html_url
stringlengths
51
51
title
stringlengths
6
280
comments
stringlengths
67
24.7k
body
stringlengths
51
36.2k
__index_level_0__
int64
1
1.17k
comment_length
int64
16
1.45k
text
stringlengths
190
38.3k
embeddings
sequence
https://github.com/huggingface/datasets/issues/5638
xPath to implement all operations for Path
`xPath` is an internal component (it doesn't have a leading underscore in the name, but it should) not meant to be used outside of `datasets`, and it's only tested on HTTP URLs, not S3.
### Feature request Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally. ### Motivation I'm using xPath to interact with remote objects. ### Your contribution I could try to make a PR. I'm a bit unfamiliar with chaining right now.
256
34
xPath to implement all operations for Path ### Feature request Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally. ### Motivation I'm using xPath to interact with remote objects. ### Your contribution I could try to make a PR. I'm a bit unfamiliar with chaining right now. `xPath` is an internal component (it doesn't have a leading underscore in the name, but it should) not meant to be used outside of `datasets`, and it's only tested on HTTP URLs, not S3.
[ -1.0096476078033447, -0.856399416923523, -0.9224860668182373, 1.4335403442382812, -0.21319352090358734, -1.237447738647461, 0.24868834018707275, -1.1852760314941406, 1.7969523668289185, -0.8976537585258484, 0.4041021764278412, -1.5997945070266724, 0.11226208508014679, -0.5927440524101257, -0.7193063497543335, -0.9022444486618042, -0.35172706842422485, -0.7115487456321716, 1.018059492111206, 2.6474719047546387, 1.059403419494629, -1.393666386604309, 2.6214919090270996, 0.7550270557403564, -0.14678646624088287, -1.008980631828308, 0.4696687161922455, -0.03351700305938721, -1.1692783832550049, -0.516681432723999, -0.9929792881011963, -0.07587087154388428, -0.6202434301376343, -0.5701647400856018, -0.09083248674869537, 0.39458754658699036, -0.29720157384872437, -0.40604907274246216, -0.5082460045814514, -0.9407622218132019, 0.3780548870563507, -0.5018349289894104, 0.9722866415977478, -0.3473954200744629, 1.838129997253418, -0.37529587745666504, 0.42522120475769043, 0.6425986886024475, 1.475706696510315, 0.1883021593093872, -0.12284103035926819, 0.23900629580020905, 0.3458304703235626, -0.05069190263748169, 0.37563690543174744, 1.0281904935836792, 0.6716790795326233, 0.6477675437927246, 0.7070134282112122, -2.1457293033599854, 1.3310327529907227, -1.1019752025604248, 0.3393402099609375, 1.2047392129898071, -0.960946798324585, 0.28954821825027466, -1.7012521028518677, -0.09630155563354492, 0.6312026977539062, -2.2600865364074707, 0.2582743167877197, -1.1717917919158936, -0.3341246247291565, 1.0399430990219116, 0.34785526990890503, -1.2945140600204468, 0.03369848430156708, -0.3090623915195465, 0.9338926672935486, 0.40694019198417664, 1.0751211643218994, -1.780593752861023, 0.06708388030529022, -0.40761598944664, 0.014315951615571976, -1.3588804006576538, -1.4798837900161743, 0.5307025909423828, 0.7012608051300049, 0.6114325523376465, -0.06921935081481934, 0.9346576929092407, -0.987727165222168, 0.6751027703285217, -0.8947267532348633, -1.761296033859253, -1.2663713693618774, -2.32962703704834, -2.3764195442199707, 0.7387086749076843, -0.3754773736000061, -0.5477640628814697, 2.052116870880127, -0.9521998167037964, -1.7356748580932617, 1.1310442686080933, 0.13608580827713013, -0.02746763452887535, 2.4980223178863525, 0.11036381125450134, -0.6625393629074097, 0.4586625397205353, -0.6884392499923706, 0.8696780800819397, -0.6119990944862366, 1.4568947553634644, 0.40876471996307373, -1.073313593864441, 1.7127915620803833, -0.3885117769241333, 0.5984916090965271, -0.6891888380050659, -0.4912261962890625, -0.8575335144996643, 0.46928757429122925, 1.8938994407653809, -0.2978954613208771, 1.5172683000564575, -0.4124036729335785, -1.61176335811615, -1.6075795888900757, 0.9120485782623291, 0.42511606216430664, -0.6490368843078613, 0.13773752748966217, -0.3399879038333893, 0.20182918012142181, 0.049832288175821304, 1.1723294258117676, 1.3267195224761963, 0.6366033554077148, -0.17617453634738922, -1.0043314695358276, 0.3609084188938141, -0.11998364329338074, -0.6602373123168945, -1.7092541456222534, -0.4138432443141937, 0.03566206991672516, 0.6307048201560974, -1.1048885583877563, 1.7479745149612427, 0.8645747303962708, 2.0326743125915527, 1.0324726104736328, -0.25680068135261536, 1.5204914808273315, 0.05340517684817314, 1.87078058719635, -0.45754891633987427, 0.7238989472389221, -0.40658655762672424, -1.1395883560180664, 0.8462764024734497, -0.3611382842063904, -1.949179768562317, -0.7324907779693604, -0.8540638089179993, -0.17096781730651855, -0.79337477684021, 0.976714015007019, -0.2971765100955963, -1.3264093399047852, 0.313264399766922, -0.8020979166030884, 0.09837664663791656, -1.2420018911361694, 0.42626383900642395, 0.7242815494537354, -0.66975337266922, 0.15833190083503723, -0.3127104640007019, -1.3229005336761475, -0.5407663583755493, 0.29973235726356506, 1.9816956520080566, -0.7885929346084595, 0.7876232862472534, 0.9739688038825989, -0.7080559134483337, -0.020975589752197266, 0.42528074979782104, -0.29915720224380493, 0.801798403263092, -1.1333796977996826, -0.3590439558029175, 1.2605935335159302, -0.2907075583934784, -0.6355248093605042, 1.3341137170791626, 0.7373000979423523, -1.06684148311615, -0.06070404872298241, -0.18487772345542908, -0.8368253707885742, 0.1354101598262787, -1.7092398405075073, -0.1038970798254013, 0.39417189359664917, -1.4832710027694702, -0.5260075330734253, -0.27660098671913147, 1.2121710777282715, -0.09617727994918823, 1.2300186157226562, -0.3175857961177826, -0.2917746901512146, -0.34127482771873474, -0.42173564434051514, 0.1514008641242981, -0.2392321527004242, -0.6294084191322327, 0.2729686200618744, -0.7408745288848877, 0.4118119776248932, 1.4321296215057373, 0.20907635986804962, -0.003830484114587307, 0.5725502371788025, 1.0948718786239624, 0.42538127303123474, -0.11682045459747314, -0.8420056104660034, -1.4707740545272827, 2.0196096897125244, -1.3792920112609863, 1.8841954469680786, 0.8135875463485718, -0.09672977030277252, -1.7099666595458984, -1.9023220539093018, 1.440587043762207, 1.1534367799758911, 2.2421727180480957, 0.6942746043205261, 0.39518922567367554, -0.8235577940940857, -0.5875872373580933, 0.33240559697151184, -1.2009503841400146, -0.8631325960159302, 0.07107187807559967, 2.3359375, 1.6577551364898682, -0.3851183354854584, -0.14088961482048035, -1.0781272649765015, 1.3604931831359863, -0.13509896397590637, 0.16805335879325867, 2.049933433532715, -0.3006463944911957, -1.1755932569503784, 1.1260066032409668, -2.2645163536071777, 0.11867961287498474, 2.0227749347686768, 0.22033186256885529, 0.106390580534935, -1.4171254634857178, -0.6943811178207397, -0.15826140344142914, -0.1857796609401703, -1.2651700973510742, 0.5386309027671814, -0.17137698829174042, -0.7476482391357422, -1.5145093202590942, 0.3686351776123047, -1.0782736539840698, -1.5644874572753906, 0.2221853882074356, 1.9153199195861816, 2.1091244220733643, -0.8447569012641907, 1.6220685243606567, -0.13619323074817657, 0.2032063752412796, 1.2352133989334106, 1.0240172147750854, 3.051769733428955, 2.034175395965576, -1.074111819267273, 0.6210631728172302, -0.08075989782810211, -0.5315115451812744, 1.2080013751983643, -1.06618332862854, 1.2618978023529053, -0.18818315863609314, -1.0640181303024292, -1.374748706817627, 0.7335996627807617, 0.4415128827095032, -0.03163005784153938, -0.39966174960136414, 1.272269368171692, 0.025503985583782196, 1.1824933290481567, 0.4802345931529999, -0.31001436710357666, 0.7113261818885803, -0.4381089210510254, -0.3840232193470001, 1.5807243585586548, 0.35075387358665466, -1.399662971496582, -2.315817356109619, -0.15704630315303802, -0.7690377831459045, 0.06308597326278687, -0.5624686479568481, -1.0176348686218262, 1.6613147258758545, 0.3058759272098541, -1.1564489603042603, -0.3951798379421234, -0.38619229197502136, -0.6471602320671082, 2.7466816902160645, -1.4882203340530396, -0.3498770296573639, -1.0078202486038208, -0.5896766185760498, 1.7624495029449463, -1.302032470703125, -0.1362793892621994, -1.0844697952270508, -0.4900679886341095, -1.2011561393737793, -0.5609843730926514, -0.047832198441028595, -0.9313285946846008, 0.8352351188659668, 0.2844510078430176, -1.213773488998413, -0.19835352897644043, -0.9174042344093323, 0.7201585173606873, -0.06884737312793732, 0.31467849016189575, 1.7756731510162354, 0.4512779116630554, -0.33611413836479187, 0.7165637612342834, 1.1002925634384155, 0.5730755925178528, -0.6079814434051514, 0.3356288969516754, -0.7223902940750122, 0.2931133508682251, -1.2207828760147095, 0.3351934552192688, -2.8201229572296143, 0.5813912749290466, -0.08506660163402557, -0.1554308980703354, -0.011833247728645802, -1.2748090028762817, 1.1106294393539429, 2.6080024242401123, -1.2583006620407104, 0.5231766104698181, 0.22607825696468353, 1.3540643453598022, -1.5842403173446655, 0.2830255627632141, -0.3642945885658264, 2.2327191829681396, 0.2232704758644104, 1.1953383684158325, -0.4806489050388336, -2.3710546493530273, 0.6608101725578308, -1.2487493753433228, -1.2504907846450806, 0.7338324785232544, -0.8377981185913086, -0.24237945675849915, -1.3453999757766724, -0.21199248731136322, -0.7654869556427002, -1.3262711763381958, 0.8180778622627258, 0.16608230769634247, 0.5843081474304199, -0.5544596910476685, 0.29855817556381226, -2.1766254901885986, -1.404932975769043, -0.27452293038368225, -1.0080467462539673, 0.2901277244091034, -0.3744853734970093, 0.6298116445541382, -0.4397868812084198, 0.037070099264383316, 0.3430810868740082, 1.4125639200210571, 3.500502347946167, 0.15942025184631348, 0.522991418838501, -0.16185081005096436, -0.9511706829071045, 1.3557076454162598, 0.9027066230773926, -0.055203069001436234, -0.5325182676315308, -1.011820912361145, 1.2249482870101929, 2.0201363563537598, 0.8940819501876831, 0.03542445972561836, -0.8375867009162903, -0.5874451994895935, -0.09868195652961731, 0.2632328271865845, 0.40375176072120667, 0.9283344149589539, 0.13805162906646729, -0.10443206131458282, 1.3701167106628418, 1.2173352241516113, -0.4930807650089264, 0.4680439829826355, -0.8042979836463928, -0.39330604672431946, 0.4755062758922577, 0.29332318902015686, 0.028055936098098755, 0.12424415349960327, -0.8654462695121765, -0.2011994570493698, -0.394577294588089, -0.9804837703704834, -0.854083240032196, -0.44786056876182556, -0.2972293198108673, 1.7525917291641235, 0.10316385328769684, -0.6116831302642822, -0.039089515805244446, -0.7550334334373474, 0.006487162783741951, -0.9517598748207092, 0.15174812078475952, -0.1947595328092575, -0.2800711989402771, -0.020372260361909866, 1.8339077234268188, -1.0841574668884277, -2.1239912509918213, 0.25206220149993896, 0.28684747219085693, -0.3156474828720093, 0.2530924081802368, 1.5135389566421509, 0.5127535462379456, 1.5246915817260742, 1.3807135820388794, 1.0172030925750732, -0.7867193222045898, -1.390287160873413, 0.6656936407089233, 0.9478821158409119, -1.4114948511123657, 0.69732266664505, 0.11355865001678467, -0.3876529633998871, 0.6124036908149719, 1.1795215606689453, 0.584575355052948, -1.9411262273788452, 0.7398988008499146, -1.008931279182434, 0.7352169752120972, 0.6884402632713318, 0.6852499842643738, 0.26658114790916443, 0.6744067072868347, -1.0963637828826904, -1.1443454027175903, -0.7370090484619141, -0.6828542947769165, 1.9591461420059204, -0.30458933115005493, 0.686896562576294, -0.013545761816203594, -1.3835505247116089, -0.14960549771785736, 0.7227069735527039, 0.4337979555130005, -0.45815736055374146, 0.700817346572876, -0.6964514851570129, -1.0407078266143799, -1.5153212547302246, -0.5188932418823242, -1.0687295198440552, -1.067527413368225, 1.0006717443466187, 0.7638859748840332, 0.26176369190216064, 1.8795087337493896, 0.6618185043334961, 0.3100323975086212, -2.602113723754883, 0.8934115171432495, 0.5016286969184875, 0.01631373167037964, 0.8670057654380798, 0.43634849786758423, 0.9678943157196045, -0.05221882835030556, 0.5519977807998657, -2.3174147605895996, 2.4166088104248047, -0.3052368760108948, 0.6708962917327881, 0.02167048677802086, -0.1640574187040329, 1.0634994506835938, 0.42270833253860474, 0.594343364238739, -1.0954233407974243, 0.6335945725440979, -0.6962065100669861, 1.3248083591461182, 0.9373317956924438, -0.7698416709899902, 0.004531293176114559, 1.3037517070770264, 0.49590152502059937, -0.5467740297317505, -0.9112933874130249, -0.9789267778396606, 0.8634030818939209, 1.7832496166229248, -0.10866524279117584, -0.04828891158103943, 0.8451164364814758, 0.5685353875160217, -1.2624382972717285, -0.035454899072647095, -0.7932672500610352, -0.8401958346366882, 1.599450945854187, 1.966432809829712, -0.16663648188114166, -0.3351622521877289, -0.8861835598945618, -1.185827374458313, 0.7989518046379089, 0.012498635798692703, -0.05918579921126366, 0.6669865250587463, -0.601638913154602, 1.1419764757156372, 1.0231609344482422, 0.9330328106880188, 0.18744315207004547, 0.29831093549728394, 0.4950816035270691, -0.4253526031970978, -1.0884957313537598, -0.2833799421787262, -1.1805347204208374, -2.65208101272583, 0.4580383896827698, -0.351422518491745, -1.4180203676223755, -0.10531312227249146, -1.0475541353225708, 1.0163402557373047, -0.46045318245887756, -0.9855015277862549, -1.592086672782898, 0.10564276576042175, -0.09259083867073059, 0.883141815662384, -1.5831353664398193, -0.057039737701416016, 1.226265549659729, 1.0156900882720947, -0.8097402453422546, 1.0147470235824585, 0.21756860613822937, 1.191933274269104, 0.8648243546485901, -0.3686343729496002, 0.5401982665061951, -0.010153885930776596, -1.248809814453125, 0.5374961495399475, 1.1423137187957764, 0.12628373503684998, 1.4103909730911255, -0.6490498781204224, -0.02310835011303425, 0.33305859565734863, -0.39672333002090454, -0.45970118045806885, -0.5878318548202515, 0.8408426642417908, 0.09977254271507263, -0.7501888871192932, 0.10592298209667206, -0.05748714134097099, -0.1612015962600708, 0.16865533590316772, -1.6499725580215454, -0.2582438290119171, -0.2912884056568146, -0.5337368845939636, -1.182953953742981, -0.07913386821746826, 1.3821618556976318, -0.6383160948753357, -0.2820799648761749, 0.5423304438591003, 0.48822900652885437, 0.4358093738555908, 0.5416310429573059, -0.5898590683937073, -0.4495747685432434, -0.14235985279083252, -0.3194819688796997, 0.48683544993400574, 1.4455045461654663, -0.0843474417924881, -0.9871070384979248, 0.7901139855384827, -0.3366043269634247, 0.03640603646636009, 1.83101487159729, 0.1653609424829483, -1.0502684116363525, 0.1446724534034729, -0.6901068091392517, 2.0100183486938477, 1.6907879114151, 1.2552896738052368, 0.005218977108597755, -0.9382315874099731, 0.8100045323371887, -0.24565309286117554, -0.38627228140830994, 0.8839741349220276, 0.46394243836402893, -0.16494853794574738, -1.411937952041626, 0.609874427318573, 1.1999459266662598, -0.7440776824951172, -1.0164780616760254, -0.02415350079536438, -0.7639105319976807, 1.0159928798675537, 0.7605624794960022, 0.4641031324863434, 0.1696961373090744, 1.722402572631836, 0.8025515079498291, -0.4744247496128082, 0.5363418459892273, 0.4106917977333069, -0.12228511273860931, -2.1495978832244873, -1.1737279891967773, 0.3722229301929474, -0.40712571144104004, -1.5271680355072021, 1.3447773456573486, -1.2125458717346191, -0.8362486958503723, 0.6060077548027039, 0.1146405041217804, 1.5008591413497925, 0.34689241647720337, 1.5221084356307983, 1.9778807163238525, 0.8627397418022156, 0.3486163318157196, 1.3543479442596436, -0.3163946270942688, -0.49117377400398254, 1.736140489578247, -0.5136737823486328, 0.4970524311065674, 1.1127105951309204, -0.30295419692993164, -0.9588916897773743, -0.7158779501914978, -1.1968451738357544, -0.6033135652542114, 1.0130823850631714, 0.11540824174880981, -1.168949842453003, 0.34867554903030396, 1.5735440254211426, 0.03254000097513199, -0.34061408042907715, 0.486535906791687, 0.48405054211616516, -0.8762980103492737, 0.00035374704748392105, -0.8651658296585083, 0.553503155708313, -0.24602004885673523, -0.4271796643733978, 0.48576900362968445, 0.38462886214256287, 1.2976458072662354, -0.17208610475063324, 0.17421120405197144, 1.1307358741760254, -1.4967325925827026, 1.4009674787521362, -0.6287199258804321, 0.20998121798038483, -2.2532248497009277, 1.4121441841125488, -0.6595184206962585, 1.8898122310638428, -2.739501714706421, 0.39710181951522827, -0.5789917707443237, -0.35472142696380615, 0.30952614545822144, -0.28575435280799866, 0.20412065088748932, -0.12211942672729492, -1.1497111320495605, -0.09639200568199158, -0.6520204544067383, 0.5394311547279358, 1.184767723083496, 1.171422004699707, -0.8730717301368713, -0.188689723610878, -1.7679903507232666, -0.13531494140625, -0.6163180470466614, 0.2870037257671356, -2.039837121963501, -0.3536189794540405, -1.9041507244110107, -2.2906014919281006, -1.308249831199646, -0.6606037020683289, 1.045265555381775, 0.11850324273109436, -0.8361222147941589, 1.201657772064209, -0.22542648017406464, -1.7914108037948608, 1.0856925249099731, -2.1823489665985107 ]
https://github.com/huggingface/datasets/issues/5638
xPath to implement all operations for Path
Okay I understand that xPath won't support my usecase. What I was perhaps getting to is why not use UPath in `datasets` instead of `xPath` if UPath seems to have strictly more robust implementations.
### Feature request Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally. ### Motivation I'm using xPath to interact with remote objects. ### Your contribution I could try to make a PR. I'm a bit unfamiliar with chaining right now.
256
34
xPath to implement all operations for Path ### Feature request Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally. ### Motivation I'm using xPath to interact with remote objects. ### Your contribution I could try to make a PR. I'm a bit unfamiliar with chaining right now. Okay I understand that xPath won't support my usecase. What I was perhaps getting to is why not use UPath in `datasets` instead of `xPath` if UPath seems to have strictly more robust implementations.
[ -0.9839048385620117, -0.7708210945129395, -0.9500556588172913, 1.4291080236434937, -0.1828235238790512, -1.2047094106674194, 0.25649920105934143, -1.209984540939331, 1.7841482162475586, -0.8390918970108032, 0.42940062284469604, -1.5716805458068848, 0.1252724677324295, -0.5470800399780273, -0.696068525314331, -0.9095451831817627, -0.3662724792957306, -0.6588442325592041, 1.0248104333877563, 2.6574597358703613, 1.0581202507019043, -1.3582305908203125, 2.5919134616851807, 0.7603398561477661, -0.18133950233459473, -1.1004810333251953, 0.5320229530334473, 0.012332126498222351, -1.1304513216018677, -0.49896860122680664, -0.9119824171066284, -0.054331280291080475, -0.592475175857544, -0.6288681030273438, -0.11166466772556305, 0.3758895993232727, -0.2646970748901367, -0.4726305603981018, -0.463592529296875, -0.8551917672157288, 0.35543692111968994, -0.4752269685268402, 0.9496417045593262, -0.3529745042324066, 1.843326210975647, -0.4399038553237915, 0.49563905596733093, 0.6864030957221985, 1.520132303237915, 0.21524392068386078, -0.13689768314361572, 0.27071842551231384, 0.40476053953170776, -0.06928583234548569, 0.32069459557533264, 1.0073580741882324, 0.6847469806671143, 0.6402795314788818, 0.7201838493347168, -2.075110673904419, 1.2507437467575073, -1.100360631942749, 0.2910017669200897, 1.2072776556015015, -1.0028080940246582, 0.24786606431007385, -1.712739109992981, -0.0496717169880867, 0.5998834371566772, -2.2159500122070312, 0.23591995239257812, -1.1238371133804321, -0.3950350284576416, 1.056074619293213, 0.329268217086792, -1.3709830045700073, 0.07478515803813934, -0.27668100595474243, 0.9080692529678345, 0.4247230589389801, 1.133164405822754, -1.6618900299072266, 0.0574629008769989, -0.44407546520233154, 0.00270707905292511, -1.335631012916565, -1.441899061203003, 0.5318745374679565, 0.645291268825531, 0.5575379729270935, -0.05304785072803497, 0.9021392464637756, -0.9495553374290466, 0.7106676697731018, -0.8364826440811157, -1.8249307870864868, -1.2911756038665771, -2.3194525241851807, -2.3207321166992188, 0.7687466740608215, -0.33202263712882996, -0.585436224937439, 2.0411534309387207, -0.9738439321517944, -1.7365063428878784, 1.1019445657730103, 0.12208757549524307, -0.004763181321322918, 2.4959957599639893, 0.08881984651088715, -0.6683821678161621, 0.4097846448421478, -0.6997642517089844, 0.8420138955116272, -0.637299120426178, 1.4675692319869995, 0.37259283661842346, -1.0761406421661377, 1.7500215768814087, -0.3406320810317993, 0.7286315560340881, -0.6718060374259949, -0.4661661684513092, -0.8968756794929504, 0.4194498360157013, 1.974856972694397, -0.2876698672771454, 1.5881543159484863, -0.4683380126953125, -1.571388840675354, -1.5807543992996216, 0.9610034823417664, 0.38350722193717957, -0.6199647784233093, 0.20129169523715973, -0.3147627115249634, 0.15471702814102173, 0.01321965642273426, 1.0929523706436157, 1.3571538925170898, 0.6466088891029358, -0.19196383655071259, -1.0181511640548706, 0.33281344175338745, -0.11032651364803314, -0.6113706827163696, -1.7290189266204834, -0.40778037905693054, 0.06807833164930344, 0.6518486142158508, -1.0832785367965698, 1.7521570920944214, 0.8467049598693848, 1.999873399734497, 1.0594366788864136, -0.3030441105365753, 1.4684115648269653, 0.04016493260860443, 1.8593999147415161, -0.4332841634750366, 0.6988962888717651, -0.3477575182914734, -1.1446990966796875, 0.7793275713920593, -0.3376756012439728, -1.9835126399993896, -0.7218148112297058, -0.8752605319023132, -0.12465870380401611, -0.7747877240180969, 0.9973801970481873, -0.2873794138431549, -1.3060070276260376, 0.268133282661438, -0.8026928901672363, 0.06986868381500244, -1.326514720916748, 0.48149046301841736, 0.7383979558944702, -0.6081990003585815, 0.21198825538158417, -0.3484911620616913, -1.2982633113861084, -0.5736696124076843, 0.32312139868736267, 1.934427261352539, -0.8155757784843445, 0.8297308087348938, 0.9670306444168091, -0.689959704875946, -0.058508068323135376, 0.4800058901309967, -0.31497904658317566, 0.8926701545715332, -1.0393882989883423, -0.36495593190193176, 1.2223529815673828, -0.3273492455482483, -0.6574447154998779, 1.3576617240905762, 0.7624617218971252, -0.98918616771698, -0.09041431546211243, -0.2191188782453537, -0.8035643100738525, 0.10339491814374924, -1.7873291969299316, -0.13028940558433533, 0.34557005763053894, -1.5143263339996338, -0.5558557510375977, -0.22153936326503754, 1.2156320810317993, -0.09536658972501755, 1.259521245956421, -0.2557646334171295, -0.31748926639556885, -0.33034998178482056, -0.4483204483985901, 0.11749107390642166, -0.20647840201854706, -0.7006244659423828, 0.346657931804657, -0.7094157338142395, 0.4414231479167938, 1.3229132890701294, 0.19003050029277802, -0.025044787675142288, 0.549232542514801, 1.1061640977859497, 0.39127346873283386, -0.20655769109725952, -0.8629395365715027, -1.4747869968414307, 2.0404486656188965, -1.285457730293274, 1.8892195224761963, 0.8383067846298218, -0.12570060789585114, -1.6666038036346436, -1.872186303138733, 1.5302823781967163, 1.2223535776138306, 2.2485337257385254, 0.7906580567359924, 0.3595912754535675, -0.7940008640289307, -0.6113530993461609, 0.2844082713127136, -1.254801630973816, -0.8494248390197754, 0.021158097311854362, 2.348665237426758, 1.665436029434204, -0.43198540806770325, -0.15763363242149353, -1.1287212371826172, 1.3152995109558105, -0.1287926584482193, 0.2083016186952591, 2.0595245361328125, -0.3802785575389862, -1.130053997039795, 1.046738862991333, -2.262162446975708, 0.10106335580348969, 2.0257794857025146, 0.20247867703437805, 0.13272924721240997, -1.4239845275878906, -0.6599253416061401, -0.16425465047359467, -0.26168322563171387, -1.1983115673065186, 0.5727792978286743, -0.1543995887041092, -0.746567964553833, -1.3991247415542603, 0.3017009496688843, -1.140905737876892, -1.561466932296753, 0.24115586280822754, 1.8861699104309082, 2.037883996963501, -0.8196797966957092, 1.6164171695709229, -0.16311535239219666, 0.14088675379753113, 1.2472072839736938, 1.1138689517974854, 3.083958625793457, 2.091329336166382, -1.0810009241104126, 0.6691555380821228, -0.08601941168308258, -0.5935705304145813, 1.1720963716506958, -1.044471025466919, 1.2475372552871704, -0.149931401014328, -1.03184175491333, -1.3685446977615356, 0.6991097927093506, 0.40710926055908203, -0.020124472677707672, -0.42021939158439636, 1.1705002784729004, 0.09859029203653336, 1.2069838047027588, 0.47820165753364563, -0.29980501532554626, 0.7321928143501282, -0.42162764072418213, -0.32683101296424866, 1.5403295755386353, 0.3448246419429779, -1.3549422025680542, -2.390285015106201, -0.18167555332183838, -0.7578636407852173, 0.008403170853853226, -0.5477705597877502, -1.047303318977356, 1.595731258392334, 0.277149498462677, -1.143556833267212, -0.3736277222633362, -0.40168341994285583, -0.6893777251243591, 2.7145628929138184, -1.5043083429336548, -0.4019332826137543, -1.0274258852005005, -0.6668593883514404, 1.7543466091156006, -1.2857873439788818, -0.12478592991828918, -1.108210802078247, -0.48608168959617615, -1.2513490915298462, -0.6355473399162292, 0.020305640995502472, -0.9414977431297302, 0.8522059917449951, 0.30152150988578796, -1.1788610219955444, -0.14467579126358032, -0.8803876042366028, 0.7021764516830444, -0.10637090355157852, 0.32186365127563477, 1.725870966911316, 0.527088463306427, -0.3076047897338867, 0.6309368014335632, 1.1090763807296753, 0.5538536310195923, -0.6146053671836853, 0.3795906901359558, -0.7876135110855103, 0.24796858429908752, -1.214730978012085, 0.3616831302642822, -2.7605671882629395, 0.5681086182594299, -0.09088871628046036, -0.09181801974773407, 0.014278190210461617, -1.2836390733718872, 1.1438349485397339, 2.6612064838409424, -1.2509890794754028, 0.5659504532814026, 0.19845081865787506, 1.3521064519882202, -1.530730128288269, 0.2739136219024658, -0.3979620337486267, 2.2044007778167725, 0.26555556058883667, 1.2146522998809814, -0.46178269386291504, -2.340306520462036, 0.6314358711242676, -1.233771562576294, -1.3207772970199585, 0.7259301543235779, -0.8307119011878967, -0.20599713921546936, -1.333512544631958, -0.1585386097431183, -0.8298571705818176, -1.2468619346618652, 0.776707649230957, 0.2162991166114807, 0.5715188384056091, -0.6306720972061157, 0.3075971305370331, -2.2034075260162354, -1.380487084388733, -0.29311347007751465, -1.0035369396209717, 0.24197882413864136, -0.34222280979156494, 0.56562739610672, -0.3698337972164154, 0.037087418138980865, 0.2994125187397003, 1.3905246257781982, 3.489964723587036, 0.1522870659828186, 0.5238569378852844, -0.15712594985961914, -0.9614984393119812, 1.509042739868164, 0.9089993834495544, -0.03726751357316971, -0.5744912624359131, -0.9837218523025513, 1.177634358406067, 2.0171618461608887, 0.9472248554229736, 0.05022086203098297, -0.8792212009429932, -0.5880991220474243, -0.0963519737124443, 0.26178938150405884, 0.3521007299423218, 0.989868700504303, 0.14093264937400818, -0.03336271643638611, 1.2936612367630005, 1.2838842868804932, -0.5728007555007935, 0.46595314145088196, -0.8900587558746338, -0.42354992032051086, 0.4142390787601471, 0.31476446986198425, 0.06737871468067169, 0.09995993971824646, -0.8575689792633057, -0.18238574266433716, -0.36084383726119995, -1.0193320512771606, -0.9075444936752319, -0.3989560008049011, -0.24029648303985596, 1.7482717037200928, 0.07286769896745682, -0.6218755841255188, -0.1230345368385315, -0.7948315143585205, 0.06811380386352539, -0.9655211567878723, 0.10359230637550354, -0.1881425827741623, -0.2158937156200409, -0.019968420267105103, 1.8773753643035889, -1.1319847106933594, -2.0954110622406006, 0.2763840854167938, 0.28403112292289734, -0.36930692195892334, 0.27774208784103394, 1.484663486480713, 0.5366620421409607, 1.5326628684997559, 1.4415993690490723, 1.0696567296981812, -0.8334298729896545, -1.3773692846298218, 0.6677954792976379, 0.9198594689369202, -1.3386708498001099, 0.6948840022087097, 0.19493497908115387, -0.3606172204017639, 0.5324270725250244, 1.166071891784668, 0.6039236187934875, -1.9765440225601196, 0.7296707630157471, -0.9340174794197083, 0.7455391883850098, 0.684100866317749, 0.7138153910636902, 0.31784138083457947, 0.6677435636520386, -1.1670284271240234, -1.081120491027832, -0.8372917771339417, -0.669026792049408, 1.9862329959869385, -0.33050569891929626, 0.6647298336029053, -0.0442686453461647, -1.3877063989639282, -0.19765201210975647, 0.7418572902679443, 0.45041027665138245, -0.48350387811660767, 0.6714564561843872, -0.620090126991272, -1.0903475284576416, -1.5579497814178467, -0.5000216960906982, -0.9819074869155884, -1.0421583652496338, 1.042569637298584, 0.7968068718910217, 0.24747687578201294, 1.85124671459198, 0.6370473504066467, 0.3109273314476013, -2.607231616973877, 0.9384084939956665, 0.4563794434070587, -0.003301515243947506, 0.8260994553565979, 0.4159605801105499, 0.9714555740356445, -0.059812672436237335, 0.55657958984375, -2.3391408920288086, 2.4302144050598145, -0.2238609492778778, 0.6826217174530029, 0.04319566488265991, -0.16153115034103394, 1.1015284061431885, 0.4551389813423157, 0.6783837080001831, -1.1114938259124756, 0.6786538362503052, -0.7196934223175049, 1.3697410821914673, 0.9174025654792786, -0.7070675492286682, 0.01684209518134594, 1.3440927267074585, 0.4941607415676117, -0.4793068468570709, -0.9426127076148987, -0.8941568732261658, 0.8536776900291443, 1.792378306388855, -0.11812338978052139, -0.031005142256617546, 0.8201374411582947, 0.5883912444114685, -1.3273557424545288, -0.041499651968479156, -0.754672110080719, -0.8144841194152832, 1.650200605392456, 1.995906114578247, -0.18541836738586426, -0.39747628569602966, -0.9702431559562683, -1.186269998550415, 0.8085965514183044, 0.046904854476451874, -0.027012644335627556, 0.6779302358627319, -0.6054560542106628, 1.245659351348877, 1.064676284790039, 0.9775893688201904, 0.18804670870304108, 0.2655242681503296, 0.4484994411468506, -0.3568703532218933, -1.0276204347610474, -0.2524375915527344, -1.16085946559906, -2.6314587593078613, 0.4921209514141083, -0.36044231057167053, -1.3936489820480347, -0.10973673313856125, -1.0761146545410156, 0.9962674975395203, -0.486255019903183, -0.9382110834121704, -1.6374253034591675, 0.0703481063246727, -0.11215371638536453, 0.8595668077468872, -1.6066113710403442, -0.029957696795463562, 1.211746335029602, 1.003618836402893, -0.7510985136032104, 1.0379951000213623, 0.1730073243379593, 1.1530886888504028, 0.8694621920585632, -0.34330514073371887, 0.49301984906196594, -0.023937175050377846, -1.2240310907363892, 0.516874372959137, 1.1190185546875, 0.15522877871990204, 1.410819411277771, -0.6576612591743469, -0.02343587577342987, 0.3731786906719208, -0.3281881511211395, -0.5275289416313171, -0.6246464252471924, 0.8190698027610779, 0.14731566607952118, -0.8111761808395386, 0.12451838701963425, -0.03987862914800644, -0.15624357759952545, 0.17945286631584167, -1.6400161981582642, -0.25075677037239075, -0.28427401185035706, -0.599208414554596, -1.1672581434249878, -0.03130735456943512, 1.3933651447296143, -0.6109148263931274, -0.2993144392967224, 0.5074721574783325, 0.5156848430633545, 0.3699202239513397, 0.5380572080612183, -0.5795459747314453, -0.47765249013900757, -0.18789713084697723, -0.32822760939598083, 0.4642091393470764, 1.4332685470581055, -0.12218368798494339, -1.03395676612854, 0.7282442450523376, -0.3457745909690857, -0.06587326526641846, 1.909139633178711, 0.18547764420509338, -1.0266034603118896, 0.10970799624919891, -0.6696672439575195, 2.0031540393829346, 1.6462889909744263, 1.3310896158218384, -0.0459275096654892, -0.9888289570808411, 0.7286376953125, -0.21420861780643463, -0.3585616648197174, 0.9090316295623779, 0.4947147071361542, -0.1497040092945099, -1.3817622661590576, 0.5647057890892029, 1.2937356233596802, -0.819503903388977, -0.9455522298812866, 0.005150665529072285, -0.8877435326576233, 1.011192798614502, 0.7390946745872498, 0.4494209289550781, 0.15808117389678955, 1.6214169263839722, 0.7545143961906433, -0.47566986083984375, 0.533982515335083, 0.3591206967830658, -0.18739919364452362, -2.1044085025787354, -1.1759942770004272, 0.3474251329898834, -0.4400097727775574, -1.5819751024246216, 1.3954746723175049, -1.2725759744644165, -0.7801828384399414, 0.5663149356842041, 0.1523977667093277, 1.545864224433899, 0.3242065906524658, 1.5547826290130615, 1.9391037225723267, 0.8562923073768616, 0.356369286775589, 1.3250519037246704, -0.31242403388023376, -0.5347194075584412, 1.7161540985107422, -0.5323031544685364, 0.44727402925491333, 1.1621394157409668, -0.23647791147232056, -1.0116833448410034, -0.7739675045013428, -1.2334493398666382, -0.5920490622520447, 1.10200035572052, 0.08206441253423691, -1.1725819110870361, 0.32242801785469055, 1.5941643714904785, 0.02455996908247471, -0.3293275237083435, 0.47927287220954895, 0.460686057806015, -0.8844242095947266, 0.049160487949848175, -0.9499393701553345, 0.575768768787384, -0.18167971074581146, -0.44441574811935425, 0.4345238506793976, 0.33685848116874695, 1.2418156862258911, -0.1719619482755661, 0.20600152015686035, 1.1854274272918701, -1.5647773742675781, 1.4974968433380127, -0.678636908531189, 0.20463964343070984, -2.290748119354248, 1.4322038888931274, -0.6440143585205078, 1.8599871397018433, -2.688448905944824, 0.30309343338012695, -0.6548189520835876, -0.2998979985713959, 0.32384002208709717, -0.2935064435005188, 0.14138108491897583, -0.11582978814840317, -1.188449501991272, -0.08990440517663956, -0.7207353115081787, 0.5085161328315735, 1.186861276626587, 1.1115235090255737, -0.8277392983436584, -0.19219818711280823, -1.7532974481582642, -0.14808136224746704, -0.5916274189949036, 0.35554787516593933, -2.0283989906311035, -0.3423472046852112, -1.8912466764450073, -2.2916455268859863, -1.2784124612808228, -0.7130700349807739, 1.0052205324172974, 0.10684115439653397, -0.7906996011734009, 1.1130176782608032, -0.2495584934949875, -1.8179904222488403, 1.087350606918335, -2.194033145904541 ]
https://github.com/huggingface/datasets/issues/5638
xPath to implement all operations for Path
It seems like `universal_pathlib` does not support `fsspec` URL chaining (`::` is the chaining symbol) and "compression" filesystems (e.g., `zip`), but this is what we need to access and stream files from within an archive (e.g., we want to stream URLs such as this one: `zip://data.parquet::https://www.dummyurl.com/archive.zip`)
### Feature request Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally. ### Motivation I'm using xPath to interact with remote objects. ### Your contribution I could try to make a PR. I'm a bit unfamiliar with chaining right now.
256
46
xPath to implement all operations for Path ### Feature request Current xPath implementation is a great extension of Path in order to work with remote objects. However some methods such as `mkdir` are not implemented correctly. It should instead rely on `fsspec` methods, instead of defaulting do `Path` methods which only work locally. ### Motivation I'm using xPath to interact with remote objects. ### Your contribution I could try to make a PR. I'm a bit unfamiliar with chaining right now. It seems like `universal_pathlib` does not support `fsspec` URL chaining (`::` is the chaining symbol) and "compression" filesystems (e.g., `zip`), but this is what we need to access and stream files from within an archive (e.g., we want to stream URLs such as this one: `zip://data.parquet::https://www.dummyurl.com/archive.zip`)
[ -1.021508812904358, -0.8691565990447998, -0.8554427623748779, 1.4810752868652344, -0.1754007488489151, -1.2783641815185547, 0.23315665125846863, -1.144027590751648, 1.7115973234176636, -0.8197272419929504, 0.4234815835952759, -1.6065181493759155, 0.13080665469169617, -0.6197822690010071, -0.78774493932724, -0.8840623497962952, -0.38270172476768494, -0.7126131653785706, 0.9205230474472046, 2.634181499481201, 1.165770173072815, -1.3633447885513306, 2.522139072418213, 0.7649353742599487, -0.1538057178258896, -1.081540584564209, 0.48881494998931885, -0.01589253358542919, -1.1918867826461792, -0.45307981967926025, -0.9828987121582031, -0.17409132421016693, -0.5901600122451782, -0.670978844165802, -0.06128065288066864, 0.4040696322917938, -0.33555078506469727, -0.443449467420578, -0.5554906129837036, -0.9342193603515625, 0.42506784200668335, -0.5021026134490967, 1.0250762701034546, -0.3433768153190613, 1.794428825378418, -0.5565485954284668, 0.5161176323890686, 0.7307061553001404, 1.4307332038879395, 0.15340223908424377, -0.10041521489620209, 0.25653183460235596, 0.407166987657547, 0.09448876231908798, 0.3968774676322937, 1.0315217971801758, 0.7537899017333984, 0.5337199568748474, 0.7089266180992126, -2.1497280597686768, 1.262096881866455, -1.1102430820465088, 0.25426462292671204, 1.1461107730865479, -0.9727093577384949, 0.20580977201461792, -1.768757700920105, -0.0744844377040863, 0.5871622562408447, -2.200326442718506, 0.23768742382526398, -1.2599666118621826, -0.4096938371658325, 1.0574698448181152, 0.379315048456192, -1.2439087629318237, 0.01680630072951317, -0.35279443860054016, 0.8547398447990417, 0.5018140077590942, 1.0755298137664795, -1.731006145477295, -0.0029286909848451614, -0.3980182707309723, 0.04190543293952942, -1.2710031270980835, -1.4084161520004272, 0.4681476354598999, 0.740105152130127, 0.5025827288627625, -0.08608733117580414, 0.9520914554595947, -0.9408251047134399, 0.7863010764122009, -0.9486759901046753, -1.8243073225021362, -1.3657708168029785, -2.308384895324707, -2.298936367034912, 0.7043931484222412, -0.44526031613349915, -0.48055604100227356, 2.074608325958252, -0.9376691579818726, -1.7605623006820679, 1.1057744026184082, 0.10082788020372391, -0.004136206582188606, 2.3762567043304443, 0.1088498905301094, -0.6509906053543091, 0.41134774684906006, -0.7400197982788086, 0.7964297533035278, -0.5330777764320374, 1.4702749252319336, 0.4366191625595093, -1.0670915842056274, 1.7216864824295044, -0.42327505350112915, 0.5760008692741394, -0.6704477667808533, -0.43009763956069946, -0.733980655670166, 0.44779103994369507, 1.904170036315918, -0.3537029027938843, 1.4981470108032227, -0.42690879106521606, -1.589991807937622, -1.5179970264434814, 0.8869102597236633, 0.4675191044807434, -0.6702494025230408, 0.15627680718898773, -0.32759255170822144, 0.16104204952716827, -0.015876080840826035, 1.1281335353851318, 1.2954365015029907, 0.6803343892097473, -0.310685396194458, -0.975106954574585, 0.3403472900390625, -0.0255693718791008, -0.7569732069969177, -1.6793668270111084, -0.39945852756500244, 0.07724741101264954, 0.657446026802063, -1.1519943475723267, 1.8040064573287964, 0.7841628193855286, 1.9814977645874023, 0.9999305605888367, -0.2949639856815338, 1.4603220224380493, 0.05255412682890892, 1.9845384359359741, -0.5348160862922668, 0.6994734406471252, -0.35170844197273254, -1.1385562419891357, 0.8770401477813721, -0.3211514353752136, -2.0335073471069336, -0.7630031704902649, -0.882963240146637, -0.16663463413715363, -0.7739599347114563, 0.9364030957221985, -0.29584214091300964, -1.3399358987808228, 0.2573477625846863, -0.8510679006576538, 0.05207617208361626, -1.2559635639190674, 0.33509325981140137, 0.724044680595398, -0.6479597091674805, 0.17688454687595367, -0.35757389664649963, -1.2455594539642334, -0.5284253358840942, 0.3043564260005951, 1.9613583087921143, -0.803320586681366, 0.8781355619430542, 1.0101367235183716, -0.6894333362579346, 0.04303192347288132, 0.49202585220336914, -0.2946200668811798, 0.8531212210655212, -1.1040198802947998, -0.36203429102897644, 1.2427173852920532, -0.22105905413627625, -0.7135514616966248, 1.4295485019683838, 0.7266953587532043, -0.9482706785202026, -0.15299314260482788, -0.14984828233718872, -0.77774977684021, 0.12829750776290894, -1.7311956882476807, -0.06933185458183289, 0.3913329839706421, -1.5341997146606445, -0.513384222984314, -0.26767420768737793, 1.2497321367263794, -0.10286889225244522, 1.3429747819900513, -0.3242452144622803, -0.30582940578460693, -0.35501229763031006, -0.3859950304031372, 0.1710185557603836, -0.2769705653190613, -0.6402244567871094, 0.32923921942710876, -0.7641711831092834, 0.4084514379501343, 1.4047881364822388, 0.21096986532211304, 0.016586914658546448, 0.5404557585716248, 1.0778145790100098, 0.35801103711128235, -0.11187240481376648, -0.9101598858833313, -1.4959757328033447, 2.052602529525757, -1.3865423202514648, 1.909861445426941, 0.7627602219581604, -0.006634809076786041, -1.7145270109176636, -1.9030653238296509, 1.4042950868606567, 1.1327379941940308, 2.249903440475464, 0.6633113622665405, 0.3079870939254761, -0.8323072791099548, -0.5383685827255249, 0.3421078026294708, -1.207885503768921, -0.8419569134712219, 0.0643310397863388, 2.4226253032684326, 1.654057502746582, -0.39102569222450256, -0.2486257553100586, -1.13429594039917, 1.3410365581512451, -0.10410666465759277, 0.18446318805217743, 2.066019058227539, -0.28771719336509705, -1.0930683612823486, 1.211999773979187, -2.2881298065185547, 0.20505975186824799, 2.0013694763183594, 0.31648510694503784, 0.130154088139534, -1.4505194425582886, -0.6495946049690247, -0.17468257248401642, -0.29348024725914, -1.1237132549285889, 0.5705335736274719, -0.2044827938079834, -0.7579910755157471, -1.4429678916931152, 0.2568976581096649, -1.084002137184143, -1.7246315479278564, 0.26207470893859863, 1.8375076055526733, 1.9488964080810547, -0.7751150727272034, 1.6150672435760498, -0.2648915946483612, 0.1669900268316269, 1.3557990789413452, 1.1530177593231201, 3.1167023181915283, 2.0251758098602295, -1.1948838233947754, 0.7112499475479126, -0.11889568716287613, -0.40464282035827637, 1.207411766052246, -1.115431547164917, 1.1406614780426025, -0.18923938274383545, -1.0946444272994995, -1.2672922611236572, 0.8745700716972351, 0.39002665877342224, -0.0026029651053249836, -0.45764315128326416, 1.1726552248001099, 0.1389194279909134, 1.228676438331604, 0.5440040230751038, -0.30415046215057373, 0.7309054732322693, -0.3179716169834137, -0.3261171877384186, 1.5231373310089111, 0.3129035234451294, -1.3257322311401367, -2.3134303092956543, -0.14070145785808563, -0.824205756187439, 0.05348125100135803, -0.5035933256149292, -1.0274981260299683, 1.7748093605041504, 0.3007136583328247, -1.3114700317382812, -0.2747200131416321, -0.37896519899368286, -0.6107604503631592, 2.7628045082092285, -1.5192766189575195, -0.31690362095832825, -1.0815352201461792, -0.6202595829963684, 1.7363771200180054, -1.3061785697937012, -0.2067120224237442, -1.0486584901809692, -0.46953579783439636, -1.2303270101547241, -0.6480197310447693, -0.018006831407546997, -0.9361227750778198, 0.8308218121528625, 0.22129027545452118, -1.2735449075698853, -0.3047023415565491, -0.8420908451080322, 0.8116775155067444, -0.04443499818444252, 0.33322855830192566, 1.8490076065063477, 0.5161178112030029, -0.31678706407546997, 0.6706622242927551, 1.0595221519470215, 0.641445517539978, -0.5871086120605469, 0.43510571122169495, -0.6709864735603333, 0.23684096336364746, -1.2571913003921509, 0.3239568769931793, -2.71693754196167, 0.5928435921669006, -0.07931223511695862, -0.12198276072740555, -0.02039271593093872, -1.3243486881256104, 1.1057300567626953, 2.6443169116973877, -1.2217785120010376, 0.47969743609428406, 0.2632109522819519, 1.2297322750091553, -1.5225701332092285, 0.38177239894866943, -0.3252507448196411, 2.2002763748168945, 0.29673275351524353, 1.2448382377624512, -0.4379580318927765, -2.3184401988983154, 0.6907283663749695, -1.2113686800003052, -1.2544077634811401, 0.74103844165802, -0.7234234809875488, -0.1253371387720108, -1.3386800289154053, -0.15028485655784607, -0.7774524688720703, -1.3118748664855957, 0.7958877086639404, 0.1421554833650589, 0.47017234563827515, -0.6154484152793884, 0.3109901249408722, -2.0993382930755615, -1.3305716514587402, -0.2897670567035675, -0.9022234678268433, 0.3011692762374878, -0.29539188742637634, 0.6358930468559265, -0.3128960132598877, -0.026279259473085403, 0.3189985454082489, 1.3968591690063477, 3.5021369457244873, 0.23207829892635345, 0.4413858950138092, -0.15304842591285706, -0.9745643734931946, 1.4432188272476196, 0.8688724040985107, -0.07050462067127228, -0.5562098622322083, -1.032719612121582, 1.1735923290252686, 2.018543004989624, 0.8972988724708557, 0.063911072909832, -0.7852992415428162, -0.7476204037666321, -0.0493597686290741, 0.19424982368946075, 0.43567848205566406, 0.9711359739303589, 0.09605243802070618, -0.06508409231901169, 1.390397310256958, 1.2472130060195923, -0.45732563734054565, 0.36458683013916016, -0.8540244698524475, -0.3652454614639282, 0.505386233329773, 0.30392542481422424, 0.08148272335529327, 0.1840648651123047, -0.9615936279296875, -0.21182601153850555, -0.34744346141815186, -0.9831574559211731, -0.7950761914253235, -0.49927839636802673, -0.346372127532959, 1.7002776861190796, 0.11914372444152832, -0.5460604429244995, -0.1271975338459015, -0.7560691833496094, 0.00921493861824274, -0.9733215570449829, 0.1784944385290146, -0.16757620871067047, -0.23504216969013214, -0.005575858522206545, 1.8853356838226318, -1.0550581216812134, -2.074291706085205, 0.39281079173088074, 0.2012384533882141, -0.4416070282459259, 0.28422412276268005, 1.4978605508804321, 0.5673568248748779, 1.409553050994873, 1.3735991716384888, 0.9483678936958313, -0.7264187932014465, -1.3178209066390991, 0.6605038046836853, 0.9807509183883667, -1.4889458417892456, 0.7216173410415649, 0.17661365866661072, -0.3725719451904297, 0.5656316876411438, 1.2285583019256592, 0.506062388420105, -1.9935213327407837, 0.6572239995002747, -0.8194833993911743, 0.6679940819740295, 0.7394413948059082, 0.7470963001251221, 0.2304975837469101, 0.6767082810401917, -1.200677514076233, -1.1292556524276733, -0.752044677734375, -0.6203911304473877, 1.9562358856201172, -0.2669050693511963, 0.690162181854248, -0.012960082851350307, -1.4467732906341553, -0.17594414949417114, 0.7766813635826111, 0.32581061124801636, -0.5822554230690002, 0.7705862522125244, -0.6268303990364075, -1.059540867805481, -1.3866757154464722, -0.5809327363967896, -0.999780535697937, -1.0298511981964111, 0.9956502318382263, 0.8158289194107056, 0.32915881276130676, 1.8936399221420288, 0.6369565725326538, 0.28668880462646484, -2.6744110584259033, 0.8777903914451599, 0.37507015466690063, 0.07747673243284225, 0.9194668531417847, 0.36037084460258484, 0.9504583477973938, -0.07662693411111832, 0.6627004146575928, -2.39977765083313, 2.4490997791290283, -0.257074773311615, 0.7023941278457642, 0.05326418578624725, -0.15049521625041962, 1.122814416885376, 0.44048210978507996, 0.5760763883590698, -1.1198883056640625, 0.6032062768936157, -0.7761453986167908, 1.3424265384674072, 0.8973151445388794, -0.8064514398574829, 0.0031511420384049416, 1.3463480472564697, 0.4811621606349945, -0.5058103799819946, -0.9297589659690857, -1.004234790802002, 0.9366620779037476, 1.8274710178375244, -0.05013839900493622, -0.05629994720220566, 0.9975396990776062, 0.6205191016197205, -1.2686326503753662, -0.08038439601659775, -0.8447281718254089, -0.7231367826461792, 1.6609128713607788, 2.0248215198516846, -0.1694975197315216, -0.3506242632865906, -0.857345700263977, -1.1446948051452637, 0.8193973302841187, -0.015596950426697731, 0.01068014558404684, 0.6595912575721741, -0.5791694521903992, 1.1218295097351074, 0.9577270746231079, 1.0163257122039795, 0.1998661309480667, 0.3483978807926178, 0.383345365524292, -0.38929447531700134, -1.0646878480911255, -0.23826055228710175, -1.2251375913619995, -2.620507001876831, 0.5646169185638428, -0.2854175865650177, -1.418910026550293, -0.024956323206424713, -1.1175403594970703, 0.9147865772247314, -0.5962545871734619, -1.047326683998108, -1.5141026973724365, 0.14737224578857422, -0.17678287625312805, 0.8708298802375793, -1.6183595657348633, -0.04817066714167595, 1.239680290222168, 0.9622612595558167, -0.6678153872489929, 1.0151472091674805, 0.15589739382266998, 1.1935120820999146, 0.8851363658905029, -0.25387173891067505, 0.4944074749946594, 0.056260183453559875, -1.2519477605819702, 0.5192651152610779, 1.136561393737793, 0.14622998237609863, 1.525895118713379, -0.6054977774620056, 0.07870117574930191, 0.35634249448776245, -0.4839361011981964, -0.48973414301872253, -0.6725600957870483, 0.7775001525878906, 0.1146465465426445, -0.8771136403083801, 0.0892326757311821, -0.051710616797208786, -0.16127176582813263, 0.14837108552455902, -1.5700256824493408, -0.18502680957317352, -0.26055362820625305, -0.5906956791877747, -1.1894553899765015, -0.10694476217031479, 1.326981544494629, -0.674412190914154, -0.2415885329246521, 0.4768092930316925, 0.31456637382507324, 0.5104143619537354, 0.5440590977668762, -0.5700533390045166, -0.486422598361969, -0.18992656469345093, -0.3809179365634918, 0.4302832782268524, 1.3149622678756714, -0.028994519263505936, -1.0204168558120728, 0.8094863891601562, -0.407117635011673, 0.13136082887649536, 1.9467304944992065, 0.10657306015491486, -0.8909795880317688, 0.2146809846162796, -0.6638590693473816, 1.9089597463607788, 1.628230333328247, 1.2441564798355103, -0.03518855571746826, -0.9854121208190918, 0.78129643201828, -0.23022691905498505, -0.38053545355796814, 0.841215193271637, 0.3558657765388489, -0.17311991751194, -1.3010164499282837, 0.5870062112808228, 1.2972842454910278, -0.8706792593002319, -0.965656578540802, 0.0571434423327446, -0.8311924338340759, 0.944452166557312, 0.6396912932395935, 0.40713515877723694, 0.20095737278461456, 1.656462550163269, 0.7703811526298523, -0.43793919682502747, 0.5680292844772339, 0.4158652424812317, -0.14805050194263458, -2.155949592590332, -1.1412971019744873, 0.35122978687286377, -0.46208587288856506, -1.6206072568893433, 1.3312687873840332, -1.315191388130188, -0.7941733598709106, 0.5592974424362183, 0.2290446162223816, 1.5003013610839844, 0.3079621493816376, 1.5500649213790894, 1.9971424341201782, 0.8356253504753113, 0.36820757389068604, 1.344028353691101, -0.16692082583904266, -0.5762767195701599, 1.773724913597107, -0.5110337138175964, 0.5347545146942139, 1.1869149208068848, -0.23118270933628082, -0.9977620244026184, -0.754784345626831, -1.197337031364441, -0.6907105445861816, 1.135554313659668, 0.10869604349136353, -1.1530284881591797, 0.3100861608982086, 1.5968235731124878, 0.041290976107120514, -0.378353089094162, 0.49658840894699097, 0.37299272418022156, -0.8652668595314026, -0.026610497385263443, -0.8796960115432739, 0.49829035997390747, -0.19431951642036438, -0.37668755650520325, 0.3696955442428589, 0.3777739703655243, 1.2538186311721802, -0.08647129684686661, 0.13227571547031403, 1.1294939517974854, -1.5020121335983276, 1.5718224048614502, -0.572734534740448, 0.259000301361084, -2.3280937671661377, 1.423313856124878, -0.797886848449707, 1.8127427101135254, -2.652316093444824, 0.30860933661460876, -0.5385600924491882, -0.38066184520721436, 0.2321583330631256, -0.2960173189640045, 0.12480564415454865, -0.12838050723075867, -1.1591137647628784, -0.1301693171262741, -0.7296631336212158, 0.5663185715675354, 1.1590481996536255, 1.196508765220642, -1.0130621194839478, -0.2022794932126999, -1.804165244102478, -0.16939817368984222, -0.6925756335258484, 0.4072647988796234, -2.0279366970062256, -0.18986959755420685, -1.892661452293396, -2.2745680809020996, -1.3142204284667969, -0.7512586712837219, 0.996160089969635, 0.10964041203260422, -0.7782105803489685, 1.054412603378296, -0.25095656514167786, -1.80032479763031, 1.0585743188858032, -2.2570409774780273 ]
https://github.com/huggingface/datasets/issues/5637
IterableDataset with_format does not support 'device' keyword for jax
Hi! Yes, only `torch` is currently supported. Unlike `Dataset`, `IterableDataset` is not PyArrow-backed, so we cannot simply call `to_numpy` on the underlying subtables to format them numerically. Instead, we must manually convert examples to (numeric) arrays while preserving consistency with `Dataset`, which is not trivial, so this is still a to-do.
### Describe the bug As seen here: https://huggingface.co/docs/datasets/use_with_jax dataset.with_format() supports the keyword 'device', to put data on a specific device when loaded as jax. However, when called on an IterableDataset, I got the error `TypeError: with_format() got an unexpected keyword argument 'device'` Looking over the code, it seems IterableDataset support only pytorch and no support for jax device keyword? https://github.com/huggingface/datasets/blob/fc5c84f36684343bff3e424cb0fd1ac5ecdd66da/src/datasets/iterable_dataset.py#L1029 ### Steps to reproduce the bug 1. Load an IterableDataset (tested in streaming mode) 2. Call with_format('jax',device=device) ### Expected behavior I expect to call `with_format('jax', device=device)` as per [documentation](https://huggingface.co/docs/datasets/use_with_jax) without error ### Environment info Tested with installing newest (dev) and also pip release (2.10.1). - `datasets` version: 2.10.2.dev0 - Platform: Linux-5.15.89+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - Huggingface_hub version: 0.12.1 - PyArrow version: 11.0.0 - Pandas version: 1.3.5
257
51
IterableDataset with_format does not support 'device' keyword for jax ### Describe the bug As seen here: https://huggingface.co/docs/datasets/use_with_jax dataset.with_format() supports the keyword 'device', to put data on a specific device when loaded as jax. However, when called on an IterableDataset, I got the error `TypeError: with_format() got an unexpected keyword argument 'device'` Looking over the code, it seems IterableDataset support only pytorch and no support for jax device keyword? https://github.com/huggingface/datasets/blob/fc5c84f36684343bff3e424cb0fd1ac5ecdd66da/src/datasets/iterable_dataset.py#L1029 ### Steps to reproduce the bug 1. Load an IterableDataset (tested in streaming mode) 2. Call with_format('jax',device=device) ### Expected behavior I expect to call `with_format('jax', device=device)` as per [documentation](https://huggingface.co/docs/datasets/use_with_jax) without error ### Environment info Tested with installing newest (dev) and also pip release (2.10.1). - `datasets` version: 2.10.2.dev0 - Platform: Linux-5.15.89+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - Huggingface_hub version: 0.12.1 - PyArrow version: 11.0.0 - Pandas version: 1.3.5 Hi! Yes, only `torch` is currently supported. Unlike `Dataset`, `IterableDataset` is not PyArrow-backed, so we cannot simply call `to_numpy` on the underlying subtables to format them numerically. Instead, we must manually convert examples to (numeric) arrays while preserving consistency with `Dataset`, which is not trivial, so this is still a to-do.
[ -1.2325011491775513, -0.940279483795166, -0.6965106129646301, 1.4070303440093994, -0.1233501210808754, -1.2415097951889038, 0.17469142377376556, -1.0437079668045044, 1.6669445037841797, -0.774493932723999, 0.34157007932662964, -1.689767837524414, 0.0415092408657074, -0.5208538770675659, -0.7340857982635498, -0.7889173030853271, -0.4009397029876709, -0.8109815716743469, 1.0582516193389893, 2.537949800491333, 1.2071917057037354, -1.4080199003219604, 2.715956211090088, 0.6865749955177307, -0.21676743030548096, -1.0042803287506104, 0.4793534576892853, -0.01964976079761982, -1.3755666017532349, -0.39218437671661377, -0.8865242600440979, -0.08945989608764648, -0.552370548248291, -0.5371001362800598, 0.0030847694724798203, 0.3727978467941284, -0.1905287504196167, -0.3919702172279358, -0.5065031051635742, -0.712022602558136, 0.48281949758529663, -0.41407328844070435, 0.9358333349227905, -0.290222704410553, 1.8004474639892578, -0.5230880379676819, 0.5117440223693848, 0.7056373953819275, 1.349458932876587, 0.16552209854125977, -0.02270973101258278, 0.3366039991378784, 0.36476075649261475, 0.04571663588285446, 0.5388530492782593, 1.162928819656372, 0.7038692831993103, 0.4794039726257324, 0.6608675718307495, -2.283942461013794, 1.2532355785369873, -0.9362577795982361, 0.33089518547058105, 1.3143789768218994, -0.9381499290466309, 0.316385418176651, -1.7875144481658936, -0.0591106191277504, 0.554041862487793, -2.2746102809906006, 0.24267756938934326, -1.3184242248535156, -0.4689478278160095, 1.0364279747009277, 0.31778818368911743, -1.2850641012191772, 0.1433393359184265, -0.4936574399471283, 1.0068178176879883, 0.41974523663520813, 1.1191860437393188, -1.6653084754943848, -0.01039351150393486, -0.25291797518730164, 0.13927894830703735, -1.2705755233764648, -1.5619453191757202, 0.47912833094596863, 0.6734820604324341, 0.6555823087692261, -0.06167662516236305, 0.9451028108596802, -1.0160183906555176, 0.7752900719642639, -0.9740781188011169, -1.754162073135376, -1.4265340566635132, -2.3169379234313965, -2.267923593521118, 0.7251525521278381, -0.44606927037239075, -0.4631470739841461, 2.094003915786743, -1.0442619323730469, -1.7810680866241455, 1.1186637878417969, 0.30417340993881226, -0.013467244803905487, 2.328474760055542, 0.1517229527235031, -0.7278973460197449, 0.4841640889644623, -0.7764016389846802, 0.7447658777236938, -0.41224002838134766, 1.3106175661087036, 0.4701490104198456, -0.9926588535308838, 1.549923300743103, -0.4443432092666626, 0.5879338383674622, -0.6991759538650513, -0.4723350703716278, -0.7733094692230225, 0.28477105498313904, 1.8804658651351929, -0.3225415349006653, 1.5248537063598633, -0.34298738837242126, -1.5632582902908325, -1.5382544994354248, 0.8612474799156189, 0.49178433418273926, -0.7291305065155029, 0.06361953914165497, -0.4220075011253357, 0.10421240329742432, -0.03486912325024605, 1.0416324138641357, 1.2483363151550293, 0.7211642265319824, -0.30511289834976196, -0.9419556260108948, 0.2450844645500183, -0.09962791949510574, -0.6966674327850342, -1.7407759428024292, -0.287095844745636, 0.11582522839307785, 0.5798525214195251, -1.2381494045257568, 1.7189184427261353, 0.8876502513885498, 1.970504641532898, 1.0175861120224, -0.361074835062027, 1.5581459999084473, 0.1022174209356308, 1.9023783206939697, -0.5072268843650818, 0.6623108983039856, -0.35807305574417114, -1.1630561351776123, 0.7932454347610474, -0.3274441361427307, -2.083841562271118, -0.6548416614532471, -0.7995541095733643, -0.20610545575618744, -0.8039751648902893, 0.9583241939544678, -0.25552788376808167, -1.4100276231765747, 0.2220628559589386, -0.7202525734901428, 0.17204222083091736, -1.2220805883407593, 0.3161461055278778, 0.7650802731513977, -0.5981234312057495, 0.03927247226238251, -0.2743571996688843, -1.3392680883407593, -0.45110082626342773, 0.34385159611701965, 1.8498426675796509, -0.6916505694389343, 0.9316465854644775, 1.101395845413208, -0.6713889241218567, 0.007292403839528561, 0.3279040455818176, -0.3558237552642822, 0.8344096541404724, -1.0091215372085571, -0.4368778467178345, 1.210983395576477, -0.18406163156032562, -0.6554200649261475, 1.4325180053710938, 0.7387704849243164, -1.0241354703903198, -0.22688931226730347, -0.06393986940383911, -0.8100882172584534, 0.08089178800582886, -1.6740046739578247, -0.10372956097126007, 0.3382076323032379, -1.5238628387451172, -0.4527459144592285, -0.24515514075756073, 1.2753093242645264, -0.035614751279354095, 1.3815038204193115, -0.26840391755104065, -0.12234678864479065, -0.40714192390441895, -0.386648029088974, 0.11972353607416153, -0.2423320710659027, -0.6268860101699829, 0.22107253968715668, -0.748810887336731, 0.34435054659843445, 1.4471020698547363, 0.32140204310417175, 0.06839402765035629, 0.4962587356567383, 1.0301432609558105, 0.4563693702220917, -0.07820065319538116, -0.874370813369751, -1.6349060535430908, 2.057896137237549, -1.4087539911270142, 2.0017526149749756, 0.8158789873123169, -0.04538337513804436, -1.7636041641235352, -1.897979497909546, 1.2912847995758057, 1.0677860975265503, 2.3808321952819824, 0.5555860996246338, 0.4292406141757965, -0.8157135248184204, -0.6501185297966003, 0.35879600048065186, -0.9487603306770325, -0.7340212464332581, 0.16661183536052704, 2.4090700149536133, 1.722084641456604, -0.43713876605033875, -0.10425446182489395, -1.0259218215942383, 1.3224455118179321, -0.19888348877429962, 0.27747252583503723, 2.010344982147217, -0.22385665774345398, -1.0472229719161987, 1.3109642267227173, -2.395038604736328, 0.26953211426734924, 1.975020408630371, 0.2725730240345001, 0.08656829595565796, -1.3811160326004028, -0.6559640765190125, -0.23727233707904816, -0.40498673915863037, -1.1998023986816406, 0.5672703981399536, -0.2188931107521057, -0.8667684197425842, -1.443538784980774, 0.1359170824289322, -1.1608831882476807, -1.7169082164764404, 0.30297034978866577, 1.8783878087997437, 2.0390844345092773, -0.8003982305526733, 1.506314992904663, -0.29131245613098145, 0.20015597343444824, 1.2094945907592773, 1.2348278760910034, 3.0527350902557373, 1.9409403800964355, -1.3115266561508179, 0.7430546283721924, -0.1694735288619995, -0.5095500349998474, 1.1589430570602417, -1.1669986248016357, 1.2599449157714844, -0.16694794595241547, -1.2507662773132324, -1.214698314666748, 1.0242433547973633, 0.5292507410049438, 0.03939897567033768, -0.4977260231971741, 1.1914708614349365, 0.07387790828943253, 1.2811095714569092, 0.5737493634223938, -0.31838199496269226, 0.5869842767715454, -0.398223340511322, -0.5161136984825134, 1.5291266441345215, 0.12894129753112793, -1.473758339881897, -2.3313028812408447, -0.22667765617370605, -0.8612744212150574, -0.05519089102745056, -0.6830782294273376, -1.0347670316696167, 1.6028718948364258, 0.3899371922016144, -1.2112659215927124, -0.3130769431591034, -0.3175344467163086, -0.5337521433830261, 2.6343166828155518, -1.4048196077346802, -0.24396629631519318, -1.0282644033432007, -0.6087425947189331, 1.600443959236145, -1.2264392375946045, -0.23493991792201996, -1.0275342464447021, -0.6575527787208557, -1.198428750038147, -0.49445396661758423, -0.023462310433387756, -0.91656494140625, 0.7788770198822021, 0.248378723859787, -1.14790678024292, -0.3101974427700043, -0.9557610154151917, 0.9098492860794067, -0.08125495165586472, 0.1775042861700058, 1.8420101404190063, 0.3990355432033539, -0.36979496479034424, 0.7249054908752441, 1.1456910371780396, 0.6234467029571533, -0.6660469770431519, 0.2238127589225769, -0.7384768724441528, 0.3809087574481964, -1.322378158569336, 0.2545355558395386, -2.873077392578125, 0.6094511151313782, -0.04867338016629219, -0.07050123810768127, -0.04240494221448898, -1.2957839965820312, 1.1134151220321655, 2.580601692199707, -1.1834514141082764, 0.5258423686027527, 0.3433607220649719, 1.1773512363433838, -1.5720067024230957, 0.312499463558197, -0.5018729567527771, 2.147250175476074, 0.1558055281639099, 1.2108385562896729, -0.45900723338127136, -2.338379383087158, 0.6497647762298584, -1.2783920764923096, -1.1254111528396606, 0.7861061096191406, -0.9124064445495605, 0.09136154502630234, -1.3790327310562134, -0.18384183943271637, -0.8107448220252991, -1.2220442295074463, 0.6993224024772644, 0.11150230467319489, 0.4854501485824585, -0.6799004077911377, 0.31827086210250854, -2.185472249984741, -1.388084888458252, -0.18320202827453613, -0.9313704967498779, 0.5305141806602478, -0.35560929775238037, 0.6734356880187988, -0.1625424176454544, 0.0179467611014843, 0.3316124677658081, 1.3787081241607666, 3.459956407546997, 0.169382706284523, 0.35739970207214355, -0.19132162630558014, -0.9911672472953796, 1.3835617303848267, 0.9505969285964966, -0.2041395902633667, -0.5603187680244446, -1.006617784500122, 1.2906055450439453, 2.008969783782959, 1.0537214279174805, 0.0791378915309906, -0.8684214353561401, -0.7765450477600098, 0.022022955119609833, 0.2090597003698349, 0.510704517364502, 0.968468964099884, 0.07093891501426697, 0.14190711081027985, 1.4069043397903442, 1.2011795043945312, -0.42341381311416626, 0.3683472275733948, -0.8779902458190918, -0.4310379922389984, 0.48012980818748474, 0.3062902092933655, 0.006138927303254604, 0.456744521856308, -1.0921649932861328, -0.22765372693538666, -0.351785808801651, -0.8706890344619751, -0.7529893517494202, -0.39536312222480774, -0.3559816777706146, 1.6629045009613037, 0.060025401413440704, -0.48541760444641113, -0.022940292954444885, -0.7472758293151855, -0.05791323632001877, -1.0385128259658813, 0.2618900239467621, -0.16261841356754303, -0.05380716174840927, -0.13420024514198303, 1.6858453750610352, -0.9800568222999573, -2.0762476921081543, 0.20530828833580017, 0.23163026571273804, -0.3223005533218384, 0.18732240796089172, 1.6374313831329346, 0.5590876936912537, 1.4466453790664673, 1.3503074645996094, 1.0037460327148438, -0.6026478409767151, -1.3349131345748901, 0.7627258896827698, 0.9794741868972778, -1.3882449865341187, 0.796992838382721, -0.030412480235099792, -0.590522825717926, 0.6926248669624329, 1.3236968517303467, 0.44747403264045715, -2.0404484272003174, 0.8462199568748474, -0.9538121819496155, 0.8733060956001282, 0.7366142868995667, 0.8179925680160522, 0.19890263676643372, 0.801449716091156, -1.3522415161132812, -1.1273126602172852, -0.7072573900222778, -0.6994032263755798, 1.9433401823043823, -0.2717370092868805, 0.6069018840789795, -0.1542200744152069, -1.4055488109588623, -0.06188664957880974, 0.680331826210022, 0.3361944556236267, -0.4447276294231415, 0.8365682363510132, -0.6600118279457092, -1.1314697265625, -1.4283655881881714, -0.4893515110015869, -1.0154974460601807, -0.9045690298080444, 0.9946564435958862, 0.7861875295639038, 0.36066189408302307, 1.8369430303573608, 0.6170602440834045, 0.21294289827346802, -2.701833963394165, 0.8894597291946411, 0.3372432589530945, -0.07493933290243149, 0.8650354743003845, 0.2600548565387726, 1.0795615911483765, -0.025060348212718964, 0.5579438209533691, -2.360555648803711, 2.2873120307922363, -0.19471131265163422, 0.692058801651001, -0.0304291769862175, -0.10206421464681625, 1.0500617027282715, 0.5984814167022705, 0.5822479128837585, -1.1299326419830322, 0.7736132740974426, -0.6483891010284424, 1.213422417640686, 0.9115005731582642, -0.837151050567627, -0.08620233833789825, 1.3542088270187378, 0.4796021580696106, -0.5222747921943665, -0.8663262128829956, -0.9413080215454102, 0.9278425574302673, 1.7827028036117554, -0.0501495786011219, -0.0005710097029805183, 0.8359730839729309, 0.6789665818214417, -1.3293288946151733, -0.02111002430319786, -0.6863792538642883, -0.6925507187843323, 1.6641830205917358, 2.0781641006469727, -0.10305629670619965, -0.21411804854869843, -0.7411954998970032, -1.226692795753479, 0.7769133448600769, -0.05814046785235405, 0.04574540629982948, 0.7028005719184875, -0.5909326672554016, 1.141670823097229, 0.7968453168869019, 1.0170401334762573, 0.13119857013225555, 0.23133891820907593, 0.2898923456668854, -0.3728158175945282, -1.1595314741134644, -0.30337411165237427, -1.0867332220077515, -2.530604600906372, 0.4424121081829071, -0.15194861590862274, -1.47670316696167, 0.05828139930963516, -0.9994542598724365, 0.9244117140769958, -0.5646238923072815, -1.1170697212219238, -1.441961646080017, 0.21347038447856903, -0.11601391434669495, 0.8301331996917725, -1.6455297470092773, -0.0966133326292038, 1.255255937576294, 0.9587160348892212, -0.5934954285621643, 1.0588115453720093, 0.2524990141391754, 0.992058277130127, 0.8553436994552612, -0.36796092987060547, 0.5166736245155334, 0.13874214887619019, -1.2890616655349731, 0.4338432550430298, 1.203508973121643, 0.24484184384346008, 1.4530701637268066, -0.5341673493385315, -0.002785783726722002, 0.41272076964378357, -0.564452588558197, -0.45892757177352905, -0.5914470553398132, 0.731473982334137, 0.05522117763757706, -0.9399825930595398, 0.017595916986465454, -0.11327948421239853, -0.1665874868631363, 0.17167483270168304, -1.5322635173797607, -0.1729600727558136, -0.39217817783355713, -0.609987735748291, -1.29941725730896, -0.016679586842656136, 1.4327278137207031, -0.804722785949707, -0.13754360377788544, 0.4975045323371887, 0.30996257066726685, 0.5332607626914978, 0.6818554997444153, -0.661046028137207, -0.36916565895080566, -0.2818543016910553, -0.3530489504337311, 0.2927452325820923, 1.3172866106033325, -0.12133554369211197, -0.997484028339386, 0.7168416976928711, -0.42042526602745056, 0.10154189169406891, 1.8523043394088745, 0.0391094833612442, -0.809219241142273, 0.37917783856391907, -0.7221225500106812, 1.8797252178192139, 1.6623681783676147, 1.3212645053863525, -0.10212923586368561, -0.9484320282936096, 0.5384985208511353, -0.32039064168930054, -0.3721972405910492, 0.9145679473876953, 0.43536248803138733, -0.2115236073732376, -1.427483081817627, 0.619661808013916, 1.2416448593139648, -0.8074418306350708, -0.7688119411468506, 0.15633876621723175, -0.8315702676773071, 1.1785917282104492, 0.6321393847465515, 0.3450048267841339, 0.1847078502178192, 1.5911405086517334, 0.7581934928894043, -0.5420436263084412, 0.5593917369842529, 0.49321430921554565, -0.19436883926391602, -2.049489736557007, -1.0799298286437988, 0.34675249457359314, -0.4362127184867859, -1.5641136169433594, 1.344272255897522, -1.1641433238983154, -0.927121639251709, 0.5280539393424988, 0.08400416374206543, 1.3934270143508911, 0.37390971183776855, 1.604986310005188, 2.098681926727295, 0.931605875492096, 0.3787265717983246, 1.2921327352523804, -0.1355026662349701, -0.37688449025154114, 1.770056962966919, -0.3982387185096741, 0.5426961779594421, 1.0048118829727173, -0.41304096579551697, -1.0423462390899658, -0.8267888426780701, -1.2444289922714233, -0.6394715905189514, 1.141732931137085, 0.09123685210943222, -1.1774275302886963, 0.301268607378006, 1.5910439491271973, 0.06976420432329178, -0.25821805000305176, 0.7228767275810242, 0.4104432463645935, -0.760172963142395, -0.10597807168960571, -0.937982976436615, 0.4362402558326721, -0.23364263772964478, -0.30800285935401917, 0.3080402612686157, 0.5208486318588257, 1.245441198348999, -0.035013314336538315, 0.09273584932088852, 1.2105579376220703, -1.3940261602401733, 1.433375597000122, -0.6667962670326233, 0.2746202349662781, -2.3513450622558594, 1.3703516721725464, -0.7588496208190918, 1.9824085235595703, -2.597651481628418, 0.38889700174331665, -0.579002857208252, -0.4589143395423889, 0.28143760561943054, -0.3274150490760803, 0.1420239806175232, -0.14240923523902893, -1.1202270984649658, -0.11467806249856949, -0.76463782787323, 0.5602051615715027, 1.1433347463607788, 1.304344654083252, -1.0754536390304565, -0.21789349615573883, -1.745924711227417, -0.1887921690940857, -0.6663348078727722, 0.3224511444568634, -1.9817614555358887, -0.2086396962404251, -2.0005440711975098, -2.38016414642334, -1.3320574760437012, -0.8080636858940125, 1.129539966583252, 0.1509188860654831, -0.8606278896331787, 1.1470898389816284, -0.34552985429763794, -1.8010640144348145, 1.0482367277145386, -2.177994728088379 ]
https://github.com/huggingface/datasets/issues/5637
IterableDataset with_format does not support 'device' keyword for jax
Any plans to support it in the future? Or would streaming dataset be left without support for jax and tensorflow?
### Describe the bug As seen here: https://huggingface.co/docs/datasets/use_with_jax dataset.with_format() supports the keyword 'device', to put data on a specific device when loaded as jax. However, when called on an IterableDataset, I got the error `TypeError: with_format() got an unexpected keyword argument 'device'` Looking over the code, it seems IterableDataset support only pytorch and no support for jax device keyword? https://github.com/huggingface/datasets/blob/fc5c84f36684343bff3e424cb0fd1ac5ecdd66da/src/datasets/iterable_dataset.py#L1029 ### Steps to reproduce the bug 1. Load an IterableDataset (tested in streaming mode) 2. Call with_format('jax',device=device) ### Expected behavior I expect to call `with_format('jax', device=device)` as per [documentation](https://huggingface.co/docs/datasets/use_with_jax) without error ### Environment info Tested with installing newest (dev) and also pip release (2.10.1). - `datasets` version: 2.10.2.dev0 - Platform: Linux-5.15.89+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - Huggingface_hub version: 0.12.1 - PyArrow version: 11.0.0 - Pandas version: 1.3.5
257
20
IterableDataset with_format does not support 'device' keyword for jax ### Describe the bug As seen here: https://huggingface.co/docs/datasets/use_with_jax dataset.with_format() supports the keyword 'device', to put data on a specific device when loaded as jax. However, when called on an IterableDataset, I got the error `TypeError: with_format() got an unexpected keyword argument 'device'` Looking over the code, it seems IterableDataset support only pytorch and no support for jax device keyword? https://github.com/huggingface/datasets/blob/fc5c84f36684343bff3e424cb0fd1ac5ecdd66da/src/datasets/iterable_dataset.py#L1029 ### Steps to reproduce the bug 1. Load an IterableDataset (tested in streaming mode) 2. Call with_format('jax',device=device) ### Expected behavior I expect to call `with_format('jax', device=device)` as per [documentation](https://huggingface.co/docs/datasets/use_with_jax) without error ### Environment info Tested with installing newest (dev) and also pip release (2.10.1). - `datasets` version: 2.10.2.dev0 - Platform: Linux-5.15.89+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - Huggingface_hub version: 0.12.1 - PyArrow version: 11.0.0 - Pandas version: 1.3.5 Any plans to support it in the future? Or would streaming dataset be left without support for jax and tensorflow?
[ -1.244858741760254, -0.967814028263092, -0.7181598544120789, 1.4467706680297852, -0.1347845196723938, -1.207514762878418, 0.1415264904499054, -1.0039390325546265, 1.6438817977905273, -0.7366711497306824, 0.31190264225006104, -1.675411343574524, 0.03625664487481117, -0.49465417861938477, -0.7212833166122437, -0.8112167716026306, -0.3733452260494232, -0.8002787232398987, 1.0919147729873657, 2.5386593341827393, 1.2218165397644043, -1.4304927587509155, 2.7236125469207764, 0.6778220534324646, -0.2408311814069748, -1.0004020929336548, 0.4819205701351166, 0.008883174508810043, -1.3576103448867798, -0.3950543999671936, -0.8776013255119324, -0.06833325326442719, -0.517259418964386, -0.5118680000305176, -0.023807885125279427, 0.3422430753707886, -0.20432166755199432, -0.4049825668334961, -0.5176689624786377, -0.7330315709114075, 0.4813479483127594, -0.3961564600467682, 0.8828434348106384, -0.27787548303604126, 1.8236393928527832, -0.51460862159729, 0.5217868089675903, 0.6669676303863525, 1.3163810968399048, 0.1527712643146515, -0.00667194090783596, 0.36687159538269043, 0.365537166595459, 0.03573564440011978, 0.5419448018074036, 1.202386498451233, 0.697514533996582, 0.4321700930595398, 0.6257371306419373, -2.2771105766296387, 1.2505954504013062, -0.946045458316803, 0.2986255884170532, 1.3195765018463135, -0.9640490412712097, 0.35229286551475525, -1.768939733505249, -0.07716819643974304, 0.5835877656936646, -2.2962939739227295, 0.2224990278482437, -1.3548041582107544, -0.5023467540740967, 0.9958487153053284, 0.2854398787021637, -1.2936205863952637, 0.14792762696743011, -0.5435892939567566, 1.0361932516098022, 0.4238320589065552, 1.1271487474441528, -1.669618844985962, -0.013426486402750015, -0.22398963570594788, 0.09267453849315643, -1.3093280792236328, -1.5601866245269775, 0.4636904001235962, 0.6510244011878967, 0.6722363829612732, 0.00490970816463232, 0.945006251335144, -1.0128060579299927, 0.7961866855621338, -0.9399322271347046, -1.7363327741622925, -1.4143970012664795, -2.3884787559509277, -2.2859878540039062, 0.7505483627319336, -0.4153057038784027, -0.5000506043434143, 2.088207960128784, -1.066572666168213, -1.7986149787902832, 1.1337491273880005, 0.293730229139328, -0.0316922552883625, 2.369084119796753, 0.1463654488325119, -0.7637277245521545, 0.48800456523895264, -0.776547372341156, 0.7645003199577332, -0.42306265234947205, 1.3607144355773926, 0.5157779455184937, -0.9474854469299316, 1.5492961406707764, -0.4407508373260498, 0.5682428479194641, -0.6767509579658508, -0.5197153091430664, -0.7978760600090027, 0.2536335587501526, 1.8824105262756348, -0.33742231130599976, 1.5513283014297485, -0.337492972612381, -1.5783244371414185, -1.497878074645996, 0.870425283908844, 0.4807514250278473, -0.7501618266105652, 0.10903364419937134, -0.41071611642837524, 0.07159861922264099, 0.007458467036485672, 1.0380347967147827, 1.239462971687317, 0.6862809658050537, -0.3167101740837097, -0.9555395841598511, 0.2704675495624542, -0.14898410439491272, -0.6685354113578796, -1.7253806591033936, -0.2565794289112091, 0.14078021049499512, 0.5847253799438477, -1.3181946277618408, 1.6582916975021362, 0.8696168065071106, 1.9737135171890259, 1.0152126550674438, -0.3390277326107025, 1.5486507415771484, 0.063353031873703, 1.890574336051941, -0.4875308871269226, 0.6596941351890564, -0.3509577810764313, -1.1774877309799194, 0.7886987328529358, -0.3596447706222534, -2.0807137489318848, -0.6848476529121399, -0.82563716173172, -0.19099539518356323, -0.8267884254455566, 0.9532421827316284, -0.26461097598075867, -1.4169740676879883, 0.2595667243003845, -0.7414819598197937, 0.2106727510690689, -1.2379027605056763, 0.28903108835220337, 0.7526975870132446, -0.5626620054244995, 0.03566930443048477, -0.25261983275413513, -1.3320187330245972, -0.4465430676937103, 0.38826480507850647, 1.86115562915802, -0.6859273314476013, 0.9502875804901123, 1.098313808441162, -0.6903393864631653, 0.025434568524360657, 0.29193323850631714, -0.345935583114624, 0.8895359635353088, -0.987453043460846, -0.4233979880809784, 1.206101655960083, -0.21481581032276154, -0.631589412689209, 1.4497883319854736, 0.7400822639465332, -0.9929436445236206, -0.2567196488380432, -0.05762788653373718, -0.8317378759384155, 0.06632272899150848, -1.6773277521133423, -0.12890543043613434, 0.29682159423828125, -1.5232962369918823, -0.46220284700393677, -0.2444288283586502, 1.2840311527252197, -0.03884571045637131, 1.4226242303848267, -0.2962116003036499, -0.15619666874408722, -0.4050288796424866, -0.42510074377059937, 0.12544724345207214, -0.26608648896217346, -0.6119229197502136, 0.22485682368278503, -0.7611754536628723, 0.32825034856796265, 1.3890800476074219, 0.34594714641571045, 0.05400997772812843, 0.4987393915653229, 1.0292242765426636, 0.4747244417667389, -0.11235961318016052, -0.8603020906448364, -1.6366938352584839, 2.0553629398345947, -1.400151014328003, 2.0085110664367676, 0.8013115525245667, -0.07943786680698395, -1.7732785940170288, -1.9295333623886108, 1.2469935417175293, 1.1011295318603516, 2.3703784942626953, 0.5611703991889954, 0.44275370240211487, -0.8306397795677185, -0.6870353817939758, 0.32318952679634094, -0.9683453440666199, -0.7374194264411926, 0.17568135261535645, 2.389941453933716, 1.7188564538955688, -0.4191567599773407, -0.10333399474620819, -1.0228043794631958, 1.3089708089828491, -0.19959338009357452, 0.2555885910987854, 1.9707882404327393, -0.22015847265720367, -1.049047827720642, 1.282920479774475, -2.4106242656707764, 0.2817729711532593, 1.9610824584960938, 0.32145270705223083, 0.08449652791023254, -1.3925819396972656, -0.6672892570495605, -0.2773571014404297, -0.40959563851356506, -1.1310821771621704, 0.5805492997169495, -0.25133559107780457, -0.8983128070831299, -1.4313498735427856, 0.08862197399139404, -1.1270731687545776, -1.7154223918914795, 0.31324130296707153, 1.8657829761505127, 2.0737032890319824, -0.8259649276733398, 1.5075196027755737, -0.26895326375961304, 0.192588672041893, 1.23431396484375, 1.2289535999298096, 3.050039768218994, 1.9595468044281006, -1.2962173223495483, 0.7500838041305542, -0.12405350804328918, -0.4783872663974762, 1.1581872701644897, -1.1863903999328613, 1.2739139795303345, -0.18121469020843506, -1.2563672065734863, -1.2065024375915527, 1.0542503595352173, 0.5342198610305786, 0.017779875546693802, -0.5169984698295593, 1.205716609954834, 0.06591461598873138, 1.2871830463409424, 0.5656901001930237, -0.3222334086894989, 0.5361631512641907, -0.40093478560447693, -0.5099575519561768, 1.5500776767730713, 0.08168204128742218, -1.5156508684158325, -2.312211275100708, -0.24653778970241547, -0.8079499006271362, -0.07935073971748352, -0.6862444877624512, -1.0737872123718262, 1.5900269746780396, 0.40555495023727417, -1.1839243173599243, -0.3415820002555847, -0.328458696603775, -0.5449008941650391, 2.6460564136505127, -1.4173556566238403, -0.19955037534236908, -1.0198314189910889, -0.6080697774887085, 1.6023677587509155, -1.2014436721801758, -0.2392653226852417, -0.9975435733795166, -0.7013338208198547, -1.2144607305526733, -0.500282883644104, -0.04562213271856308, -0.9202510118484497, 0.7180708646774292, 0.20727597177028656, -1.088543176651001, -0.2682817578315735, -0.9485162496566772, 0.9301681518554688, -0.07917182147502899, 0.19221597909927368, 1.8391779661178589, 0.4014528691768646, -0.359828919172287, 0.7429744601249695, 1.1560148000717163, 0.6410747170448303, -0.6700355410575867, 0.18831613659858704, -0.7501242756843567, 0.425033837556839, -1.3207696676254272, 0.26706552505493164, -2.86824107170105, 0.6118543744087219, -0.03763848543167114, -0.05680268257856369, -0.04111732915043831, -1.2593642473220825, 1.1403545141220093, 2.5249099731445312, -1.2094873189926147, 0.5348631143569946, 0.33881673216819763, 1.1561797857284546, -1.5989285707473755, 0.3391827642917633, -0.48543813824653625, 2.1745405197143555, 0.15172399580478668, 1.2258455753326416, -0.4553664028644562, -2.306276321411133, 0.6597303748130798, -1.2648917436599731, -1.10990309715271, 0.7547418475151062, -0.9326374530792236, 0.13120396435260773, -1.3844916820526123, -0.19596685469150543, -0.8022711873054504, -1.2444391250610352, 0.6651118397712708, 0.12659119069576263, 0.4634622037410736, -0.6333533525466919, 0.32553380727767944, -2.216379165649414, -1.4151570796966553, -0.16522714495658875, -0.9582148194313049, 0.5677258372306824, -0.38610926270484924, 0.6560193300247192, -0.14795832335948944, 0.03015546128153801, 0.30234861373901367, 1.361627221107483, 3.464036703109741, 0.1687219738960266, 0.36938127875328064, -0.11728833615779877, -1.0195547342300415, 1.375514030456543, 0.9553748369216919, -0.25018250942230225, -0.5599313974380493, -0.9817615151405334, 1.329243540763855, 1.9841969013214111, 1.084782361984253, 0.11327363550662994, -0.8530154824256897, -0.7762849926948547, 0.01678869128227234, 0.22829371690750122, 0.5424690842628479, 0.9749634861946106, 0.049869392067193985, 0.16854649782180786, 1.4198168516159058, 1.2029271125793457, -0.4111408293247223, 0.3791826069355011, -0.9020513892173767, -0.42903345823287964, 0.45056185126304626, 0.302825927734375, -0.035830266773700714, 0.49186089634895325, -1.097150444984436, -0.24447253346443176, -0.3368733525276184, -0.8863435387611389, -0.7559237480163574, -0.36491790413856506, -0.3674427270889282, 1.642271637916565, 0.11130604147911072, -0.47975680232048035, -0.044893983751535416, -0.7530333995819092, -0.069268599152565, -1.052280306816101, 0.2945432662963867, -0.13896982371807098, -0.021761592477560043, -0.13896805047988892, 1.6944918632507324, -0.9928061962127686, -2.1174895763397217, 0.1789591908454895, 0.2571125626564026, -0.30641889572143555, 0.1812659353017807, 1.6126378774642944, 0.5407344698905945, 1.4584957361221313, 1.3234140872955322, 0.9914291501045227, -0.6172854900360107, -1.3336447477340698, 0.7754744291305542, 1.0197597742080688, -1.4052778482437134, 0.7791863679885864, -0.04564535990357399, -0.5908960103988647, 0.6920904517173767, 1.3288904428482056, 0.4418189823627472, -2.009695053100586, 0.8746575713157654, -0.9365918040275574, 0.8382731080055237, 0.7101903557777405, 0.8450903296470642, 0.21346895396709442, 0.8041415810585022, -1.3879212141036987, -1.0948283672332764, -0.7263202667236328, -0.6966662406921387, 1.925272822380066, -0.28936296701431274, 0.5914452075958252, -0.17382654547691345, -1.3559975624084473, -0.027512114495038986, 0.7083019018173218, 0.32390502095222473, -0.3861599266529083, 0.882584273815155, -0.6665098667144775, -1.14862859249115, -1.4315822124481201, -0.46297508478164673, -0.9679986834526062, -0.9020500183105469, 0.9822437763214111, 0.7690642476081848, 0.33123543858528137, 1.8614227771759033, 0.5750594139099121, 0.20263633131980896, -2.704646587371826, 0.8940348625183105, 0.3114266097545624, -0.030008267611265182, 0.882757306098938, 0.22641414403915405, 1.0955395698547363, -0.018822401762008667, 0.5259921550750732, -2.2975196838378906, 2.237165689468384, -0.20701563358306885, 0.7358111143112183, -0.03307140991091728, -0.0633201003074646, 1.046188235282898, 0.6105766892433167, 0.6140899658203125, -1.1601667404174805, 0.8404095768928528, -0.6301950812339783, 1.2051968574523926, 0.9222801327705383, -0.8266425728797913, -0.11095531284809113, 1.376076340675354, 0.4913249909877777, -0.4993303716182709, -0.8787570595741272, -0.8907022476196289, 0.9113146066665649, 1.7628036737442017, -0.03625015914440155, 0.033723603934049606, 0.7953106164932251, 0.6643261909484863, -1.360244631767273, -0.018583931028842926, -0.6839380264282227, -0.6673761010169983, 1.6537199020385742, 2.09633731842041, -0.0828767716884613, -0.24204862117767334, -0.7227826118469238, -1.2405104637145996, 0.7726966738700867, -0.068088099360466, 0.07626602053642273, 0.7258903384208679, -0.6156711578369141, 1.1055893898010254, 0.7859371900558472, 0.9998168349266052, 0.10129041969776154, 0.1951221376657486, 0.2988480031490326, -0.30525580048561096, -1.1772774457931519, -0.30028313398361206, -1.0737600326538086, -2.5090208053588867, 0.4254148006439209, -0.1591852903366089, -1.4882206916809082, 0.08188018202781677, -0.9900873303413391, 0.9567546844482422, -0.5657346248626709, -1.1252835988998413, -1.4750813245773315, 0.19472920894622803, -0.1402202546596527, 0.8171804547309875, -1.6295872926712036, -0.13426126539707184, 1.304190993309021, 0.963102400302887, -0.5507681965827942, 1.1045522689819336, 0.22207856178283691, 0.9586912989616394, 0.8518936038017273, -0.35281285643577576, 0.529632568359375, 0.14718963205814362, -1.3039175271987915, 0.4706779718399048, 1.2248197793960571, 0.24179032444953918, 1.4840116500854492, -0.562303900718689, -0.03618860989809036, 0.40647757053375244, -0.5618003010749817, -0.4723449647426605, -0.5695518255233765, 0.7216411828994751, 0.06434527039527893, -0.9390004277229309, 0.017685415223240852, -0.15950503945350647, -0.1700475662946701, 0.16914589703083038, -1.537782073020935, -0.18431705236434937, -0.4085640609264374, -0.6055770516395569, -1.32864248752594, 0.03466280922293663, 1.4211974143981934, -0.8669979572296143, -0.12873592972755432, 0.48228904604911804, 0.3428570628166199, 0.5711542367935181, 0.6822649836540222, -0.6504715085029602, -0.32182058691978455, -0.30346977710723877, -0.3049759864807129, 0.2928905785083771, 1.2829277515411377, -0.1103191077709198, -1.026407241821289, 0.7324174046516418, -0.40383654832839966, 0.10995174944400787, 1.875836968421936, 0.040014322847127914, -0.7880635261535645, 0.3671286702156067, -0.7466947436332703, 1.885784387588501, 1.587790608406067, 1.327226161956787, -0.13108409941196442, -0.9291358590126038, 0.522891640663147, -0.27911728620529175, -0.3673807382583618, 0.8904742002487183, 0.4797273278236389, -0.2141231894493103, -1.4361562728881836, 0.5890716910362244, 1.1989738941192627, -0.8511414527893066, -0.7081944942474365, 0.16719664633274078, -0.828065037727356, 1.1596267223358154, 0.6202663779258728, 0.35693737864494324, 0.17311234772205353, 1.6093823909759521, 0.7567464709281921, -0.566824197769165, 0.5158031582832336, 0.5095278024673462, -0.19995075464248657, -2.01064395904541, -1.0611259937286377, 0.3798648715019226, -0.4567071795463562, -1.5330625772476196, 1.3145208358764648, -1.1393203735351562, -0.938090443611145, 0.5408554673194885, 0.08542805910110474, 1.3908343315124512, 0.343778133392334, 1.630036473274231, 2.1033129692077637, 0.9221801161766052, 0.35353484749794006, 1.3021717071533203, -0.1279461532831192, -0.3576994836330414, 1.7477236986160278, -0.3811686635017395, 0.5624346137046814, 1.0046199560165405, -0.4552425146102905, -1.0516170263290405, -0.8224478960037231, -1.2367013692855835, -0.5712501406669617, 1.1519848108291626, 0.13412761688232422, -1.1536535024642944, 0.290740430355072, 1.5859895944595337, 0.10670074820518494, -0.27636513113975525, 0.6828227043151855, 0.41016754508018494, -0.784746527671814, -0.09726889431476593, -0.9762235879898071, 0.41958141326904297, -0.17520910501480103, -0.31355881690979004, 0.2625179588794708, 0.4820350408554077, 1.2546106576919556, -0.02033890224993229, 0.12832865118980408, 1.2538743019104004, -1.385947823524475, 1.4347654581069946, -0.6749243140220642, 0.23881158232688904, -2.326571464538574, 1.3692309856414795, -0.7787200212478638, 1.9820377826690674, -2.6059744358062744, 0.42102426290512085, -0.5867533683776855, -0.441129207611084, 0.29142555594444275, -0.3356448709964752, 0.16428694128990173, -0.1420953869819641, -1.0704928636550903, -0.1450505256652832, -0.7523085474967957, 0.5798332691192627, 1.1761419773101807, 1.295220136642456, -1.0679330825805664, -0.18753811717033386, -1.7536895275115967, -0.2101791948080063, -0.709391713142395, 0.33489638566970825, -1.988125205039978, -0.1989113986492157, -1.9747942686080933, -2.39570689201355, -1.3023463487625122, -0.7980217933654785, 1.1101609468460083, 0.1285504549741745, -0.8745010495185852, 1.136428713798523, -0.35129037499427795, -1.7746976613998413, 1.053505301475525, -2.1758105754852295 ]
https://github.com/huggingface/datasets/issues/5634
Not all progress bars are showing up when they should for downloading dataset
Hi! By default, tqdm has `leave=True` to "keep all traces of the progress bar upon the termination of iteration". However, we use `leave=False` in some places (as of recently), which removes the bar once the iteration is over. I feel like our TQDM bars are noisy, so I think we should always set `leave=False` and also use the `delay` parameter to display progress bars only for tasks that take time (e.g., more than 3s). What do you think about this? Do you find these bars useful (after the dataset generation is over)?
### Describe the bug During downloading the rotten tomatoes dataset, not all progress bars are displayed properly. This might be related to [this ticket](https://github.com/huggingface/datasets/issues/5117) as it raised the same concern but its not clear if the fix solves this issue too. ipywidgets <img width="1243" alt="image" src="https://user-images.githubusercontent.com/110427462/224851138-13fee5b7-ab51-4883-b96f-1b9808782e3b.png"> tqdm <img width="1251" alt="Screen Shot 2023-03-13 at 3 58 59 PM" src="https://user-images.githubusercontent.com/110427462/224851180-5feb7825-9250-4b1e-ad0c-f3172ac1eb78.png"> ### Steps to reproduce the bug 1. Run this line ``` from datasets import load_dataset rotten_tomatoes = load_dataset("rotten_tomatoes", split="train") ``` ### Expected behavior all progress bars for builder script, metadata, readme, training, validation, and test set ### Environment info requirements.txt ``` aiofiles==22.1.0 aiohttp==3.8.4 aiosignal==1.3.1 aiosqlite==0.18.0 anyio==3.6.2 appnope==0.1.3 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asttokens==2.2.1 async-generator==1.10 async-timeout==4.0.2 attrs==22.2.0 Babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.11.2 bleach==6.0.0 brotlipy @ file:///Users/runner/miniforge3/conda-bld/brotlipy_1666764961872/work certifi==2022.12.7 cffi @ file:///Users/runner/miniforge3/conda-bld/cffi_1671179414629/work cfgv==3.3.1 charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1661170624537/work comm==0.1.2 conda==22.9.0 conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1669907009957/work conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1669733752472/work coverage==7.2.1 cryptography @ file:///Users/runner/miniforge3/conda-bld/cryptography_1669592251328/work datasets==2.1.0 debugpy==1.6.6 decorator==5.1.1 defusedxml==0.7.1 dill==0.3.6 distlib==0.3.6 distro==1.4.0 entrypoints==0.4 exceptiongroup==1.1.0 executing==1.2.0 fastjsonschema==2.16.3 filelock==3.9.0 flaky==3.7.0 fqdn==1.5.1 frozenlist==1.3.3 fsspec==2023.3.0 huggingface-hub==0.10.1 identify==2.5.18 idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work iniconfig==2.0.0 ipykernel==6.12.1 ipyparallel==8.4.1 ipython==7.32.0 ipython-genutils==0.2.0 ipywidgets==8.0.4 isoduration==20.11.0 jedi==0.18.2 Jinja2==3.1.2 json5==0.9.11 jsonpointer==2.3 jsonschema==4.17.3 jupyter-events==0.6.3 jupyter-ydoc==0.2.2 jupyter_client==8.0.3 jupyter_core==5.2.0 jupyter_server==2.4.0 jupyter_server_fileid==0.8.0 jupyter_server_terminals==0.4.4 jupyter_server_ydoc==0.6.1 jupyterlab==3.6.1 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.5 jupyterlab_server==2.20.0 libmambapy @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/libmambapy mamba @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/mamba MarkupSafe==2.1.2 matplotlib-inline==0.1.6 mistune==2.0.5 multidict==6.0.4 multiprocess==0.70.14 nbclassic==0.5.3 nbclient==0.7.2 nbconvert==7.2.9 nbformat==5.7.3 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.3 notebook_shim==0.2.2 numpy==1.24.2 outcome==1.2.0 packaging==23.0 pandas==1.5.3 pandocfilters==1.5.0 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 platformdirs==3.0.0 plotly==5.13.1 pluggy==1.0.0 pre-commit==3.1.0 prometheus-client==0.16.0 prompt-toolkit==3.0.38 psutil==5.9.4 ptyprocess==0.7.0 pure-eval==0.2.2 pyarrow==11.0.0 pycosat @ file:///Users/runner/miniforge3/conda-bld/pycosat_1666836580084/work pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work Pygments==2.14.0 pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1665350324128/work pyrsistent==0.19.3 PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work pytest==7.2.1 pytest-asyncio==0.20.3 pytest-cov==4.0.0 pytest-timeout==2.1.0 python-dateutil==2.8.2 python-json-logger==2.0.7 pytz==2022.7.1 PyYAML==6.0 pyzmq==25.0.0 requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1661872987712/work responses==0.18.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 ruamel-yaml-conda @ file:///Users/runner/miniforge3/conda-bld/ruamel_yaml_1666819760545/work Send2Trash==1.8.0 simplegeneric==0.8.1 six==1.16.0 sniffio==1.3.0 sortedcontainers==2.4.0 soupsieve==2.4 stack-data==0.6.2 tenacity==8.2.2 terminado==0.17.1 tinycss2==1.2.1 tomli==2.0.1 toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1657485559105/work tornado==6.2 tqdm==4.64.1 traitlets==5.8.1 trio==0.22.0 typing_extensions==4.5.0 uri-template==1.2.0 urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1669259737463/work virtualenv==20.19.0 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 widgetsnbextension==4.0.5 xxhash==3.2.0 y-py==0.5.9 yarl==1.8.2 ypy-websocket==0.8.2 zstandard==0.19.0 ```
258
92
Not all progress bars are showing up when they should for downloading dataset ### Describe the bug During downloading the rotten tomatoes dataset, not all progress bars are displayed properly. This might be related to [this ticket](https://github.com/huggingface/datasets/issues/5117) as it raised the same concern but its not clear if the fix solves this issue too. ipywidgets <img width="1243" alt="image" src="https://user-images.githubusercontent.com/110427462/224851138-13fee5b7-ab51-4883-b96f-1b9808782e3b.png"> tqdm <img width="1251" alt="Screen Shot 2023-03-13 at 3 58 59 PM" src="https://user-images.githubusercontent.com/110427462/224851180-5feb7825-9250-4b1e-ad0c-f3172ac1eb78.png"> ### Steps to reproduce the bug 1. Run this line ``` from datasets import load_dataset rotten_tomatoes = load_dataset("rotten_tomatoes", split="train") ``` ### Expected behavior all progress bars for builder script, metadata, readme, training, validation, and test set ### Environment info requirements.txt ``` aiofiles==22.1.0 aiohttp==3.8.4 aiosignal==1.3.1 aiosqlite==0.18.0 anyio==3.6.2 appnope==0.1.3 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asttokens==2.2.1 async-generator==1.10 async-timeout==4.0.2 attrs==22.2.0 Babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.11.2 bleach==6.0.0 brotlipy @ file:///Users/runner/miniforge3/conda-bld/brotlipy_1666764961872/work certifi==2022.12.7 cffi @ file:///Users/runner/miniforge3/conda-bld/cffi_1671179414629/work cfgv==3.3.1 charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1661170624537/work comm==0.1.2 conda==22.9.0 conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1669907009957/work conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1669733752472/work coverage==7.2.1 cryptography @ file:///Users/runner/miniforge3/conda-bld/cryptography_1669592251328/work datasets==2.1.0 debugpy==1.6.6 decorator==5.1.1 defusedxml==0.7.1 dill==0.3.6 distlib==0.3.6 distro==1.4.0 entrypoints==0.4 exceptiongroup==1.1.0 executing==1.2.0 fastjsonschema==2.16.3 filelock==3.9.0 flaky==3.7.0 fqdn==1.5.1 frozenlist==1.3.3 fsspec==2023.3.0 huggingface-hub==0.10.1 identify==2.5.18 idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work iniconfig==2.0.0 ipykernel==6.12.1 ipyparallel==8.4.1 ipython==7.32.0 ipython-genutils==0.2.0 ipywidgets==8.0.4 isoduration==20.11.0 jedi==0.18.2 Jinja2==3.1.2 json5==0.9.11 jsonpointer==2.3 jsonschema==4.17.3 jupyter-events==0.6.3 jupyter-ydoc==0.2.2 jupyter_client==8.0.3 jupyter_core==5.2.0 jupyter_server==2.4.0 jupyter_server_fileid==0.8.0 jupyter_server_terminals==0.4.4 jupyter_server_ydoc==0.6.1 jupyterlab==3.6.1 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.5 jupyterlab_server==2.20.0 libmambapy @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/libmambapy mamba @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/mamba MarkupSafe==2.1.2 matplotlib-inline==0.1.6 mistune==2.0.5 multidict==6.0.4 multiprocess==0.70.14 nbclassic==0.5.3 nbclient==0.7.2 nbconvert==7.2.9 nbformat==5.7.3 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.3 notebook_shim==0.2.2 numpy==1.24.2 outcome==1.2.0 packaging==23.0 pandas==1.5.3 pandocfilters==1.5.0 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 platformdirs==3.0.0 plotly==5.13.1 pluggy==1.0.0 pre-commit==3.1.0 prometheus-client==0.16.0 prompt-toolkit==3.0.38 psutil==5.9.4 ptyprocess==0.7.0 pure-eval==0.2.2 pyarrow==11.0.0 pycosat @ file:///Users/runner/miniforge3/conda-bld/pycosat_1666836580084/work pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work Pygments==2.14.0 pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1665350324128/work pyrsistent==0.19.3 PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work pytest==7.2.1 pytest-asyncio==0.20.3 pytest-cov==4.0.0 pytest-timeout==2.1.0 python-dateutil==2.8.2 python-json-logger==2.0.7 pytz==2022.7.1 PyYAML==6.0 pyzmq==25.0.0 requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1661872987712/work responses==0.18.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 ruamel-yaml-conda @ file:///Users/runner/miniforge3/conda-bld/ruamel_yaml_1666819760545/work Send2Trash==1.8.0 simplegeneric==0.8.1 six==1.16.0 sniffio==1.3.0 sortedcontainers==2.4.0 soupsieve==2.4 stack-data==0.6.2 tenacity==8.2.2 terminado==0.17.1 tinycss2==1.2.1 tomli==2.0.1 toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1657485559105/work tornado==6.2 tqdm==4.64.1 traitlets==5.8.1 trio==0.22.0 typing_extensions==4.5.0 uri-template==1.2.0 urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1669259737463/work virtualenv==20.19.0 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 widgetsnbextension==4.0.5 xxhash==3.2.0 y-py==0.5.9 yarl==1.8.2 ypy-websocket==0.8.2 zstandard==0.19.0 ``` Hi! By default, tqdm has `leave=True` to "keep all traces of the progress bar upon the termination of iteration". However, we use `leave=False` in some places (as of recently), which removes the bar once the iteration is over. I feel like our TQDM bars are noisy, so I think we should always set `leave=False` and also use the `delay` parameter to display progress bars only for tasks that take time (e.g., more than 3s). What do you think about this? Do you find these bars useful (after the dataset generation is over)?
[ -1.3264236450195312, -0.9384112358093262, -0.6486805081367493, 1.4555368423461914, -0.2238524854183197, -1.1209741830825806, 0.16965985298156738, -1.0841684341430664, 1.5862623453140259, -0.8087064623832703, 0.2877905070781708, -1.5388022661209106, -0.00938345491886139, -0.5007497668266296, -0.6942360401153564, -0.8787776231765747, -0.3694928288459778, -0.6951466202735901, 1.1467682123184204, 2.5018014907836914, 1.2820069789886475, -1.293919324874878, 2.8020732402801514, 0.8319416642189026, -0.28001028299331665, -0.9605249166488647, 0.5517425537109375, 0.12032397836446762, -1.4210278987884521, -0.3606841564178467, -0.95340496301651, -0.05436718463897705, -0.47521406412124634, -0.5139099955558777, 0.01205915305763483, 0.32949796319007874, -0.30293142795562744, -0.47587472200393677, -0.5175473093986511, -0.7565034627914429, 0.4358656406402588, -0.44675952196121216, 0.7830324172973633, -0.37251025438308716, 1.8247151374816895, -0.6203075647354126, 0.44196105003356934, 0.6914990544319153, 1.1223551034927368, 0.18493938446044922, 0.06708282977342606, 0.2905005216598511, 0.4411229193210602, -0.07392039895057678, 0.5328017473220825, 1.2482444047927856, 0.707378625869751, 0.489225298166275, 0.7258545160293579, -2.1333541870117188, 1.3462632894515991, -0.9050483107566833, 0.24108177423477173, 1.4318805932998657, -0.9594061970710754, 0.4644289016723633, -1.8384290933609009, 0.0010127546265721321, 0.49172425270080566, -2.3738152980804443, 0.3210539221763611, -1.4016693830490112, -0.6640981435775757, 1.0285650491714478, 0.3016757369041443, -1.2232115268707275, 0.06823935359716415, -0.5586625933647156, 1.0306448936462402, 0.472737580537796, 1.1082204580307007, -1.6756136417388916, -0.13056080043315887, -0.27917566895484924, 0.0986303985118866, -1.3791424036026, -1.5639415979385376, 0.5323109030723572, 0.6772693395614624, 0.6107043027877808, -0.06284146755933762, 1.1105190515518188, -1.0348212718963623, 0.8182836771011353, -0.9626814126968384, -1.7542669773101807, -1.4463520050048828, -2.3885250091552734, -2.2114641666412354, 0.7321659922599792, -0.3870006203651428, -0.5330488681793213, 2.028954029083252, -1.109232783317566, -1.7244802713394165, 1.1212314367294312, 0.15596641600131989, -0.07020474225282669, 2.4182093143463135, 0.23992101848125458, -0.7151147723197937, 0.3919013440608978, -0.8598892092704773, 0.6851394176483154, -0.37436047196388245, 1.3424519300460815, 0.450309693813324, -1.0088430643081665, 1.5628771781921387, -0.35911062359809875, 0.5284321904182434, -0.765215277671814, -0.48076531291007996, -0.7409348487854004, 0.16489915549755096, 2.011080503463745, -0.29569926857948303, 1.5287680625915527, -0.38313019275665283, -1.5510956048965454, -1.6284515857696533, 0.8124060034751892, 0.5507773756980896, -0.6719760894775391, 0.13458159565925598, -0.3420109450817108, 0.0677804946899414, 0.040792401880025864, 1.0459445714950562, 1.3813368082046509, 0.7717069983482361, -0.23531514406204224, -0.828429102897644, 0.1293143928050995, -0.09062591195106506, -0.7005914449691772, -1.7677950859069824, -0.33333081007003784, 0.06839984655380249, 0.668912947177887, -1.3072950839996338, 1.6873401403427124, 0.9248777627944946, 1.8580927848815918, 1.0411128997802734, -0.43434035778045654, 1.545296549797058, 0.12836627662181854, 1.7823069095611572, -0.5028268694877625, 0.7402535676956177, -0.395565927028656, -1.111177682876587, 0.7468780875205994, -0.22836297750473022, -2.046111583709717, -0.6781240105628967, -0.7382686138153076, -0.17158180475234985, -0.7904989123344421, 0.9296368956565857, -0.2801314890384674, -1.420066237449646, 0.2127217799425125, -0.7090380787849426, 0.08217692375183105, -1.2416249513626099, 0.3624788224697113, 0.7503380179405212, -0.6644411683082581, 0.08891671150922775, -0.3221116065979004, -1.134242296218872, -0.5282745957374573, 0.31056758761405945, 1.8718624114990234, -0.6522048115730286, 0.8662008047103882, 1.031586766242981, -0.8051803112030029, -0.029608339071273804, 0.41641390323638916, -0.22893038392066956, 0.8223598599433899, -1.0480831861495972, -0.35961222648620605, 1.1041390895843506, -0.21292231976985931, -0.5707831978797913, 1.432334303855896, 0.7724410891532898, -0.951026201248169, -0.278762549161911, -0.09782371670007706, -0.7538038492202759, 0.03847706317901611, -1.5873204469680786, -0.1590404361486435, 0.35917043685913086, -1.5131072998046875, -0.5766028761863708, -0.2601264715194702, 1.3590649366378784, -0.1302870810031891, 1.4971392154693604, -0.2107590138912201, -0.16952693462371826, -0.3738345503807068, -0.3250579237937927, 0.14620180428028107, -0.16451483964920044, -0.6045374870300293, 0.24113504588603973, -0.885249674320221, 0.23052364587783813, 1.5159133672714233, 0.33123692870140076, 0.027124851942062378, 0.5125289559364319, 1.0720354318618774, 0.3916377127170563, -0.18414241075515747, -0.8581019639968872, -1.5313671827316284, 1.8790932893753052, -1.5507044792175293, 2.0597352981567383, 0.8571311235427856, -0.08513270318508148, -1.773301124572754, -1.9789354801177979, 1.2704802751541138, 1.1264245510101318, 2.498723030090332, 0.5673776268959045, 0.41312912106513977, -0.7802892327308655, -0.743147075176239, 0.2778957486152649, -1.0562846660614014, -0.842059850692749, 0.18230773508548737, 2.312608003616333, 1.685219168663025, -0.4721333682537079, -0.17751315236091614, -1.0745774507522583, 1.3643615245819092, -0.05104077607393265, 0.17848297953605652, 1.9613629579544067, -0.18574801087379456, -1.0812151432037354, 1.220943808555603, -2.3158464431762695, 0.16064906120300293, 1.9063159227371216, 0.24774114787578583, 0.14806047081947327, -1.3880295753479004, -0.7085928320884705, -0.2926962971687317, -0.4925081431865692, -1.270928144454956, 0.45688408613204956, -0.25573405623435974, -0.7919247150421143, -1.500393271446228, 0.07681971043348312, -1.1543275117874146, -1.7040988206863403, 0.22854001820087433, 1.9267981052398682, 1.9650622606277466, -0.8419221639633179, 1.4860954284667969, -0.2633066177368164, -0.012466046027839184, 1.2005623579025269, 1.3206286430358887, 3.1773433685302734, 1.9660741090774536, -1.249718427658081, 0.728823721408844, -0.1485234797000885, -0.3575548827648163, 1.0654915571212769, -1.1012954711914062, 1.3339767456054688, -0.13534243404865265, -1.1647958755493164, -1.22562575340271, 0.8954482078552246, 0.510634183883667, 0.0014896485954523087, -0.4347967803478241, 1.2166831493377686, 0.15813294053077698, 1.493022084236145, 0.5519716739654541, -0.30265188217163086, 0.7607895731925964, -0.41187939047813416, -0.3816013038158417, 1.6139248609542847, 0.18789631128311157, -1.3983361721038818, -2.232332706451416, -0.1701631247997284, -0.8432724475860596, 0.06561646610498428, -0.6299902200698853, -1.0793085098266602, 1.7569000720977783, 0.4614907205104828, -1.1434630155563354, -0.19262339174747467, -0.34047186374664307, -0.6605672836303711, 2.6074423789978027, -1.4253004789352417, -0.17185866832733154, -1.014114260673523, -0.6091614365577698, 1.5158063173294067, -1.19448983669281, -0.2071390151977539, -0.9542660713195801, -0.511454701423645, -1.3103524446487427, -0.4918335974216461, 0.013297081924974918, -0.9189445376396179, 0.7515636682510376, 0.15386134386062622, -1.1937440633773804, -0.3475669324398041, -0.8827348351478577, 0.8983862996101379, 0.00006403867155313492, 0.21875353157520294, 1.873306155204773, 0.28677278757095337, -0.3794650435447693, 0.7654767632484436, 1.1162285804748535, 0.5406996011734009, -0.6401777863502502, 0.3794041574001312, -0.6875298619270325, 0.35177236795425415, -1.281044602394104, 0.3441776633262634, -2.8539044857025146, 0.61514812707901, -0.08392778784036636, -0.024797987192869186, 0.000034973956644535065, -1.194408655166626, 1.1629431247711182, 2.5620689392089844, -1.078218698501587, 0.5640060901641846, 0.27512937784194946, 1.1639807224273682, -1.5771784782409668, 0.3201011121273041, -0.38371533155441284, 1.9762274026870728, 0.2795587182044983, 1.240271806716919, -0.5267152786254883, -2.357116460800171, 0.548858642578125, -1.2012752294540405, -1.1093086004257202, 0.7994322180747986, -0.8005868196487427, 0.023361768573522568, -1.3043010234832764, -0.31918445229530334, -0.8631636500358582, -1.1695635318756104, 0.6567819714546204, 0.21823151409626007, 0.48558706045150757, -0.6335114240646362, 0.4366287589073181, -2.2367093563079834, -1.217456340789795, -0.20234116911888123, -0.8802458643913269, 0.44840648770332336, -0.3258034288883209, 0.6457643508911133, -0.12501803040504456, -0.006082933396100998, 0.3527431786060333, 1.4453222751617432, 3.221082925796509, 0.08363771438598633, 0.32710739970207214, -0.17114850878715515, -0.9948626160621643, 1.543320655822754, 0.9202702045440674, -0.07108848541975021, -0.6195524334907532, -1.162570834159851, 1.21870756149292, 1.7704018354415894, 1.054966688156128, 0.026517190039157867, -0.9359890222549438, -0.8675397038459778, -0.0647827759385109, 0.15825696289539337, 0.420868843793869, 1.1193792819976807, 0.10908511281013489, 0.12862417101860046, 1.505079746246338, 1.263097882270813, -0.4784046411514282, 0.35150519013404846, -0.8686711192131042, -0.4580078423023224, 0.4400888979434967, 0.29327642917633057, -0.03615310788154602, 0.28680145740509033, -1.1228355169296265, -0.19078049063682556, -0.3100169599056244, -0.9030922651290894, -0.7171383500099182, -0.3499327003955841, -0.3026803731918335, 1.6297581195831299, 0.07415986806154251, -0.39133962988853455, -0.01506481971591711, -0.8915830254554749, -0.09816428273916245, -1.0788911581039429, 0.3656144142150879, -0.11688737571239471, -0.09904992580413818, -0.05597981438040733, 1.7824515104293823, -0.8539896011352539, -2.0903754234313965, 0.24949900805950165, 0.12853673100471497, -0.29990121722221375, 0.27480724453926086, 1.6903855800628662, 0.6022132635116577, 1.397926926612854, 1.254647970199585, 1.0053541660308838, -0.6317837834358215, -1.3429055213928223, 0.6736681461334229, 0.9414507150650024, -1.4489234685897827, 0.7306339144706726, -0.05810103565454483, -0.5034841299057007, 0.5918634533882141, 1.2809768915176392, 0.4452027678489685, -1.9612566232681274, 0.8111395239830017, -0.9066421389579773, 0.7893718481063843, 0.7496166229248047, 0.741723895072937, 0.1785392463207245, 0.8709747791290283, -1.2663027048110962, -1.0329644680023193, -0.5610777735710144, -0.6425268054008484, 1.8954112529754639, -0.23670382797718048, 0.49597489833831787, -0.35417452454566956, -1.2777936458587646, 0.00746834184974432, 0.560722827911377, 0.2682333290576935, -0.45527660846710205, 0.8406658172607422, -0.6649221777915955, -1.164272665977478, -1.3115415573120117, -0.5275035500526428, -1.0053791999816895, -0.8800131678581238, 0.9909493923187256, 0.777584433555603, 0.2973446846008301, 1.9416676759719849, 0.559420645236969, 0.31127822399139404, -2.778543472290039, 0.882321834564209, 0.22777089476585388, 0.012821896933019161, 0.9629915356636047, 0.23350682854652405, 1.035126805305481, -0.005076564848423004, 0.49707818031311035, -2.5006959438323975, 2.4726479053497314, -0.26570042967796326, 0.7666032314300537, 0.04096859320998192, -0.05195460096001625, 1.1151899099349976, 0.7206751704216003, 0.6048385500907898, -0.9940212368965149, 0.7015234231948853, -0.5945226550102234, 1.2874438762664795, 0.9002634286880493, -0.8534373641014099, -0.046612318605184555, 1.193808913230896, 0.40896567702293396, -0.5054737329483032, -0.8436979651451111, -0.9921020865440369, 0.8376569747924805, 1.7949086427688599, 0.05353802070021629, 0.10291128605604172, 0.7709465026855469, 0.6193822622299194, -1.358136773109436, -0.0034583513624966145, -0.6747903227806091, -0.7295896410942078, 1.655059576034546, 2.1061649322509766, -0.10224369913339615, -0.3741547465324402, -0.6172143816947937, -1.3127933740615845, 0.8294059634208679, 0.03685401380062103, 0.2573760449886322, 0.719157874584198, -0.6470134854316711, 1.0478730201721191, 0.8283022046089172, 0.9304817318916321, 0.2365679293870926, 0.27427518367767334, 0.3956202566623688, -0.4449615776538849, -1.25662362575531, -0.18162783980369568, -1.0357444286346436, -2.6060309410095215, 0.49324238300323486, -0.1104603111743927, -1.3728281259536743, 0.0525495782494545, -1.0709863901138306, 0.8471406698226929, -0.5719686150550842, -1.050586223602295, -1.503016710281372, 0.10018382221460342, -0.22007858753204346, 0.9345229268074036, -1.628341794013977, -0.11098366975784302, 1.2562624216079712, 0.9753935933113098, -0.5242853164672852, 1.0169938802719116, 0.23592950403690338, 1.0682313442230225, 0.9513755440711975, -0.2945238947868347, 0.4478552043437958, 0.07783273607492447, -1.3347187042236328, 0.291534960269928, 1.2330708503723145, 0.19382327795028687, 1.571107268333435, -0.6644659042358398, 0.032032549381256104, 0.4396732449531555, -0.4743369221687317, -0.4547918438911438, -0.5301090478897095, 0.588726818561554, 0.02560805156826973, -1.0159002542495728, -0.10198944807052612, -0.17938759922981262, -0.12327105551958084, 0.1697225123643875, -1.457358479499817, -0.1308903694152832, -0.4063449501991272, -0.5962187051773071, -1.2837715148925781, 0.007870695553719997, 1.3090744018554688, -0.8696274161338806, -0.16989335417747498, 0.4304986596107483, 0.25357067584991455, 0.5938504934310913, 0.6459500789642334, -0.7873123288154602, -0.40934666991233826, -0.13480712473392487, -0.35349687933921814, 0.3708249628543854, 1.3444147109985352, -0.19323833286762238, -1.0075318813323975, 0.5676605105400085, -0.33636948466300964, 0.20800171792507172, 1.9729582071304321, -0.03773592785000801, -0.8032039403915405, 0.23665069043636322, -0.710187554359436, 1.9216382503509521, 1.615120530128479, 1.4294428825378418, -0.2984520196914673, -0.7974289059638977, 0.5762014389038086, -0.3754054009914398, -0.38105249404907227, 0.8218792676925659, 0.5763119459152222, -0.258184015750885, -1.4450740814208984, 0.6624094843864441, 1.286661148071289, -0.9542509913444519, -0.7825733423233032, 0.13693884015083313, -0.6710239052772522, 1.0891600847244263, 0.7639843225479126, 0.35438263416290283, 0.27816736698150635, 1.6357909440994263, 0.8016554117202759, -0.5938574075698853, 0.5836235284805298, 0.3748997449874878, -0.1843360960483551, -2.106628894805908, -1.0913746356964111, 0.3134802281856537, -0.5203704833984375, -1.5761938095092773, 1.4370579719543457, -1.1632583141326904, -1.0476865768432617, 0.5362228155136108, 0.14497871696949005, 1.3320982456207275, 0.330879807472229, 1.6370823383331299, 2.0088112354278564, 0.837924063205719, 0.3298428952693939, 1.2216312885284424, -0.16285820305347443, -0.5059006214141846, 1.7135779857635498, -0.5277518630027771, 0.5224311351776123, 1.0270960330963135, -0.2398078441619873, -1.014394998550415, -0.8327071070671082, -1.303351640701294, -0.7366569638252258, 1.2118607759475708, 0.15497280657291412, -1.0589383840560913, 0.23256509006023407, 1.5727375745773315, -0.014583304524421692, -0.2591516673564911, 0.7013377547264099, 0.44948816299438477, -0.719549834728241, -0.1427685022354126, -0.9377006888389587, 0.5149003267288208, -0.1851353794336319, -0.4442760646343231, 0.19243505597114563, 0.4502390921115875, 1.3185665607452393, 0.03270843252539635, 0.12104309350252151, 1.3469022512435913, -1.2531969547271729, 1.5283422470092773, -0.7548007965087891, 0.34358131885528564, -2.3359546661376953, 1.4948817491531372, -0.8572251200675964, 1.896662950515747, -2.594381332397461, 0.5063298940658569, -0.5471183061599731, -0.4599049389362335, 0.21897535026073456, -0.3080695867538452, 0.1450466364622116, -0.23525336384773254, -1.0873844623565674, -0.16838864982128143, -0.7087514400482178, 0.5761335492134094, 1.1020753383636475, 1.3716988563537598, -1.1612130403518677, -0.08748570829629898, -1.8248422145843506, -0.1598612666130066, -0.7872077226638794, 0.3176953196525574, -1.9585145711898804, -0.32244372367858887, -1.9226930141448975, -2.3595876693725586, -1.2556233406066895, -0.8218794465065002, 1.1275907754898071, 0.0858975201845169, -0.7529829144477844, 1.1684882640838623, -0.33089199662208557, -1.843163013458252, 1.1152657270431519, -2.1271088123321533 ]
https://github.com/huggingface/datasets/issues/5634
Not all progress bars are showing up when they should for downloading dataset
Hi sorry for the late update. I think the problem still exists despite the `leave` flag <img width="1105" alt="image" src="https://user-images.githubusercontent.com/110427462/226501615-5b02fb02-fd5f-4eda-b1f7-a7ed6570892d.png"> ``` Package Version ------------------------ --------- aiofiles 22.1.0 aiohttp 3.8.4 aiosignal 1.3.1 aiosqlite 0.18.0 anyio 3.6.2 appnope 0.1.3 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 async-generator 1.10 async-timeout 4.0.2 attrs 22.2.0 Babel 2.12.1 backcall 0.2.0 beautifulsoup4 4.11.2 bleach 6.0.0 brotlipy 0.7.0 certifi 2022.12.7 cffi 1.15.1 cfgv 3.3.1 charset-normalizer 2.1.1 comm 0.1.2 conda 22.9.0 conda-package-handling 2.0.2 conda_package_streaming 0.7.0 coverage 7.2.1 cryptography 38.0.4 datasets 2.8.0 debugpy 1.6.6 decorator 5.1.1 defusedxml 0.7.1 dill 0.3.6 distlib 0.3.6 distro 1.4.0 entrypoints 0.4 exceptiongroup 1.1.0 executing 1.2.0 fastjsonschema 2.16.3 filelock 3.9.0 flaky 3.7.0 fqdn 1.5.1 frozenlist 1.3.3 fsspec 2023.3.0 huggingface-hub 0.10.1 identify 2.5.18 idna 3.4 iniconfig 2.0.0 ipykernel 6.12.1 ipyparallel 8.4.1 ipython 7.32.0 ipython-genutils 0.2.0 ipywidgets 8.0.4 isoduration 20.11.0 jedi 0.18.2 Jinja2 3.1.2 json5 0.9.11 jsonpointer 2.3 jsonschema 4.17.3 jupyter_client 8.0.3 jupyter_core 5.2.0 jupyter-events 0.6.3 jupyter_server 2.4.0 jupyter_server_fileid 0.8.0 jupyter_server_terminals 0.4.4 jupyter_server_ydoc 0.6.1 jupyter-ydoc 0.2.2 jupyterlab 3.6.1 jupyterlab-pygments 0.2.2 jupyterlab_server 2.20.0 jupyterlab-widgets 3.0.5 libmambapy 1.1.0 mamba 1.1.0 MarkupSafe 2.1.2 matplotlib-inline 0.1.6 mistune 2.0.5 multidict 6.0.4 multiprocess 0.70.14 nbclassic 0.5.3 nbclient 0.7.2 nbconvert 7.2.9 nbformat 5.7.3 nest-asyncio 1.5.6 nodeenv 1.7.0 notebook 6.5.3 notebook_shim 0.2.2 numpy 1.24.2 outcome 1.2.0 packaging 23.0 pandas 1.5.3 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 pip 22.3.1 platformdirs 3.0.0 plotly 5.13.1 pluggy 1.0.0 pre-commit 3.1.0 prometheus-client 0.16.0 prompt-toolkit 3.0.38 psutil 5.9.4 ptyprocess 0.7.0 pure-eval 0.2.2 pyarrow 11.0.0 pycosat 0.6.4 pycparser 2.21 Pygments 2.14.0 pyOpenSSL 22.1.0 pyrsistent 0.19.3 PySocks 1.7.1 pytest 7.2.1 pytest-asyncio 0.20.3 pytest-cov 4.0.0 pytest-timeout 2.1.0 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2022.7.1 PyYAML 6.0 pyzmq 25.0.0 requests 2.28.1 responses 0.18.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 ruamel-yaml-conda 0.15.80 Send2Trash 1.8.0 setuptools 65.6.3 simplegeneric 0.8.1 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 soupsieve 2.4 stack-data 0.6.2 tenacity 8.2.2 terminado 0.17.1 tinycss2 1.2.1 tomli 2.0.1 toolz 0.12.0 tornado 6.2 tqdm 4.65.0 traitlets 5.8.1 trio 0.22.0 typing_extensions 4.5.0 uri-template 1.2.0 urllib3 1.26.13 virtualenv 20.19.0 wcwidth 0.2.6 webcolors 1.12 webencodings 0.5.1 websocket-client 1.5.1 wheel 0.38.4 widgetsnbextension 4.0.5 xxhash 3.2.0 y-py 0.5.9 yarl 1.8.2 ypy-websocket 0.8.2 zstandard 0.19.0 ``` Any idea why this is happening? I debugged this to know the tqdm.pbar value is not being updated properly and its not the kernel not sending the comm messages to the IProgress bar
### Describe the bug During downloading the rotten tomatoes dataset, not all progress bars are displayed properly. This might be related to [this ticket](https://github.com/huggingface/datasets/issues/5117) as it raised the same concern but its not clear if the fix solves this issue too. ipywidgets <img width="1243" alt="image" src="https://user-images.githubusercontent.com/110427462/224851138-13fee5b7-ab51-4883-b96f-1b9808782e3b.png"> tqdm <img width="1251" alt="Screen Shot 2023-03-13 at 3 58 59 PM" src="https://user-images.githubusercontent.com/110427462/224851180-5feb7825-9250-4b1e-ad0c-f3172ac1eb78.png"> ### Steps to reproduce the bug 1. Run this line ``` from datasets import load_dataset rotten_tomatoes = load_dataset("rotten_tomatoes", split="train") ``` ### Expected behavior all progress bars for builder script, metadata, readme, training, validation, and test set ### Environment info requirements.txt ``` aiofiles==22.1.0 aiohttp==3.8.4 aiosignal==1.3.1 aiosqlite==0.18.0 anyio==3.6.2 appnope==0.1.3 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asttokens==2.2.1 async-generator==1.10 async-timeout==4.0.2 attrs==22.2.0 Babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.11.2 bleach==6.0.0 brotlipy @ file:///Users/runner/miniforge3/conda-bld/brotlipy_1666764961872/work certifi==2022.12.7 cffi @ file:///Users/runner/miniforge3/conda-bld/cffi_1671179414629/work cfgv==3.3.1 charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1661170624537/work comm==0.1.2 conda==22.9.0 conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1669907009957/work conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1669733752472/work coverage==7.2.1 cryptography @ file:///Users/runner/miniforge3/conda-bld/cryptography_1669592251328/work datasets==2.1.0 debugpy==1.6.6 decorator==5.1.1 defusedxml==0.7.1 dill==0.3.6 distlib==0.3.6 distro==1.4.0 entrypoints==0.4 exceptiongroup==1.1.0 executing==1.2.0 fastjsonschema==2.16.3 filelock==3.9.0 flaky==3.7.0 fqdn==1.5.1 frozenlist==1.3.3 fsspec==2023.3.0 huggingface-hub==0.10.1 identify==2.5.18 idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work iniconfig==2.0.0 ipykernel==6.12.1 ipyparallel==8.4.1 ipython==7.32.0 ipython-genutils==0.2.0 ipywidgets==8.0.4 isoduration==20.11.0 jedi==0.18.2 Jinja2==3.1.2 json5==0.9.11 jsonpointer==2.3 jsonschema==4.17.3 jupyter-events==0.6.3 jupyter-ydoc==0.2.2 jupyter_client==8.0.3 jupyter_core==5.2.0 jupyter_server==2.4.0 jupyter_server_fileid==0.8.0 jupyter_server_terminals==0.4.4 jupyter_server_ydoc==0.6.1 jupyterlab==3.6.1 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.5 jupyterlab_server==2.20.0 libmambapy @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/libmambapy mamba @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/mamba MarkupSafe==2.1.2 matplotlib-inline==0.1.6 mistune==2.0.5 multidict==6.0.4 multiprocess==0.70.14 nbclassic==0.5.3 nbclient==0.7.2 nbconvert==7.2.9 nbformat==5.7.3 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.3 notebook_shim==0.2.2 numpy==1.24.2 outcome==1.2.0 packaging==23.0 pandas==1.5.3 pandocfilters==1.5.0 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 platformdirs==3.0.0 plotly==5.13.1 pluggy==1.0.0 pre-commit==3.1.0 prometheus-client==0.16.0 prompt-toolkit==3.0.38 psutil==5.9.4 ptyprocess==0.7.0 pure-eval==0.2.2 pyarrow==11.0.0 pycosat @ file:///Users/runner/miniforge3/conda-bld/pycosat_1666836580084/work pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work Pygments==2.14.0 pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1665350324128/work pyrsistent==0.19.3 PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work pytest==7.2.1 pytest-asyncio==0.20.3 pytest-cov==4.0.0 pytest-timeout==2.1.0 python-dateutil==2.8.2 python-json-logger==2.0.7 pytz==2022.7.1 PyYAML==6.0 pyzmq==25.0.0 requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1661872987712/work responses==0.18.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 ruamel-yaml-conda @ file:///Users/runner/miniforge3/conda-bld/ruamel_yaml_1666819760545/work Send2Trash==1.8.0 simplegeneric==0.8.1 six==1.16.0 sniffio==1.3.0 sortedcontainers==2.4.0 soupsieve==2.4 stack-data==0.6.2 tenacity==8.2.2 terminado==0.17.1 tinycss2==1.2.1 tomli==2.0.1 toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1657485559105/work tornado==6.2 tqdm==4.64.1 traitlets==5.8.1 trio==0.22.0 typing_extensions==4.5.0 uri-template==1.2.0 urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1669259737463/work virtualenv==20.19.0 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 widgetsnbextension==4.0.5 xxhash==3.2.0 y-py==0.5.9 yarl==1.8.2 ypy-websocket==0.8.2 zstandard==0.19.0 ```
258
373
Not all progress bars are showing up when they should for downloading dataset ### Describe the bug During downloading the rotten tomatoes dataset, not all progress bars are displayed properly. This might be related to [this ticket](https://github.com/huggingface/datasets/issues/5117) as it raised the same concern but its not clear if the fix solves this issue too. ipywidgets <img width="1243" alt="image" src="https://user-images.githubusercontent.com/110427462/224851138-13fee5b7-ab51-4883-b96f-1b9808782e3b.png"> tqdm <img width="1251" alt="Screen Shot 2023-03-13 at 3 58 59 PM" src="https://user-images.githubusercontent.com/110427462/224851180-5feb7825-9250-4b1e-ad0c-f3172ac1eb78.png"> ### Steps to reproduce the bug 1. Run this line ``` from datasets import load_dataset rotten_tomatoes = load_dataset("rotten_tomatoes", split="train") ``` ### Expected behavior all progress bars for builder script, metadata, readme, training, validation, and test set ### Environment info requirements.txt ``` aiofiles==22.1.0 aiohttp==3.8.4 aiosignal==1.3.1 aiosqlite==0.18.0 anyio==3.6.2 appnope==0.1.3 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asttokens==2.2.1 async-generator==1.10 async-timeout==4.0.2 attrs==22.2.0 Babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.11.2 bleach==6.0.0 brotlipy @ file:///Users/runner/miniforge3/conda-bld/brotlipy_1666764961872/work certifi==2022.12.7 cffi @ file:///Users/runner/miniforge3/conda-bld/cffi_1671179414629/work cfgv==3.3.1 charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1661170624537/work comm==0.1.2 conda==22.9.0 conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1669907009957/work conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1669733752472/work coverage==7.2.1 cryptography @ file:///Users/runner/miniforge3/conda-bld/cryptography_1669592251328/work datasets==2.1.0 debugpy==1.6.6 decorator==5.1.1 defusedxml==0.7.1 dill==0.3.6 distlib==0.3.6 distro==1.4.0 entrypoints==0.4 exceptiongroup==1.1.0 executing==1.2.0 fastjsonschema==2.16.3 filelock==3.9.0 flaky==3.7.0 fqdn==1.5.1 frozenlist==1.3.3 fsspec==2023.3.0 huggingface-hub==0.10.1 identify==2.5.18 idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work iniconfig==2.0.0 ipykernel==6.12.1 ipyparallel==8.4.1 ipython==7.32.0 ipython-genutils==0.2.0 ipywidgets==8.0.4 isoduration==20.11.0 jedi==0.18.2 Jinja2==3.1.2 json5==0.9.11 jsonpointer==2.3 jsonschema==4.17.3 jupyter-events==0.6.3 jupyter-ydoc==0.2.2 jupyter_client==8.0.3 jupyter_core==5.2.0 jupyter_server==2.4.0 jupyter_server_fileid==0.8.0 jupyter_server_terminals==0.4.4 jupyter_server_ydoc==0.6.1 jupyterlab==3.6.1 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.5 jupyterlab_server==2.20.0 libmambapy @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/libmambapy mamba @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1671598370072/work/mamba MarkupSafe==2.1.2 matplotlib-inline==0.1.6 mistune==2.0.5 multidict==6.0.4 multiprocess==0.70.14 nbclassic==0.5.3 nbclient==0.7.2 nbconvert==7.2.9 nbformat==5.7.3 nest-asyncio==1.5.6 nodeenv==1.7.0 notebook==6.5.3 notebook_shim==0.2.2 numpy==1.24.2 outcome==1.2.0 packaging==23.0 pandas==1.5.3 pandocfilters==1.5.0 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 platformdirs==3.0.0 plotly==5.13.1 pluggy==1.0.0 pre-commit==3.1.0 prometheus-client==0.16.0 prompt-toolkit==3.0.38 psutil==5.9.4 ptyprocess==0.7.0 pure-eval==0.2.2 pyarrow==11.0.0 pycosat @ file:///Users/runner/miniforge3/conda-bld/pycosat_1666836580084/work pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work Pygments==2.14.0 pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1665350324128/work pyrsistent==0.19.3 PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work pytest==7.2.1 pytest-asyncio==0.20.3 pytest-cov==4.0.0 pytest-timeout==2.1.0 python-dateutil==2.8.2 python-json-logger==2.0.7 pytz==2022.7.1 PyYAML==6.0 pyzmq==25.0.0 requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1661872987712/work responses==0.18.0 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 ruamel-yaml-conda @ file:///Users/runner/miniforge3/conda-bld/ruamel_yaml_1666819760545/work Send2Trash==1.8.0 simplegeneric==0.8.1 six==1.16.0 sniffio==1.3.0 sortedcontainers==2.4.0 soupsieve==2.4 stack-data==0.6.2 tenacity==8.2.2 terminado==0.17.1 tinycss2==1.2.1 tomli==2.0.1 toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1657485559105/work tornado==6.2 tqdm==4.64.1 traitlets==5.8.1 trio==0.22.0 typing_extensions==4.5.0 uri-template==1.2.0 urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1669259737463/work virtualenv==20.19.0 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 widgetsnbextension==4.0.5 xxhash==3.2.0 y-py==0.5.9 yarl==1.8.2 ypy-websocket==0.8.2 zstandard==0.19.0 ``` Hi sorry for the late update. I think the problem still exists despite the `leave` flag <img width="1105" alt="image" src="https://user-images.githubusercontent.com/110427462/226501615-5b02fb02-fd5f-4eda-b1f7-a7ed6570892d.png"> ``` Package Version ------------------------ --------- aiofiles 22.1.0 aiohttp 3.8.4 aiosignal 1.3.1 aiosqlite 0.18.0 anyio 3.6.2 appnope 0.1.3 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 async-generator 1.10 async-timeout 4.0.2 attrs 22.2.0 Babel 2.12.1 backcall 0.2.0 beautifulsoup4 4.11.2 bleach 6.0.0 brotlipy 0.7.0 certifi 2022.12.7 cffi 1.15.1 cfgv 3.3.1 charset-normalizer 2.1.1 comm 0.1.2 conda 22.9.0 conda-package-handling 2.0.2 conda_package_streaming 0.7.0 coverage 7.2.1 cryptography 38.0.4 datasets 2.8.0 debugpy 1.6.6 decorator 5.1.1 defusedxml 0.7.1 dill 0.3.6 distlib 0.3.6 distro 1.4.0 entrypoints 0.4 exceptiongroup 1.1.0 executing 1.2.0 fastjsonschema 2.16.3 filelock 3.9.0 flaky 3.7.0 fqdn 1.5.1 frozenlist 1.3.3 fsspec 2023.3.0 huggingface-hub 0.10.1 identify 2.5.18 idna 3.4 iniconfig 2.0.0 ipykernel 6.12.1 ipyparallel 8.4.1 ipython 7.32.0 ipython-genutils 0.2.0 ipywidgets 8.0.4 isoduration 20.11.0 jedi 0.18.2 Jinja2 3.1.2 json5 0.9.11 jsonpointer 2.3 jsonschema 4.17.3 jupyter_client 8.0.3 jupyter_core 5.2.0 jupyter-events 0.6.3 jupyter_server 2.4.0 jupyter_server_fileid 0.8.0 jupyter_server_terminals 0.4.4 jupyter_server_ydoc 0.6.1 jupyter-ydoc 0.2.2 jupyterlab 3.6.1 jupyterlab-pygments 0.2.2 jupyterlab_server 2.20.0 jupyterlab-widgets 3.0.5 libmambapy 1.1.0 mamba 1.1.0 MarkupSafe 2.1.2 matplotlib-inline 0.1.6 mistune 2.0.5 multidict 6.0.4 multiprocess 0.70.14 nbclassic 0.5.3 nbclient 0.7.2 nbconvert 7.2.9 nbformat 5.7.3 nest-asyncio 1.5.6 nodeenv 1.7.0 notebook 6.5.3 notebook_shim 0.2.2 numpy 1.24.2 outcome 1.2.0 packaging 23.0 pandas 1.5.3 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 pip 22.3.1 platformdirs 3.0.0 plotly 5.13.1 pluggy 1.0.0 pre-commit 3.1.0 prometheus-client 0.16.0 prompt-toolkit 3.0.38 psutil 5.9.4 ptyprocess 0.7.0 pure-eval 0.2.2 pyarrow 11.0.0 pycosat 0.6.4 pycparser 2.21 Pygments 2.14.0 pyOpenSSL 22.1.0 pyrsistent 0.19.3 PySocks 1.7.1 pytest 7.2.1 pytest-asyncio 0.20.3 pytest-cov 4.0.0 pytest-timeout 2.1.0 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2022.7.1 PyYAML 6.0 pyzmq 25.0.0 requests 2.28.1 responses 0.18.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 ruamel-yaml-conda 0.15.80 Send2Trash 1.8.0 setuptools 65.6.3 simplegeneric 0.8.1 six 1.16.0 sniffio 1.3.0 sortedcontainers 2.4.0 soupsieve 2.4 stack-data 0.6.2 tenacity 8.2.2 terminado 0.17.1 tinycss2 1.2.1 tomli 2.0.1 toolz 0.12.0 tornado 6.2 tqdm 4.65.0 traitlets 5.8.1 trio 0.22.0 typing_extensions 4.5.0 uri-template 1.2.0 urllib3 1.26.13 virtualenv 20.19.0 wcwidth 0.2.6 webcolors 1.12 webencodings 0.5.1 websocket-client 1.5.1 wheel 0.38.4 widgetsnbextension 4.0.5 xxhash 3.2.0 y-py 0.5.9 yarl 1.8.2 ypy-websocket 0.8.2 zstandard 0.19.0 ``` Any idea why this is happening? I debugged this to know the tqdm.pbar value is not being updated properly and its not the kernel not sending the comm messages to the IProgress bar
[ -1.3264236450195312, -0.9384112358093262, -0.6486805081367493, 1.4555368423461914, -0.2238524854183197, -1.1209741830825806, 0.16965985298156738, -1.0841684341430664, 1.5862623453140259, -0.8087064623832703, 0.2877905070781708, -1.5388022661209106, -0.00938345491886139, -0.5007497668266296, -0.6942360401153564, -0.8787776231765747, -0.3694928288459778, -0.6951466202735901, 1.1467682123184204, 2.5018014907836914, 1.2820069789886475, -1.293919324874878, 2.8020732402801514, 0.8319416642189026, -0.28001028299331665, -0.9605249166488647, 0.5517425537109375, 0.12032397836446762, -1.4210278987884521, -0.3606841564178467, -0.95340496301651, -0.05436718463897705, -0.47521406412124634, -0.5139099955558777, 0.01205915305763483, 0.32949796319007874, -0.30293142795562744, -0.47587472200393677, -0.5175473093986511, -0.7565034627914429, 0.4358656406402588, -0.44675952196121216, 0.7830324172973633, -0.37251025438308716, 1.8247151374816895, -0.6203075647354126, 0.44196105003356934, 0.6914990544319153, 1.1223551034927368, 0.18493938446044922, 0.06708282977342606, 0.2905005216598511, 0.4411229193210602, -0.07392039895057678, 0.5328017473220825, 1.2482444047927856, 0.707378625869751, 0.489225298166275, 0.7258545160293579, -2.1333541870117188, 1.3462632894515991, -0.9050483107566833, 0.24108177423477173, 1.4318805932998657, -0.9594061970710754, 0.4644289016723633, -1.8384290933609009, 0.0010127546265721321, 0.49172425270080566, -2.3738152980804443, 0.3210539221763611, -1.4016693830490112, -0.6640981435775757, 1.0285650491714478, 0.3016757369041443, -1.2232115268707275, 0.06823935359716415, -0.5586625933647156, 1.0306448936462402, 0.472737580537796, 1.1082204580307007, -1.6756136417388916, -0.13056080043315887, -0.27917566895484924, 0.0986303985118866, -1.3791424036026, -1.5639415979385376, 0.5323109030723572, 0.6772693395614624, 0.6107043027877808, -0.06284146755933762, 1.1105190515518188, -1.0348212718963623, 0.8182836771011353, -0.9626814126968384, -1.7542669773101807, -1.4463520050048828, -2.3885250091552734, -2.2114641666412354, 0.7321659922599792, -0.3870006203651428, -0.5330488681793213, 2.028954029083252, -1.109232783317566, -1.7244802713394165, 1.1212314367294312, 0.15596641600131989, -0.07020474225282669, 2.4182093143463135, 0.23992101848125458, -0.7151147723197937, 0.3919013440608978, -0.8598892092704773, 0.6851394176483154, -0.37436047196388245, 1.3424519300460815, 0.450309693813324, -1.0088430643081665, 1.5628771781921387, -0.35911062359809875, 0.5284321904182434, -0.765215277671814, -0.48076531291007996, -0.7409348487854004, 0.16489915549755096, 2.011080503463745, -0.29569926857948303, 1.5287680625915527, -0.38313019275665283, -1.5510956048965454, -1.6284515857696533, 0.8124060034751892, 0.5507773756980896, -0.6719760894775391, 0.13458159565925598, -0.3420109450817108, 0.0677804946899414, 0.040792401880025864, 1.0459445714950562, 1.3813368082046509, 0.7717069983482361, -0.23531514406204224, -0.828429102897644, 0.1293143928050995, -0.09062591195106506, -0.7005914449691772, -1.7677950859069824, -0.33333081007003784, 0.06839984655380249, 0.668912947177887, -1.3072950839996338, 1.6873401403427124, 0.9248777627944946, 1.8580927848815918, 1.0411128997802734, -0.43434035778045654, 1.545296549797058, 0.12836627662181854, 1.7823069095611572, -0.5028268694877625, 0.7402535676956177, -0.395565927028656, -1.111177682876587, 0.7468780875205994, -0.22836297750473022, -2.046111583709717, -0.6781240105628967, -0.7382686138153076, -0.17158180475234985, -0.7904989123344421, 0.9296368956565857, -0.2801314890384674, -1.420066237449646, 0.2127217799425125, -0.7090380787849426, 0.08217692375183105, -1.2416249513626099, 0.3624788224697113, 0.7503380179405212, -0.6644411683082581, 0.08891671150922775, -0.3221116065979004, -1.134242296218872, -0.5282745957374573, 0.31056758761405945, 1.8718624114990234, -0.6522048115730286, 0.8662008047103882, 1.031586766242981, -0.8051803112030029, -0.029608339071273804, 0.41641390323638916, -0.22893038392066956, 0.8223598599433899, -1.0480831861495972, -0.35961222648620605, 1.1041390895843506, -0.21292231976985931, -0.5707831978797913, 1.432334303855896, 0.7724410891532898, -0.951026201248169, -0.278762549161911, -0.09782371670007706, -0.7538038492202759, 0.03847706317901611, -1.5873204469680786, -0.1590404361486435, 0.35917043685913086, -1.5131072998046875, -0.5766028761863708, -0.2601264715194702, 1.3590649366378784, -0.1302870810031891, 1.4971392154693604, -0.2107590138912201, -0.16952693462371826, -0.3738345503807068, -0.3250579237937927, 0.14620180428028107, -0.16451483964920044, -0.6045374870300293, 0.24113504588603973, -0.885249674320221, 0.23052364587783813, 1.5159133672714233, 0.33123692870140076, 0.027124851942062378, 0.5125289559364319, 1.0720354318618774, 0.3916377127170563, -0.18414241075515747, -0.8581019639968872, -1.5313671827316284, 1.8790932893753052, -1.5507044792175293, 2.0597352981567383, 0.8571311235427856, -0.08513270318508148, -1.773301124572754, -1.9789354801177979, 1.2704802751541138, 1.1264245510101318, 2.498723030090332, 0.5673776268959045, 0.41312912106513977, -0.7802892327308655, -0.743147075176239, 0.2778957486152649, -1.0562846660614014, -0.842059850692749, 0.18230773508548737, 2.312608003616333, 1.685219168663025, -0.4721333682537079, -0.17751315236091614, -1.0745774507522583, 1.3643615245819092, -0.05104077607393265, 0.17848297953605652, 1.9613629579544067, -0.18574801087379456, -1.0812151432037354, 1.220943808555603, -2.3158464431762695, 0.16064906120300293, 1.9063159227371216, 0.24774114787578583, 0.14806047081947327, -1.3880295753479004, -0.7085928320884705, -0.2926962971687317, -0.4925081431865692, -1.270928144454956, 0.45688408613204956, -0.25573405623435974, -0.7919247150421143, -1.500393271446228, 0.07681971043348312, -1.1543275117874146, -1.7040988206863403, 0.22854001820087433, 1.9267981052398682, 1.9650622606277466, -0.8419221639633179, 1.4860954284667969, -0.2633066177368164, -0.012466046027839184, 1.2005623579025269, 1.3206286430358887, 3.1773433685302734, 1.9660741090774536, -1.249718427658081, 0.728823721408844, -0.1485234797000885, -0.3575548827648163, 1.0654915571212769, -1.1012954711914062, 1.3339767456054688, -0.13534243404865265, -1.1647958755493164, -1.22562575340271, 0.8954482078552246, 0.510634183883667, 0.0014896485954523087, -0.4347967803478241, 1.2166831493377686, 0.15813294053077698, 1.493022084236145, 0.5519716739654541, -0.30265188217163086, 0.7607895731925964, -0.41187939047813416, -0.3816013038158417, 1.6139248609542847, 0.18789631128311157, -1.3983361721038818, -2.232332706451416, -0.1701631247997284, -0.8432724475860596, 0.06561646610498428, -0.6299902200698853, -1.0793085098266602, 1.7569000720977783, 0.4614907205104828, -1.1434630155563354, -0.19262339174747467, -0.34047186374664307, -0.6605672836303711, 2.6074423789978027, -1.4253004789352417, -0.17185866832733154, -1.014114260673523, -0.6091614365577698, 1.5158063173294067, -1.19448983669281, -0.2071390151977539, -0.9542660713195801, -0.511454701423645, -1.3103524446487427, -0.4918335974216461, 0.013297081924974918, -0.9189445376396179, 0.7515636682510376, 0.15386134386062622, -1.1937440633773804, -0.3475669324398041, -0.8827348351478577, 0.8983862996101379, 0.00006403867155313492, 0.21875353157520294, 1.873306155204773, 0.28677278757095337, -0.3794650435447693, 0.7654767632484436, 1.1162285804748535, 0.5406996011734009, -0.6401777863502502, 0.3794041574001312, -0.6875298619270325, 0.35177236795425415, -1.281044602394104, 0.3441776633262634, -2.8539044857025146, 0.61514812707901, -0.08392778784036636, -0.024797987192869186, 0.000034973956644535065, -1.194408655166626, 1.1629431247711182, 2.5620689392089844, -1.078218698501587, 0.5640060901641846, 0.27512937784194946, 1.1639807224273682, -1.5771784782409668, 0.3201011121273041, -0.38371533155441284, 1.9762274026870728, 0.2795587182044983, 1.240271806716919, -0.5267152786254883, -2.357116460800171, 0.548858642578125, -1.2012752294540405, -1.1093086004257202, 0.7994322180747986, -0.8005868196487427, 0.023361768573522568, -1.3043010234832764, -0.31918445229530334, -0.8631636500358582, -1.1695635318756104, 0.6567819714546204, 0.21823151409626007, 0.48558706045150757, -0.6335114240646362, 0.4366287589073181, -2.2367093563079834, -1.217456340789795, -0.20234116911888123, -0.8802458643913269, 0.44840648770332336, -0.3258034288883209, 0.6457643508911133, -0.12501803040504456, -0.006082933396100998, 0.3527431786060333, 1.4453222751617432, 3.221082925796509, 0.08363771438598633, 0.32710739970207214, -0.17114850878715515, -0.9948626160621643, 1.543320655822754, 0.9202702045440674, -0.07108848541975021, -0.6195524334907532, -1.162570834159851, 1.21870756149292, 1.7704018354415894, 1.054966688156128, 0.026517190039157867, -0.9359890222549438, -0.8675397038459778, -0.0647827759385109, 0.15825696289539337, 0.420868843793869, 1.1193792819976807, 0.10908511281013489, 0.12862417101860046, 1.505079746246338, 1.263097882270813, -0.4784046411514282, 0.35150519013404846, -0.8686711192131042, -0.4580078423023224, 0.4400888979434967, 0.29327642917633057, -0.03615310788154602, 0.28680145740509033, -1.1228355169296265, -0.19078049063682556, -0.3100169599056244, -0.9030922651290894, -0.7171383500099182, -0.3499327003955841, -0.3026803731918335, 1.6297581195831299, 0.07415986806154251, -0.39133962988853455, -0.01506481971591711, -0.8915830254554749, -0.09816428273916245, -1.0788911581039429, 0.3656144142150879, -0.11688737571239471, -0.09904992580413818, -0.05597981438040733, 1.7824515104293823, -0.8539896011352539, -2.0903754234313965, 0.24949900805950165, 0.12853673100471497, -0.29990121722221375, 0.27480724453926086, 1.6903855800628662, 0.6022132635116577, 1.397926926612854, 1.254647970199585, 1.0053541660308838, -0.6317837834358215, -1.3429055213928223, 0.6736681461334229, 0.9414507150650024, -1.4489234685897827, 0.7306339144706726, -0.05810103565454483, -0.5034841299057007, 0.5918634533882141, 1.2809768915176392, 0.4452027678489685, -1.9612566232681274, 0.8111395239830017, -0.9066421389579773, 0.7893718481063843, 0.7496166229248047, 0.741723895072937, 0.1785392463207245, 0.8709747791290283, -1.2663027048110962, -1.0329644680023193, -0.5610777735710144, -0.6425268054008484, 1.8954112529754639, -0.23670382797718048, 0.49597489833831787, -0.35417452454566956, -1.2777936458587646, 0.00746834184974432, 0.560722827911377, 0.2682333290576935, -0.45527660846710205, 0.8406658172607422, -0.6649221777915955, -1.164272665977478, -1.3115415573120117, -0.5275035500526428, -1.0053791999816895, -0.8800131678581238, 0.9909493923187256, 0.777584433555603, 0.2973446846008301, 1.9416676759719849, 0.559420645236969, 0.31127822399139404, -2.778543472290039, 0.882321834564209, 0.22777089476585388, 0.012821896933019161, 0.9629915356636047, 0.23350682854652405, 1.035126805305481, -0.005076564848423004, 0.49707818031311035, -2.5006959438323975, 2.4726479053497314, -0.26570042967796326, 0.7666032314300537, 0.04096859320998192, -0.05195460096001625, 1.1151899099349976, 0.7206751704216003, 0.6048385500907898, -0.9940212368965149, 0.7015234231948853, -0.5945226550102234, 1.2874438762664795, 0.9002634286880493, -0.8534373641014099, -0.046612318605184555, 1.193808913230896, 0.40896567702293396, -0.5054737329483032, -0.8436979651451111, -0.9921020865440369, 0.8376569747924805, 1.7949086427688599, 0.05353802070021629, 0.10291128605604172, 0.7709465026855469, 0.6193822622299194, -1.358136773109436, -0.0034583513624966145, -0.6747903227806091, -0.7295896410942078, 1.655059576034546, 2.1061649322509766, -0.10224369913339615, -0.3741547465324402, -0.6172143816947937, -1.3127933740615845, 0.8294059634208679, 0.03685401380062103, 0.2573760449886322, 0.719157874584198, -0.6470134854316711, 1.0478730201721191, 0.8283022046089172, 0.9304817318916321, 0.2365679293870926, 0.27427518367767334, 0.3956202566623688, -0.4449615776538849, -1.25662362575531, -0.18162783980369568, -1.0357444286346436, -2.6060309410095215, 0.49324238300323486, -0.1104603111743927, -1.3728281259536743, 0.0525495782494545, -1.0709863901138306, 0.8471406698226929, -0.5719686150550842, -1.050586223602295, -1.503016710281372, 0.10018382221460342, -0.22007858753204346, 0.9345229268074036, -1.628341794013977, -0.11098366975784302, 1.2562624216079712, 0.9753935933113098, -0.5242853164672852, 1.0169938802719116, 0.23592950403690338, 1.0682313442230225, 0.9513755440711975, -0.2945238947868347, 0.4478552043437958, 0.07783273607492447, -1.3347187042236328, 0.291534960269928, 1.2330708503723145, 0.19382327795028687, 1.571107268333435, -0.6644659042358398, 0.032032549381256104, 0.4396732449531555, -0.4743369221687317, -0.4547918438911438, -0.5301090478897095, 0.588726818561554, 0.02560805156826973, -1.0159002542495728, -0.10198944807052612, -0.17938759922981262, -0.12327105551958084, 0.1697225123643875, -1.457358479499817, -0.1308903694152832, -0.4063449501991272, -0.5962187051773071, -1.2837715148925781, 0.007870695553719997, 1.3090744018554688, -0.8696274161338806, -0.16989335417747498, 0.4304986596107483, 0.25357067584991455, 0.5938504934310913, 0.6459500789642334, -0.7873123288154602, -0.40934666991233826, -0.13480712473392487, -0.35349687933921814, 0.3708249628543854, 1.3444147109985352, -0.19323833286762238, -1.0075318813323975, 0.5676605105400085, -0.33636948466300964, 0.20800171792507172, 1.9729582071304321, -0.03773592785000801, -0.8032039403915405, 0.23665069043636322, -0.710187554359436, 1.9216382503509521, 1.615120530128479, 1.4294428825378418, -0.2984520196914673, -0.7974289059638977, 0.5762014389038086, -0.3754054009914398, -0.38105249404907227, 0.8218792676925659, 0.5763119459152222, -0.258184015750885, -1.4450740814208984, 0.6624094843864441, 1.286661148071289, -0.9542509913444519, -0.7825733423233032, 0.13693884015083313, -0.6710239052772522, 1.0891600847244263, 0.7639843225479126, 0.35438263416290283, 0.27816736698150635, 1.6357909440994263, 0.8016554117202759, -0.5938574075698853, 0.5836235284805298, 0.3748997449874878, -0.1843360960483551, -2.106628894805908, -1.0913746356964111, 0.3134802281856537, -0.5203704833984375, -1.5761938095092773, 1.4370579719543457, -1.1632583141326904, -1.0476865768432617, 0.5362228155136108, 0.14497871696949005, 1.3320982456207275, 0.330879807472229, 1.6370823383331299, 2.0088112354278564, 0.837924063205719, 0.3298428952693939, 1.2216312885284424, -0.16285820305347443, -0.5059006214141846, 1.7135779857635498, -0.5277518630027771, 0.5224311351776123, 1.0270960330963135, -0.2398078441619873, -1.014394998550415, -0.8327071070671082, -1.303351640701294, -0.7366569638252258, 1.2118607759475708, 0.15497280657291412, -1.0589383840560913, 0.23256509006023407, 1.5727375745773315, -0.014583304524421692, -0.2591516673564911, 0.7013377547264099, 0.44948816299438477, -0.719549834728241, -0.1427685022354126, -0.9377006888389587, 0.5149003267288208, -0.1851353794336319, -0.4442760646343231, 0.19243505597114563, 0.4502390921115875, 1.3185665607452393, 0.03270843252539635, 0.12104309350252151, 1.3469022512435913, -1.2531969547271729, 1.5283422470092773, -0.7548007965087891, 0.34358131885528564, -2.3359546661376953, 1.4948817491531372, -0.8572251200675964, 1.896662950515747, -2.594381332397461, 0.5063298940658569, -0.5471183061599731, -0.4599049389362335, 0.21897535026073456, -0.3080695867538452, 0.1450466364622116, -0.23525336384773254, -1.0873844623565674, -0.16838864982128143, -0.7087514400482178, 0.5761335492134094, 1.1020753383636475, 1.3716988563537598, -1.1612130403518677, -0.08748570829629898, -1.8248422145843506, -0.1598612666130066, -0.7872077226638794, 0.3176953196525574, -1.9585145711898804, -0.32244372367858887, -1.9226930141448975, -2.3595876693725586, -1.2556233406066895, -0.8218794465065002, 1.1275907754898071, 0.0858975201845169, -0.7529829144477844, 1.1684882640838623, -0.33089199662208557, -1.843163013458252, 1.1152657270431519, -2.1271088123321533 ]
https://github.com/huggingface/datasets/issues/5633
Cannot import datasets
Okay, the issue was likely caused by mixing `conda` and `pip` usage - I forgot that I have already used `pip` in this environment previously and that it was 'spoiled' because of it. Creating another environment and installing `datasets` by pip with other packages from the `requirements.txt` file solved the problem.
### Describe the bug Hi, I cannot even import the library :( I installed it by running: ``` $ conda install datasets ``` Then I realized I should maybe use the huggingface channel, because I encountered the error below, so I ran: ``` $ conda remove datasets $ conda install -c huggingface datasets ``` Please see 'steps to reproduce the bug' for the specific error, as steps to reproduce is just importing the library ### Steps to reproduce the bug ``` $ python3 Python 3.8.15 (default, Nov 24 2022, 15:19:38) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import datasets Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/datasets/__init__.py", line 33, in <module> from .arrow_dataset import Dataset, concatenate_datasets File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 59, in <module> from .arrow_reader import ArrowReader File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/datasets/arrow_reader.py", line 27, in <module> import pyarrow.parquet as pq File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/pyarrow/parquet/__init__.py", line 20, in <module> from .core import * File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/pyarrow/parquet/core.py", line 37, in <module> from pyarrow._parquet import (ParquetReader, Statistics, # noqa ImportError: cannot import name 'FileEncryptionProperties' from 'pyarrow._parquet' (/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/pyarrow/_parquet.cpython-38-x86_64-linux-gnu.so) ``` ### Expected behavior I would expect for the statement `import datasets` to cause no error ### Environment info Output of `conda list`: ``` # packages in environment at /home/jack/.conda/envs/pbalawender_zpp: # # Name Version Build Channel _libgcc_mutex 0.1 main _openmp_mutex 5.1 1_gnu abseil-cpp 20210324.2 h2531618_0 advertools 0.13.2 pypi_0 pypi aiofiles 0.8.0 pypi_0 pypi aiohttp 3.8.3 py38h5eee18b_0 aiosignal 1.2.0 pyhd3eb1b0_0 aiosqlite 0.17.0 pypi_0 pypi anyio 3.6.2 pypi_0 pypi aquirdturtle-collapsible-headings 3.1.0 pypi_0 pypi argon2-cffi 21.3.0 pypi_0 pypi argon2-cffi-bindings 21.2.0 pypi_0 pypi arrow 1.2.3 pypi_0 pypi arrow-cpp 3.0.0 py38h6b21186_4 asttokens 2.2.0 pypi_0 pypi async-timeout 4.0.2 py38h06a4308_0 attrs 22.1.0 py38h06a4308_0 automat 22.10.0 pypi_0 pypi aws-c-common 0.4.57 he6710b0_1 aws-c-event-stream 0.1.6 h2531618_5 aws-checksums 0.1.9 he6710b0_0 aws-sdk-cpp 1.8.185 hce553d0_0 babel 2.11.0 pypi_0 pypi backcall 0.2.0 pyhd3eb1b0_0 beautifulsoup4 4.11.1 pypi_0 pypi blas 1.0 mkl bleach 5.0.1 pypi_0 pypi boost-cpp 1.73.0 h27cfd23_11 bottleneck 1.3.5 py38h7deecbd_0 brotli 1.0.9 h5eee18b_7 brotli-bin 1.0.9 h5eee18b_7 brotlipy 0.7.0 py38h27cfd23_1003 bzip2 1.0.8 h7b6447c_0 c-ares 1.18.1 h7f8727e_0 ca-certificates 2023.01.10 h06a4308_0 certifi 2022.9.24 pypi_0 pypi cffi 1.15.1 py38h5eee18b_3 charset-normalizer 2.1.1 pypi_0 pypi click 8.1.3 pypi_0 pypi constantly 15.1.0 pypi_0 pypi contourpy 1.0.6 pypi_0 pypi cryptography 38.0.4 pypi_0 pypi cssselect 1.2.0 pypi_0 pypi cudatoolkit 10.1.243 h8cb64d8_10 conda-forge cycler 0.11.0 pypi_0 pypi dacite 1.6.0 pypi_0 pypi dataclasses 0.8 pyh6d0b6a4_7 datasets 1.18.4 py_0 huggingface datetime 4.7 pypi_0 pypi debugpy 1.6.4 pypi_0 pypi decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pypi_0 pypi dill 0.3.6 py38h06a4308_0 docker-pycreds 0.4.0 pypi_0 pypi double-conversion 3.1.5 he6710b0_1 entrypoints 0.4 py38h06a4308_0 executing 0.8.3 pyhd3eb1b0_0 filelock 3.8.0 pypi_0 pypi flake8 6.0.0 pypi_0 pypi flask 2.1.3 py38h06a4308_0 flit-core 3.6.0 pyhd3eb1b0_0 fonttools 4.38.0 pypi_0 pypi fqdn 1.5.1 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.3.3 py38h5eee18b_0 fsspec 2022.11.0 py38h06a4308_0 gensim 4.2.0 pypi_0 pypi gflags 2.2.2 he6710b0_0 giflib 5.2.1 h5eee18b_3 gitdb 4.0.10 pypi_0 pypi gitpython 3.1.30 pypi_0 pypi glog 0.5.0 h2531618_0 grpc-cpp 1.39.0 hae934f6_5 huggingface-hub 0.11.1 pypi_0 pypi huggingface_hub 0.13.1 py_0 huggingface hyperlink 21.0.0 pypi_0 pypi icu 58.2 he6710b0_3 idna 3.4 py38h06a4308_0 importlib-metadata 5.1.0 pypi_0 pypi importlib_metadata 4.11.3 hd3eb1b0_0 importlib_resources 5.2.0 pyhd3eb1b0_1 incremental 22.10.0 pypi_0 pypi intel-openmp 2021.4.0 h06a4308_3561 ipykernel 6.17.1 pyh210e3f2_0 conda-forge ipython 8.7.0 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi ipywidgets 8.0.2 pyhd8ed1ab_1 conda-forge isoduration 20.11.0 pypi_0 pypi itemadapter 0.7.0 pypi_0 pypi itemloaders 1.0.6 pypi_0 pypi itsdangerous 2.0.1 pyhd3eb1b0_0 jedi 0.18.2 pypi_0 pypi jinja2 3.1.2 py38h06a4308_0 jmespath 1.0.1 pypi_0 pypi joblib 1.2.0 pypi_0 pypi jpeg 9b h024ee3a_2 json5 0.9.10 pypi_0 pypi jsonpickle 3.0.0 pypi_0 pypi jsonpointer 2.3 pypi_0 pypi jsonschema 4.17.3 py38h06a4308_0 jupyter-core 5.1.0 pypi_0 pypi jupyter-events 0.5.0 pypi_0 pypi jupyter-server 1.23.3 pypi_0 pypi jupyter-server-fileid 0.6.0 pypi_0 pypi jupyter-server-ydoc 0.4.0 pypi_0 pypi jupyter-ydoc 0.2.2 pypi_0 pypi jupyter_client 7.4.9 py38h06a4308_0 jupyter_core 5.2.0 py38h06a4308_0 jupyterlab 3.6.0a4 pypi_0 pypi jupyterlab-pygments 0.2.2 pypi_0 pypi jupyterlab-server 2.16.3 pypi_0 pypi jupyterlab_widgets 3.0.3 pyhd8ed1ab_0 conda-forge kiwisolver 1.4.4 pypi_0 pypi krb5 1.19.4 h568e23c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 libboost 1.73.0 h3ff78a5_11 libbrotlicommon 1.0.9 h5eee18b_7 libbrotlidec 1.0.9 h5eee18b_7 libbrotlienc 1.0.9 h5eee18b_7 libcurl 7.88.1 h91b91d3_0 libedit 3.1.20221030 h5eee18b_0 libev 4.33 h7f8727e_1 libevent 2.1.12 h8f2d780_0 libffi 3.4.2 h6a678d5_6 libgcc-ng 11.2.0 h1234567_1 libgomp 11.2.0 h1234567_1 libnghttp2 1.46.0 hce63b2e_0 libpng 1.6.39 h5eee18b_0 libprotobuf 3.17.2 h4ff587b_1 libsodium 1.0.18 h7b6447c_0 libssh2 1.10.0 h8f2d780_0 libstdcxx-ng 11.2.0 h1234567_1 libthrift 0.14.2 hcc01f38_0 libtiff 4.1.0 h2733197_1 libuv 1.44.2 h5eee18b_0 libwebp 1.2.0 h89dd481_0 lz4-c 1.9.4 h6a678d5_0 markupsafe 2.1.1 py38h7f8727e_0 matplotlib 3.6.2 pypi_0 pypi matplotlib-inline 0.1.6 py38h06a4308_0 mccabe 0.7.0 pypi_0 pypi mistune 2.0.4 pypi_0 pypi mkl 2021.4.0 h06a4308_640 mkl-service 2.4.0 py38h7f8727e_0 mkl_fft 1.3.1 py38hd3c417c_0 mkl_random 1.2.2 py38h51133e4_0 morfeusz2 1.99.6 pypi_0 pypi multidict 6.0.2 py38h5eee18b_0 multiprocess 0.70.14 py38h06a4308_0 nbclassic 0.4.8 pypi_0 pypi nbclient 0.7.2 pypi_0 pypi nbconvert 7.2.5 pypi_0 pypi nbformat 5.7.0 py38h06a4308_0 ncurses 6.4 h6a678d5_0 nest-asyncio 1.5.6 py38h06a4308_0 ninja 1.10.2 h06a4308_5 ninja-base 1.10.2 hd09550d_5 notebook 6.5.2 pypi_0 pypi notebook-shim 0.2.2 pypi_0 pypi numexpr 2.8.4 py38he184ba9_0 numpy 1.23.5 py38h14f4228_0 numpy-base 1.23.5 py38h31eccc5_0 oauthlib 3.2.2 pypi_0 pypi opencv-python 4.6.0.66 pypi_0 pypi openssl 1.1.1t h7f8727e_0 orc 1.6.9 ha97a36c_3 packaging 22.0 py38h06a4308_0 pandas 1.5.2 pypi_0 pypi pandocfilters 1.5.0 pypi_0 pypi parsel 1.7.0 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0 pathlib 1.0.1 pypi_0 pypi pathtools 0.1.2 pypi_0 pypi pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 9.3.0 pypi_0 pypi pip 22.2.2 py38h06a4308_0 pkgutil-resolve-name 1.3.10 py38h06a4308_0 platformdirs 2.5.4 pypi_0 pypi prometheus-client 0.15.0 pypi_0 pypi promise 2.3 pypi_0 pypi prompt-toolkit 3.0.33 pypi_0 pypi protego 0.2.1 pypi_0 pypi protobuf 4.21.12 pypi_0 pypi psutil 5.9.0 py38h5eee18b_0 ptyprocess 0.7.0 pyhd3eb1b0_2 pure_eval 0.2.2 pyhd3eb1b0_0 pyarrow 10.0.1 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pycodestyle 2.10.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pydispatcher 2.0.6 pypi_0 pypi pyflakes 3.0.1 pypi_0 pypi pygments 2.11.2 pyhd3eb1b0_0 pyopenssl 22.1.0 pypi_0 pypi pyrsistent 0.18.0 py38heee7806_0 pysocks 1.7.1 py38h06a4308_0 python 3.8.15 h7a1cb2a_2 python-dateutil 2.8.2 pyhd3eb1b0_0 python-dotenv 0.21.0 pypi_0 pypi python-fastjsonschema 2.16.2 py38h06a4308_0 python-json-logger 2.0.4 pypi_0 pypi python-xxhash 2.0.2 py38h5eee18b_1 pytorch 1.7.1 py3.8_cuda10.1.243_cudnn7.6.3_0 pytorch pytz 2022.6 pypi_0 pypi pyyaml 6.0 py38h5eee18b_1 pyzmq 23.2.0 py38h6a678d5_0 queuelib 1.6.2 pypi_0 pypi re2 2022.04.01 h295c915_0 readline 8.2 h5eee18b_0 regex 2022.10.31 pypi_0 pypi requests 2.28.1 py38h06a4308_0 requests-file 1.5.1 pypi_0 pypi requests-oauthlib 1.3.1 pypi_0 pypi rfc3339-validator 0.1.4 pypi_0 pypi rfc3986-validator 0.1.1 pypi_0 pypi scikit-learn 1.1.3 pypi_0 pypi scipy 1.9.3 pypi_0 pypi scrapy 2.7.1 pypi_0 pypi seaborn 0.12.1 pypi_0 pypi send2trash 1.8.0 pypi_0 pypi sentry-sdk 1.12.1 pypi_0 pypi service-identity 21.1.0 pypi_0 pypi setproctitle 1.3.2 pypi_0 pypi setuptools 65.6.3 pypi_0 pypi shortuuid 1.0.11 pypi_0 pypi six 1.16.0 pyhd3eb1b0_1 smart-open 6.2.0 pypi_0 pypi smmap 5.0.0 pypi_0 pypi snappy 1.1.9 h295c915_0 sniffio 1.3.0 pypi_0 pypi soupsieve 2.3.2.post1 pypi_0 pypi sqlite 3.40.1 h5082296_0 stack-data 0.6.2 pypi_0 pypi stack_data 0.2.0 pyhd3eb1b0_0 terminado 0.17.0 pypi_0 pypi threadpoolctl 3.1.0 pypi_0 pypi tinycss2 1.2.1 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tldextract 3.4.0 pypi_0 pypi tokenizers 0.13.2 pypi_0 pypi tomli 2.0.1 pypi_0 pypi torchvision 0.8.2 py38_cu101 pytorch tornado 6.2 py38h5eee18b_0 tqdm 4.64.1 py38h06a4308_0 traitlets 5.6.0 pypi_0 pypi transformers 4.25.1 pypi_0 pypi tweepy 4.12.1 pypi_0 pypi twisted 22.10.0 pypi_0 pypi twython 3.9.1 pypi_0 pypi typing-extensions 4.4.0 py38h06a4308_0 typing_extensions 4.4.0 py38h06a4308_0 uri-template 1.2.0 pypi_0 pypi uriparser 0.9.3 he6710b0_1 urllib3 1.26.13 pypi_0 pypi utf8proc 2.6.1 h27cfd23_0 w3lib 2.1.0 pypi_0 pypi wandb 0.13.7 pypi_0 pypi wcwidth 0.2.5 pyhd3eb1b0_0 webcolors 1.12 pypi_0 pypi webencodings 0.5.1 pypi_0 pypi websocket-client 1.4.2 pypi_0 pypi werkzeug 2.2.2 py38h06a4308_0 wheel 0.38.4 py38h06a4308_0 widgetsnbextension 4.0.3 py38h06a4308_0 xxhash 0.8.0 h7f8727e_3 xz 5.2.10 h5eee18b_1 y-py 0.5.4 pypi_0 pypi yaml 0.2.5 h7b6447c_0 yarl 1.8.1 py38h5eee18b_0 ypy-websocket 0.5.0 pypi_0 pypi zeromq 4.3.4 h2531618_0 zipp 3.11.0 py38h06a4308_0 zlib 1.2.13 h5eee18b_0 zope-interface 5.5.2 pypi_0 pypi zstd 1.4.9 haebb681_0 ```
259
51
Cannot import datasets ### Describe the bug Hi, I cannot even import the library :( I installed it by running: ``` $ conda install datasets ``` Then I realized I should maybe use the huggingface channel, because I encountered the error below, so I ran: ``` $ conda remove datasets $ conda install -c huggingface datasets ``` Please see 'steps to reproduce the bug' for the specific error, as steps to reproduce is just importing the library ### Steps to reproduce the bug ``` $ python3 Python 3.8.15 (default, Nov 24 2022, 15:19:38) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import datasets Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/datasets/__init__.py", line 33, in <module> from .arrow_dataset import Dataset, concatenate_datasets File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 59, in <module> from .arrow_reader import ArrowReader File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/datasets/arrow_reader.py", line 27, in <module> import pyarrow.parquet as pq File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/pyarrow/parquet/__init__.py", line 20, in <module> from .core import * File "/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/pyarrow/parquet/core.py", line 37, in <module> from pyarrow._parquet import (ParquetReader, Statistics, # noqa ImportError: cannot import name 'FileEncryptionProperties' from 'pyarrow._parquet' (/home/jack/.conda/envs/jack_zpp/lib/python3.8/site-packages/pyarrow/_parquet.cpython-38-x86_64-linux-gnu.so) ``` ### Expected behavior I would expect for the statement `import datasets` to cause no error ### Environment info Output of `conda list`: ``` # packages in environment at /home/jack/.conda/envs/pbalawender_zpp: # # Name Version Build Channel _libgcc_mutex 0.1 main _openmp_mutex 5.1 1_gnu abseil-cpp 20210324.2 h2531618_0 advertools 0.13.2 pypi_0 pypi aiofiles 0.8.0 pypi_0 pypi aiohttp 3.8.3 py38h5eee18b_0 aiosignal 1.2.0 pyhd3eb1b0_0 aiosqlite 0.17.0 pypi_0 pypi anyio 3.6.2 pypi_0 pypi aquirdturtle-collapsible-headings 3.1.0 pypi_0 pypi argon2-cffi 21.3.0 pypi_0 pypi argon2-cffi-bindings 21.2.0 pypi_0 pypi arrow 1.2.3 pypi_0 pypi arrow-cpp 3.0.0 py38h6b21186_4 asttokens 2.2.0 pypi_0 pypi async-timeout 4.0.2 py38h06a4308_0 attrs 22.1.0 py38h06a4308_0 automat 22.10.0 pypi_0 pypi aws-c-common 0.4.57 he6710b0_1 aws-c-event-stream 0.1.6 h2531618_5 aws-checksums 0.1.9 he6710b0_0 aws-sdk-cpp 1.8.185 hce553d0_0 babel 2.11.0 pypi_0 pypi backcall 0.2.0 pyhd3eb1b0_0 beautifulsoup4 4.11.1 pypi_0 pypi blas 1.0 mkl bleach 5.0.1 pypi_0 pypi boost-cpp 1.73.0 h27cfd23_11 bottleneck 1.3.5 py38h7deecbd_0 brotli 1.0.9 h5eee18b_7 brotli-bin 1.0.9 h5eee18b_7 brotlipy 0.7.0 py38h27cfd23_1003 bzip2 1.0.8 h7b6447c_0 c-ares 1.18.1 h7f8727e_0 ca-certificates 2023.01.10 h06a4308_0 certifi 2022.9.24 pypi_0 pypi cffi 1.15.1 py38h5eee18b_3 charset-normalizer 2.1.1 pypi_0 pypi click 8.1.3 pypi_0 pypi constantly 15.1.0 pypi_0 pypi contourpy 1.0.6 pypi_0 pypi cryptography 38.0.4 pypi_0 pypi cssselect 1.2.0 pypi_0 pypi cudatoolkit 10.1.243 h8cb64d8_10 conda-forge cycler 0.11.0 pypi_0 pypi dacite 1.6.0 pypi_0 pypi dataclasses 0.8 pyh6d0b6a4_7 datasets 1.18.4 py_0 huggingface datetime 4.7 pypi_0 pypi debugpy 1.6.4 pypi_0 pypi decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pypi_0 pypi dill 0.3.6 py38h06a4308_0 docker-pycreds 0.4.0 pypi_0 pypi double-conversion 3.1.5 he6710b0_1 entrypoints 0.4 py38h06a4308_0 executing 0.8.3 pyhd3eb1b0_0 filelock 3.8.0 pypi_0 pypi flake8 6.0.0 pypi_0 pypi flask 2.1.3 py38h06a4308_0 flit-core 3.6.0 pyhd3eb1b0_0 fonttools 4.38.0 pypi_0 pypi fqdn 1.5.1 pypi_0 pypi freetype 2.12.1 h4a9f257_0 frozenlist 1.3.3 py38h5eee18b_0 fsspec 2022.11.0 py38h06a4308_0 gensim 4.2.0 pypi_0 pypi gflags 2.2.2 he6710b0_0 giflib 5.2.1 h5eee18b_3 gitdb 4.0.10 pypi_0 pypi gitpython 3.1.30 pypi_0 pypi glog 0.5.0 h2531618_0 grpc-cpp 1.39.0 hae934f6_5 huggingface-hub 0.11.1 pypi_0 pypi huggingface_hub 0.13.1 py_0 huggingface hyperlink 21.0.0 pypi_0 pypi icu 58.2 he6710b0_3 idna 3.4 py38h06a4308_0 importlib-metadata 5.1.0 pypi_0 pypi importlib_metadata 4.11.3 hd3eb1b0_0 importlib_resources 5.2.0 pyhd3eb1b0_1 incremental 22.10.0 pypi_0 pypi intel-openmp 2021.4.0 h06a4308_3561 ipykernel 6.17.1 pyh210e3f2_0 conda-forge ipython 8.7.0 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi ipywidgets 8.0.2 pyhd8ed1ab_1 conda-forge isoduration 20.11.0 pypi_0 pypi itemadapter 0.7.0 pypi_0 pypi itemloaders 1.0.6 pypi_0 pypi itsdangerous 2.0.1 pyhd3eb1b0_0 jedi 0.18.2 pypi_0 pypi jinja2 3.1.2 py38h06a4308_0 jmespath 1.0.1 pypi_0 pypi joblib 1.2.0 pypi_0 pypi jpeg 9b h024ee3a_2 json5 0.9.10 pypi_0 pypi jsonpickle 3.0.0 pypi_0 pypi jsonpointer 2.3 pypi_0 pypi jsonschema 4.17.3 py38h06a4308_0 jupyter-core 5.1.0 pypi_0 pypi jupyter-events 0.5.0 pypi_0 pypi jupyter-server 1.23.3 pypi_0 pypi jupyter-server-fileid 0.6.0 pypi_0 pypi jupyter-server-ydoc 0.4.0 pypi_0 pypi jupyter-ydoc 0.2.2 pypi_0 pypi jupyter_client 7.4.9 py38h06a4308_0 jupyter_core 5.2.0 py38h06a4308_0 jupyterlab 3.6.0a4 pypi_0 pypi jupyterlab-pygments 0.2.2 pypi_0 pypi jupyterlab-server 2.16.3 pypi_0 pypi jupyterlab_widgets 3.0.3 pyhd8ed1ab_0 conda-forge kiwisolver 1.4.4 pypi_0 pypi krb5 1.19.4 h568e23c_0 lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 libboost 1.73.0 h3ff78a5_11 libbrotlicommon 1.0.9 h5eee18b_7 libbrotlidec 1.0.9 h5eee18b_7 libbrotlienc 1.0.9 h5eee18b_7 libcurl 7.88.1 h91b91d3_0 libedit 3.1.20221030 h5eee18b_0 libev 4.33 h7f8727e_1 libevent 2.1.12 h8f2d780_0 libffi 3.4.2 h6a678d5_6 libgcc-ng 11.2.0 h1234567_1 libgomp 11.2.0 h1234567_1 libnghttp2 1.46.0 hce63b2e_0 libpng 1.6.39 h5eee18b_0 libprotobuf 3.17.2 h4ff587b_1 libsodium 1.0.18 h7b6447c_0 libssh2 1.10.0 h8f2d780_0 libstdcxx-ng 11.2.0 h1234567_1 libthrift 0.14.2 hcc01f38_0 libtiff 4.1.0 h2733197_1 libuv 1.44.2 h5eee18b_0 libwebp 1.2.0 h89dd481_0 lz4-c 1.9.4 h6a678d5_0 markupsafe 2.1.1 py38h7f8727e_0 matplotlib 3.6.2 pypi_0 pypi matplotlib-inline 0.1.6 py38h06a4308_0 mccabe 0.7.0 pypi_0 pypi mistune 2.0.4 pypi_0 pypi mkl 2021.4.0 h06a4308_640 mkl-service 2.4.0 py38h7f8727e_0 mkl_fft 1.3.1 py38hd3c417c_0 mkl_random 1.2.2 py38h51133e4_0 morfeusz2 1.99.6 pypi_0 pypi multidict 6.0.2 py38h5eee18b_0 multiprocess 0.70.14 py38h06a4308_0 nbclassic 0.4.8 pypi_0 pypi nbclient 0.7.2 pypi_0 pypi nbconvert 7.2.5 pypi_0 pypi nbformat 5.7.0 py38h06a4308_0 ncurses 6.4 h6a678d5_0 nest-asyncio 1.5.6 py38h06a4308_0 ninja 1.10.2 h06a4308_5 ninja-base 1.10.2 hd09550d_5 notebook 6.5.2 pypi_0 pypi notebook-shim 0.2.2 pypi_0 pypi numexpr 2.8.4 py38he184ba9_0 numpy 1.23.5 py38h14f4228_0 numpy-base 1.23.5 py38h31eccc5_0 oauthlib 3.2.2 pypi_0 pypi opencv-python 4.6.0.66 pypi_0 pypi openssl 1.1.1t h7f8727e_0 orc 1.6.9 ha97a36c_3 packaging 22.0 py38h06a4308_0 pandas 1.5.2 pypi_0 pypi pandocfilters 1.5.0 pypi_0 pypi parsel 1.7.0 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0 pathlib 1.0.1 pypi_0 pypi pathtools 0.1.2 pypi_0 pypi pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 9.3.0 pypi_0 pypi pip 22.2.2 py38h06a4308_0 pkgutil-resolve-name 1.3.10 py38h06a4308_0 platformdirs 2.5.4 pypi_0 pypi prometheus-client 0.15.0 pypi_0 pypi promise 2.3 pypi_0 pypi prompt-toolkit 3.0.33 pypi_0 pypi protego 0.2.1 pypi_0 pypi protobuf 4.21.12 pypi_0 pypi psutil 5.9.0 py38h5eee18b_0 ptyprocess 0.7.0 pyhd3eb1b0_2 pure_eval 0.2.2 pyhd3eb1b0_0 pyarrow 10.0.1 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pycodestyle 2.10.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pydispatcher 2.0.6 pypi_0 pypi pyflakes 3.0.1 pypi_0 pypi pygments 2.11.2 pyhd3eb1b0_0 pyopenssl 22.1.0 pypi_0 pypi pyrsistent 0.18.0 py38heee7806_0 pysocks 1.7.1 py38h06a4308_0 python 3.8.15 h7a1cb2a_2 python-dateutil 2.8.2 pyhd3eb1b0_0 python-dotenv 0.21.0 pypi_0 pypi python-fastjsonschema 2.16.2 py38h06a4308_0 python-json-logger 2.0.4 pypi_0 pypi python-xxhash 2.0.2 py38h5eee18b_1 pytorch 1.7.1 py3.8_cuda10.1.243_cudnn7.6.3_0 pytorch pytz 2022.6 pypi_0 pypi pyyaml 6.0 py38h5eee18b_1 pyzmq 23.2.0 py38h6a678d5_0 queuelib 1.6.2 pypi_0 pypi re2 2022.04.01 h295c915_0 readline 8.2 h5eee18b_0 regex 2022.10.31 pypi_0 pypi requests 2.28.1 py38h06a4308_0 requests-file 1.5.1 pypi_0 pypi requests-oauthlib 1.3.1 pypi_0 pypi rfc3339-validator 0.1.4 pypi_0 pypi rfc3986-validator 0.1.1 pypi_0 pypi scikit-learn 1.1.3 pypi_0 pypi scipy 1.9.3 pypi_0 pypi scrapy 2.7.1 pypi_0 pypi seaborn 0.12.1 pypi_0 pypi send2trash 1.8.0 pypi_0 pypi sentry-sdk 1.12.1 pypi_0 pypi service-identity 21.1.0 pypi_0 pypi setproctitle 1.3.2 pypi_0 pypi setuptools 65.6.3 pypi_0 pypi shortuuid 1.0.11 pypi_0 pypi six 1.16.0 pyhd3eb1b0_1 smart-open 6.2.0 pypi_0 pypi smmap 5.0.0 pypi_0 pypi snappy 1.1.9 h295c915_0 sniffio 1.3.0 pypi_0 pypi soupsieve 2.3.2.post1 pypi_0 pypi sqlite 3.40.1 h5082296_0 stack-data 0.6.2 pypi_0 pypi stack_data 0.2.0 pyhd3eb1b0_0 terminado 0.17.0 pypi_0 pypi threadpoolctl 3.1.0 pypi_0 pypi tinycss2 1.2.1 pypi_0 pypi tk 8.6.12 h1ccaba5_0 tldextract 3.4.0 pypi_0 pypi tokenizers 0.13.2 pypi_0 pypi tomli 2.0.1 pypi_0 pypi torchvision 0.8.2 py38_cu101 pytorch tornado 6.2 py38h5eee18b_0 tqdm 4.64.1 py38h06a4308_0 traitlets 5.6.0 pypi_0 pypi transformers 4.25.1 pypi_0 pypi tweepy 4.12.1 pypi_0 pypi twisted 22.10.0 pypi_0 pypi twython 3.9.1 pypi_0 pypi typing-extensions 4.4.0 py38h06a4308_0 typing_extensions 4.4.0 py38h06a4308_0 uri-template 1.2.0 pypi_0 pypi uriparser 0.9.3 he6710b0_1 urllib3 1.26.13 pypi_0 pypi utf8proc 2.6.1 h27cfd23_0 w3lib 2.1.0 pypi_0 pypi wandb 0.13.7 pypi_0 pypi wcwidth 0.2.5 pyhd3eb1b0_0 webcolors 1.12 pypi_0 pypi webencodings 0.5.1 pypi_0 pypi websocket-client 1.4.2 pypi_0 pypi werkzeug 2.2.2 py38h06a4308_0 wheel 0.38.4 py38h06a4308_0 widgetsnbextension 4.0.3 py38h06a4308_0 xxhash 0.8.0 h7f8727e_3 xz 5.2.10 h5eee18b_1 y-py 0.5.4 pypi_0 pypi yaml 0.2.5 h7b6447c_0 yarl 1.8.1 py38h5eee18b_0 ypy-websocket 0.5.0 pypi_0 pypi zeromq 4.3.4 h2531618_0 zipp 3.11.0 py38h06a4308_0 zlib 1.2.13 h5eee18b_0 zope-interface 5.5.2 pypi_0 pypi zstd 1.4.9 haebb681_0 ``` Okay, the issue was likely caused by mixing `conda` and `pip` usage - I forgot that I have already used `pip` in this environment previously and that it was 'spoiled' because of it. Creating another environment and installing `datasets` by pip with other packages from the `requirements.txt` file solved the problem.
[ -1.1801728010177612, -0.880652904510498, -0.7368806600570679, 1.455385446548462, -0.10973728448152542, -1.303460955619812, 0.10291359573602676, -1.125065803527832, 1.5669465065002441, -0.6529191136360168, 0.2321343570947647, -1.6736702919006348, -0.13928870856761932, -0.49055325984954834, -0.7023903727531433, -0.970532238483429, -0.3318672776222229, -0.8931103944778442, 1.0292290449142456, 2.5565438270568848, 1.3671023845672607, -1.3255099058151245, 2.7508902549743652, 0.6277089715003967, -0.19442889094352722, -1.0730417966842651, 0.6167870759963989, -0.04129266366362572, -1.160083293914795, -0.5363055467605591, -0.9018433094024658, -0.009852021001279354, -0.5964745283126831, -0.4499469995498657, 0.0721273273229599, 0.4798562824726105, -0.2938535511493683, -0.3063238561153412, -0.6429511904716492, -0.7846656441688538, 0.4962766170501709, -0.35525304079055786, 0.9799438118934631, -0.3644719421863556, 1.7339297533035278, -0.6585977673530579, 0.4454183876514435, 0.8108416199684143, 1.2447603940963745, 0.16302353143692017, 0.05703800544142723, 0.25569474697113037, 0.4030762016773224, -0.04281897470355034, 0.6518966555595398, 1.1249579191207886, 0.6031411290168762, 0.5756152868270874, 0.6693788170814514, -2.1775660514831543, 1.252225637435913, -0.9009262919425964, 0.22977551817893982, 1.3318746089935303, -0.7849909067153931, 0.33544325828552246, -1.824451208114624, -0.06721602380275726, 0.6079831123352051, -2.2811686992645264, 0.2564256191253662, -1.2770100831985474, -0.528563380241394, 0.9236539602279663, 0.3206007480621338, -1.2373241186141968, 0.1695290058851242, -0.5037750601768494, 1.0631784200668335, 0.5367910265922546, 1.1682696342468262, -1.7155556678771973, 0.04658335819840431, -0.1729818433523178, 0.11801338195800781, -1.1983681917190552, -1.592390775680542, 0.552387535572052, 0.5233218669891357, 0.670283317565918, -0.07667750120162964, 0.9527894258499146, -1.0073939561843872, 0.7605863213539124, -0.988758385181427, -1.6356242895126343, -1.3924106359481812, -2.368600368499756, -2.3247225284576416, 0.7672630548477173, -0.5980101227760315, -0.48693913221359253, 2.0382237434387207, -0.9590170979499817, -1.7723122835159302, 1.0067274570465088, 0.31104859709739685, 0.13312096893787384, 2.428753614425659, 0.21543435752391815, -0.7245965003967285, 0.5058176517486572, -0.6258375644683838, 0.7550143599510193, -0.2976703941822052, 1.2999032735824585, 0.46046581864356995, -0.9873279333114624, 1.6558542251586914, -0.45751333236694336, 0.599490225315094, -0.6944167017936707, -0.4068223237991333, -0.7933520078659058, 0.176568865776062, 1.8742643594741821, -0.3674141764640808, 1.5010981559753418, -0.22497372329235077, -1.507802128791809, -1.522568941116333, 0.8529046177864075, 0.4738479256629944, -0.955258846282959, 0.0671413391828537, -0.44985857605934143, 0.16508914530277252, -0.023920878767967224, 1.1124913692474365, 1.181677222251892, 0.7766556739807129, -0.3072322905063629, -0.8524273633956909, 0.251948744058609, -0.1305445283651352, -0.7292599081993103, -1.7910441160202026, -0.31295475363731384, 0.16643649339675903, 0.664999783039093, -1.2433701753616333, 1.8253400325775146, 0.926068902015686, 1.9552305936813354, 0.9631394743919373, -0.43316349387168884, 1.4172347784042358, 0.032711874693632126, 1.8937236070632935, -0.45052728056907654, 0.603571891784668, -0.385659396648407, -1.1565678119659424, 0.9088365435600281, -0.3676414489746094, -1.9478346109390259, -0.869495689868927, -0.7891114950180054, -0.12477543205022812, -0.7407405972480774, 0.8534174561500549, -0.28387251496315, -1.421638011932373, 0.09385498613119125, -0.7338387370109558, 0.16307221353054047, -1.338482141494751, 0.23672503232955933, 0.6786996722221375, -0.7005063891410828, 0.014156320132315159, -0.3265431523323059, -1.3138700723648071, -0.5620250105857849, 0.26340219378471375, 1.9619686603546143, -0.6159147620201111, 0.9347900152206421, 0.9783309102058411, -0.8160339593887329, 0.05296284332871437, 0.32529523968696594, -0.3806239366531372, 0.7404454350471497, -1.1479979753494263, -0.45421111583709717, 1.1931140422821045, -0.24520690739154816, -0.772850513458252, 1.5361721515655518, 0.766575276851654, -1.1080565452575684, -0.267471581697464, -0.2372129112482071, -0.8367255330085754, 0.01683877408504486, -1.475690245628357, -0.09607184678316116, 0.4478742480278015, -1.5095875263214111, -0.40783756971359253, -0.14922069013118744, 1.3658913373947144, -0.20258404314517975, 1.460037350654602, -0.3616962730884552, -0.19256047904491425, -0.28764235973358154, -0.4235808551311493, 0.20057812333106995, -0.17070718109607697, -0.6589744091033936, 0.15868766605854034, -0.8045421838760376, 0.2871379852294922, 1.5071043968200684, 0.3456195294857025, -0.029337450861930847, 0.46252745389938354, 1.129875898361206, 0.39181798696517944, -0.01046484149992466, -0.8890380859375, -1.3921208381652832, 1.956437587738037, -1.4620758295059204, 1.8937700986862183, 0.7391840219497681, -0.0703384056687355, -1.7986360788345337, -1.8841540813446045, 1.2988702058792114, 1.1875507831573486, 2.3694608211517334, 0.480022668838501, 0.45313626527786255, -0.7272056341171265, -0.7134140729904175, 0.26658934354782104, -0.9911378026008606, -0.6680715084075928, 0.20638325810432434, 2.362450122833252, 1.8277621269226074, -0.5763137340545654, -0.2900000810623169, -0.9068071842193604, 1.3058857917785645, -0.2560005784034729, 0.23309706151485443, 2.0583510398864746, -0.2288588434457779, -1.0069904327392578, 1.3762956857681274, -2.3674418926239014, 0.24148517847061157, 2.114356756210327, 0.2491609752178192, 0.16207264363765717, -1.4638475179672241, -0.6675161123275757, -0.2771151661872864, -0.4937148988246918, -1.2788530588150024, 0.5451127290725708, -0.2747578024864197, -0.8509745001792908, -1.4108799695968628, 0.13871775567531586, -1.120622158050537, -1.7765493392944336, 0.24106884002685547, 1.965011477470398, 2.050299882888794, -0.7917118072509766, 1.3855568170547485, -0.2810925245285034, 0.0021625040099024773, 1.3405847549438477, 1.319076418876648, 3.073268175125122, 1.9568051099777222, -1.2744522094726562, 0.7659135460853577, -0.23669719696044922, -0.5070988535881042, 1.270728588104248, -1.121437430381775, 1.042168140411377, -0.22208841145038605, -1.2788019180297852, -1.2463935613632202, 0.9805682897567749, 0.47794851660728455, 0.042483411729335785, -0.48005956411361694, 1.256830096244812, 0.116842120885849, 1.290661096572876, 0.6100213527679443, -0.42022812366485596, 0.6518433690071106, -0.38352441787719727, -0.4298049807548523, 1.593401551246643, 0.173061341047287, -1.4860056638717651, -2.319878339767456, -0.26381900906562805, -0.9622783660888672, -0.03418884053826332, -0.5550875663757324, -1.0071091651916504, 1.6159093379974365, 0.46717849373817444, -1.1813455820083618, -0.3174358904361725, -0.27033331990242004, -0.4986388087272644, 2.7012267112731934, -1.233288288116455, -0.19294783473014832, -0.9751957058906555, -0.5031721591949463, 1.6486796140670776, -1.2166640758514404, -0.2221432775259018, -1.0107686519622803, -0.5754972100257874, -1.3616209030151367, -0.49216338992118835, 0.05365770682692528, -0.9749037623405457, 0.8016960620880127, 0.2054147720336914, -1.179229974746704, -0.28318506479263306, -0.886813223361969, 0.9588438272476196, -0.044010285288095474, 0.25123292207717896, 1.9274500608444214, 0.31287872791290283, -0.4528520703315735, 0.690951943397522, 1.1833319664001465, 0.6170620322227478, -0.6344375610351562, 0.10917866975069046, -0.709294855594635, 0.31377527117729187, -1.4185256958007812, 0.03555936738848686, -2.935844659805298, 0.6931157112121582, -0.15816950798034668, -0.15708619356155396, -0.09374424815177917, -1.299238920211792, 1.0897854566574097, 2.5674126148223877, -1.180387020111084, 0.4603799283504486, 0.40398797392845154, 1.2048521041870117, -1.6002812385559082, 0.3309112787246704, -0.45043039321899414, 2.0442075729370117, 0.15370208024978638, 1.1955533027648926, -0.398764044046402, -2.202176570892334, 0.6196849942207336, -1.2531230449676514, -1.0990785360336304, 0.7736002802848816, -0.8322046995162964, 0.2297796607017517, -1.4762639999389648, -0.10655258595943451, -0.8537951111793518, -1.260048508644104, 0.8022514581680298, 0.08469662815332413, 0.4302594065666199, -0.5583238005638123, 0.3564245402812958, -2.1493396759033203, -1.4090330600738525, -0.27288952469825745, -0.9843937158584595, 0.4932136535644531, -0.420136034488678, 0.6388086676597595, -0.08056093007326126, 0.10704858601093292, 0.3125731647014618, 1.4854896068572998, 3.460362434387207, 0.21855083107948303, 0.25368377566337585, -0.1595333367586136, -1.085552453994751, 1.5346070528030396, 0.8871287703514099, -0.17692719399929047, -0.5754580497741699, -1.006829857826233, 1.2779486179351807, 2.0195250511169434, 1.0914106369018555, 0.16394741833209991, -0.881558895111084, -0.7134384512901306, -0.05339296907186508, 0.11353091895580292, 0.5309057235717773, 1.0002416372299194, -0.013126440346240997, -0.0246102437376976, 1.4008958339691162, 1.1029753684997559, -0.23253233730793, 0.39563223719596863, -0.953061580657959, -0.3864656984806061, 0.5043320059776306, 0.22861921787261963, 0.03938760980963707, 0.4691181182861328, -1.0231472253799438, -0.31223759055137634, -0.27687695622444153, -0.8950930833816528, -0.770475447177887, -0.39958611130714417, -0.3699726164340973, 1.6114792823791504, 0.06360577791929245, -0.5434520840644836, 0.084157295525074, -0.6004461050033569, -0.1035531610250473, -1.096583366394043, 0.11512580513954163, -0.15278419852256775, -0.12925460934638977, -0.16876336932182312, 1.6693439483642578, -0.9693859815597534, -2.051414728164673, 0.1496000587940216, 0.36957237124443054, -0.26127153635025024, 0.29008108377456665, 1.6865748167037964, 0.506779670715332, 1.3764694929122925, 1.3127764463424683, 1.0096180438995361, -0.6292265057563782, -1.265162706375122, 0.7256959676742554, 0.9520621299743652, -1.3072731494903564, 0.9225345849990845, -0.15619812905788422, -0.5477325916290283, 0.5790568590164185, 1.2998186349868774, 0.42338132858276367, -1.9823503494262695, 0.8753477334976196, -0.8935665488243103, 0.7945125699043274, 0.6281744241714478, 0.8198319673538208, 0.22207851707935333, 0.8329700827598572, -1.1973183155059814, -1.1161046028137207, -0.6031497120857239, -0.6367799639701843, 1.8313747644424438, -0.2860684394836426, 0.6454135775566101, -0.18259647488594055, -1.221181035041809, -0.13720081746578217, 0.8404795527458191, 0.3789837658405304, -0.4449428617954254, 0.840354859828949, -0.5859692096710205, -0.9834229946136475, -1.262588381767273, -0.4415649175643921, -1.1171648502349854, -0.8091347813606262, 1.0500060319900513, 0.7637946605682373, 0.37596240639686584, 1.8708480596542358, 0.6258927583694458, 0.30064618587493896, -2.655766010284424, 0.859856903553009, 0.2976902723312378, -0.051079317927360535, 0.8305519223213196, 0.33817750215530396, 1.1097543239593506, -0.045975346118211746, 0.6144443154335022, -2.3048014640808105, 2.259505271911621, -0.1896388828754425, 0.621131956577301, 0.037292346358299255, -0.2924421727657318, 1.0955342054367065, 0.603146493434906, 0.5831778049468994, -1.067365288734436, 0.6025115847587585, -0.5772469639778137, 1.108545184135437, 0.8953793048858643, -0.8615477085113525, 0.07394590228796005, 1.3870192766189575, 0.5473933219909668, -0.41583380103111267, -1.0709811449050903, -0.8494918346405029, 1.0718168020248413, 1.6933603286743164, -0.10237764567136765, -0.08016099035739899, 0.8703754544258118, 0.6530378460884094, -1.221103549003601, 0.06946956366300583, -0.7776333689689636, -0.6723920106887817, 1.7250620126724243, 2.0157017707824707, -0.1757490485906601, -0.2078176736831665, -0.7737417817115784, -1.2752959728240967, 0.8040615916252136, -0.0967080369591713, 0.02529206871986389, 0.6476909518241882, -0.6529483199119568, 1.1053392887115479, 0.6419451236724854, 1.0832456350326538, 0.07964439690113068, 0.3375772535800934, 0.2978779375553131, -0.4090726971626282, -1.1125694513320923, -0.2143879532814026, -1.0950130224227905, -2.601844072341919, 0.3806861639022827, -0.27203959226608276, -1.4657748937606812, 0.051690537482500076, -1.0902818441390991, 0.9151718616485596, -0.5534758567810059, -1.1411536931991577, -1.4561281204223633, 0.32123562693595886, -0.14273841679096222, 0.9512289762496948, -1.6405279636383057, -0.2045532912015915, 1.282738208770752, 0.8730593919754028, -0.7231586575508118, 0.8829503655433655, 0.26183098554611206, 1.0176302194595337, 0.7896629571914673, -0.3914918899536133, 0.5778125524520874, -0.027060620486736298, -1.3245532512664795, 0.42225298285484314, 1.2081352472305298, 0.20317737758159637, 1.3207844495773315, -0.47813794016838074, 0.1920338273048401, 0.43561968207359314, -0.6070393919944763, -0.509319007396698, -0.4346185624599457, 0.6720685362815857, -0.011981706134974957, -1.0934333801269531, -0.13194435834884644, -0.09917398542165756, -0.288391649723053, 0.1730068475008011, -1.4424664974212646, -0.2770141661167145, -0.3487270176410675, -0.5129519701004028, -1.3420642614364624, 0.0277133509516716, 1.3046449422836304, -0.7531880736351013, -0.24719418585300446, 0.4388912618160248, 0.30431410670280457, 0.5649065971374512, 0.43687915802001953, -0.7460652589797974, -0.28085198998451233, -0.33360666036605835, -0.29161199927330017, 0.24013131856918335, 1.3014200925827026, -0.08642463386058807, -1.034263253211975, 0.7091619968414307, -0.31488752365112305, 0.13569840788841248, 2.0311410427093506, 0.040764257311820984, -0.6916061639785767, 0.3372851610183716, -0.6305680274963379, 1.737012505531311, 1.763296127319336, 1.2722952365875244, -0.11439983546733856, -0.807776689529419, 0.5746742486953735, -0.3277835249900818, -0.3645811080932617, 0.880803644657135, 0.3260688781738281, -0.24225004017353058, -1.461976170539856, 0.6190185546875, 1.3312472105026245, -0.6388073563575745, -0.8008086085319519, 0.055573780089616776, -0.889648973941803, 1.2710219621658325, 0.6039580702781677, 0.33030423521995544, 0.24359744787216187, 1.5174392461776733, 0.7160512804985046, -0.43635186553001404, 0.5225374102592468, 0.51994389295578, -0.1792570799589157, -2.146674394607544, -1.0459381341934204, 0.3027316629886627, -0.417496919631958, -1.6181187629699707, 1.3962761163711548, -1.1432468891143799, -0.9959692358970642, 0.5901886224746704, 0.18063890933990479, 1.3436301946640015, 0.4298030138015747, 1.613633394241333, 2.1064624786376953, 0.8897908329963684, 0.366538941860199, 1.1488252878189087, -0.08518209308385849, -0.47469043731689453, 1.8571356534957886, -0.41249367594718933, 0.5583662986755371, 0.9889544248580933, -0.3720514476299286, -1.1299147605895996, -0.8508298397064209, -1.1734546422958374, -0.6799766421318054, 1.2206016778945923, 0.04700923711061478, -1.1201895475387573, 0.1820519119501114, 1.5490869283676147, 0.1900171935558319, -0.293000191450119, 0.7259237766265869, 0.33997562527656555, -0.7317443490028381, -0.04308402165770531, -0.8290922045707703, 0.5232324600219727, -0.17462487518787384, -0.2781960666179657, 0.3532243072986603, 0.5658357739448547, 1.3089712858200073, -0.04877001792192459, 0.16007618606090546, 1.1276863813400269, -1.3638534545898438, 1.6133869886398315, -0.6728813052177429, 0.2708878815174103, -2.4464008808135986, 1.4602489471435547, -0.7934537529945374, 1.8954986333847046, -2.5105412006378174, 0.42624640464782715, -0.48385530710220337, -0.4569745361804962, 0.24181416630744934, -0.4427947402000427, 0.1002107635140419, -0.1266833394765854, -1.0032427310943604, 0.01135664340108633, -0.731580913066864, 0.5897051095962524, 1.1184401512145996, 1.4542070627212524, -1.148740291595459, -0.28413450717926025, -1.7694103717803955, -0.13373036682605743, -0.8037510514259338, 0.3998854160308838, -1.9442245960235596, -0.1746663898229599, -1.9617658853530884, -2.369067430496216, -1.3812572956085205, -0.8682700395584106, 1.0368194580078125, 0.21831682324409485, -0.8931660652160645, 1.2074546813964844, -0.30618229508399963, -1.8297374248504639, 1.1732252836227417, -2.2491037845611572 ]
https://github.com/huggingface/datasets/issues/5632
Dataset cannot convert too large dictionnary
Answered on the forum: > To fix the overflow error, we need to merge [support LargeListArray in pyarrow by xwwwwww · Pull Request #4800 · huggingface/datasets · GitHub](https://github.com/huggingface/datasets/pull/4800), which adds support for the large lists. However, before merging it, we need to come up with a cleaner API for large lists. I hope to find some time to address this before Datasets 3.0.
### Describe the bug Hello everyone! I tried to build a new dataset with the command "dict_valid = datasets.Dataset.from_dict({'input_values': values_array})". However, I have a very large dataset (~400Go) and it seems that dataset cannot handle this. Indeed, I can create the dataset until a certain size of my dictionnary, and then I have the error "OverflowError: Python int too large to convert to C long". Do you know how to solve this problem? Unfortunately I cannot give a reproductible code because I cannot share a so large file, but you can find the code below (it's a test on only a part of the validation data ~10Go, but it's already the case). Thank you! ### Steps to reproduce the bug SAVE_DIR = './data/' features = h5py.File(SAVE_DIR+'features.hdf5','r') valid_data = features["validation"]["data/features"] v_array_values = [np.float32(item[()]) for item in valid_data.values()] for i in range(len(v_array_values)): v_array_values[i] = v_array_values[i].round(decimals=5) dict_valid = datasets.Dataset.from_dict({'input_values': v_array_values}) ### Expected behavior The code is expected to give me a Huggingface dataset. ### Environment info python: 3.8.15 numpy: 1.22.3 datasets: 2.3.2 pyarrow: 8.0.0
260
63
Dataset cannot convert too large dictionnary ### Describe the bug Hello everyone! I tried to build a new dataset with the command "dict_valid = datasets.Dataset.from_dict({'input_values': values_array})". However, I have a very large dataset (~400Go) and it seems that dataset cannot handle this. Indeed, I can create the dataset until a certain size of my dictionnary, and then I have the error "OverflowError: Python int too large to convert to C long". Do you know how to solve this problem? Unfortunately I cannot give a reproductible code because I cannot share a so large file, but you can find the code below (it's a test on only a part of the validation data ~10Go, but it's already the case). Thank you! ### Steps to reproduce the bug SAVE_DIR = './data/' features = h5py.File(SAVE_DIR+'features.hdf5','r') valid_data = features["validation"]["data/features"] v_array_values = [np.float32(item[()]) for item in valid_data.values()] for i in range(len(v_array_values)): v_array_values[i] = v_array_values[i].round(decimals=5) dict_valid = datasets.Dataset.from_dict({'input_values': v_array_values}) ### Expected behavior The code is expected to give me a Huggingface dataset. ### Environment info python: 3.8.15 numpy: 1.22.3 datasets: 2.3.2 pyarrow: 8.0.0 Answered on the forum: > To fix the overflow error, we need to merge [support LargeListArray in pyarrow by xwwwwww · Pull Request #4800 · huggingface/datasets · GitHub](https://github.com/huggingface/datasets/pull/4800), which adds support for the large lists. However, before merging it, we need to come up with a cleaner API for large lists. I hope to find some time to address this before Datasets 3.0.
[ -1.3318010568618774, -0.9440325498580933, -0.7260366678237915, 1.464353084564209, -0.1459263116121292, -1.2061792612075806, 0.1252291053533554, -1.0885341167449951, 1.6726020574569702, -0.7644535899162292, 0.24400624632835388, -1.6093380451202393, 0.10537301003932953, -0.5523220300674438, -0.7755879163742065, -0.9026985764503479, -0.37266623973846436, -0.7381399273872375, 1.1069868803024292, 2.436136245727539, 1.2412687540054321, -1.3821619749069214, 2.758838415145874, 0.7363730072975159, -0.15700370073318481, -1.0664736032485962, 0.5940852165222168, 0.022826876491308212, -1.340704083442688, -0.4505029320716858, -0.9837983250617981, -0.11213137954473495, -0.5187186002731323, -0.4850632846355438, -0.07068179547786713, 0.46347448229789734, -0.21376954019069672, -0.45821186900138855, -0.6372085213661194, -0.6870331168174744, 0.4359503984451294, -0.28975096344947815, 0.9425627589225769, -0.2820296883583069, 1.8342458009719849, -0.5121587514877319, 0.4678158164024353, 0.6928728818893433, 1.3995165824890137, 0.18106675148010254, 0.015750881284475327, 0.2991780638694763, 0.44689732789993286, -0.07355586439371109, 0.48080363869667053, 1.1539013385772705, 0.721099317073822, 0.4732658863067627, 0.7406101226806641, -2.1851203441619873, 1.3222054243087769, -1.0314240455627441, 0.3905031681060791, 1.4060888290405273, -0.9012213349342346, 0.40944600105285645, -1.6844472885131836, -0.0735180452466011, 0.6158060431480408, -2.2496800422668457, 0.16559235751628876, -1.3244622945785522, -0.5509437322616577, 0.9405007362365723, 0.3078233599662781, -1.2149488925933838, 0.1547725796699524, -0.49421820044517517, 1.076170802116394, 0.4750783145427704, 1.1258398294448853, -1.6023799180984497, -0.05257759988307953, -0.28682950139045715, 0.1137726828455925, -1.2711858749389648, -1.6038786172866821, 0.5282265543937683, 0.6180621385574341, 0.5753970146179199, -0.08090533316135406, 1.0268830060958862, -1.0418628454208374, 0.807697057723999, -0.9247027039527893, -1.6938750743865967, -1.430268406867981, -2.3707098960876465, -2.253842353820801, 0.6780909299850464, -0.4525250494480133, -0.5354869365692139, 2.0445363521575928, -1.050575613975525, -1.7349681854248047, 1.1787813901901245, 0.24866974353790283, 0.05139467865228653, 2.458667755126953, 0.11150670796632767, -0.6985441446304321, 0.480980783700943, -0.7678897976875305, 0.7936446666717529, -0.37417206168174744, 1.3832660913467407, 0.4354323446750641, -0.9694811105728149, 1.5991946458816528, -0.3684670627117157, 0.5445511341094971, -0.6194971203804016, -0.4814700186252594, -0.7556650638580322, 0.2870562672615051, 1.8436282873153687, -0.3338947296142578, 1.600104808807373, -0.34900403022766113, -1.522383689880371, -1.627200722694397, 0.8755324482917786, 0.47856462001800537, -0.8950026631355286, 0.08575820922851562, -0.48445701599121094, 0.09329722821712494, -0.07617627084255219, 1.162803053855896, 1.2518478631973267, 0.7050772309303284, -0.3602094352245331, -0.8662431240081787, 0.19269199669361115, -0.12897537648677826, -0.7207835912704468, -1.7988866567611694, -0.29542648792266846, 0.1365502029657364, 0.6541762351989746, -1.2420507669448853, 1.644002079963684, 0.892944872379303, 1.885213851928711, 1.0677757263183594, -0.4771026372909546, 1.4511895179748535, 0.048149727284908295, 1.7060881853103638, -0.6213075518608093, 0.611504852771759, -0.34025895595550537, -1.1153457164764404, 0.7544183731079102, -0.32055556774139404, -2.0578925609588623, -0.7954508662223816, -0.7254728674888611, -0.1523997187614441, -0.8213119506835938, 0.9560548663139343, -0.4022972881793976, -1.3938945531845093, 0.24990388751029968, -0.7423768043518066, 0.1584118902683258, -1.169618010520935, 0.3069462478160858, 0.746038019657135, -0.5723710060119629, 0.08775433152914047, -0.17526227235794067, -1.310118556022644, -0.47223183512687683, 0.3572598397731781, 1.785781741142273, -0.7668696045875549, 0.8476910591125488, 1.0076282024383545, -0.6114864349365234, 0.03515608608722687, 0.28373533487319946, -0.24971400201320648, 0.9032924175262451, -1.0316866636276245, -0.48330047726631165, 1.172890067100525, -0.218303844332695, -0.5816203951835632, 1.4531031847000122, 0.7345125675201416, -0.9626761674880981, -0.28454163670539856, -0.0590909942984581, -0.9087039828300476, -0.027193807065486908, -1.637488603591919, -0.1041555255651474, 0.4580301344394684, -1.6161428689956665, -0.4112214148044586, -0.19489315152168274, 1.3053158521652222, -0.18946979939937592, 1.5157889127731323, -0.3781568109989166, -0.1820431351661682, -0.3515247404575348, -0.40721532702445984, 0.19229084253311157, -0.25384020805358887, -0.5612050890922546, 0.10815735906362534, -0.8035808205604553, 0.4198679029941559, 1.4394936561584473, 0.3817500174045563, 0.06141176447272301, 0.5528602600097656, 1.1407335996627808, 0.39513131976127625, -0.1282130926847458, -0.8428347110748291, -1.5708708763122559, 1.9982333183288574, -1.4186633825302124, 2.0300869941711426, 0.8476608395576477, -0.08456963300704956, -1.7862365245819092, -1.8358620405197144, 1.2998076677322388, 1.1481657028198242, 2.2901265621185303, 0.501754879951477, 0.3401460349559784, -0.8089353442192078, -0.6033433675765991, 0.232700377702713, -0.9914010167121887, -0.7113388776779175, 0.15659159421920776, 2.3594093322753906, 1.8507238626480103, -0.4317556619644165, -0.19288849830627441, -1.000893235206604, 1.40523099899292, -0.20914006233215332, 0.2457798719406128, 1.9585011005401611, -0.1953781396150589, -1.0642757415771484, 1.2724095582962036, -2.366710901260376, 0.11320412904024124, 2.049381732940674, 0.2815767228603363, 0.03924992308020592, -1.3928239345550537, -0.598796010017395, -0.43324196338653564, -0.4159686863422394, -1.2835886478424072, 0.5115041136741638, -0.2728288173675537, -0.806350588798523, -1.4530324935913086, 0.13103990256786346, -1.1516872644424438, -1.6342322826385498, 0.2767842411994934, 1.9495657682418823, 1.9985206127166748, -0.7122825980186462, 1.5177135467529297, -0.23723293840885162, 0.17791876196861267, 1.221578598022461, 1.2350388765335083, 3.084561824798584, 1.8868098258972168, -1.279381513595581, 0.6148777008056641, -0.1446041464805603, -0.4940195679664612, 1.1236281394958496, -1.2182362079620361, 1.2802400588989258, -0.005463367328047752, -1.237399697303772, -1.1543018817901611, 1.0937644243240356, 0.5064576864242554, 0.09448067098855972, -0.5208792090415955, 1.224012017250061, 0.008498801849782467, 1.3214421272277832, 0.5683606863021851, -0.3462989926338196, 0.5714445114135742, -0.28195807337760925, -0.5912625193595886, 1.519655466079712, 0.12343446910381317, -1.51612389087677, -2.330441474914551, -0.2589840888977051, -0.7585350275039673, 0.006539057940244675, -0.6156327128410339, -1.0783220529556274, 1.6992566585540771, 0.3764745891094208, -1.2962709665298462, -0.3051302134990692, -0.3200160264968872, -0.5952884554862976, 2.753629446029663, -1.3432486057281494, -0.20587469637393951, -0.9755024313926697, -0.6288334727287292, 1.6474885940551758, -1.193694829940796, -0.20387211441993713, -1.0743420124053955, -0.6426579356193542, -1.2927875518798828, -0.52506422996521, 0.0514320470392704, -0.9884051084518433, 0.732854962348938, 0.22826501727104187, -1.043107032775879, -0.32776889204978943, -0.8347373604774475, 0.9611267447471619, -0.14043496549129486, 0.19687670469284058, 1.8754912614822388, 0.3867782652378082, -0.41837653517723083, 0.760236918926239, 1.1416743993759155, 0.6926088333129883, -0.663295567035675, 0.04765545204281807, -0.6597715616226196, 0.3302939832210541, -1.3084510564804077, 0.2518971860408783, -2.8473963737487793, 0.6442542672157288, -0.10241418331861496, -0.17653720080852509, -0.01038363017141819, -1.3097827434539795, 1.109275221824646, 2.6039838790893555, -1.1575664281845093, 0.43582436442375183, 0.34612902998924255, 1.1615095138549805, -1.6343306303024292, 0.43483299016952515, -0.48286867141723633, 2.044997215270996, 0.23372966051101685, 1.206764578819275, -0.5131602883338928, -2.278634548187256, 0.6039446592330933, -1.236526608467102, -1.1894701719284058, 0.7514469027519226, -0.9251159429550171, 0.16275203227996826, -1.4575210809707642, -0.2480672299861908, -0.9152382016181946, -1.2164568901062012, 0.6466071605682373, 0.18719196319580078, 0.35449621081352234, -0.6482496857643127, 0.36136263608932495, -2.21231746673584, -1.3745003938674927, -0.1552157998085022, -0.9790180921554565, 0.5260204672813416, -0.45226597785949707, 0.6673997640609741, -0.10123944282531738, -0.04087980464100838, 0.29365310072898865, 1.4803307056427002, 3.3908209800720215, 0.3028373420238495, 0.3022235333919525, -0.1913052648305893, -0.94453364610672, 1.5044907331466675, 0.930432915687561, -0.1276348978281021, -0.5907367467880249, -1.0253722667694092, 1.3066986799240112, 1.9556814432144165, 0.9909311532974243, -0.012289050035178661, -0.7340293526649475, -0.6745817065238953, 0.01303305197507143, 0.26240190863609314, 0.4381314814090729, 0.9396636486053467, -0.006388233043253422, 0.09303774684667587, 1.4777036905288696, 1.2460179328918457, -0.40983065962791443, 0.37039119005203247, -0.8125109076499939, -0.5244628190994263, 0.4409460425376892, 0.241842120885849, -0.07398200035095215, 0.4763462245464325, -1.0053091049194336, -0.23750337958335876, -0.45733535289764404, -0.9365748167037964, -0.677102267742157, -0.3408556282520294, -0.3831554651260376, 1.5970386266708374, 0.20408466458320618, -0.5488286018371582, 0.023243259638547897, -0.699028730392456, -0.16957850754261017, -1.0792312622070312, 0.2789558470249176, -0.09396138787269592, -0.05547906830906868, -0.11457927525043488, 1.7937579154968262, -0.9119719862937927, -2.1361324787139893, 0.17950813472270966, 0.1863730549812317, -0.30222609639167786, 0.2740359902381897, 1.6284871101379395, 0.48545005917549133, 1.440719723701477, 1.3496816158294678, 0.8722891211509705, -0.6719743013381958, -1.3549683094024658, 0.7251356244087219, 0.9579682946205139, -1.3818793296813965, 0.8145424723625183, -0.07247162610292435, -0.6259023547172546, 0.6988962292671204, 1.2812654972076416, 0.45813316106796265, -2.002218246459961, 0.8716447949409485, -0.9475806355476379, 0.8328872919082642, 0.7251750230789185, 0.6501708626747131, 0.2622843086719513, 0.8681982159614563, -1.2393959760665894, -1.1179431676864624, -0.7760111689567566, -0.6500144004821777, 2.01884388923645, -0.30290305614471436, 0.7223519086837769, -0.20923206210136414, -1.2620277404785156, -0.07402929663658142, 0.675889790058136, 0.3843018412590027, -0.480638712644577, 0.8635433912277222, -0.6509954929351807, -1.1390968561172485, -1.2855266332626343, -0.4189700186252594, -0.9768453240394592, -0.9677914381027222, 1.003015398979187, 0.7482814788818359, 0.22542287409305573, 1.845862865447998, 0.5749989748001099, 0.2204068899154663, -2.674861192703247, 0.9156358242034912, 0.26788660883903503, -0.08407972007989883, 0.7631824612617493, 0.31767401099205017, 1.033097505569458, 0.054051440209150314, 0.4906904995441437, -2.3583879470825195, 2.285548448562622, -0.19893352687358856, 0.7681666016578674, -0.16148018836975098, -0.16467994451522827, 1.1975390911102295, 0.6430507302284241, 0.5567241907119751, -1.0060726404190063, 0.6558132767677307, -0.558864176273346, 1.2294992208480835, 0.9050007462501526, -0.7409147024154663, -0.07064425945281982, 1.4232319593429565, 0.5806641578674316, -0.5320828557014465, -0.9630967974662781, -0.9099404811859131, 0.9443655610084534, 1.7005716562271118, 0.02123434469103813, 0.04616992175579071, 0.8145732879638672, 0.6368962526321411, -1.3022522926330566, 0.1185668557882309, -0.7458519339561462, -0.7134804725646973, 1.6154197454452515, 2.115398406982422, -0.2076033502817154, -0.14040294289588928, -0.6823252439498901, -1.3098773956298828, 0.7393858432769775, -0.14794579148292542, 0.19197815656661987, 0.5851994156837463, -0.6092780828475952, 1.0248619318008423, 0.8124822378158569, 0.9329385757446289, 0.166110560297966, 0.2973730266094208, 0.35458609461784363, -0.3262117803096771, -1.2098426818847656, -0.23383685946464539, -1.1056758165359497, -2.416311025619507, 0.348583847284317, -0.18278293311595917, -1.471471905708313, 0.04599890857934952, -0.971159040927887, 0.9238293766975403, -0.5850438475608826, -1.0593631267547607, -1.51214599609375, 0.21338742971420288, -0.07325318455696106, 0.9235525727272034, -1.5959526300430298, -0.15740086138248444, 1.2391536235809326, 0.8788948059082031, -0.5472492575645447, 1.0171680450439453, 0.22066815197467804, 1.0086883306503296, 0.7693159580230713, -0.3510701656341553, 0.5172145366668701, 0.004111948423087597, -1.388221263885498, 0.5084887146949768, 1.134830355644226, 0.14909280836582184, 1.476804494857788, -0.4898343086242676, -0.06214700639247894, 0.4334562420845032, -0.5889537930488586, -0.39757344126701355, -0.40217888355255127, 0.6380723714828491, 0.05011938139796257, -0.8578179478645325, -0.025659888982772827, -0.12024981528520584, -0.32882773876190186, 0.17900700867176056, -1.5359997749328613, -0.18973226845264435, -0.4439525902271271, -0.6323186159133911, -1.26937997341156, 0.03495000675320625, 1.4560703039169312, -0.8083566427230835, -0.24507936835289001, 0.4478554427623749, 0.44925275444984436, 0.5164585113525391, 0.7161870002746582, -0.6842009425163269, -0.30338796973228455, -0.233178973197937, -0.3273637294769287, 0.2590768039226532, 1.3272736072540283, -0.16623756289482117, -0.9749545454978943, 0.6407058238983154, -0.32876056432724, 0.029467936605215073, 1.9685369729995728, 0.09226404875516891, -0.7348611354827881, 0.34346216917037964, -0.7557177543640137, 1.9014424085617065, 1.6829040050506592, 1.3961659669876099, -0.25879067182540894, -0.8999617695808411, 0.5641125440597534, -0.3395633101463318, -0.348171591758728, 0.8653630614280701, 0.40304067730903625, -0.156126469373703, -1.370759129524231, 0.7174833416938782, 1.2325897216796875, -0.9443209767341614, -0.7292520403862, 0.12506812810897827, -0.8324707746505737, 1.1833710670471191, 0.5674794316291809, 0.3352912366390228, 0.26370683312416077, 1.6743687391281128, 0.7248721122741699, -0.468170166015625, 0.5538872480392456, 0.6213246583938599, -0.21029290556907654, -2.1579501628875732, -1.092930793762207, 0.26296231150627136, -0.5200486779212952, -1.6216038465499878, 1.3289835453033447, -1.0956538915634155, -0.9400496482849121, 0.5175819993019104, 0.10783802717924118, 1.3784778118133545, 0.3756551444530487, 1.572644829750061, 2.1088006496429443, 0.8399301171302795, 0.44617754220962524, 1.255702257156372, -0.04830065742135048, -0.3830978572368622, 1.7774741649627686, -0.3980122208595276, 0.5090948939323425, 1.0905277729034424, -0.3687542974948883, -1.1000614166259766, -0.7309359312057495, -1.195770025253296, -0.6702156662940979, 1.184159278869629, 0.09670332819223404, -1.1069655418395996, 0.2520182132720947, 1.495900273323059, 0.09112070500850677, -0.36529603600502014, 0.5793264508247375, 0.4116581380367279, -0.6877966523170471, -0.12549157440662384, -0.8890948295593262, 0.5391773581504822, -0.21188519895076752, -0.37307554483413696, 0.40482890605926514, 0.4313354194164276, 1.3169729709625244, -0.04411860182881355, 0.18203237652778625, 1.2127797603607178, -1.4606610536575317, 1.469818115234375, -0.5634765625, 0.23708565533161163, -2.3940911293029785, 1.4527561664581299, -0.6484343409538269, 1.9393807649612427, -2.6964950561523438, 0.5061823725700378, -0.6349400281906128, -0.4852644205093384, 0.33252519369125366, -0.3676356077194214, 0.05425184592604637, -0.1607445776462555, -1.1125431060791016, -0.08869041502475739, -0.6716731190681458, 0.5728182196617126, 1.1296303272247314, 1.3281446695327759, -1.079365611076355, -0.26639050245285034, -1.654754400253296, -0.167465940117836, -0.7649438381195068, 0.34829264879226685, -2.105780601501465, -0.19969381392002106, -1.9056131839752197, -2.4342823028564453, -1.2321357727050781, -0.730725109577179, 1.1011351346969604, 0.17665602266788483, -0.8683138489723206, 1.2698055505752563, -0.38516080379486084, -1.8287944793701172, 1.0621697902679443, -2.200655221939087 ]
https://github.com/huggingface/datasets/issues/5631
Custom split names
Hi! You can also use names other than "train", "validation" and "test". As an example, check the [script](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0/blob/e095840f23f3dffc1056c078c2f9320dad9ca74d/common_voice_11_0.py#L139) of the Common Voice 11 dataset.
### Feature request Hi, I participated in multiple NLP tasks where there are more than just train, test, validation splits, there could be multiple validation sets or test sets. But it seems currently only those mentioned three splits supported. It would be nice to have the support for more splits on the hub. (currently i can have more splits when I am loading datasets from urls, but not hub) ### Motivation Easier access to more splits ### Your contribution No
261
24
Custom split names ### Feature request Hi, I participated in multiple NLP tasks where there are more than just train, test, validation splits, there could be multiple validation sets or test sets. But it seems currently only those mentioned three splits supported. It would be nice to have the support for more splits on the hub. (currently i can have more splits when I am loading datasets from urls, but not hub) ### Motivation Easier access to more splits ### Your contribution No Hi! You can also use names other than "train", "validation" and "test". As an example, check the [script](https://huggingface.co/datasets/mozilla-foundation/common_voice_11_0/blob/e095840f23f3dffc1056c078c2f9320dad9ca74d/common_voice_11_0.py#L139) of the Common Voice 11 dataset.
[ -1.1770635843276978, -0.9241767525672913, -0.8355674147605896, 1.4496593475341797, -0.1094215139746666, -1.1831300258636475, 0.10229720920324326, -1.085262417793274, 1.5207239389419556, -0.775841236114502, 0.259285032749176, -1.6633424758911133, 0.06859844923019409, -0.5358826518058777, -0.7099629044532776, -0.8981125354766846, -0.35197913646698, -0.7780294418334961, 1.0442323684692383, 2.5920424461364746, 1.2700817584991455, -1.2266380786895752, 2.7091305255889893, 0.6296920776367188, -0.2736361026763916, -1.0884051322937012, 0.5488467812538147, -0.00991509947925806, -1.1894941329956055, -0.5041676163673401, -0.9129968285560608, -0.024088559672236443, -0.5546817183494568, -0.41567087173461914, 0.017860982567071915, 0.4211254119873047, -0.23358666896820068, -0.25381308794021606, -0.5839807987213135, -0.7861509323120117, 0.4876641631126404, -0.4587210416793823, 1.0647447109222412, -0.42246949672698975, 1.8337045907974243, -0.5478359460830688, 0.46476227045059204, 0.6626661419868469, 1.3159537315368652, 0.16888341307640076, 0.011524658650159836, 0.2020944058895111, 0.3718916177749634, -0.005276553798466921, 0.4807004928588867, 1.051336646080017, 0.6038817167282104, 0.5753797292709351, 0.6195433735847473, -2.0838189125061035, 1.2973747253417969, -0.9283490777015686, 0.22004514932632446, 1.4268442392349243, -0.9405501484870911, 0.34689170122146606, -1.733880639076233, -0.1041543111205101, 0.596485435962677, -2.308957576751709, 0.19888634979724884, -1.220571756362915, -0.6737672090530396, 1.0183073282241821, 0.32662761211395264, -1.2840631008148193, 0.08828455209732056, -0.4967411160469055, 1.0101301670074463, 0.4913153648376465, 1.0445067882537842, -1.6558383703231812, 0.0006144698709249496, -0.36572909355163574, -0.03345174342393875, -1.4660801887512207, -1.5168108940124512, 0.5492717623710632, 0.5822902321815491, 0.5844005346298218, 0.014499861747026443, 0.9483833909034729, -1.0614879131317139, 0.8014286756515503, -0.8851418495178223, -1.6657239198684692, -1.3763352632522583, -2.4504711627960205, -2.275392532348633, 0.8257339596748352, -0.40632277727127075, -0.568679928779602, 1.9850207567214966, -1.0916589498519897, -1.7066513299942017, 1.2682985067367554, 0.24435685575008392, 0.08696828782558441, 2.4695804119110107, 0.1940774917602539, -0.6740636229515076, 0.4193379878997803, -0.7265641093254089, 0.8685098886489868, -0.47606492042541504, 1.3635787963867188, 0.48442167043685913, -1.0366989374160767, 1.6955770254135132, -0.411560595035553, 0.5782398581504822, -0.5660378932952881, -0.5622808337211609, -0.8591974973678589, 0.36235320568084717, 1.933676838874817, -0.2969120740890503, 1.5924558639526367, -0.2752864360809326, -1.5847033262252808, -1.568167805671692, 0.8334224820137024, 0.44368183612823486, -0.8420782089233398, 0.1038677990436554, -0.42799896001815796, 0.07212027907371521, -0.0003222944214940071, 1.0461922883987427, 1.3103591203689575, 0.6598191261291504, -0.32248228788375854, -0.8528069853782654, 0.3339230418205261, -0.12090614438056946, -0.6808724999427795, -1.7752479314804077, -0.31839144229888916, 0.0462326779961586, 0.6811888217926025, -1.2128108739852905, 1.7811554670333862, 0.9458893537521362, 1.9411935806274414, 0.9758898019790649, -0.2869279980659485, 1.4500269889831543, 0.006957408040761948, 1.749792218208313, -0.4651750922203064, 0.7431483268737793, -0.3096369504928589, -1.081167221069336, 0.8452407121658325, -0.44416362047195435, -1.8698537349700928, -0.8857975006103516, -0.856670618057251, -0.17847974598407745, -0.8338850736618042, 0.9762789011001587, -0.3945697546005249, -1.3032957315444946, 0.30569177865982056, -0.7340548634529114, 0.11237587034702301, -1.2985378503799438, 0.25411081314086914, 0.7194446325302124, -0.6440281867980957, 0.037327300757169724, -0.2080582082271576, -1.2481402158737183, -0.4940592050552368, 0.2134653478860855, 1.9881095886230469, -0.6209785342216492, 0.8431642055511475, 0.9638774991035461, -0.6652957797050476, 0.007155442610383034, 0.3799241781234741, -0.28270965814590454, 0.7533583045005798, -1.0806702375411987, -0.4201975464820862, 1.1108120679855347, -0.219609797000885, -0.689546525478363, 1.4641311168670654, 0.7978513836860657, -1.0557225942611694, -0.2110622227191925, -0.12695437669754028, -0.770159125328064, 0.01562601886689663, -1.604373574256897, -0.1801345944404602, 0.3228844404220581, -1.516121745109558, -0.37813282012939453, -0.18600305914878845, 1.3072781562805176, -0.19399842619895935, 1.4529811143875122, -0.35627132654190063, -0.2540513575077057, -0.28917986154556274, -0.626550555229187, 0.16360025107860565, -0.1737436205148697, -0.6244970560073853, 0.2849600911140442, -0.8006832599639893, 0.3506072163581848, 1.4739443063735962, 0.2990303039550781, 0.18137235939502716, 0.52186119556427, 1.00795578956604, 0.3511073589324951, -0.15308992564678192, -0.9848546981811523, -1.5564199686050415, 1.9952713251113892, -1.4526309967041016, 1.9509354829788208, 0.9689413905143738, -0.134139284491539, -1.7748826742172241, -1.8387036323547363, 1.2639626264572144, 1.1807541847229004, 2.281351327896118, 0.5914553999900818, 0.2988581657409668, -0.809026300907135, -0.7225847840309143, 0.26423925161361694, -1.0727735757827759, -0.75990229845047, 0.13206245005130768, 2.373771905899048, 1.7225216627120972, -0.40786248445510864, -0.15670379996299744, -0.960830569267273, 1.2303951978683472, -0.1345451921224594, 0.22487255930900574, 2.0566372871398926, -0.38466107845306396, -1.1310955286026, 1.1764919757843018, -2.2676751613616943, 0.14752045273780823, 1.947492003440857, 0.36509013175964355, 0.03784649819135666, -1.462213397026062, -0.7336488366127014, -0.3616422414779663, -0.34073132276535034, -1.2480714321136475, 0.6244232058525085, -0.3341400623321533, -0.9293968081474304, -1.4649986028671265, 0.11719948053359985, -1.2095057964324951, -1.6133079528808594, 0.42480069398880005, 1.8256022930145264, 2.1111717224121094, -0.7731159925460815, 1.5043569803237915, -0.21222682297229767, 0.057048410177230835, 1.2870789766311646, 1.2440747022628784, 3.1180946826934814, 1.8683757781982422, -1.1933757066726685, 0.6832898855209351, -0.167051762342453, -0.5299684405326843, 1.183226466178894, -1.0281271934509277, 1.2540558576583862, -0.21093806624412537, -1.1548453569412231, -1.2277605533599854, 0.9562420845031738, 0.3206027150154114, 0.03364017605781555, -0.42414867877960205, 1.2456779479980469, 0.07795073837041855, 1.307063102722168, 0.5644044876098633, -0.3134126663208008, 0.6043561100959778, -0.4136527180671692, -0.48621833324432373, 1.6132971048355103, 0.1929321587085724, -1.6556109189987183, -2.3154239654541016, -0.25086984038352966, -0.7928390502929688, -0.04641108587384224, -0.5768706798553467, -1.0555634498596191, 1.644234299659729, 0.36097973585128784, -1.238287091255188, -0.345222532749176, -0.32908034324645996, -0.6124101281166077, 2.697356939315796, -1.452471137046814, -0.28082168102264404, -0.9724735617637634, -0.6662201285362244, 1.665550947189331, -1.2499170303344727, -0.11038167029619217, -1.021707534790039, -0.6200001239776611, -1.2627912759780884, -0.48382431268692017, 0.02665696293115616, -1.014827013015747, 0.7693345546722412, 0.1653977632522583, -1.0149495601654053, -0.2388605773448944, -0.8910998106002808, 0.8022419810295105, -0.10425582528114319, 0.41280674934387207, 1.7824279069900513, 0.3483075499534607, -0.42858272790908813, 0.6952281594276428, 1.1759427785873413, 0.6068882942199707, -0.6955953240394592, 0.05584191530942917, -0.6803723573684692, 0.31873422861099243, -1.2070398330688477, 0.3534319996833801, -2.854614734649658, 0.6482234597206116, -0.1783703714609146, -0.19169484078884125, 0.05836329609155655, -1.3136060237884521, 1.144713044166565, 2.55642032623291, -1.1957951784133911, 0.4652549624443054, 0.2756025791168213, 1.2333290576934814, -1.5923405885696411, 0.40335583686828613, -0.43341803550720215, 2.057464122772217, 0.16568470001220703, 1.1876649856567383, -0.5352216958999634, -2.1342849731445312, 0.8079572916030884, -1.298041820526123, -1.2083700895309448, 0.7739309072494507, -0.9059579968452454, 0.1067039966583252, -1.4107218980789185, -0.203018456697464, -0.8552260994911194, -1.2542558908462524, 0.7183035016059875, 0.1658824384212494, 0.5047546625137329, -0.5149235725402832, 0.29226112365722656, -2.1793417930603027, -1.4657034873962402, -0.2440457046031952, -1.0036815404891968, 0.38760852813720703, -0.48381495475769043, 0.6085323095321655, -0.20123030245304108, 0.07012422382831573, 0.37912142276763916, 1.458824872970581, 3.4800233840942383, 0.18219895660877228, 0.4034017324447632, -0.11511783301830292, -0.9731545448303223, 1.5413808822631836, 0.9382857084274292, 0.0309746116399765, -0.6434335708618164, -0.9940398335456848, 1.338622808456421, 2.0092530250549316, 1.0492146015167236, 0.06151070445775986, -0.7194920182228088, -0.6336941719055176, -0.06646982580423355, 0.26288652420043945, 0.4066937565803528, 0.9068152904510498, -0.029149534180760384, 0.049772344529628754, 1.4304983615875244, 1.3068712949752808, -0.4983806610107422, 0.3571263551712036, -0.8695050477981567, -0.37298262119293213, 0.43255364894866943, 0.304953396320343, -0.040242962539196014, 0.4379652142524719, -0.9834317564964294, -0.2939335107803345, -0.3094445466995239, -1.0253958702087402, -0.7530879378318787, -0.416187584400177, -0.3854946494102478, 1.6676212549209595, 0.09591905772686005, -0.47004348039627075, 0.010500501841306686, -0.8047823905944824, -0.08398422598838806, -1.1310380697250366, 0.06266700476408005, -0.09092383831739426, -0.1764204353094101, -0.08490490913391113, 1.839097499847412, -1.0730562210083008, -2.254239320755005, 0.2590876817703247, 0.30488085746765137, -0.27353835105895996, 0.22034206986427307, 1.6311724185943604, 0.4163298010826111, 1.4422345161437988, 1.2564408779144287, 1.0070770978927612, -0.6903703212738037, -1.2936952114105225, 0.7103418707847595, 1.032737374305725, -1.3960987329483032, 0.8902013897895813, -0.047700684517621994, -0.5098577737808228, 0.703548789024353, 1.2077709436416626, 0.4948512315750122, -1.7683364152908325, 0.842887818813324, -0.8944852948188782, 0.7784320116043091, 0.7441664338111877, 0.7796398997306824, 0.26878148317337036, 0.8438960909843445, -1.2021313905715942, -1.1039060354232788, -0.8082190752029419, -0.5789170265197754, 1.9608991146087646, -0.21329791843891144, 0.5650580525398254, -0.1613212674856186, -1.187630534172058, -0.05776827409863472, 0.7556746602058411, 0.368338406085968, -0.3481729030609131, 0.7826652526855469, -0.679948091506958, -1.057337999343872, -1.4608221054077148, -0.3949025869369507, -0.9334921836853027, -1.030253529548645, 1.1309788227081299, 0.6998668909072876, 0.2869521379470825, 1.9653434753417969, 0.6235173344612122, 0.30076855421066284, -2.5770156383514404, 0.905954122543335, 0.25487738847732544, 0.0467994250357151, 0.9435871839523315, 0.28065013885498047, 1.152644157409668, 0.030267875641584396, 0.3486260175704956, -2.306051015853882, 2.2784371376037598, -0.28394585847854614, 0.7062768936157227, 0.03173544257879257, -0.08057717233896255, 1.207515835762024, 0.6248714923858643, 0.4783823490142822, -1.0989881753921509, 0.7910215258598328, -0.5523121953010559, 1.2612104415893555, 0.9903741478919983, -0.8791663646697998, 0.08433900773525238, 1.3366361856460571, 0.5060110092163086, -0.5130854845046997, -0.8521610498428345, -0.7965978384017944, 0.8729590773582458, 1.758087396621704, -0.0658908411860466, 0.04274534806609154, 0.7603491544723511, 0.5382537841796875, -1.2112129926681519, 0.02691684290766716, -0.7529720664024353, -0.776597261428833, 1.6352803707122803, 2.010455369949341, -0.0922592431306839, -0.21658961474895477, -0.8041852712631226, -1.2610379457473755, 0.8542819619178772, -0.09089642763137817, 0.13466137647628784, 0.6896860599517822, -0.6855654120445251, 1.074210524559021, 0.9014312624931335, 0.9433263540267944, 0.1274864375591278, 0.27785420417785645, 0.5050213932991028, -0.2721930742263794, -1.0728353261947632, -0.3687242269515991, -1.176217794418335, -2.7366466522216797, 0.460158109664917, -0.4136353135108948, -1.4633580446243286, -0.07365685701370239, -1.0440577268600464, 0.9608260989189148, -0.5794695019721985, -0.9896978139877319, -1.6284812688827515, 0.236475870013237, -0.13322415947914124, 0.8427029848098755, -1.6130828857421875, -0.2507118582725525, 1.2208752632141113, 0.8753290772438049, -0.5852924585342407, 1.0210990905761719, 0.17278169095516205, 0.9928210973739624, 0.7625833749771118, -0.42126619815826416, 0.6346303224563599, -0.026708342134952545, -1.4202693700790405, 0.417422354221344, 1.2211607694625854, 0.20537464320659637, 1.4206690788269043, -0.454992413520813, 0.06268887966871262, 0.4148474335670471, -0.5033261179924011, -0.4793785810470581, -0.427049458026886, 0.7571743726730347, 0.029486045241355896, -0.8873834013938904, -0.02212991937994957, -0.22428837418556213, -0.25429654121398926, 0.21841469407081604, -1.4736562967300415, -0.24926798045635223, -0.44634878635406494, -0.5874934792518616, -1.3589054346084595, 0.015401547774672508, 1.4262256622314453, -0.7502791285514832, -0.19963718950748444, 0.43018054962158203, 0.451626181602478, 0.5194602012634277, 0.5725417733192444, -0.7111988067626953, -0.4114161729812622, -0.30577218532562256, -0.25861912965774536, 0.34660059213638306, 1.2391785383224487, -0.09208552539348602, -1.0246140956878662, 0.6867456436157227, -0.3008296489715576, 0.07983686774969101, 2.0269393920898438, 0.08241845667362213, -0.7764359712600708, 0.2975519299507141, -0.7020063400268555, 1.9977236986160278, 1.6141265630722046, 1.2429866790771484, -0.10272704064846039, -0.883364737033844, 0.7209720611572266, -0.16478382050991058, -0.2853851914405823, 0.8551334142684937, 0.44050341844558716, -0.23040176928043365, -1.4028480052947998, 0.6636182069778442, 1.2588123083114624, -0.8282713890075684, -0.7556309700012207, 0.03519807010889053, -0.9178159236907959, 1.1387280225753784, 0.6434317231178284, 0.5219835638999939, 0.25073128938674927, 1.6848664283752441, 0.7090988159179688, -0.5485575199127197, 0.44089043140411377, 0.47447800636291504, -0.15114851295948029, -2.1209754943847656, -1.0418872833251953, 0.39213883876800537, -0.5239676237106323, -1.480112910270691, 1.366346001625061, -1.0871080160140991, -0.8856483697891235, 0.5538817644119263, 0.13669957220554352, 1.4487695693969727, 0.2952200174331665, 1.7010303735733032, 2.0187461376190186, 0.8811740279197693, 0.31574660539627075, 1.261328935623169, -0.0907420963048935, -0.42699921131134033, 1.8522701263427734, -0.39073896408081055, 0.4834425449371338, 1.1055833101272583, -0.32652008533477783, -1.0256373882293701, -0.7394187450408936, -1.0643038749694824, -0.6679002046585083, 1.201733946800232, 0.14095327258110046, -1.1102041006088257, 0.16409078240394592, 1.5669589042663574, 0.14120042324066162, -0.21433207392692566, 0.5081260800361633, 0.5248300433158875, -0.8007094860076904, -0.08262773603200912, -0.9808917045593262, 0.48609405755996704, -0.1990543156862259, -0.33809345960617065, 0.3819495439529419, 0.4713073968887329, 1.3222497701644897, -0.14168700575828552, 0.21483466029167175, 1.1445815563201904, -1.4512457847595215, 1.449816346168518, -0.5743314027786255, 0.18541277945041656, -2.3472816944122314, 1.3835242986679077, -0.7593277096748352, 1.8586711883544922, -2.654719829559326, 0.32235443592071533, -0.6848739981651306, -0.4501773715019226, 0.30063188076019287, -0.41704702377319336, 0.12816059589385986, -0.21304023265838623, -0.9488688111305237, -0.0927329808473587, -0.7353585958480835, 0.6313032507896423, 1.1584007740020752, 1.3171594142913818, -1.0353891849517822, -0.23981426656246185, -1.697102427482605, -0.15941889584064484, -0.7349663376808167, 0.1919465810060501, -2.1509909629821777, -0.21454322338104248, -1.971693992614746, -2.322763681411743, -1.3691922426223755, -0.7977816462516785, 1.216045618057251, 0.2050471305847168, -0.8453812003135681, 1.1655174493789673, -0.38712650537490845, -1.7733017206192017, 1.10706627368927, -2.0979976654052734 ]
https://github.com/huggingface/datasets/issues/5629
load_dataset gives "403" error when using Financial phrasebank
Hi! You seem to be using an outdated version of `datasets` that downloads the older script version. To avoid the error, you can either pass `revision="main"` to `load_dataset` (this can fail if a script uses newer features of the lib) or update your installation with `pip install -U datasets` (better solution).
When I try to load this dataset, I receive the following error: ConnectionError: Couldn't reach https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip (error 403) Has this been seen before? Thanks. The website loads when I try to access it manually.
262
51
load_dataset gives "403" error when using Financial phrasebank When I try to load this dataset, I receive the following error: ConnectionError: Couldn't reach https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip (error 403) Has this been seen before? Thanks. The website loads when I try to access it manually. Hi! You seem to be using an outdated version of `datasets` that downloads the older script version. To avoid the error, you can either pass `revision="main"` to `load_dataset` (this can fail if a script uses newer features of the lib) or update your installation with `pip install -U datasets` (better solution).
[ -1.1847862005233765, -0.8617866039276123, -0.7911846041679382, 1.467525601387024, -0.2067996710538864, -1.3115179538726807, 0.13070455193519592, -1.1052074432373047, 1.5948033332824707, -0.7261543273925781, 0.33966758847236633, -1.6774890422821045, 0.057503167539834976, -0.5273615121841431, -0.7213162779808044, -0.8607934713363647, -0.328048437833786, -0.7198628783226013, 0.9427457451820374, 2.614501476287842, 1.1412302255630493, -1.298421859741211, 2.717102527618408, 0.6008043885231018, -0.19439350068569183, -1.0469069480895996, 0.5325294137001038, 0.08139277994632721, -1.1690824031829834, -0.45758920907974243, -0.8988809585571289, -0.034907273948192596, -0.6270182132720947, -0.4827582538127899, 0.010277986526489258, 0.35119113326072693, -0.3284250497817993, -0.30329373478889465, -0.5849401950836182, -0.8035727143287659, 0.5369002819061279, -0.3845526874065399, 0.9025809168815613, -0.48708245158195496, 1.807108759880066, -0.5843705534934998, 0.4565856456756592, 0.7424167394638062, 1.3840723037719727, 0.2116689532995224, 0.05889306589961052, 0.2932690680027008, 0.44351235032081604, 0.019571011886000633, 0.4624379575252533, 1.1387113332748413, 0.5644291043281555, 0.6391249299049377, 0.5738045573234558, -2.193758726119995, 1.2277872562408447, -1.0355550050735474, 0.22332648932933807, 1.3792698383331299, -0.9000110626220703, 0.3271271288394928, -1.838991641998291, -0.24517422914505005, 0.526326060295105, -2.278005599975586, 0.2787803113460541, -1.291337251663208, -0.5972477197647095, 0.8951674103736877, 0.29300034046173096, -1.2729309797286987, 0.13827310502529144, -0.36440661549568176, 0.9504209756851196, 0.43118172883987427, 1.0735082626342773, -1.6324876546859741, 0.027933944016695023, -0.2949932813644409, 0.03219360113143921, -1.2764281034469604, -1.4966044425964355, 0.6380261778831482, 0.5846269130706787, 0.6025311350822449, -0.17528799176216125, 0.9486733675003052, -1.0406663417816162, 0.8993947505950928, -0.9364114999771118, -1.6480239629745483, -1.3990514278411865, -2.3768935203552246, -2.266974687576294, 0.8955776691436768, -0.39706549048423767, -0.5086311101913452, 2.0373730659484863, -1.0913810729980469, -1.7810266017913818, 1.101048231124878, 0.21346721053123474, -0.06915926933288574, 2.3758604526519775, 0.22361060976982117, -0.7108010649681091, 0.5305397510528564, -0.7488887906074524, 0.8917790651321411, -0.3937682807445526, 1.4240922927856445, 0.5006440877914429, -1.0272375345230103, 1.6135234832763672, -0.46098899841308594, 0.5737482309341431, -0.6359553337097168, -0.6035757660865784, -0.8432531356811523, 0.4065835177898407, 1.9207755327224731, -0.24678677320480347, 1.6155399084091187, -0.2953870892524719, -1.4713290929794312, -1.4898298978805542, 0.9191679358482361, 0.5298317074775696, -0.7557873725891113, 0.04328792542219162, -0.355009526014328, 0.13747242093086243, 0.03503198176622391, 1.1853746175765991, 1.1981924772262573, 0.7153549790382385, -0.31480664014816284, -0.9007508158683777, 0.25143030285835266, -0.00603076908737421, -0.6605280637741089, -1.847355604171753, -0.32328516244888306, 0.15037864446640015, 0.6428943276405334, -1.2659934759140015, 1.8232390880584717, 0.895949125289917, 1.9746558666229248, 1.0653131008148193, -0.2225571721792221, 1.4485399723052979, -0.019369253888726234, 1.866373062133789, -0.44038477540016174, 0.6312980055809021, -0.3275064527988434, -1.1509602069854736, 0.7618281841278076, -0.3150690197944641, -2.0004565715789795, -0.7646970152854919, -0.9586123824119568, -0.227140411734581, -0.7539921402931213, 0.8791974782943726, -0.38885679841041565, -1.3435124158859253, 0.1576816588640213, -0.6414891481399536, 0.060023438185453415, -1.3035147190093994, 0.366315633058548, 0.7667636871337891, -0.6997148394584656, 0.00171626266092062, -0.24002107977867126, -1.2755006551742554, -0.6145881414413452, 0.2649664282798767, 1.978387713432312, -0.6889398097991943, 0.9960146546363831, 0.9273487329483032, -0.7272271513938904, 0.06402665376663208, 0.41636189818382263, -0.3407052457332611, 0.7881682515144348, -1.005486011505127, -0.4811549484729767, 1.189788818359375, -0.20358730852603912, -0.6405494809150696, 1.5249361991882324, 0.8012566566467285, -0.990821361541748, -0.17746217548847198, -0.2578505277633667, -0.8982152342796326, -0.0029587531462311745, -1.5874757766723633, -0.16563433408737183, 0.2440839260816574, -1.4747405052185059, -0.4952108561992645, -0.14036890864372253, 1.2443761825561523, -0.16752400994300842, 1.2885946035385132, -0.3207230865955353, -0.275923490524292, -0.36360105872154236, -0.50226891040802, 0.08148133754730225, -0.16589820384979248, -0.7058733701705933, 0.29073235392570496, -0.8513717651367188, 0.2535327970981598, 1.4702942371368408, 0.29349932074546814, 0.03566047176718712, 0.5959740877151489, 1.065772533416748, 0.29593437910079956, -0.07039840519428253, -0.8896100521087646, -1.5701394081115723, 1.9502346515655518, -1.36787748336792, 1.9126430749893188, 0.7602398991584778, -0.133780837059021, -1.8106788396835327, -1.8231236934661865, 1.489122748374939, 1.1934573650360107, 2.3802764415740967, 0.5544037222862244, 0.30360299348831177, -0.7807972431182861, -0.717936098575592, 0.30252406001091003, -1.0771063566207886, -0.7331054210662842, 0.09856162965297699, 2.3718152046203613, 1.8284368515014648, -0.5238502621650696, -0.1727626919746399, -1.052982211112976, 1.2651687860488892, -0.12747542560100555, 0.24159811437129974, 1.9441956281661987, -0.41499942541122437, -1.0431305170059204, 1.2379869222640991, -2.3222320079803467, 0.13546516001224518, 2.095755100250244, 0.39111092686653137, 0.0263756662607193, -1.422561526298523, -0.6259536743164062, -0.2424839735031128, -0.37319132685661316, -1.1951487064361572, 0.6325424909591675, -0.2827267646789551, -0.8192819952964783, -1.3858891725540161, 0.09933646023273468, -1.1388922929763794, -1.6536544561386108, 0.46810320019721985, 1.8287463188171387, 2.0675418376922607, -0.6755785346031189, 1.4841893911361694, -0.31964728236198425, 0.1457960307598114, 1.2288988828659058, 1.2030515670776367, 3.13027024269104, 1.8787496089935303, -1.2071160078048706, 0.6970186233520508, -0.1063966155052185, -0.5542207360267639, 1.1969304084777832, -1.0986297130584717, 1.221736192703247, -0.2621766924858093, -1.1127867698669434, -1.2382590770721436, 0.9047300219535828, 0.42176729440689087, 0.05421537533402443, -0.558336079120636, 1.1551227569580078, 0.12014606595039368, 1.323214054107666, 0.45579150319099426, -0.3191289007663727, 0.6088696718215942, -0.3655932545661926, -0.5312171578407288, 1.622825264930725, 0.19881069660186768, -1.5906656980514526, -2.3868861198425293, -0.21963901817798615, -0.7900255918502808, 0.04785723611712456, -0.6092960834503174, -0.963612973690033, 1.6369524002075195, 0.3870878219604492, -1.289541244506836, -0.2427525818347931, -0.39131197333335876, -0.6640632152557373, 2.66338849067688, -1.498928189277649, -0.21251711249351501, -0.9840096235275269, -0.67802894115448, 1.7407262325286865, -1.2396320104599, -0.10158717632293701, -1.058092474937439, -0.6016362309455872, -1.378877878189087, -0.5075732469558716, 0.09155809879302979, -0.9069153666496277, 0.8367933630943298, 0.08711917698383331, -1.1012333631515503, -0.3592052459716797, -0.8769789934158325, 0.9089589715003967, -0.10249868035316467, 0.2623533308506012, 1.877181887626648, 0.41153812408447266, -0.43453994393348694, 0.7028647065162659, 1.2608857154846191, 0.6218813061714172, -0.7073072195053101, 0.2415459305047989, -0.6378423571586609, 0.2754761576652527, -1.336896538734436, 0.25922486186027527, -2.8588385581970215, 0.7105932235717773, -0.036459553986787796, -0.09114286303520203, 0.06779477000236511, -1.3536185026168823, 1.051972508430481, 2.4890120029449463, -1.2354546785354614, 0.4800459146499634, 0.3499923646450043, 1.092618465423584, -1.4827653169631958, 0.29973864555358887, -0.35873234272003174, 2.0538103580474854, 0.1357041448354721, 1.1462117433547974, -0.5440602898597717, -2.144962787628174, 0.6714043021202087, -1.1980819702148438, -1.2448042631149292, 0.7569446563720703, -0.9179771542549133, 0.10523742437362671, -1.3423532247543335, -0.13832946121692657, -1.0106143951416016, -1.2046327590942383, 0.8558769226074219, 0.25694990158081055, 0.3959423005580902, -0.5993982553482056, 0.33302798867225647, -2.1729848384857178, -1.3889528512954712, -0.2001151293516159, -0.9515885710716248, 0.5550401210784912, -0.3558877110481262, 0.6962186098098755, -0.22678034007549286, 0.0652623325586319, 0.33700644969940186, 1.405897855758667, 3.4372973442077637, 0.14322316646575928, 0.3233416974544525, -0.10437145829200745, -1.0246164798736572, 1.459972858428955, 0.9899601936340332, 0.023540515452623367, -0.5069882869720459, -1.0381622314453125, 1.2186977863311768, 1.9056663513183594, 1.0582505464553833, 0.07880575954914093, -0.8468858599662781, -0.6120641231536865, -0.01962311565876007, 0.22849079966545105, 0.5156077146530151, 0.8815515041351318, -0.03241828456521034, 0.1398332715034485, 1.2968837022781372, 1.260284185409546, -0.40907853841781616, 0.3735140860080719, -0.8196984529495239, -0.41177594661712646, 0.45309990644454956, 0.34305858612060547, -0.011005960404872894, 0.40580639243125916, -0.9069576263427734, -0.29851034283638, -0.2990388870239258, -1.0267105102539062, -0.6938934922218323, -0.509771466255188, -0.4650881886482239, 1.5533854961395264, 0.052889320999383926, -0.4666348993778229, -0.08388812839984894, -0.9059929251670837, -0.12974776327610016, -1.006735920906067, 0.1515553891658783, -0.0789305567741394, -0.19447581470012665, -0.12178875505924225, 1.8198049068450928, -0.9381769895553589, -2.119842767715454, 0.36548563838005066, 0.328996866941452, -0.36523979902267456, 0.13456332683563232, 1.6642566919326782, 0.5100229978561401, 1.3491474390029907, 1.3631196022033691, 0.9049490690231323, -0.5060458183288574, -1.2420227527618408, 0.6683233976364136, 1.008354902267456, -1.381909728050232, 0.8629036545753479, -0.014097152277827263, -0.42661789059638977, 0.7412680983543396, 1.1668275594711304, 0.5192305445671082, -1.8695499897003174, 0.7840657830238342, -0.8496788740158081, 0.8107060194015503, 0.7274105548858643, 0.715578556060791, 0.241493359208107, 0.8532237410545349, -1.2177574634552002, -1.1257948875427246, -0.8807002902030945, -0.655742347240448, 2.0068089962005615, -0.17385949194431305, 0.5635243058204651, -0.16738580167293549, -1.2082173824310303, -0.18100771307945251, 0.6856885552406311, 0.3767734169960022, -0.43928495049476624, 0.7593971490859985, -0.668831467628479, -1.0339852571487427, -1.3829162120819092, -0.341888427734375, -0.995927631855011, -0.9363958835601807, 1.0677213668823242, 0.8627632260322571, 0.3422180116176605, 1.9984873533248901, 0.6078851222991943, 0.21940883994102478, -2.6682605743408203, 0.8821924924850464, 0.31966567039489746, 0.00007222406566143036, 0.8723710775375366, 0.33993422985076904, 1.10638427734375, -0.00820715632289648, 0.5511062145233154, -2.2846503257751465, 2.2966935634613037, -0.276957243680954, 0.7131294012069702, 0.048318490386009216, -0.16467422246932983, 1.1637609004974365, 0.5577383041381836, 0.5103251934051514, -1.0860568284988403, 0.7323114275932312, -0.6593027114868164, 1.328203797340393, 1.090166687965393, -0.8989821076393127, 0.1028311550617218, 1.3633521795272827, 0.5616632699966431, -0.429852694272995, -0.9134654998779297, -0.829840898513794, 1.013134241104126, 1.71864652633667, 0.012239780277013779, -0.0171388927847147, 0.8463056087493896, 0.664138674736023, -1.304587483406067, 0.09253329038619995, -0.7656151652336121, -0.7686447501182556, 1.6705939769744873, 2.0999491214752197, -0.01884886994957924, -0.19062790274620056, -0.7855693101882935, -1.1195875406265259, 0.7830915451049805, -0.040653664618730545, 0.14559617638587952, 0.7354452610015869, -0.6670255064964294, 1.13026762008667, 0.8367201089859009, 0.8961154222488403, 0.17171205580234528, 0.31672728061676025, 0.34496015310287476, -0.22020584344863892, -1.1808000802993774, -0.33508625626564026, -1.127502679824829, -2.6666066646575928, 0.4490114748477936, -0.34518754482269287, -1.3635984659194946, -0.008604109287261963, -1.1422301530838013, 0.9017354249954224, -0.6377763748168945, -1.0834518671035767, -1.5560286045074463, 0.1328018307685852, -0.12420319020748138, 0.8302536606788635, -1.6446055173873901, -0.09958513081073761, 1.1953829526901245, 0.946025013923645, -0.6541576385498047, 1.0455468893051147, 0.27479231357574463, 1.058302402496338, 0.7708622217178345, -0.47863903641700745, 0.555779755115509, 0.0188673697412014, -1.383204698562622, 0.49374479055404663, 1.2127734422683716, 0.14421632885932922, 1.4095606803894043, -0.4910191297531128, 0.013641854748129845, 0.43013304471969604, -0.47736266255378723, -0.5037748217582703, -0.6413708329200745, 0.7529011964797974, 0.012647025287151337, -0.8971783518791199, 0.06393972039222717, -0.0825737714767456, -0.1422675997018814, 0.20658205449581146, -1.5258039236068726, -0.2616581320762634, -0.42774543166160583, -0.5617826581001282, -1.3378326892852783, -0.06925538182258606, 1.3779664039611816, -0.8316066265106201, -0.16641944646835327, 0.46918487548828125, 0.29291173815727234, 0.5723235011100769, 0.5987481474876404, -0.6621112823486328, -0.28985917568206787, -0.3201911747455597, -0.3887191116809845, 0.26725316047668457, 1.317428708076477, -0.1843496561050415, -0.9570176005363464, 0.675286591053009, -0.35177671909332275, 0.10858726501464844, 1.9710153341293335, 0.05398648604750633, -0.7662653923034668, 0.33237797021865845, -0.6922537088394165, 1.8679485321044922, 1.5664416551589966, 1.3126578330993652, -0.056973330676555634, -0.8497797846794128, 0.5985202789306641, -0.1693757176399231, -0.37123820185661316, 0.9005988836288452, 0.40791162848472595, -0.1257716566324234, -1.3725537061691284, 0.6235945820808411, 1.3054531812667847, -0.8255335092544556, -0.8339520692825317, 0.04996085911989212, -0.8702147006988525, 1.024641990661621, 0.6498809456825256, 0.4251319169998169, 0.3283081650733948, 1.5805504322052002, 0.6974931359291077, -0.5173735022544861, 0.5524874925613403, 0.48711445927619934, -0.08275072276592255, -2.149723529815674, -1.1138298511505127, 0.37882643938064575, -0.3744451403617859, -1.5899977684020996, 1.432053565979004, -1.1220051050186157, -0.9230902194976807, 0.6007476449012756, 0.15675897896289825, 1.4677720069885254, 0.26126545667648315, 1.5970183610916138, 2.033761501312256, 0.8603180646896362, 0.32507455348968506, 1.342088222503662, -0.1442898064851761, -0.4401395618915558, 1.8872244358062744, -0.44490018486976624, 0.4968549609184265, 1.0656440258026123, -0.35291969776153564, -1.0093269348144531, -0.7320647239685059, -1.1538723707199097, -0.6838911175727844, 1.2696235179901123, 0.11782272160053253, -1.14391028881073, 0.09618036448955536, 1.5958818197250366, 0.13083148002624512, -0.21569037437438965, 0.6347249150276184, 0.3711635172367096, -0.7577038407325745, -0.034829460084438324, -0.9625182151794434, 0.6016334295272827, -0.11751477420330048, -0.3818777799606323, 0.2307920604944229, 0.42826569080352783, 1.264359474182129, -0.140036478638649, 0.07040256261825562, 1.1504430770874023, -1.4720150232315063, 1.4141182899475098, -0.6057752370834351, 0.25113141536712646, -2.401129961013794, 1.4576151371002197, -0.7716966271400452, 1.8376878499984741, -2.6024134159088135, 0.38148048520088196, -0.6679304242134094, -0.4257958233356476, 0.2842581868171692, -0.4617495536804199, 0.12076672911643982, -0.21581220626831055, -1.059422492980957, 0.04098274186253548, -0.805639922618866, 0.6218109726905823, 1.2380623817443848, 1.3914016485214233, -1.0548136234283447, -0.33506831526756287, -1.7462977170944214, -0.16751728951931, -0.6847398281097412, 0.34658995270729065, -2.1229467391967773, -0.1975669264793396, -1.992629885673523, -2.2540695667266846, -1.3410930633544922, -0.8524230122566223, 1.061644434928894, 0.090518519282341, -1.025032639503479, 1.02826726436615, -0.45984145998954773, -1.7626440525054932, 1.1224154233932495, -2.205958366394043 ]
https://github.com/huggingface/datasets/issues/5627
Unable to load AutoTrain-generated dataset from the hub
The AutoTrain format is not supported right now. I think it would require a dedicated dataset builder
### Describe the bug DatasetGenerationError: An error occurred while generating the dataset -> ValueError: Couldn't cast ... because column names don't match ``` ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match ``` ### Steps to reproduce the bug Steps to reproduce: 1. `pip install datasets==2.10.1` 2. Attempt to load (private dataset). Note that I'm authenticated via ` huggingface-cli login` ``` from datasets import load_dataset # load dataset dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" dataset = load_dataset(dataset) ``` Here's the full traceback: ```Downloading and preparing dataset json/ijmiller2--autotrain-data-betterbin-vision-10000 to /Users/ian/.cache/huggingface/datasets/ijmiller2___json/ijmiller2--autotrain-data-betterbin-vision-10000-2eae034a9ff8a1a9/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|███████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2383.80it/s] Extracting data files: 100%|█████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 505.95it/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1874, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1868 writer = writer_class( 1869 features=writer._features, 1870 path=fpath.replace("SSSSS", f"{shard_id:05d}").replace("JJJJJ", f"{job_id:05d}"), 1871 storage_options=self._fs.storage_options, 1872 embed_local_files=embed_local_files, 1873 ) -> 1874 writer.write_table(table) 1875 num_examples_progress_update += len(table) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/arrow_writer.py:568, in ArrowWriter.write_table(self, pa_table, writer_batch_size) 567 pa_table = pa_table.combine_chunks() --> 568 pa_table = table_cast(pa_table, self._schema) 569 if self.embed_local_files: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2312, in table_cast(table, schema) 2311 if table.schema != schema: -> 2312 return cast_table_to_schema(table, schema) 2313 elif table.schema.metadata != schema.metadata: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2270, in cast_table_to_schema(table, schema) 2269 if sorted(table.column_names) != sorted(features): -> 2270 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2271 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Input In [8], in <cell line: 6>() 4 # load dataset 5 dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" ----> 6 dataset = load_dataset(dataset) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/load.py:1782, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs) 1779 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 1781 # Download and prepare data -> 1782 builder_instance.download_and_prepare( 1783 download_config=download_config, 1784 download_mode=download_mode, 1785 verification_mode=verification_mode, 1786 try_from_hf_gcs=try_from_hf_gcs, 1787 num_proc=num_proc, 1788 ) 1790 # Build dataset for splits 1791 keep_in_memory = ( 1792 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1793 ) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:872, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 870 if num_proc is not None: 871 prepare_split_kwargs["num_proc"] = num_proc --> 872 self._download_and_prepare( 873 dl_manager=dl_manager, 874 verification_mode=verification_mode, 875 **prepare_split_kwargs, 876 **download_and_prepare_kwargs, 877 ) 878 # Sync info 879 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:967, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 963 split_dict.add(split_generator.split_info) 965 try: 966 # Prepare split will record examples associated to the split --> 967 self._prepare_split(split_generator, **prepare_split_kwargs) 968 except OSError as e: 969 raise OSError( 970 "Cannot find data file. " 971 + (self.manual_download_instructions or "") 972 + "\nOriginal error:\n" 973 + str(e) 974 ) from None File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1749, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1747 job_id = 0 1748 with pbar: -> 1749 for job_id, done, content in self._prepare_split_single( 1750 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1751 ): 1752 if done: 1753 result = content File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1892, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1890 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1891 e = e.__context__ -> 1892 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1894 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` ### Expected behavior I'm ultimately trying to generate my own performance metrics on validation data (before putting an endpoint into production) and so was hoping to load all or at least the validation subset from the hub. I'm expecting the `load_dataset()` function to work as shown in the documentation [here](https://huggingface.co/docs/datasets/loading#hugging-face-hub): ```python dataset = load_dataset( "lhoestq/custom_squad", revision="main" # tag name, or branch name, or commit hash ) ``` ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.8.13 - PyArrow version: 9.0.0 - Pandas version: 1.4.4
263
17
Unable to load AutoTrain-generated dataset from the hub ### Describe the bug DatasetGenerationError: An error occurred while generating the dataset -> ValueError: Couldn't cast ... because column names don't match ``` ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match ``` ### Steps to reproduce the bug Steps to reproduce: 1. `pip install datasets==2.10.1` 2. Attempt to load (private dataset). Note that I'm authenticated via ` huggingface-cli login` ``` from datasets import load_dataset # load dataset dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" dataset = load_dataset(dataset) ``` Here's the full traceback: ```Downloading and preparing dataset json/ijmiller2--autotrain-data-betterbin-vision-10000 to /Users/ian/.cache/huggingface/datasets/ijmiller2___json/ijmiller2--autotrain-data-betterbin-vision-10000-2eae034a9ff8a1a9/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|███████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2383.80it/s] Extracting data files: 100%|█████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 505.95it/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1874, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1868 writer = writer_class( 1869 features=writer._features, 1870 path=fpath.replace("SSSSS", f"{shard_id:05d}").replace("JJJJJ", f"{job_id:05d}"), 1871 storage_options=self._fs.storage_options, 1872 embed_local_files=embed_local_files, 1873 ) -> 1874 writer.write_table(table) 1875 num_examples_progress_update += len(table) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/arrow_writer.py:568, in ArrowWriter.write_table(self, pa_table, writer_batch_size) 567 pa_table = pa_table.combine_chunks() --> 568 pa_table = table_cast(pa_table, self._schema) 569 if self.embed_local_files: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2312, in table_cast(table, schema) 2311 if table.schema != schema: -> 2312 return cast_table_to_schema(table, schema) 2313 elif table.schema.metadata != schema.metadata: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2270, in cast_table_to_schema(table, schema) 2269 if sorted(table.column_names) != sorted(features): -> 2270 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2271 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Input In [8], in <cell line: 6>() 4 # load dataset 5 dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" ----> 6 dataset = load_dataset(dataset) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/load.py:1782, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs) 1779 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 1781 # Download and prepare data -> 1782 builder_instance.download_and_prepare( 1783 download_config=download_config, 1784 download_mode=download_mode, 1785 verification_mode=verification_mode, 1786 try_from_hf_gcs=try_from_hf_gcs, 1787 num_proc=num_proc, 1788 ) 1790 # Build dataset for splits 1791 keep_in_memory = ( 1792 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1793 ) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:872, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 870 if num_proc is not None: 871 prepare_split_kwargs["num_proc"] = num_proc --> 872 self._download_and_prepare( 873 dl_manager=dl_manager, 874 verification_mode=verification_mode, 875 **prepare_split_kwargs, 876 **download_and_prepare_kwargs, 877 ) 878 # Sync info 879 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:967, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 963 split_dict.add(split_generator.split_info) 965 try: 966 # Prepare split will record examples associated to the split --> 967 self._prepare_split(split_generator, **prepare_split_kwargs) 968 except OSError as e: 969 raise OSError( 970 "Cannot find data file. " 971 + (self.manual_download_instructions or "") 972 + "\nOriginal error:\n" 973 + str(e) 974 ) from None File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1749, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1747 job_id = 0 1748 with pbar: -> 1749 for job_id, done, content in self._prepare_split_single( 1750 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1751 ): 1752 if done: 1753 result = content File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1892, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1890 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1891 e = e.__context__ -> 1892 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1894 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` ### Expected behavior I'm ultimately trying to generate my own performance metrics on validation data (before putting an endpoint into production) and so was hoping to load all or at least the validation subset from the hub. I'm expecting the `load_dataset()` function to work as shown in the documentation [here](https://huggingface.co/docs/datasets/loading#hugging-face-hub): ```python dataset = load_dataset( "lhoestq/custom_squad", revision="main" # tag name, or branch name, or commit hash ) ``` ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.8.13 - PyArrow version: 9.0.0 - Pandas version: 1.4.4 The AutoTrain format is not supported right now. I think it would require a dedicated dataset builder
[ -1.2668479681015015, -1.1041215658187866, -0.7530314922332764, 1.728272795677185, -0.28150415420532227, -0.9776759147644043, 0.0697939470410347, -0.991932213306427, 1.5877076387405396, -0.5884959697723389, 0.22780397534370422, -1.5597028732299805, -0.036122385412454605, -0.7347760200500488, -0.6915895938873291, -0.8035113215446472, -0.32320436835289, -0.771528422832489, 1.2070733308792114, 2.4118239879608154, 1.200285792350769, -1.5453917980194092, 2.7016305923461914, 0.8816941380500793, -0.12610267102718353, -1.1133153438568115, 0.5421517491340637, -0.0640779510140419, -1.1574115753173828, -0.5066576600074768, -0.8649032115936279, -0.0896325558423996, -0.6167130470275879, -0.3605197072029114, -0.07864593714475632, 0.5280413031578064, -0.27107518911361694, -0.4718596935272217, -0.5487840175628662, -0.7785322666168213, 0.49171963334083557, -0.4384336769580841, 0.7514248490333557, -0.24614571034908295, 1.71208918094635, -0.39002642035484314, 0.2845098674297333, 0.6851634383201599, 1.292158842086792, 0.14130938053131104, 0.02753600850701332, 0.4569132626056671, 0.41540783643722534, -0.07058685272932053, 0.5432404279708862, 1.0555710792541504, 0.7123696208000183, 0.33477458357810974, 0.8422979712486267, -2.408203601837158, 1.1302738189697266, -1.1043037176132202, 0.4089505672454834, 1.3673304319381714, -0.8833780884742737, 0.5218858122825623, -1.7682785987854004, 0.06957574188709259, 0.7351123690605164, -2.053126811981201, 0.4930669367313385, -1.1906214952468872, -0.39516428112983704, 0.9617709517478943, 0.4212599992752075, -1.2411950826644897, 0.09042736887931824, -0.3578740656375885, 1.0576786994934082, 0.32524263858795166, 0.9752327799797058, -1.7586380243301392, 0.10387493669986725, -0.2712053954601288, 0.10783598572015762, -1.2694193124771118, -1.5003095865249634, 0.4346408545970917, 0.4964570701122284, 0.7000347971916199, -0.16723790764808655, 1.0925828218460083, -1.1226266622543335, 0.6318255662918091, -1.1204956769943237, -1.7015502452850342, -1.4005239009857178, -2.4142181873321533, -2.183048725128174, 0.6107887625694275, -0.4129815697669983, -0.4752710461616516, 2.0762760639190674, -0.87148517370224, -1.769208550453186, 1.305567741394043, 0.4397881329059601, 0.06256155669689178, 2.397179365158081, 0.19471128284931183, -0.7476795315742493, 0.5176205039024353, -0.9045448303222656, 0.7031600475311279, -0.387716680765152, 1.4773300886154175, 0.43043646216392517, -0.8768291473388672, 1.6143345832824707, -0.4443293809890747, 0.5835939645767212, -0.6843193769454956, -0.425972580909729, -0.7838126420974731, 0.34839117527008057, 1.9186593294143677, -0.15932732820510864, 1.3677855730056763, -0.4550398886203766, -1.5443968772888184, -1.4892221689224243, 1.0300687551498413, 0.4367663562297821, -0.9085675477981567, 0.23573094606399536, -0.4552927017211914, 0.23377695679664612, -0.2178596705198288, 1.1508562564849854, 1.270998477935791, 0.6144272685050964, -0.3740505576133728, -0.9593902826309204, 0.10446972399950027, -0.147430419921875, -0.691725492477417, -1.828667402267456, -0.24024184048175812, 0.11856409162282944, 0.6998089551925659, -1.2863565683364868, 1.527488350868225, 0.9343627691268921, 1.9273282289505005, 1.007340431213379, -0.4869047701358795, 1.5244531631469727, 0.08776897937059402, 1.8448853492736816, -0.6499449610710144, 0.6687297224998474, -0.39816221594810486, -1.1742140054702759, 0.9296540021896362, -0.22369500994682312, -2.0405139923095703, -0.7447272539138794, -0.8057583570480347, -0.2900041937828064, -0.7878550887107849, 0.8789755702018738, -0.4218652844429016, -1.480165958404541, 0.285492867231369, -0.8941280841827393, 0.34869372844696045, -1.0726559162139893, 0.3573586046695709, 0.6992371082305908, -0.5447956919670105, 0.0873132050037384, -0.302603542804718, -1.1991357803344727, -0.5384302735328674, 0.5659259557723999, 1.805525302886963, -0.8360293507575989, 0.7451766729354858, 1.0462448596954346, -0.5773900747299194, 0.0943225845694542, 0.174861341714859, -0.23959659039974213, 0.8240803480148315, -1.0933235883712769, -0.7929631471633911, 1.2060960531234741, -0.21647131443023682, -0.6326318383216858, 1.4130241870880127, 0.8339019417762756, -1.0205957889556885, -0.30057400465011597, -0.1706647425889969, -0.7648914456367493, 0.05269445851445198, -1.6262834072113037, -0.10925256460905075, 0.5472329258918762, -1.634995698928833, -0.5019084215164185, -0.2688395380973816, 1.3790749311447144, -0.06928647309541702, 1.344970464706421, -0.39931198954582214, -0.07588114589452744, -0.20055031776428223, -0.3100266754627228, 0.2573176920413971, -0.27615344524383545, -0.5838398933410645, -0.002776605077087879, -0.8719885945320129, 0.40456297993659973, 1.4402620792388916, 0.32519781589508057, 0.06267276406288147, 0.5448765158653259, 1.1598106622695923, 0.5038600564002991, 0.20106396079063416, -0.8661119341850281, -1.4799445867538452, 1.9036747217178345, -1.6290826797485352, 2.0544228553771973, 0.635890781879425, 0.06318040937185287, -1.7201015949249268, -1.8664376735687256, 1.4092297554016113, 1.1274000406265259, 2.2305045127868652, 0.6398751735687256, 0.42176827788352966, -1.0111793279647827, -0.6780086755752563, 0.09554333239793777, -0.8764956593513489, -0.8319846391677856, 0.21791650354862213, 2.539180278778076, 1.8451179265975952, -0.41410884261131287, -0.264950692653656, -0.8855593800544739, 1.5963737964630127, -0.16363590955734253, 0.2717883288860321, 2.0822105407714844, -0.022383086383342743, -1.0367486476898193, 1.1989355087280273, -2.5806667804718018, 0.25163087248802185, 2.0260024070739746, 0.3154086768627167, 0.28995829820632935, -1.3960649967193604, -0.7826492786407471, -0.12370024621486664, -0.5389534831047058, -1.2180907726287842, 0.5186406373977661, -0.33860552310943604, -0.7159385681152344, -1.4500077962875366, 0.3014303743839264, -1.097739338874817, -1.6070892810821533, 0.14966796338558197, 1.9433966875076294, 2.167468309402466, -0.8640859723091125, 1.7386252880096436, -0.1993078589439392, 0.2524416148662567, 1.298349142074585, 1.2274982929229736, 2.878089189529419, 1.852105975151062, -1.2704265117645264, 0.46719446778297424, -0.09620312601327896, -0.48077648878097534, 1.1081721782684326, -1.2038331031799316, 1.1315133571624756, -0.1841217577457428, -1.1422086954116821, -1.1673637628555298, 0.8615504503250122, 0.584589958190918, -0.004599579609930515, -0.5145704746246338, 1.1116479635238647, -0.08939406275749207, 1.3225220441818237, 0.6961862444877625, -0.3506808578968048, 0.5513858795166016, -0.422671914100647, -0.5463706851005554, 1.5295783281326294, 0.05456935241818428, -1.401625156402588, -2.1731293201446533, -0.17565590143203735, -0.7979542016983032, -0.035258229821920395, -0.5798336863517761, -1.0118811130523682, 1.540379285812378, 0.24484074115753174, -1.194773554801941, -0.19529452919960022, -0.2780514359474182, -0.42487940192222595, 2.666095733642578, -1.324273943901062, -0.4165481626987457, -0.9456943273544312, -0.6127907037734985, 1.6620573997497559, -1.0507465600967407, -0.30912938714027405, -1.1829454898834229, -0.5832558870315552, -1.2662335634231567, -0.5055664777755737, 0.0271361842751503, -0.8144050240516663, 0.9813134074211121, 0.3639523386955261, -1.266111969947815, -0.38524216413497925, -0.9237715005874634, 0.9803213477134705, -0.11512763798236847, 0.18198829889297485, 1.8366650342941284, 0.4027935564517975, -0.32440322637557983, 0.9450808167457581, 1.1100128889083862, 0.6654080748558044, -0.605794370174408, 0.2546783685684204, -0.4510341286659241, 0.3241444528102875, -1.3772872686386108, 0.2478393316268921, -2.898327589035034, 0.6513213515281677, 0.11946596950292587, -0.03366513177752495, -0.05343107134103775, -1.3594731092453003, 1.1189287900924683, 2.4952168464660645, -1.2554265260696411, 0.6013612151145935, 0.3743593692779541, 1.2759721279144287, -1.8386430740356445, 0.20066070556640625, -0.34946051239967346, 2.1926188468933105, 0.11344058811664581, 1.3382854461669922, -0.4534248411655426, -2.5612287521362305, 0.5138241648674011, -1.378907322883606, -1.096144437789917, 0.5438309907913208, -0.9353097081184387, 0.2295178920030594, -1.6823643445968628, -0.3507068455219269, -0.9807725548744202, -1.23163902759552, 0.7478442192077637, 0.24851861596107483, 0.20326247811317444, -0.5497328042984009, 0.37707212567329407, -2.2067346572875977, -1.4128284454345703, -0.12608905136585236, -0.9020375609397888, 0.5281027555465698, -0.4444662034511566, 0.8008015155792236, -0.1477760225534439, -0.05501328781247139, 0.28496530652046204, 1.4374902248382568, 3.4014227390289307, 0.16237173974514008, 0.3758961260318756, -0.24263112246990204, -0.8985548615455627, 1.4853166341781616, 0.914016842842102, -0.20555061101913452, -0.45759278535842896, -1.1972235441207886, 1.355351448059082, 1.9516472816467285, 0.9659605026245117, -0.05546893551945686, -0.7257453203201294, -0.6084998250007629, 0.017256125807762146, 0.2678490877151489, 0.5826884508132935, 0.7850968837738037, -0.07913242280483246, -0.08739479631185532, 1.3673394918441772, 1.042707085609436, -0.383566290140152, 0.36721938848495483, -0.8188737034797668, -0.4698449671268463, 0.5504011511802673, 0.14558133482933044, -0.07815474271774292, 0.30935946106910706, -0.9870389699935913, -0.2175315022468567, -0.35862308740615845, -0.8286726474761963, -0.6315758228302002, -0.4222418963909149, -0.395269513130188, 1.4581652879714966, 0.33635982871055603, -0.5857260227203369, -0.1381477564573288, -0.6677396297454834, -0.10494890809059143, -1.1006336212158203, 0.15618422627449036, -0.21344180405139923, -0.15174774825572968, -0.30854952335357666, 1.6744167804718018, -0.8874971270561218, -2.0855424404144287, 0.08501512557268143, 0.4301665127277374, -0.1569567620754242, 0.3608926832675934, 1.761603832244873, 0.48256969451904297, 1.2962088584899902, 1.2531248331069946, 0.9628139734268188, -0.6228628754615784, -1.312849998474121, 0.6435427665710449, 1.1790704727172852, -1.3762458562850952, 0.7715480327606201, -0.035545915365219116, -0.47801923751831055, 0.6259837746620178, 1.498741865158081, 0.5328872203826904, -2.0559730529785156, 0.7916529774665833, -1.0588557720184326, 1.0539153814315796, 0.7624366283416748, 0.631879985332489, 0.24829944968223572, 0.8147405385971069, -1.2486376762390137, -1.0286734104156494, -0.783541738986969, -0.8171359300613403, 2.0325887203216553, -0.3425305485725403, 0.543720006942749, -0.12242921441793442, -1.3209023475646973, -0.002820964902639389, 0.6450803279876709, 0.27309319376945496, -0.5618501305580139, 0.8473577499389648, -0.6639176607131958, -1.2530796527862549, -1.1642979383468628, -0.4365643262863159, -0.9171666502952576, -1.0488070249557495, 1.0594820976257324, 0.8405079245567322, 0.12263863533735275, 1.807677149772644, 0.6661230325698853, 0.09680551290512085, -2.5179736614227295, 0.873526394367218, 0.26026850938796997, -0.10427428036928177, 0.7383029460906982, 0.37568268179893494, 1.1092103719711304, 0.11256609857082367, 0.603712260723114, -2.4029972553253174, 2.25303053855896, -0.14169535040855408, 0.7472838163375854, -0.1646309196949005, -0.1639726459980011, 1.0729955434799194, 0.5009540915489197, 0.49589160084724426, -0.8284602761268616, 0.5737544894218445, -0.4787689447402954, 1.2693513631820679, 0.9169272184371948, -0.846095860004425, -0.11102518439292908, 1.237303376197815, 0.33606040477752686, -0.7209679484367371, -0.9790141582489014, -0.8248558640480042, 0.9648652076721191, 1.6591660976409912, -0.07955276221036911, 0.021596267819404602, 0.7797747254371643, 0.5675472021102905, -1.2970633506774902, 0.026393026113510132, -0.6737058162689209, -0.6548845171928406, 1.7586997747421265, 2.0157549381256104, -0.36559534072875977, -0.11579208821058273, -0.706498920917511, -1.392422080039978, 0.7425097823143005, -0.16347934305667877, 0.05659865960478783, 0.5329612493515015, -0.5306766629219055, 0.917732834815979, 0.7651580572128296, 0.8978162407875061, 0.0849350169301033, 0.24111124873161316, 0.4574235677719116, -0.544844925403595, -1.120320439338684, -0.28674569725990295, -1.2700698375701904, -2.427173137664795, 0.36712080240249634, -0.053535155951976776, -1.1649643182754517, 0.0037777377292513847, -0.9532427787780762, 1.202413558959961, -0.5448103547096252, -1.1564278602600098, -1.2731035947799683, 0.14579607546329498, -0.05652177333831787, 0.8160554766654968, -1.6625938415527344, -0.005310381762683392, 1.2644027471542358, 0.8777130246162415, -0.7986063361167908, 1.0033237934112549, 0.2401246726512909, 1.2059881687164307, 0.700213611125946, -0.2797033190727234, 0.5746321678161621, -0.059658803045749664, -1.306015133857727, 0.5674008131027222, 1.1457260847091675, 0.1809573769569397, 1.5189807415008545, -0.4729924201965332, -0.19800062477588654, 0.36234021186828613, -0.6253977417945862, -0.41856861114501953, -0.3583616614341736, 0.5317158102989197, 0.11913347989320755, -0.8135496377944946, 0.043827153742313385, 0.07258502393960953, -0.28195860981941223, 0.1509467214345932, -1.5583711862564087, -0.16746968030929565, -0.43738123774528503, -0.43222376704216003, -1.2314237356185913, -0.20512434840202332, 1.2923880815505981, -0.5589585304260254, -0.3939417600631714, 0.577337920665741, 0.2589011490345001, 0.48413926362991333, 0.6844009160995483, -0.6661331653594971, -0.3683795630931854, -0.12952154874801636, -0.34981173276901245, 0.2823764383792877, 1.4309070110321045, -0.0660490095615387, -0.9736713767051697, 0.7385560870170593, -0.3514034152030945, 0.08295492827892303, 1.709301471710205, -0.05499222129583359, -0.8412119746208191, 0.2570672929286957, -0.7683187127113342, 1.9771199226379395, 1.6382570266723633, 1.3024041652679443, -0.4094626009464264, -0.8132486343383789, 0.7260692715644836, -0.5006282925605774, -0.4478164315223694, 0.7758959531784058, 0.5432184338569641, -0.24249659478664398, -1.4317456483840942, 0.8217384815216064, 1.2347825765609741, -0.8309211730957031, -0.8389790058135986, 0.28885847330093384, -0.6734582781791687, 1.1105220317840576, 0.6932225823402405, 0.43406441807746887, 0.297102153301239, 1.7145370244979858, 0.831576406955719, -0.4994727075099945, 0.6323974132537842, 0.5257280468940735, -0.26715970039367676, -2.1138217449188232, -1.252794861793518, 0.3176620602607727, -0.5137653350830078, -1.6952552795410156, 1.3159769773483276, -1.101449966430664, -0.9162051677703857, 0.6450519561767578, 0.03628940507769585, 1.2808847427368164, 0.4349811375141144, 1.411503791809082, 1.9934818744659424, 0.6940814256668091, 0.5151010751724243, 1.154569149017334, -0.1815454214811325, -0.5042612552642822, 1.8176535367965698, -0.3345796763896942, 0.532935380935669, 1.1353654861450195, -0.25566089153289795, -1.2013441324234009, -0.7644199728965759, -1.3346127271652222, -0.7110083699226379, 1.2127081155776978, 0.07262489199638367, -1.1307826042175293, 0.2965683937072754, 1.6197154521942139, -0.024373119696974754, -0.4674893319606781, 0.7696972489356995, 0.27382907271385193, -1.0030088424682617, -0.05859793350100517, -0.8630975484848022, 0.4454632103443146, -0.27057331800460815, -0.18273210525512695, 0.42780864238739014, 0.4344092309474945, 1.4027845859527588, 0.09972959011793137, 0.17073404788970947, 0.9811175465583801, -1.3107826709747314, 1.478776454925537, -0.772055983543396, 0.4201301634311676, -2.3539507389068604, 1.2731677293777466, -0.7085732221603394, 2.0847792625427246, -2.719498634338379, 0.526012659072876, -0.6789117455482483, -0.48385003209114075, 0.2819129228591919, -0.2959164083003998, 0.03798713535070419, -0.08121193945407867, -1.0807422399520874, 0.13174542784690857, -0.5597617030143738, 0.44277238845825195, 1.2955079078674316, 1.264159917831421, -1.1070516109466553, -0.1026454046368599, -1.7685422897338867, -0.29887303709983826, -0.9133437275886536, 0.3217937648296356, -2.0676887035369873, -0.2988162338733673, -1.8510645627975464, -2.1551554203033447, -1.073627233505249, -0.8519344329833984, 1.2278246879577637, 0.08484544605016708, -0.8758429884910583, 1.3742387294769287, -0.3587663769721985, -1.6812200546264648, 1.0576056241989136, -2.022516965866089 ]
https://github.com/huggingface/datasets/issues/5627
Unable to load AutoTrain-generated dataset from the hub
Okay, good to know. Thanks for the reply. For now I will just have to manage the split manually before training, because I can’t find any way of pulling out file indices or file names from the autogenerated split. The file names field of the image dataset (loaded directly from arrow file) is missing, just fyi (for anyone else this might be relevant too). On Fri, Mar 10, 2023 at 7:02 PM Quentin Lhoest ***@***.***> wrote: > The AutoTrain format is not supported right now. I think it would require > a dedicated dataset builder > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/5627#issuecomment-1464734308>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACBJ4F5A353MCZ76OGRJ6CTW3PFI7ANCNFSM6AAAAAAVWXNUTE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
### Describe the bug DatasetGenerationError: An error occurred while generating the dataset -> ValueError: Couldn't cast ... because column names don't match ``` ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match ``` ### Steps to reproduce the bug Steps to reproduce: 1. `pip install datasets==2.10.1` 2. Attempt to load (private dataset). Note that I'm authenticated via ` huggingface-cli login` ``` from datasets import load_dataset # load dataset dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" dataset = load_dataset(dataset) ``` Here's the full traceback: ```Downloading and preparing dataset json/ijmiller2--autotrain-data-betterbin-vision-10000 to /Users/ian/.cache/huggingface/datasets/ijmiller2___json/ijmiller2--autotrain-data-betterbin-vision-10000-2eae034a9ff8a1a9/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|███████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2383.80it/s] Extracting data files: 100%|█████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 505.95it/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1874, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1868 writer = writer_class( 1869 features=writer._features, 1870 path=fpath.replace("SSSSS", f"{shard_id:05d}").replace("JJJJJ", f"{job_id:05d}"), 1871 storage_options=self._fs.storage_options, 1872 embed_local_files=embed_local_files, 1873 ) -> 1874 writer.write_table(table) 1875 num_examples_progress_update += len(table) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/arrow_writer.py:568, in ArrowWriter.write_table(self, pa_table, writer_batch_size) 567 pa_table = pa_table.combine_chunks() --> 568 pa_table = table_cast(pa_table, self._schema) 569 if self.embed_local_files: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2312, in table_cast(table, schema) 2311 if table.schema != schema: -> 2312 return cast_table_to_schema(table, schema) 2313 elif table.schema.metadata != schema.metadata: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2270, in cast_table_to_schema(table, schema) 2269 if sorted(table.column_names) != sorted(features): -> 2270 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2271 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Input In [8], in <cell line: 6>() 4 # load dataset 5 dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" ----> 6 dataset = load_dataset(dataset) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/load.py:1782, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs) 1779 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 1781 # Download and prepare data -> 1782 builder_instance.download_and_prepare( 1783 download_config=download_config, 1784 download_mode=download_mode, 1785 verification_mode=verification_mode, 1786 try_from_hf_gcs=try_from_hf_gcs, 1787 num_proc=num_proc, 1788 ) 1790 # Build dataset for splits 1791 keep_in_memory = ( 1792 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1793 ) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:872, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 870 if num_proc is not None: 871 prepare_split_kwargs["num_proc"] = num_proc --> 872 self._download_and_prepare( 873 dl_manager=dl_manager, 874 verification_mode=verification_mode, 875 **prepare_split_kwargs, 876 **download_and_prepare_kwargs, 877 ) 878 # Sync info 879 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:967, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 963 split_dict.add(split_generator.split_info) 965 try: 966 # Prepare split will record examples associated to the split --> 967 self._prepare_split(split_generator, **prepare_split_kwargs) 968 except OSError as e: 969 raise OSError( 970 "Cannot find data file. " 971 + (self.manual_download_instructions or "") 972 + "\nOriginal error:\n" 973 + str(e) 974 ) from None File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1749, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1747 job_id = 0 1748 with pbar: -> 1749 for job_id, done, content in self._prepare_split_single( 1750 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1751 ): 1752 if done: 1753 result = content File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1892, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1890 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1891 e = e.__context__ -> 1892 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1894 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` ### Expected behavior I'm ultimately trying to generate my own performance metrics on validation data (before putting an endpoint into production) and so was hoping to load all or at least the validation subset from the hub. I'm expecting the `load_dataset()` function to work as shown in the documentation [here](https://huggingface.co/docs/datasets/loading#hugging-face-hub): ```python dataset = load_dataset( "lhoestq/custom_squad", revision="main" # tag name, or branch name, or commit hash ) ``` ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.8.13 - PyArrow version: 9.0.0 - Pandas version: 1.4.4
263
131
Unable to load AutoTrain-generated dataset from the hub ### Describe the bug DatasetGenerationError: An error occurred while generating the dataset -> ValueError: Couldn't cast ... because column names don't match ``` ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match ``` ### Steps to reproduce the bug Steps to reproduce: 1. `pip install datasets==2.10.1` 2. Attempt to load (private dataset). Note that I'm authenticated via ` huggingface-cli login` ``` from datasets import load_dataset # load dataset dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" dataset = load_dataset(dataset) ``` Here's the full traceback: ```Downloading and preparing dataset json/ijmiller2--autotrain-data-betterbin-vision-10000 to /Users/ian/.cache/huggingface/datasets/ijmiller2___json/ijmiller2--autotrain-data-betterbin-vision-10000-2eae034a9ff8a1a9/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|███████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2383.80it/s] Extracting data files: 100%|█████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 505.95it/s] --------------------------------------------------------------------------- ValueError Traceback (most recent call last) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1874, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1868 writer = writer_class( 1869 features=writer._features, 1870 path=fpath.replace("SSSSS", f"{shard_id:05d}").replace("JJJJJ", f"{job_id:05d}"), 1871 storage_options=self._fs.storage_options, 1872 embed_local_files=embed_local_files, 1873 ) -> 1874 writer.write_table(table) 1875 num_examples_progress_update += len(table) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/arrow_writer.py:568, in ArrowWriter.write_table(self, pa_table, writer_batch_size) 567 pa_table = pa_table.combine_chunks() --> 568 pa_table = table_cast(pa_table, self._schema) 569 if self.embed_local_files: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2312, in table_cast(table, schema) 2311 if table.schema != schema: -> 2312 return cast_table_to_schema(table, schema) 2313 elif table.schema.metadata != schema.metadata: File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/table.py:2270, in cast_table_to_schema(table, schema) 2269 if sorted(table.column_names) != sorted(features): -> 2270 raise ValueError(f"Couldn't cast\n{table.schema}\nto\n{features}\nbecause column names don't match") 2271 arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] ValueError: Couldn't cast _data_files: list<item: struct<filename: string>> child 0, item: struct<filename: string> child 0, filename: string _fingerprint: string _format_columns: list<item: string> child 0, item: string _format_kwargs: struct<> _format_type: null _indexes: struct<> _output_all_columns: bool _split: null to {'citation': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'features': {'image': {'_type': Value(dtype='string', id=None)}, 'target': {'names': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), '_type': Value(dtype='string', id=None)}}, 'homepage': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'splits': {'train': {'name': Value(dtype='string', id=None), 'num_bytes': Value(dtype='int64', id=None), 'num_examples': Value(dtype='int64', id=None), 'dataset_name': Value(dtype='null', id=None)}}} because column names don't match The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) Input In [8], in <cell line: 6>() 4 # load dataset 5 dataset = "ijmiller2/autotrain-data-betterbin-vision-10000" ----> 6 dataset = load_dataset(dataset) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/load.py:1782, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs) 1779 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES 1781 # Download and prepare data -> 1782 builder_instance.download_and_prepare( 1783 download_config=download_config, 1784 download_mode=download_mode, 1785 verification_mode=verification_mode, 1786 try_from_hf_gcs=try_from_hf_gcs, 1787 num_proc=num_proc, 1788 ) 1790 # Build dataset for splits 1791 keep_in_memory = ( 1792 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size) 1793 ) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:872, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 870 if num_proc is not None: 871 prepare_split_kwargs["num_proc"] = num_proc --> 872 self._download_and_prepare( 873 dl_manager=dl_manager, 874 verification_mode=verification_mode, 875 **prepare_split_kwargs, 876 **download_and_prepare_kwargs, 877 ) 878 # Sync info 879 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values()) File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:967, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs) 963 split_dict.add(split_generator.split_info) 965 try: 966 # Prepare split will record examples associated to the split --> 967 self._prepare_split(split_generator, **prepare_split_kwargs) 968 except OSError as e: 969 raise OSError( 970 "Cannot find data file. " 971 + (self.manual_download_instructions or "") 972 + "\nOriginal error:\n" 973 + str(e) 974 ) from None File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1749, in ArrowBasedBuilder._prepare_split(self, split_generator, file_format, num_proc, max_shard_size) 1747 job_id = 0 1748 with pbar: -> 1749 for job_id, done, content in self._prepare_split_single( 1750 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args 1751 ): 1752 if done: 1753 result = content File ~/anaconda3/envs/betterbin/lib/python3.8/site-packages/datasets/builder.py:1892, in ArrowBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1890 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1891 e = e.__context__ -> 1892 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1894 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset ``` ### Expected behavior I'm ultimately trying to generate my own performance metrics on validation data (before putting an endpoint into production) and so was hoping to load all or at least the validation subset from the hub. I'm expecting the `load_dataset()` function to work as shown in the documentation [here](https://huggingface.co/docs/datasets/loading#hugging-face-hub): ```python dataset = load_dataset( "lhoestq/custom_squad", revision="main" # tag name, or branch name, or commit hash ) ``` ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.8.13 - PyArrow version: 9.0.0 - Pandas version: 1.4.4 Okay, good to know. Thanks for the reply. For now I will just have to manage the split manually before training, because I can’t find any way of pulling out file indices or file names from the autogenerated split. The file names field of the image dataset (loaded directly from arrow file) is missing, just fyi (for anyone else this might be relevant too). On Fri, Mar 10, 2023 at 7:02 PM Quentin Lhoest ***@***.***> wrote: > The AutoTrain format is not supported right now. I think it would require > a dedicated dataset builder > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/5627#issuecomment-1464734308>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACBJ4F5A353MCZ76OGRJ6CTW3PFI7ANCNFSM6AAAAAAVWXNUTE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
[ -1.2668479681015015, -1.1041215658187866, -0.7530314922332764, 1.728272795677185, -0.28150415420532227, -0.9776759147644043, 0.0697939470410347, -0.991932213306427, 1.5877076387405396, -0.5884959697723389, 0.22780397534370422, -1.5597028732299805, -0.036122385412454605, -0.7347760200500488, -0.6915895938873291, -0.8035113215446472, -0.32320436835289, -0.771528422832489, 1.2070733308792114, 2.4118239879608154, 1.200285792350769, -1.5453917980194092, 2.7016305923461914, 0.8816941380500793, -0.12610267102718353, -1.1133153438568115, 0.5421517491340637, -0.0640779510140419, -1.1574115753173828, -0.5066576600074768, -0.8649032115936279, -0.0896325558423996, -0.6167130470275879, -0.3605197072029114, -0.07864593714475632, 0.5280413031578064, -0.27107518911361694, -0.4718596935272217, -0.5487840175628662, -0.7785322666168213, 0.49171963334083557, -0.4384336769580841, 0.7514248490333557, -0.24614571034908295, 1.71208918094635, -0.39002642035484314, 0.2845098674297333, 0.6851634383201599, 1.292158842086792, 0.14130938053131104, 0.02753600850701332, 0.4569132626056671, 0.41540783643722534, -0.07058685272932053, 0.5432404279708862, 1.0555710792541504, 0.7123696208000183, 0.33477458357810974, 0.8422979712486267, -2.408203601837158, 1.1302738189697266, -1.1043037176132202, 0.4089505672454834, 1.3673304319381714, -0.8833780884742737, 0.5218858122825623, -1.7682785987854004, 0.06957574188709259, 0.7351123690605164, -2.053126811981201, 0.4930669367313385, -1.1906214952468872, -0.39516428112983704, 0.9617709517478943, 0.4212599992752075, -1.2411950826644897, 0.09042736887931824, -0.3578740656375885, 1.0576786994934082, 0.32524263858795166, 0.9752327799797058, -1.7586380243301392, 0.10387493669986725, -0.2712053954601288, 0.10783598572015762, -1.2694193124771118, -1.5003095865249634, 0.4346408545970917, 0.4964570701122284, 0.7000347971916199, -0.16723790764808655, 1.0925828218460083, -1.1226266622543335, 0.6318255662918091, -1.1204956769943237, -1.7015502452850342, -1.4005239009857178, -2.4142181873321533, -2.183048725128174, 0.6107887625694275, -0.4129815697669983, -0.4752710461616516, 2.0762760639190674, -0.87148517370224, -1.769208550453186, 1.305567741394043, 0.4397881329059601, 0.06256155669689178, 2.397179365158081, 0.19471128284931183, -0.7476795315742493, 0.5176205039024353, -0.9045448303222656, 0.7031600475311279, -0.387716680765152, 1.4773300886154175, 0.43043646216392517, -0.8768291473388672, 1.6143345832824707, -0.4443293809890747, 0.5835939645767212, -0.6843193769454956, -0.425972580909729, -0.7838126420974731, 0.34839117527008057, 1.9186593294143677, -0.15932732820510864, 1.3677855730056763, -0.4550398886203766, -1.5443968772888184, -1.4892221689224243, 1.0300687551498413, 0.4367663562297821, -0.9085675477981567, 0.23573094606399536, -0.4552927017211914, 0.23377695679664612, -0.2178596705198288, 1.1508562564849854, 1.270998477935791, 0.6144272685050964, -0.3740505576133728, -0.9593902826309204, 0.10446972399950027, -0.147430419921875, -0.691725492477417, -1.828667402267456, -0.24024184048175812, 0.11856409162282944, 0.6998089551925659, -1.2863565683364868, 1.527488350868225, 0.9343627691268921, 1.9273282289505005, 1.007340431213379, -0.4869047701358795, 1.5244531631469727, 0.08776897937059402, 1.8448853492736816, -0.6499449610710144, 0.6687297224998474, -0.39816221594810486, -1.1742140054702759, 0.9296540021896362, -0.22369500994682312, -2.0405139923095703, -0.7447272539138794, -0.8057583570480347, -0.2900041937828064, -0.7878550887107849, 0.8789755702018738, -0.4218652844429016, -1.480165958404541, 0.285492867231369, -0.8941280841827393, 0.34869372844696045, -1.0726559162139893, 0.3573586046695709, 0.6992371082305908, -0.5447956919670105, 0.0873132050037384, -0.302603542804718, -1.1991357803344727, -0.5384302735328674, 0.5659259557723999, 1.805525302886963, -0.8360293507575989, 0.7451766729354858, 1.0462448596954346, -0.5773900747299194, 0.0943225845694542, 0.174861341714859, -0.23959659039974213, 0.8240803480148315, -1.0933235883712769, -0.7929631471633911, 1.2060960531234741, -0.21647131443023682, -0.6326318383216858, 1.4130241870880127, 0.8339019417762756, -1.0205957889556885, -0.30057400465011597, -0.1706647425889969, -0.7648914456367493, 0.05269445851445198, -1.6262834072113037, -0.10925256460905075, 0.5472329258918762, -1.634995698928833, -0.5019084215164185, -0.2688395380973816, 1.3790749311447144, -0.06928647309541702, 1.344970464706421, -0.39931198954582214, -0.07588114589452744, -0.20055031776428223, -0.3100266754627228, 0.2573176920413971, -0.27615344524383545, -0.5838398933410645, -0.002776605077087879, -0.8719885945320129, 0.40456297993659973, 1.4402620792388916, 0.32519781589508057, 0.06267276406288147, 0.5448765158653259, 1.1598106622695923, 0.5038600564002991, 0.20106396079063416, -0.8661119341850281, -1.4799445867538452, 1.9036747217178345, -1.6290826797485352, 2.0544228553771973, 0.635890781879425, 0.06318040937185287, -1.7201015949249268, -1.8664376735687256, 1.4092297554016113, 1.1274000406265259, 2.2305045127868652, 0.6398751735687256, 0.42176827788352966, -1.0111793279647827, -0.6780086755752563, 0.09554333239793777, -0.8764956593513489, -0.8319846391677856, 0.21791650354862213, 2.539180278778076, 1.8451179265975952, -0.41410884261131287, -0.264950692653656, -0.8855593800544739, 1.5963737964630127, -0.16363590955734253, 0.2717883288860321, 2.0822105407714844, -0.022383086383342743, -1.0367486476898193, 1.1989355087280273, -2.5806667804718018, 0.25163087248802185, 2.0260024070739746, 0.3154086768627167, 0.28995829820632935, -1.3960649967193604, -0.7826492786407471, -0.12370024621486664, -0.5389534831047058, -1.2180907726287842, 0.5186406373977661, -0.33860552310943604, -0.7159385681152344, -1.4500077962875366, 0.3014303743839264, -1.097739338874817, -1.6070892810821533, 0.14966796338558197, 1.9433966875076294, 2.167468309402466, -0.8640859723091125, 1.7386252880096436, -0.1993078589439392, 0.2524416148662567, 1.298349142074585, 1.2274982929229736, 2.878089189529419, 1.852105975151062, -1.2704265117645264, 0.46719446778297424, -0.09620312601327896, -0.48077648878097534, 1.1081721782684326, -1.2038331031799316, 1.1315133571624756, -0.1841217577457428, -1.1422086954116821, -1.1673637628555298, 0.8615504503250122, 0.584589958190918, -0.004599579609930515, -0.5145704746246338, 1.1116479635238647, -0.08939406275749207, 1.3225220441818237, 0.6961862444877625, -0.3506808578968048, 0.5513858795166016, -0.422671914100647, -0.5463706851005554, 1.5295783281326294, 0.05456935241818428, -1.401625156402588, -2.1731293201446533, -0.17565590143203735, -0.7979542016983032, -0.035258229821920395, -0.5798336863517761, -1.0118811130523682, 1.540379285812378, 0.24484074115753174, -1.194773554801941, -0.19529452919960022, -0.2780514359474182, -0.42487940192222595, 2.666095733642578, -1.324273943901062, -0.4165481626987457, -0.9456943273544312, -0.6127907037734985, 1.6620573997497559, -1.0507465600967407, -0.30912938714027405, -1.1829454898834229, -0.5832558870315552, -1.2662335634231567, -0.5055664777755737, 0.0271361842751503, -0.8144050240516663, 0.9813134074211121, 0.3639523386955261, -1.266111969947815, -0.38524216413497925, -0.9237715005874634, 0.9803213477134705, -0.11512763798236847, 0.18198829889297485, 1.8366650342941284, 0.4027935564517975, -0.32440322637557983, 0.9450808167457581, 1.1100128889083862, 0.6654080748558044, -0.605794370174408, 0.2546783685684204, -0.4510341286659241, 0.3241444528102875, -1.3772872686386108, 0.2478393316268921, -2.898327589035034, 0.6513213515281677, 0.11946596950292587, -0.03366513177752495, -0.05343107134103775, -1.3594731092453003, 1.1189287900924683, 2.4952168464660645, -1.2554265260696411, 0.6013612151145935, 0.3743593692779541, 1.2759721279144287, -1.8386430740356445, 0.20066070556640625, -0.34946051239967346, 2.1926188468933105, 0.11344058811664581, 1.3382854461669922, -0.4534248411655426, -2.5612287521362305, 0.5138241648674011, -1.378907322883606, -1.096144437789917, 0.5438309907913208, -0.9353097081184387, 0.2295178920030594, -1.6823643445968628, -0.3507068455219269, -0.9807725548744202, -1.23163902759552, 0.7478442192077637, 0.24851861596107483, 0.20326247811317444, -0.5497328042984009, 0.37707212567329407, -2.2067346572875977, -1.4128284454345703, -0.12608905136585236, -0.9020375609397888, 0.5281027555465698, -0.4444662034511566, 0.8008015155792236, -0.1477760225534439, -0.05501328781247139, 0.28496530652046204, 1.4374902248382568, 3.4014227390289307, 0.16237173974514008, 0.3758961260318756, -0.24263112246990204, -0.8985548615455627, 1.4853166341781616, 0.914016842842102, -0.20555061101913452, -0.45759278535842896, -1.1972235441207886, 1.355351448059082, 1.9516472816467285, 0.9659605026245117, -0.05546893551945686, -0.7257453203201294, -0.6084998250007629, 0.017256125807762146, 0.2678490877151489, 0.5826884508132935, 0.7850968837738037, -0.07913242280483246, -0.08739479631185532, 1.3673394918441772, 1.042707085609436, -0.383566290140152, 0.36721938848495483, -0.8188737034797668, -0.4698449671268463, 0.5504011511802673, 0.14558133482933044, -0.07815474271774292, 0.30935946106910706, -0.9870389699935913, -0.2175315022468567, -0.35862308740615845, -0.8286726474761963, -0.6315758228302002, -0.4222418963909149, -0.395269513130188, 1.4581652879714966, 0.33635982871055603, -0.5857260227203369, -0.1381477564573288, -0.6677396297454834, -0.10494890809059143, -1.1006336212158203, 0.15618422627449036, -0.21344180405139923, -0.15174774825572968, -0.30854952335357666, 1.6744167804718018, -0.8874971270561218, -2.0855424404144287, 0.08501512557268143, 0.4301665127277374, -0.1569567620754242, 0.3608926832675934, 1.761603832244873, 0.48256969451904297, 1.2962088584899902, 1.2531248331069946, 0.9628139734268188, -0.6228628754615784, -1.312849998474121, 0.6435427665710449, 1.1790704727172852, -1.3762458562850952, 0.7715480327606201, -0.035545915365219116, -0.47801923751831055, 0.6259837746620178, 1.498741865158081, 0.5328872203826904, -2.0559730529785156, 0.7916529774665833, -1.0588557720184326, 1.0539153814315796, 0.7624366283416748, 0.631879985332489, 0.24829944968223572, 0.8147405385971069, -1.2486376762390137, -1.0286734104156494, -0.783541738986969, -0.8171359300613403, 2.0325887203216553, -0.3425305485725403, 0.543720006942749, -0.12242921441793442, -1.3209023475646973, -0.002820964902639389, 0.6450803279876709, 0.27309319376945496, -0.5618501305580139, 0.8473577499389648, -0.6639176607131958, -1.2530796527862549, -1.1642979383468628, -0.4365643262863159, -0.9171666502952576, -1.0488070249557495, 1.0594820976257324, 0.8405079245567322, 0.12263863533735275, 1.807677149772644, 0.6661230325698853, 0.09680551290512085, -2.5179736614227295, 0.873526394367218, 0.26026850938796997, -0.10427428036928177, 0.7383029460906982, 0.37568268179893494, 1.1092103719711304, 0.11256609857082367, 0.603712260723114, -2.4029972553253174, 2.25303053855896, -0.14169535040855408, 0.7472838163375854, -0.1646309196949005, -0.1639726459980011, 1.0729955434799194, 0.5009540915489197, 0.49589160084724426, -0.8284602761268616, 0.5737544894218445, -0.4787689447402954, 1.2693513631820679, 0.9169272184371948, -0.846095860004425, -0.11102518439292908, 1.237303376197815, 0.33606040477752686, -0.7209679484367371, -0.9790141582489014, -0.8248558640480042, 0.9648652076721191, 1.6591660976409912, -0.07955276221036911, 0.021596267819404602, 0.7797747254371643, 0.5675472021102905, -1.2970633506774902, 0.026393026113510132, -0.6737058162689209, -0.6548845171928406, 1.7586997747421265, 2.0157549381256104, -0.36559534072875977, -0.11579208821058273, -0.706498920917511, -1.392422080039978, 0.7425097823143005, -0.16347934305667877, 0.05659865960478783, 0.5329612493515015, -0.5306766629219055, 0.917732834815979, 0.7651580572128296, 0.8978162407875061, 0.0849350169301033, 0.24111124873161316, 0.4574235677719116, -0.544844925403595, -1.120320439338684, -0.28674569725990295, -1.2700698375701904, -2.427173137664795, 0.36712080240249634, -0.053535155951976776, -1.1649643182754517, 0.0037777377292513847, -0.9532427787780762, 1.202413558959961, -0.5448103547096252, -1.1564278602600098, -1.2731035947799683, 0.14579607546329498, -0.05652177333831787, 0.8160554766654968, -1.6625938415527344, -0.005310381762683392, 1.2644027471542358, 0.8777130246162415, -0.7986063361167908, 1.0033237934112549, 0.2401246726512909, 1.2059881687164307, 0.700213611125946, -0.2797033190727234, 0.5746321678161621, -0.059658803045749664, -1.306015133857727, 0.5674008131027222, 1.1457260847091675, 0.1809573769569397, 1.5189807415008545, -0.4729924201965332, -0.19800062477588654, 0.36234021186828613, -0.6253977417945862, -0.41856861114501953, -0.3583616614341736, 0.5317158102989197, 0.11913347989320755, -0.8135496377944946, 0.043827153742313385, 0.07258502393960953, -0.28195860981941223, 0.1509467214345932, -1.5583711862564087, -0.16746968030929565, -0.43738123774528503, -0.43222376704216003, -1.2314237356185913, -0.20512434840202332, 1.2923880815505981, -0.5589585304260254, -0.3939417600631714, 0.577337920665741, 0.2589011490345001, 0.48413926362991333, 0.6844009160995483, -0.6661331653594971, -0.3683795630931854, -0.12952154874801636, -0.34981173276901245, 0.2823764383792877, 1.4309070110321045, -0.0660490095615387, -0.9736713767051697, 0.7385560870170593, -0.3514034152030945, 0.08295492827892303, 1.709301471710205, -0.05499222129583359, -0.8412119746208191, 0.2570672929286957, -0.7683187127113342, 1.9771199226379395, 1.6382570266723633, 1.3024041652679443, -0.4094626009464264, -0.8132486343383789, 0.7260692715644836, -0.5006282925605774, -0.4478164315223694, 0.7758959531784058, 0.5432184338569641, -0.24249659478664398, -1.4317456483840942, 0.8217384815216064, 1.2347825765609741, -0.8309211730957031, -0.8389790058135986, 0.28885847330093384, -0.6734582781791687, 1.1105220317840576, 0.6932225823402405, 0.43406441807746887, 0.297102153301239, 1.7145370244979858, 0.831576406955719, -0.4994727075099945, 0.6323974132537842, 0.5257280468940735, -0.26715970039367676, -2.1138217449188232, -1.252794861793518, 0.3176620602607727, -0.5137653350830078, -1.6952552795410156, 1.3159769773483276, -1.101449966430664, -0.9162051677703857, 0.6450519561767578, 0.03628940507769585, 1.2808847427368164, 0.4349811375141144, 1.411503791809082, 1.9934818744659424, 0.6940814256668091, 0.5151010751724243, 1.154569149017334, -0.1815454214811325, -0.5042612552642822, 1.8176535367965698, -0.3345796763896942, 0.532935380935669, 1.1353654861450195, -0.25566089153289795, -1.2013441324234009, -0.7644199728965759, -1.3346127271652222, -0.7110083699226379, 1.2127081155776978, 0.07262489199638367, -1.1307826042175293, 0.2965683937072754, 1.6197154521942139, -0.024373119696974754, -0.4674893319606781, 0.7696972489356995, 0.27382907271385193, -1.0030088424682617, -0.05859793350100517, -0.8630975484848022, 0.4454632103443146, -0.27057331800460815, -0.18273210525512695, 0.42780864238739014, 0.4344092309474945, 1.4027845859527588, 0.09972959011793137, 0.17073404788970947, 0.9811175465583801, -1.3107826709747314, 1.478776454925537, -0.772055983543396, 0.4201301634311676, -2.3539507389068604, 1.2731677293777466, -0.7085732221603394, 2.0847792625427246, -2.719498634338379, 0.526012659072876, -0.6789117455482483, -0.48385003209114075, 0.2819129228591919, -0.2959164083003998, 0.03798713535070419, -0.08121193945407867, -1.0807422399520874, 0.13174542784690857, -0.5597617030143738, 0.44277238845825195, 1.2955079078674316, 1.264159917831421, -1.1070516109466553, -0.1026454046368599, -1.7685422897338867, -0.29887303709983826, -0.9133437275886536, 0.3217937648296356, -2.0676887035369873, -0.2988162338733673, -1.8510645627975464, -2.1551554203033447, -1.073627233505249, -0.8519344329833984, 1.2278246879577637, 0.08484544605016708, -0.8758429884910583, 1.3742387294769287, -0.3587663769721985, -1.6812200546264648, 1.0576056241989136, -2.022516965866089 ]
https://github.com/huggingface/datasets/issues/5625
Allow "jsonl" data type signifier
You can use "json" instead. It doesn't work by extension names, but rather by dataset builder names, e.g. "text", "imagefolder", etc. I don't think the example in `transformers` is correct because of that
### Feature request `load_dataset` currently does not accept `jsonl` as type but only `json`. ### Motivation I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because ``` FileNotFoundError: Couldn't find a dataset script at jsonl\jsonl.py or any data file in the same directory. Couldn't find 'jsonl' on the Hugging Face Hub either: FileNotFoundError: Dataset 'jsonl' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`. ``` The reason is because the script has these lines to extract the data type by its extension. Therefore, the derived type is `jsonl` which is not recognized by datasets as the error above shows. https://github.com/huggingface/transformers/blob/ade26bf9912f69e2110137443e4406d7dbe253e7/examples/pytorch/translation/run_translation.py#L342-L356 I suppose you could argue that this is the script's fault (in which case I'll do a PR over at `transformers`) but it makes sense to me to add `jsonl` as an alias to `json` in `datasets`. ### Your contribution At the moment I cannot work on this. I think it can be as "easy" as having an alias for json, namely jsonl.
264
33
Allow "jsonl" data type signifier ### Feature request `load_dataset` currently does not accept `jsonl` as type but only `json`. ### Motivation I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because ``` FileNotFoundError: Couldn't find a dataset script at jsonl\jsonl.py or any data file in the same directory. Couldn't find 'jsonl' on the Hugging Face Hub either: FileNotFoundError: Dataset 'jsonl' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`. ``` The reason is because the script has these lines to extract the data type by its extension. Therefore, the derived type is `jsonl` which is not recognized by datasets as the error above shows. https://github.com/huggingface/transformers/blob/ade26bf9912f69e2110137443e4406d7dbe253e7/examples/pytorch/translation/run_translation.py#L342-L356 I suppose you could argue that this is the script's fault (in which case I'll do a PR over at `transformers`) but it makes sense to me to add `jsonl` as an alias to `json` in `datasets`. ### Your contribution At the moment I cannot work on this. I think it can be as "easy" as having an alias for json, namely jsonl. You can use "json" instead. It doesn't work by extension names, but rather by dataset builder names, e.g. "text", "imagefolder", etc. I don't think the example in `transformers` is correct because of that
[ -1.1171170473098755, -0.9781569242477417, -0.8593897819519043, 1.5335286855697632, -0.12153265625238419, -1.1575781106948853, 0.13303165137767792, -1.0777931213378906, 1.7873183488845825, -0.7732706665992737, 0.30229246616363525, -1.6623814105987549, -0.007482464425265789, -0.6368702054023743, -0.7418080568313599, -0.8222067952156067, -0.39331451058387756, -0.8230707049369812, 0.9357770681381226, 2.515242576599121, 1.1968830823898315, -1.3154412508010864, 2.671674966812134, 0.6552749276161194, -0.20729683339595795, -1.008428692817688, 0.45715323090553284, -0.052561283111572266, -1.1275179386138916, -0.5000306367874146, -0.9040855765342712, -0.061536625027656555, -0.5898241400718689, -0.6321254372596741, 0.018013345077633858, 0.43950510025024414, -0.34782007336616516, -0.47372666001319885, -0.5349600315093994, -0.7636916637420654, 0.4216591715812683, -0.376213401556015, 0.9994489550590515, -0.31742367148399353, 1.830356478691101, -0.5350696444511414, 0.38590142130851746, 0.7700548768043518, 1.319899559020996, 0.2789366841316223, -0.03747369721531868, 0.30335673689842224, 0.4451834261417389, -0.06691227108240128, 0.5259572267532349, 1.1732889413833618, 0.7011462450027466, 0.5144851803779602, 0.7332726716995239, -2.219043731689453, 1.3004047870635986, -1.0179035663604736, 0.18267641961574554, 1.3180065155029297, -0.9294221997261047, 0.4131854772567749, -1.8034982681274414, 0.039760246872901917, 0.5886609554290771, -2.271696090698242, 0.2203984409570694, -1.3499890565872192, -0.4498957693576813, 1.0825896263122559, 0.28266972303390503, -1.3120566606521606, 0.10837612301111221, -0.31164202094078064, 0.9824902415275574, 0.4659852981567383, 1.188428282737732, -1.7695916891098022, -0.07832852005958557, -0.29152095317840576, 0.1653566211462021, -1.259325623512268, -1.5398564338684082, 0.4766855537891388, 0.5744943618774414, 0.6480063199996948, -0.09827426820993423, 1.0033230781555176, -1.0758030414581299, 0.7304869890213013, -0.9897878170013428, -1.7463734149932861, -1.377031683921814, -2.1674649715423584, -2.344344139099121, 0.7815675735473633, -0.49827441573143005, -0.528617262840271, 2.098200798034668, -0.9571114182472229, -1.8061269521713257, 1.1698238849639893, 0.25805917382240295, 0.04166771471500397, 2.409841775894165, 0.26197996735572815, -0.7451062798500061, 0.41287609934806824, -0.6120461225509644, 0.7774038910865784, -0.32760781049728394, 1.3470184803009033, 0.44195613265037537, -1.0091482400894165, 1.6176210641860962, -0.4134925305843353, 0.6813613176345825, -0.6815902590751648, -0.49947136640548706, -0.724801778793335, 0.36766597628593445, 1.91665518283844, -0.32315003871917725, 1.501466989517212, -0.42351582646369934, -1.6074186563491821, -1.6583137512207031, 0.9116490483283997, 0.46370381116867065, -0.783585786819458, 0.12858028709888458, -0.36274975538253784, 0.10071767866611481, -0.1178005039691925, 1.1664936542510986, 1.2836735248565674, 0.728707492351532, -0.3293282985687256, -0.8203534483909607, 0.2204294353723526, -0.023046396672725677, -0.7315789461135864, -1.756730079650879, -0.3072052597999573, 0.18105047941207886, 0.6377759575843811, -1.2184114456176758, 1.6480993032455444, 0.8548426628112793, 1.9238935708999634, 0.9974464774131775, -0.3117508590221405, 1.4540480375289917, 0.013554984703660011, 1.859701156616211, -0.495641827583313, 0.6225882172584534, -0.344335675239563, -1.1718586683273315, 0.8063640594482422, -0.3059186637401581, -2.009655475616455, -0.810038149356842, -0.8170129060745239, -0.183664932847023, -0.731540322303772, 0.8665083050727844, -0.27696749567985535, -1.3961018323898315, 0.23050498962402344, -0.7101434469223022, 0.10579333454370499, -1.2939770221710205, 0.34004366397857666, 0.6757301092147827, -0.7405316233634949, 0.18849746882915497, -0.2963733673095703, -1.279485821723938, -0.48826587200164795, 0.3142606317996979, 1.936890721321106, -0.8049017190933228, 0.8897445797920227, 1.0020465850830078, -0.7845600247383118, 0.036618709564208984, 0.382249653339386, -0.26636573672294617, 0.8089560866355896, -1.097618818283081, -0.3853108286857605, 1.184761881828308, -0.19815091788768768, -0.6150428056716919, 1.4228103160858154, 0.7082074284553528, -1.0494627952575684, -0.21667462587356567, -0.1965690553188324, -0.8348402976989746, 0.037470415234565735, -1.5926480293273926, -0.1639423668384552, 0.3381858170032501, -1.5587267875671387, -0.5011373162269592, -0.31083303689956665, 1.341447114944458, -0.17021502554416656, 1.3902974128723145, -0.36986464262008667, -0.20454922318458557, -0.2639067769050598, -0.4084663391113281, 0.13452614843845367, -0.209066241979599, -0.5901588797569275, 0.22611384093761444, -0.7431574463844299, 0.3522695302963257, 1.358208179473877, 0.37859103083610535, -0.04238279163837433, 0.45619985461235046, 1.1648496389389038, 0.4535056948661804, 0.020118067041039467, -0.9699755907058716, -1.4577183723449707, 1.969441294670105, -1.4946759939193726, 1.9736684560775757, 0.7799174189567566, -0.017754096537828445, -1.7159292697906494, -1.934560775756836, 1.4289273023605347, 1.15113365650177, 2.3589937686920166, 0.6220794320106506, 0.3646303117275238, -0.8410656452178955, -0.6214571595191956, 0.34351277351379395, -1.064906358718872, -0.8110913038253784, 0.14978757500648499, 2.3773036003112793, 1.732020616531372, -0.4755095839500427, -0.23716606199741364, -0.989751398563385, 1.2950502634048462, -0.20356108248233795, 0.20600582659244537, 2.1016829013824463, -0.28593289852142334, -1.0539888143539429, 1.2756423950195312, -2.331315517425537, 0.16066929697990417, 2.009117603302002, 0.20240388810634613, 0.14202116429805756, -1.4811427593231201, -0.6622048616409302, -0.14603015780448914, -0.3721939027309418, -1.262856364250183, 0.5669254064559937, -0.25471270084381104, -0.7659050822257996, -1.5512888431549072, 0.23907223343849182, -1.0482699871063232, -1.63886559009552, 0.2328130304813385, 1.97506844997406, 1.975020170211792, -0.8363193273544312, 1.6362935304641724, -0.2393917739391327, 0.134601891040802, 1.3035972118377686, 1.1437627077102661, 3.1150619983673096, 1.8764848709106445, -1.2630518674850464, 0.5882560014724731, -0.15065313875675201, -0.4894843101501465, 1.1714074611663818, -1.158786416053772, 1.1868798732757568, -0.24127671122550964, -1.1064149141311646, -1.2601044178009033, 0.8811485171318054, 0.4623791575431824, 0.02102038264274597, -0.48928311467170715, 1.22162663936615, 0.10352851450443268, 1.3044840097427368, 0.5424860715866089, -0.42657044529914856, 0.7537135481834412, -0.3834691345691681, -0.4311935007572174, 1.5510510206222534, 0.24340133368968964, -1.3582288026809692, -2.2665536403656006, -0.22332441806793213, -0.8343302607536316, 0.05661873519420624, -0.5114028453826904, -0.9684001803398132, 1.6867468357086182, 0.38732099533081055, -1.2361506223678589, -0.3143138289451599, -0.3169110417366028, -0.58834308385849, 2.662306547164917, -1.4347208738327026, -0.243009552359581, -0.9851865768432617, -0.6258550882339478, 1.6721017360687256, -1.109514832496643, -0.2060644030570984, -1.0709563493728638, -0.5702556371688843, -1.3988080024719238, -0.5836438536643982, 0.026968760415911674, -0.8869631886482239, 0.9383374452590942, 0.2506760358810425, -1.2117440700531006, -0.25883644819259644, -0.8917191028594971, 0.8256210684776306, -0.14678457379341125, 0.31497424840927124, 1.9724080562591553, 0.40984514355659485, -0.39694908261299133, 0.7589516043663025, 1.0843862295150757, 0.5656531453132629, -0.6113474369049072, 0.29039204120635986, -0.670653223991394, 0.29746800661087036, -1.315168023109436, 0.3013778328895569, -2.7900521755218506, 0.6263484358787537, -0.10192454606294632, -0.05313844233751297, -0.049973927438259125, -1.3197534084320068, 1.108302116394043, 2.627753973007202, -1.1407355070114136, 0.45107048749923706, 0.3157994747161865, 1.3333758115768433, -1.6462992429733276, 0.3039439022541046, -0.4149501919746399, 2.1437771320343018, 0.20438678562641144, 1.2467097043991089, -0.4096662104129791, -2.3081934452056885, 0.6146825551986694, -1.262088656425476, -1.230759620666504, 0.8328819274902344, -0.8209151029586792, -0.04637124389410019, -1.4261795282363892, -0.20758652687072754, -0.8360402584075928, -1.2365410327911377, 0.7996701598167419, 0.13914139568805695, 0.4305955171585083, -0.7024973630905151, 0.39572006464004517, -2.0888941287994385, -1.3982257843017578, -0.3173861801624298, -0.9503635168075562, 0.35837557911872864, -0.3185977339744568, 0.6831650137901306, -0.27772659063339233, 0.022856270894408226, 0.3596177101135254, 1.3989118337631226, 3.376363515853882, 0.23230797052383423, 0.3720703125, -0.18640576303005219, -0.9647717475891113, 1.4517797231674194, 0.9244388341903687, -0.13060824573040009, -0.5077195167541504, -1.128186583518982, 1.1398751735687256, 2.025402784347534, 1.001059889793396, 0.03543426841497421, -0.7873018383979797, -0.7203980088233948, -0.06277813017368317, 0.17299002408981323, 0.4911159574985504, 0.8456803560256958, 0.10967501252889633, 0.06964265555143356, 1.3725593090057373, 1.1601324081420898, -0.39617666602134705, 0.4160906970500946, -0.7670629024505615, -0.4692445695400238, 0.4485883414745331, 0.27709686756134033, 0.007787667214870453, 0.2193804681301117, -1.0038167238235474, -0.2901040017604828, -0.4425571858882904, -0.9694951176643372, -0.7469642162322998, -0.4025101363658905, -0.2576100528240204, 1.6732245683670044, 0.10828672349452972, -0.5159227848052979, -0.07943369448184967, -0.7543725967407227, -0.07095398008823395, -0.9855574369430542, 0.27267181873321533, -0.22582389414310455, -0.22534498572349548, -0.029722804203629494, 1.7435986995697021, -1.0140122175216675, -2.0038206577301025, 0.3007488250732422, 0.2808971405029297, -0.3101350963115692, 0.25724494457244873, 1.5684878826141357, 0.5636003613471985, 1.514504075050354, 1.392356276512146, 0.9791203141212463, -0.7038220167160034, -1.2710992097854614, 0.6081010699272156, 0.9577198624610901, -1.4662548303604126, 0.7286925911903381, 0.018943533301353455, -0.45786768198013306, 0.5505408644676208, 1.3366435766220093, 0.4063762128353119, -1.9284824132919312, 0.7726180553436279, -0.8898969292640686, 0.6395553946495056, 0.704272449016571, 0.7018314003944397, 0.17288781702518463, 0.7355901002883911, -1.0780622959136963, -1.2249503135681152, -0.7185594439506531, -0.6160118579864502, 1.9472851753234863, -0.24702148139476776, 0.5657207369804382, -0.03670100122690201, -1.3548228740692139, -0.08741194754838943, 0.6875045299530029, 0.41829898953437805, -0.5048484206199646, 0.766624391078949, -0.6009476184844971, -1.0434882640838623, -1.4354546070098877, -0.4528360664844513, -1.0084774494171143, -0.9945983290672302, 0.9328307509422302, 0.8441080451011658, 0.2041015625, 1.859459638595581, 0.6755490303039551, 0.3315999507904053, -2.5928449630737305, 0.965181827545166, 0.4015992283821106, -0.16401177644729614, 0.9736726880073547, 0.3608081340789795, 0.9805852174758911, -0.01052531786262989, 0.5861691236495972, -2.3741862773895264, 2.3856797218322754, -0.1764477640390396, 0.6879228949546814, 0.043374598026275635, -0.32909199595451355, 1.1132041215896606, 0.47461262345314026, 0.558522641658783, -1.0664509534835815, 0.7123277187347412, -0.6250729560852051, 1.2582876682281494, 0.9270220994949341, -0.828069806098938, -0.013108964078128338, 1.3173203468322754, 0.47358107566833496, -0.5436164140701294, -0.8775206208229065, -1.0504854917526245, 0.8916555643081665, 1.762994408607483, -0.08842562139034271, 0.001102968119084835, 0.8800323009490967, 0.6015707850456238, -1.2388097047805786, 0.11910031735897064, -0.7815294861793518, -0.833259105682373, 1.621466875076294, 2.0674540996551514, -0.11216972023248672, -0.27015024423599243, -0.8505990505218506, -1.2167657613754272, 0.7732076644897461, 0.11199500411748886, 0.10252922028303146, 0.7365252375602722, -0.6977692246437073, 1.21373450756073, 0.9060760736465454, 0.9445765018463135, 0.14719454944133759, 0.3728521764278412, 0.41225630044937134, -0.39398786425590515, -1.0560134649276733, -0.14095911383628845, -1.1037415266036987, -2.4471001625061035, 0.46466928720474243, -0.197146937251091, -1.3370834589004517, -0.006546894088387489, -0.9821712374687195, 0.9345545768737793, -0.5553598403930664, -1.1471197605133057, -1.5640841722488403, 0.222962886095047, -0.12214665859937668, 0.9078640937805176, -1.5289859771728516, -0.12143761664628983, 1.275428056716919, 0.9659405946731567, -0.7549856305122375, 0.8814572691917419, 0.19246451556682587, 1.046228289604187, 0.8520722389221191, -0.31740322709083557, 0.5010729432106018, -0.03538765758275986, -1.3112410306930542, 0.4782583713531494, 1.1410125494003296, 0.20530080795288086, 1.5760248899459839, -0.5508557558059692, -0.057172976434230804, 0.36467787623405457, -0.5243699550628662, -0.45985928177833557, -0.5058407187461853, 0.7700198888778687, 0.055833637714385986, -0.880381166934967, 0.13252538442611694, -0.048386283218860626, -0.037937283515930176, 0.1780494749546051, -1.5543242692947388, -0.1576482355594635, -0.36654138565063477, -0.6192430853843689, -1.1196517944335938, -0.04362668842077255, 1.275970458984375, -0.7321538329124451, -0.32707923650741577, 0.5101818442344666, 0.349725604057312, 0.3953416645526886, 0.558064341545105, -0.7118913531303406, -0.4426361620426178, -0.2657332420349121, -0.4161932170391083, 0.3690768778324127, 1.3661893606185913, -0.06178382784128189, -1.0101536512374878, 0.6961662769317627, -0.4214113652706146, -0.04039125144481659, 1.83698308467865, 0.023606618866324425, -0.8584409356117249, 0.29096874594688416, -0.652772843837738, 1.9566311836242676, 1.7440921068191528, 1.3297922611236572, -0.10809788107872009, -1.0067459344863892, 0.6714476346969604, -0.40479886531829834, -0.39896389842033386, 0.9565860629081726, 0.3824712038040161, -0.19333289563655853, -1.4141544103622437, 0.6862510442733765, 1.2772102355957031, -0.9275670647621155, -0.8366876244544983, 0.09665939211845398, -0.7719701528549194, 0.9798396229743958, 0.7080610394477844, 0.4195829927921295, 0.16174809634685516, 1.6083425283432007, 0.7780718207359314, -0.3772374093532562, 0.5098931193351746, 0.4442023038864136, -0.16387121379375458, -2.0754599571228027, -1.1800696849822998, 0.34344202280044556, -0.4890499413013458, -1.5441328287124634, 1.4497817754745483, -1.1892361640930176, -0.9073541760444641, 0.5032426118850708, 0.09252504259347916, 1.452605128288269, 0.3466859459877014, 1.606316089630127, 2.1264522075653076, 0.8860207200050354, 0.36287686228752136, 1.2640434503555298, -0.1845168024301529, -0.5536405444145203, 1.7849479913711548, -0.46695536375045776, 0.43296268582344055, 1.0944117307662964, -0.3199883997440338, -1.0020414590835571, -0.8129966855049133, -1.2624469995498657, -0.6726104617118835, 1.107201337814331, 0.07082529366016388, -1.1319856643676758, 0.31041276454925537, 1.5804060697555542, 0.152800053358078, -0.37244170904159546, 0.6419122219085693, 0.48720911145210266, -0.8248977065086365, -0.032070375978946686, -0.8226994276046753, 0.5437770485877991, -0.22323232889175415, -0.33789077401161194, 0.3733036518096924, 0.35890763998031616, 1.415556788444519, -0.04787830263376236, 0.12097418308258057, 1.150206208229065, -1.3579342365264893, 1.5529389381408691, -0.6855820417404175, 0.25637781620025635, -2.4476518630981445, 1.3656401634216309, -0.7631036639213562, 1.9209728240966797, -2.6246325969696045, 0.4518425166606903, -0.5592384934425354, -0.3617766201496124, 0.25445106625556946, -0.33830374479293823, 0.1719386875629425, -0.14369754493236542, -1.178831696510315, -0.15658700466156006, -0.7635072469711304, 0.6212435364723206, 1.090593695640564, 1.3829175233840942, -1.0743918418884277, -0.2936745584011078, -1.810309648513794, -0.1675594449043274, -0.6761526465415955, 0.34889885783195496, -1.9443638324737549, -0.21442106366157532, -1.9302308559417725, -2.3844847679138184, -1.2890433073043823, -0.7966224551200867, 1.0369484424591064, 0.09270258992910385, -0.8874256610870361, 1.2205978631973267, -0.300275981426239, -1.8647716045379639, 1.115006446838379, -2.093066930770874 ]
https://github.com/huggingface/datasets/issues/5625
Allow "jsonl" data type signifier
Yes, I understand the reasoning but this issue is to propose that the example in transformers (while incorrect) "makes sense" in terms of user expectation. So the question is whether it would be possible to add "aliases" for common types (like "json" and "text") based on common extensions (like jsonl and txt)?
### Feature request `load_dataset` currently does not accept `jsonl` as type but only `json`. ### Motivation I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because ``` FileNotFoundError: Couldn't find a dataset script at jsonl\jsonl.py or any data file in the same directory. Couldn't find 'jsonl' on the Hugging Face Hub either: FileNotFoundError: Dataset 'jsonl' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`. ``` The reason is because the script has these lines to extract the data type by its extension. Therefore, the derived type is `jsonl` which is not recognized by datasets as the error above shows. https://github.com/huggingface/transformers/blob/ade26bf9912f69e2110137443e4406d7dbe253e7/examples/pytorch/translation/run_translation.py#L342-L356 I suppose you could argue that this is the script's fault (in which case I'll do a PR over at `transformers`) but it makes sense to me to add `jsonl` as an alias to `json` in `datasets`. ### Your contribution At the moment I cannot work on this. I think it can be as "easy" as having an alias for json, namely jsonl.
264
52
Allow "jsonl" data type signifier ### Feature request `load_dataset` currently does not accept `jsonl` as type but only `json`. ### Motivation I was working with one of the `run_translation` scripts and used my own datasets (`.jsonl`) as train_dataset. But the default code did not work because ``` FileNotFoundError: Couldn't find a dataset script at jsonl\jsonl.py or any data file in the same directory. Couldn't find 'jsonl' on the Hugging Face Hub either: FileNotFoundError: Dataset 'jsonl' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`. ``` The reason is because the script has these lines to extract the data type by its extension. Therefore, the derived type is `jsonl` which is not recognized by datasets as the error above shows. https://github.com/huggingface/transformers/blob/ade26bf9912f69e2110137443e4406d7dbe253e7/examples/pytorch/translation/run_translation.py#L342-L356 I suppose you could argue that this is the script's fault (in which case I'll do a PR over at `transformers`) but it makes sense to me to add `jsonl` as an alias to `json` in `datasets`. ### Your contribution At the moment I cannot work on this. I think it can be as "easy" as having an alias for json, namely jsonl. Yes, I understand the reasoning but this issue is to propose that the example in transformers (while incorrect) "makes sense" in terms of user expectation. So the question is whether it would be possible to add "aliases" for common types (like "json" and "text") based on common extensions (like jsonl and txt)?
[ -1.1289620399475098, -0.965147078037262, -0.8540281653404236, 1.5681935548782349, -0.11368619650602341, -1.1700540781021118, 0.13679121434688568, -1.0804232358932495, 1.777850866317749, -0.7727180123329163, 0.3149605393409729, -1.648427963256836, -0.0031464705243706703, -0.6520736217498779, -0.7420141100883484, -0.8144683837890625, -0.4295506775379181, -0.8139145970344543, 0.9085771441459656, 2.506011486053467, 1.2258648872375488, -1.3245960474014282, 2.699444532394409, 0.667137861251831, -0.2224784791469574, -0.9835965633392334, 0.4409087896347046, -0.05743752419948578, -1.1331058740615845, -0.4999266564846039, -0.8882388472557068, -0.07049079239368439, -0.5625273585319519, -0.6399759650230408, 0.015264664776623249, 0.44393715262413025, -0.34712573885917664, -0.4767248332500458, -0.5482721328735352, -0.7784468531608582, 0.4592477083206177, -0.37731531262397766, 1.0046956539154053, -0.3312043249607086, 1.8425747156143188, -0.5507818460464478, 0.37521839141845703, 0.7736386060714722, 1.341378927230835, 0.27407631278038025, -0.04268835484981537, 0.3181079626083374, 0.4393793046474457, -0.07398150861263275, 0.55606609582901, 1.2069694995880127, 0.7214120030403137, 0.5415841937065125, 0.7656623125076294, -2.182387590408325, 1.3087873458862305, -1.0231298208236694, 0.20036107301712036, 1.291072130203247, -0.9451135396957397, 0.41476744413375854, -1.792258620262146, 0.013655018992722034, 0.5775315165519714, -2.265866756439209, 0.21813516318798065, -1.3140809535980225, -0.46003830432891846, 1.0733851194381714, 0.2726452350616455, -1.2957305908203125, 0.11382738500833511, -0.3539727032184601, 0.9758531451225281, 0.42669036984443665, 1.1941733360290527, -1.7657427787780762, -0.08877017349004745, -0.30680739879608154, 0.13680444657802582, -1.263905644416809, -1.5561519861221313, 0.4797190725803375, 0.5699502229690552, 0.6376495361328125, -0.09340747445821762, 0.9823532700538635, -1.0650629997253418, 0.7408791780471802, -0.9691257476806641, -1.7070741653442383, -1.3901203870773315, -2.155353546142578, -2.301666021347046, 0.7608940601348877, -0.5016877055168152, -0.5689521431922913, 2.1029036045074463, -0.9679072499275208, -1.8152399063110352, 1.185546636581421, 0.24278220534324646, 0.03952973708510399, 2.403094530105591, 0.25920507311820984, -0.7314222455024719, 0.4197160005569458, -0.5739092230796814, 0.7988491654396057, -0.36112073063850403, 1.3033725023269653, 0.43771421909332275, -1.0293991565704346, 1.6011875867843628, -0.4111604392528534, 0.6809222102165222, -0.6724570393562317, -0.5093358159065247, -0.7675532102584839, 0.37607744336128235, 1.8940929174423218, -0.32314184308052063, 1.501274824142456, -0.3981465995311737, -1.6176508665084839, -1.670757532119751, 0.9089502692222595, 0.46144500374794006, -0.7654658555984497, 0.13145169615745544, -0.3742651045322418, 0.09706635028123856, -0.11159571260213852, 1.1738879680633545, 1.2843732833862305, 0.7219597697257996, -0.31155213713645935, -0.8223379850387573, 0.21924591064453125, 0.013656928203999996, -0.7346672415733337, -1.733995795249939, -0.3130742013454437, 0.2045355886220932, 0.6106372475624084, -1.2149906158447266, 1.6350936889648438, 0.8702817559242249, 1.8878718614578247, 1.026961088180542, -0.28344473242759705, 1.4604861736297607, 0.027375157922506332, 1.8517094850540161, -0.521381676197052, 0.6057249307632446, -0.3233247995376587, -1.1677840948104858, 0.7818246483802795, -0.3343549072742462, -2.0629184246063232, -0.8122169375419617, -0.7657284736633301, -0.16786131262779236, -0.7315114736557007, 0.8953773379325867, -0.30462536215782166, -1.3695969581604004, 0.24211642146110535, -0.7204965949058533, 0.12318197637796402, -1.2734360694885254, 0.3412705063819885, 0.6724254488945007, -0.7468821406364441, 0.17556065320968628, -0.24498797953128815, -1.2640516757965088, -0.4614366590976715, 0.2936720550060272, 1.952696442604065, -0.8131356239318848, 0.8862583637237549, 0.9940915107727051, -0.8005238771438599, 0.02202644571661949, 0.3933686912059784, -0.2720702886581421, 0.8573873043060303, -1.0968681573867798, -0.38776132464408875, 1.1764001846313477, -0.17593643069267273, -0.6107776761054993, 1.4177970886230469, 0.7257370352745056, -1.0221987962722778, -0.22675110399723053, -0.18073245882987976, -0.8786327242851257, 0.04619603604078293, -1.5628761053085327, -0.17422446608543396, 0.32997748255729675, -1.5445691347122192, -0.5057021379470825, -0.3268751800060272, 1.3203330039978027, -0.1735757738351822, 1.3768501281738281, -0.3895152807235718, -0.19928230345249176, -0.24900473654270172, -0.4265470802783966, 0.12438120692968369, -0.2026185542345047, -0.607566237449646, 0.22265130281448364, -0.7320924401283264, 0.34323275089263916, 1.3755947351455688, 0.39204514026641846, -0.022554464638233185, 0.47810277342796326, 1.1536078453063965, 0.4485989511013031, -0.0047902632504701614, -0.9528835415840149, -1.4703152179718018, 1.9824496507644653, -1.4969546794891357, 1.982145071029663, 0.7941138744354248, -0.008289928548038006, -1.7058887481689453, -1.968487024307251, 1.410627841949463, 1.159567952156067, 2.3778483867645264, 0.5985404253005981, 0.35921746492385864, -0.8477033376693726, -0.659752368927002, 0.33190301060676575, -1.09627103805542, -0.8010851144790649, 0.12655270099639893, 2.3723642826080322, 1.7530336380004883, -0.45902207493782043, -0.24700842797756195, -0.9915526509284973, 1.2960410118103027, -0.18189643323421478, 0.159836083650589, 2.0959675312042236, -0.24557240307331085, -1.0798784494400024, 1.289968490600586, -2.3144443035125732, 0.14016158878803253, 1.9916836023330688, 0.2030038684606552, 0.09960150718688965, -1.480588674545288, -0.6536750793457031, -0.1435699462890625, -0.3551439642906189, -1.2663824558258057, 0.5593734383583069, -0.26649409532546997, -0.7582871913909912, -1.5338040590286255, 0.21200662851333618, -1.0626094341278076, -1.6009589433670044, 0.24744448065757751, 1.9574739933013916, 1.995855450630188, -0.8450344800949097, 1.6598401069641113, -0.2354983687400818, 0.12889577448368073, 1.285964846611023, 1.1660678386688232, 3.141024112701416, 1.8747419118881226, -1.2760716676712036, 0.5729502439498901, -0.17420443892478943, -0.4843985438346863, 1.1582263708114624, -1.183781385421753, 1.2105565071105957, -0.2222910076379776, -1.1181341409683228, -1.2343614101409912, 0.8911423087120056, 0.474089115858078, 0.019406285136938095, -0.4950561225414276, 1.19044828414917, 0.07845651358366013, 1.3007229566574097, 0.5381651520729065, -0.3938010334968567, 0.7313216924667358, -0.39284461736679077, -0.43001696467399597, 1.5497519969940186, 0.23506653308868408, -1.347533106803894, -2.2769651412963867, -0.20341810584068298, -0.8216305375099182, 0.08802460134029388, -0.5262925028800964, -0.9498828053474426, 1.7182714939117432, 0.3671766519546509, -1.2807565927505493, -0.32242393493652344, -0.313385546207428, -0.5754410028457642, 2.6483259201049805, -1.4535489082336426, -0.23492778837680817, -1.0138410329818726, -0.6134504079818726, 1.6774052381515503, -1.1178538799285889, -0.22756850719451904, -1.033728003501892, -0.5789295434951782, -1.382859706878662, -0.614139199256897, 0.021088603883981705, -0.8716334700584412, 0.9275951981544495, 0.25366127490997314, -1.1819173097610474, -0.2637413740158081, -0.8913624882698059, 0.8186801671981812, -0.14374667406082153, 0.3306104838848114, 1.9614841938018799, 0.4122251868247986, -0.38316741585731506, 0.7500931024551392, 1.093883752822876, 0.5778282880783081, -0.6143247485160828, 0.26434001326560974, -0.6762866377830505, 0.2719608545303345, -1.331095576286316, 0.3178711533546448, -2.7944157123565674, 0.6318061947822571, -0.11814884096384048, -0.0650131106376648, -0.027180198580026627, -1.3083268404006958, 1.0932012796401978, 2.6324846744537354, -1.1052470207214355, 0.41923585534095764, 0.2980196475982666, 1.320326566696167, -1.6707857847213745, 0.2874440550804138, -0.42082515358924866, 2.1470823287963867, 0.19882291555404663, 1.2400647401809692, -0.4119032025337219, -2.286853790283203, 0.6037330031394958, -1.2707140445709229, -1.2362676858901978, 0.832084596157074, -0.7958509922027588, -0.05806221812963486, -1.428288221359253, -0.2195432484149933, -0.8299272060394287, -1.231188178062439, 0.7967989444732666, 0.15272951126098633, 0.4196133613586426, -0.6825167536735535, 0.368191123008728, -2.0849268436431885, -1.3970954418182373, -0.3225640654563904, -0.945464015007019, 0.38541334867477417, -0.3393109142780304, 0.6831358671188354, -0.2872067391872406, -0.00034121330827474594, 0.34596410393714905, 1.3870552778244019, 3.355100393295288, 0.24468770623207092, 0.36550241708755493, -0.20130877196788788, -0.9437124133110046, 1.441422462463379, 0.9008116722106934, -0.1343832015991211, -0.5488604307174683, -1.1279462575912476, 1.1677732467651367, 2.011862277984619, 0.9735227227210999, 0.04663098603487015, -0.789259135723114, -0.7236310839653015, -0.0783955305814743, 0.1700213998556137, 0.502856969833374, 0.8623473644256592, 0.08868370950222015, 0.045896925032138824, 1.3902881145477295, 1.197900414466858, -0.3931075632572174, 0.4079885184764862, -0.736768901348114, -0.4567180871963501, 0.4482896625995636, 0.27151334285736084, -0.0062835365533828735, 0.20861662924289703, -1.0163955688476562, -0.298227995634079, -0.46001747250556946, -0.964402973651886, -0.7617568373680115, -0.4084622859954834, -0.26926204562187195, 1.6792842149734497, 0.10072208195924759, -0.5226724147796631, -0.07787732034921646, -0.7779929637908936, -0.0845242366194725, -0.9956535696983337, 0.28878462314605713, -0.23512707650661469, -0.22588491439819336, -0.028363008052110672, 1.7630139589309692, -1.000232458114624, -2.013579845428467, 0.2832016348838806, 0.2647550702095032, -0.308637410402298, 0.2247190624475479, 1.5458482503890991, 0.5654796957969666, 1.502685308456421, 1.393919587135315, 0.9660477638244629, -0.6993732452392578, -1.2632306814193726, 0.6061686277389526, 0.9673499464988708, -1.4863353967666626, 0.7232251167297363, -0.004325550515204668, -0.4937416911125183, 0.5804258584976196, 1.3402915000915527, 0.3896068036556244, -1.9285147190093994, 0.7756631374359131, -0.8758004307746887, 0.6441514492034912, 0.7044201493263245, 0.6913681030273438, 0.1876005232334137, 0.7283892631530762, -1.1162127256393433, -1.256754994392395, -0.7208376526832581, -0.6085571050643921, 1.9325913190841675, -0.2341219037771225, 0.5706143379211426, -0.03684299439191818, -1.3725110292434692, -0.09654149413108826, 0.6994515657424927, 0.3954830765724182, -0.4770694375038147, 0.7866987586021423, -0.6314166188240051, -1.047623872756958, -1.4199702739715576, -0.4535108208656311, -1.0147809982299805, -0.9967783689498901, 0.9507142901420593, 0.8470165729522705, 0.19470861554145813, 1.8667457103729248, 0.6890804767608643, 0.33441948890686035, -2.5765931606292725, 0.9431684613227844, 0.4009914696216583, -0.16572926938533783, 0.9932150840759277, 0.3655361235141754, 0.9585887789726257, 0.034902896732091904, 0.5569244623184204, -2.3854501247406006, 2.3678195476531982, -0.1656806766986847, 0.6902857422828674, -0.0025637857615947723, -0.33311927318573, 1.1204088926315308, 0.4721853733062744, 0.584509551525116, -1.0511459112167358, 0.6841544508934021, -0.6003679037094116, 1.2381879091262817, 0.9055039882659912, -0.8444805145263672, -0.013935702852904797, 1.3154006004333496, 0.4927208423614502, -0.5301011800765991, -0.8567046523094177, -1.0567588806152344, 0.8792021870613098, 1.7758523225784302, -0.06101291626691818, 0.027083344757556915, 0.9099287986755371, 0.630483865737915, -1.2385809421539307, 0.11831412464380264, -0.776615560054779, -0.8293063044548035, 1.6333388090133667, 2.055241584777832, -0.1086655929684639, -0.2816935181617737, -0.8414849638938904, -1.2248324155807495, 0.79584139585495, 0.10595330595970154, 0.13936364650726318, 0.7343748807907104, -0.7038644552230835, 1.2009391784667969, 0.9321160912513733, 0.9725444912910461, 0.1316951960325241, 0.38532933592796326, 0.4325402081012726, -0.3848293125629425, -1.0755974054336548, -0.1403561532497406, -1.0993815660476685, -2.436439037322998, 0.46497780084609985, -0.1875859498977661, -1.3642996549606323, 0.02175869047641754, -0.9831684827804565, 0.9217936396598816, -0.5508682131767273, -1.1526182889938354, -1.5930171012878418, 0.24225696921348572, -0.12573233246803284, 0.911270022392273, -1.4995770454406738, -0.1316179484128952, 1.2620693445205688, 0.9718908667564392, -0.7325135469436646, 0.8873305320739746, 0.18370896577835083, 1.0262670516967773, 0.8659093379974365, -0.3336690366268158, 0.49261224269866943, -0.02490343153476715, -1.3226169347763062, 0.4761686623096466, 1.1400930881500244, 0.20452003180980682, 1.5712276697158813, -0.5566374659538269, -0.06212091073393822, 0.36988523602485657, -0.5443951487541199, -0.42478883266448975, -0.5075364708900452, 0.7571923732757568, 0.04001903533935547, -0.8878999948501587, 0.12917472422122955, -0.05427267402410507, -0.08410830795764923, 0.16689781844615936, -1.5452837944030762, -0.1363862156867981, -0.4024765193462372, -0.6203235387802124, -1.1260404586791992, -0.02048724889755249, 1.2896926403045654, -0.7512125968933105, -0.3338356018066406, 0.4978761076927185, 0.37053176760673523, 0.42181888222694397, 0.5398404598236084, -0.6980398893356323, -0.4206066429615021, -0.26009082794189453, -0.4224880337715149, 0.3686927855014801, 1.340531826019287, -0.06866025924682617, -1.0008902549743652, 0.7101045846939087, -0.4277121126651764, -0.028556548058986664, 1.8578181266784668, 0.0422995463013649, -0.8137590289115906, 0.3001154065132141, -0.6647550463676453, 1.9726336002349854, 1.7431548833847046, 1.3456517457962036, -0.10845175385475159, -0.9980498552322388, 0.6883279085159302, -0.40798333287239075, -0.38647571206092834, 0.9573358297348022, 0.39873844385147095, -0.15476329624652863, -1.430177092552185, 0.6880074143409729, 1.2737956047058105, -0.9247246980667114, -0.8345561623573303, 0.10837789624929428, -0.773682713508606, 0.9837493896484375, 0.7109440565109253, 0.41690024733543396, 0.15478196740150452, 1.6314828395843506, 0.787773847579956, -0.3642783463001251, 0.48632699251174927, 0.4772986173629761, -0.12910322844982147, -2.084728479385376, -1.1549421548843384, 0.34542006254196167, -0.46975332498550415, -1.551291584968567, 1.441394567489624, -1.191878318786621, -0.9209511876106262, 0.5030702352523804, 0.08343971520662308, 1.4763737916946411, 0.35908234119415283, 1.5863829851150513, 2.120267629623413, 0.8635409474372864, 0.37061193585395813, 1.2588591575622559, -0.16980409622192383, -0.5431184768676758, 1.8083659410476685, -0.4895489513874054, 0.4467722177505493, 1.1103394031524658, -0.3348631262779236, -1.040883183479309, -0.7801544070243835, -1.253859281539917, -0.7084835767745972, 1.1120586395263672, 0.06507960706949234, -1.1054812669754028, 0.30973806977272034, 1.6024532318115234, 0.162107452750206, -0.38773882389068604, 0.6105390191078186, 0.47148218750953674, -0.7895814180374146, -0.06436651945114136, -0.8198780417442322, 0.5504271984100342, -0.22238507866859436, -0.358013778924942, 0.3567008674144745, 0.34756094217300415, 1.388569712638855, -0.055895548313856125, 0.09771572798490524, 1.1487300395965576, -1.3829952478408813, 1.5484663248062134, -0.6785559058189392, 0.24705833196640015, -2.438523054122925, 1.4036997556686401, -0.7754522562026978, 1.9275001287460327, -2.6055092811584473, 0.44989296793937683, -0.5688430070877075, -0.3669871389865875, 0.26282691955566406, -0.3295471668243408, 0.17612804472446442, -0.16949309408664703, -1.1563069820404053, -0.14600220322608948, -0.723089873790741, 0.6351844668388367, 1.1058109998703003, 1.3887295722961426, -1.083491563796997, -0.27805012464523315, -1.8009766340255737, -0.1505819410085678, -0.6786714196205139, 0.31536027789115906, -1.9503931999206543, -0.2132904976606369, -1.9240553379058838, -2.383938789367676, -1.3101452589035034, -0.7743978500366211, 1.0446290969848633, 0.14645114541053772, -0.9086034893989563, 1.2315293550491333, -0.323763906955719, -1.8588635921478271, 1.1401612758636475, -2.1046764850616455 ]
https://github.com/huggingface/datasets/issues/5624
glue datasets returning -1 for test split
Hi @lithafnium, thanks for reporting. Please note that you can use the "Community" tab in the corresponding dataset page to start any discussion: https://huggingface.co/datasets/glue/discussions Indeed this issue was already raised there (https://huggingface.co/datasets/glue/discussions/5) and answered: https://huggingface.co/datasets/glue/discussions/5#63907885937867f0cb3cde31 > The test labels are not public. > > Note this dataset belongs to a benchmark: people send their predictions for the test split to GLUE (https://gluebenchmark.com/) and then they get a score in their leaderboard...
### Describe the bug Downloading any dataset from GLUE has -1 as class labels for test split. Train and validation have regular 0/1 class labels. This is also present in the dataset card online. ### Steps to reproduce the bug ``` dataset = load_dataset("glue", "sst2") for d in dataset: # prints out -1 print(d["label"] ``` ### Expected behavior Expected behavior should be 0/1 instead of -1. ### Environment info - `datasets` version: 2.4.0 - Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17 - Python version: 3.8.16 - PyArrow version: 8.0.0 - Pandas version: 1.5.3
265
71
glue datasets returning -1 for test split ### Describe the bug Downloading any dataset from GLUE has -1 as class labels for test split. Train and validation have regular 0/1 class labels. This is also present in the dataset card online. ### Steps to reproduce the bug ``` dataset = load_dataset("glue", "sst2") for d in dataset: # prints out -1 print(d["label"] ``` ### Expected behavior Expected behavior should be 0/1 instead of -1. ### Environment info - `datasets` version: 2.4.0 - Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.17 - Python version: 3.8.16 - PyArrow version: 8.0.0 - Pandas version: 1.5.3 Hi @lithafnium, thanks for reporting. Please note that you can use the "Community" tab in the corresponding dataset page to start any discussion: https://huggingface.co/datasets/glue/discussions Indeed this issue was already raised there (https://huggingface.co/datasets/glue/discussions/5) and answered: https://huggingface.co/datasets/glue/discussions/5#63907885937867f0cb3cde31 > The test labels are not public. > > Note this dataset belongs to a benchmark: people send their predictions for the test split to GLUE (https://gluebenchmark.com/) and then they get a score in their leaderboard...
[ -1.155807614326477, -0.882905125617981, -0.7539591789245605, 1.4164730310440063, -0.1072247251868248, -1.2842718362808228, 0.1016727089881897, -1.0471786260604858, 1.6512656211853027, -0.7368374466896057, 0.2724594175815582, -1.728262186050415, -0.04369534179568291, -0.5601991415023804, -0.7156667113304138, -0.872003972530365, -0.455994188785553, -0.6284574866294861, 0.993835985660553, 2.5534133911132812, 1.228415846824646, -1.361427903175354, 2.712550640106201, 0.7051700353622437, -0.20194528996944427, -0.9879592061042786, 0.5735813975334167, 0.06534271687269211, -1.335091233253479, -0.2914278209209442, -0.8774491548538208, -0.09737662225961685, -0.563012957572937, -0.5460225939750671, 0.019002459943294525, 0.3940315544605255, -0.3094117045402527, -0.3438762128353119, -0.5020720958709717, -0.8157840967178345, 0.41010236740112305, -0.3315078616142273, 0.9259861707687378, -0.3910975754261017, 1.737013339996338, -0.6046162247657776, 0.48749932646751404, 0.7335131764411926, 1.300607442855835, 0.17483757436275482, 0.04261714965105057, 0.3371785283088684, 0.4100121557712555, 0.026509270071983337, 0.489532470703125, 1.1613134145736694, 0.654464840888977, 0.42498889565467834, 0.6708359122276306, -2.2190160751342773, 1.2815097570419312, -0.8612602949142456, 0.2796965539455414, 1.4099658727645874, -0.9480157494544983, 0.36144110560417175, -1.856472134590149, -0.06228439137339592, 0.5360903143882751, -2.2492709159851074, 0.1671023666858673, -1.284876823425293, -0.5082054138183594, 0.994272768497467, 0.34083524346351624, -1.2229321002960205, 0.08776479214429855, -0.4597654640674591, 1.0248152017593384, 0.4843350052833557, 1.2189642190933228, -1.686809778213501, -0.019952982664108276, -0.29807761311531067, 0.07990650087594986, -1.234096884727478, -1.551901936531067, 0.45320576429367065, 0.7098320722579956, 0.5747144222259521, -0.028819788247346878, 0.8312695622444153, -0.9609375596046448, 0.6984440684318542, -0.9286313056945801, -1.8066215515136719, -1.4381976127624512, -2.401538372039795, -2.319256544113159, 0.7553033232688904, -0.4825713038444519, -0.4773218333721161, 1.968013882637024, -1.0559767484664917, -1.8698768615722656, 1.1044875383377075, 0.33436837792396545, -0.01983002945780754, 2.417729377746582, 0.20251590013504028, -0.7515326738357544, 0.5183854103088379, -0.7414263486862183, 0.6822593212127686, -0.3397632837295532, 1.269789457321167, 0.4874964952468872, -1.0254305601119995, 1.5976688861846924, -0.493935763835907, 0.5729047656059265, -0.7379348278045654, -0.4028797745704651, -0.6951076984405518, 0.2691280245780945, 1.8122437000274658, -0.3217230439186096, 1.5618761777877808, -0.25252795219421387, -1.5101945400238037, -1.5365324020385742, 0.7397933602333069, 0.5325327515602112, -0.6922698020935059, 0.12694664299488068, -0.3236743211746216, 0.050893425941467285, 0.055821727961301804, 1.0600754022598267, 1.2145358324050903, 0.756733775138855, -0.36192086338996887, -0.9130516052246094, 0.27942609786987305, -0.0003756927326321602, -0.6951247453689575, -1.7927261590957642, -0.21081069111824036, 0.2053208351135254, 0.582069456577301, -1.2977840900421143, 1.742960810661316, 0.8152166604995728, 1.9473663568496704, 1.0083847045898438, -0.3436127305030823, 1.499563455581665, 0.07422715425491333, 1.8680486679077148, -0.43431705236434937, 0.638126015663147, -0.30420830845832825, -1.1782374382019043, 0.7865980267524719, -0.4253230392932892, -2.099086284637451, -0.7194939255714417, -0.8621513843536377, -0.0846157968044281, -0.7697716355323792, 1.0129673480987549, -0.19152870774269104, -1.318202257156372, 0.2676372230052948, -0.6838251352310181, 0.07895684242248535, -1.368075966835022, 0.22635525465011597, 0.7442531585693359, -0.5702068209648132, 0.011141500435769558, -0.3264659345149994, -1.3376686573028564, -0.40562713146209717, 0.33608993887901306, 1.8239206075668335, -0.737471342086792, 0.9470542669296265, 0.9785913825035095, -0.729986846446991, 0.0255134217441082, 0.375203013420105, -0.32250115275382996, 0.9313159584999084, -0.9980646371841431, -0.4283252954483032, 1.0977798700332642, -0.1535942256450653, -0.6777162551879883, 1.4721875190734863, 0.7571086287498474, -0.96468585729599, -0.2506045997142792, -0.15366381406784058, -0.7923120260238647, -0.05320169776678085, -1.6630281209945679, -0.08340723067522049, 0.17485323548316956, -1.5205594301223755, -0.4306347668170929, -0.19561319053173065, 1.3473747968673706, -0.14550715684890747, 1.4746702909469604, -0.31883203983306885, -0.18340738117694855, -0.493334025144577, -0.47039175033569336, 0.08225478231906891, -0.25561046600341797, -0.6163833141326904, 0.31540539860725403, -0.795859158039093, 0.35339266061782837, 1.4054054021835327, 0.4166649281978607, 0.05981257185339928, 0.5857393145561218, 1.0246113538742065, 0.3012320399284363, -0.20253844559192657, -0.8625261187553406, -1.629746913909912, 2.0459177494049072, -1.3651931285858154, 1.9458757638931274, 0.7858997583389282, -0.0480501763522625, -1.83603036403656, -1.935490608215332, 1.3865622282028198, 1.1695516109466553, 2.4460489749908447, 0.5476058721542358, 0.46908748149871826, -0.8322403430938721, -0.7228962779045105, 0.25269001722335815, -0.9578200578689575, -0.7896785736083984, 0.12176132947206497, 2.378593921661377, 1.721835970878601, -0.43284639716148376, -0.17661823332309723, -1.0896495580673218, 1.3515018224716187, -0.12067924439907074, 0.14884796738624573, 1.996601939201355, -0.26062723994255066, -1.0306518077850342, 1.326106071472168, -2.262582778930664, 0.20355728268623352, 1.965116262435913, 0.20462028682231903, 0.05381219461560249, -1.3886662721633911, -0.7180755138397217, -0.3261636793613434, -0.42216596007347107, -1.226845622062683, 0.5608806610107422, -0.28978365659713745, -0.8450449109077454, -1.4863553047180176, 0.06608851253986359, -1.097915768623352, -1.7114957571029663, 0.27226829528808594, 1.7353649139404297, 1.9870387315750122, -0.8561131954193115, 1.4423859119415283, -0.23760095238685608, 0.15696527063846588, 1.2588781118392944, 1.207210898399353, 3.186845541000366, 1.9426220655441284, -1.3513437509536743, 0.8310993909835815, -0.08923035860061646, -0.4314988851547241, 1.1946207284927368, -1.162031650543213, 1.2516690492630005, -0.2590892016887665, -1.2957823276519775, -1.2252413034439087, 0.9650998711585999, 0.45261669158935547, 0.0634789913892746, -0.5445201992988586, 1.1939054727554321, 0.10175330936908722, 1.3911267518997192, 0.5577244162559509, -0.3037136197090149, 0.656936526298523, -0.39543411135673523, -0.4721272587776184, 1.590848684310913, 0.15378306806087494, -1.5016391277313232, -2.3963818550109863, -0.2679431438446045, -0.8814204335212708, -0.1437971591949463, -0.6189596056938171, -1.000657081604004, 1.648931860923767, 0.5246273875236511, -1.1673487424850464, -0.3279213607311249, -0.38533449172973633, -0.583458423614502, 2.6961069107055664, -1.5038058757781982, -0.13437025249004364, -1.0335773229599, -0.5267698168754578, 1.621554970741272, -1.1586021184921265, -0.14758969843387604, -0.9839534759521484, -0.6536128520965576, -1.3625776767730713, -0.5692490339279175, -0.0929827094078064, -0.8844944834709167, 0.7758404612541199, 0.09717350453138351, -1.1773313283920288, -0.2273915410041809, -0.8945443034172058, 0.9021912813186646, -0.13543495535850525, 0.2521226704120636, 1.9159884452819824, 0.4813031852245331, -0.3473086357116699, 0.6743407249450684, 1.1154059171676636, 0.6708380579948425, -0.6708982586860657, 0.22775030136108398, -0.7145038843154907, 0.3341045379638672, -1.3408787250518799, 0.1974904090166092, -2.8405699729919434, 0.6726254224777222, -0.08643314242362976, -0.038884732872247696, -0.030953511595726013, -1.223037600517273, 1.1043919324874878, 2.569793462753296, -1.2197926044464111, 0.4655652642250061, 0.31626254320144653, 1.1386643648147583, -1.5251930952072144, 0.23903392255306244, -0.5066311359405518, 2.136866331100464, 0.11460182070732117, 1.1464905738830566, -0.4658605754375458, -2.169402599334717, 0.6448530554771423, -1.2475391626358032, -1.077541708946228, 0.8266168236732483, -0.7701887488365173, 0.11470019817352295, -1.3554713726043701, -0.11295390874147415, -0.8506409525871277, -1.2430543899536133, 0.729432225227356, 0.04082781821489334, 0.49460792541503906, -0.5864087343215942, 0.36840060353279114, -2.1987571716308594, -1.336929202079773, -0.2991393208503723, -0.9760540723800659, 0.40082767605781555, -0.2586750090122223, 0.7193030714988708, -0.13972344994544983, -0.014956367202103138, 0.294888436794281, 1.293358564376831, 3.3760037422180176, 0.188303604722023, 0.34140634536743164, -0.06590396165847778, -1.058394193649292, 1.4673652648925781, 0.9333018660545349, -0.15605340898036957, -0.5788249373435974, -0.9940811395645142, 1.2979600429534912, 1.9008195400238037, 1.1088508367538452, 0.08063467592000961, -0.9094498753547668, -0.7489730715751648, 0.08636762201786041, 0.18033091723918915, 0.5205294489860535, 0.9295141100883484, 0.01741085946559906, 0.10725197941064835, 1.5381513833999634, 1.2658506631851196, -0.31077632308006287, 0.3815731108188629, -0.8587921857833862, -0.49816563725471497, 0.5011701583862305, 0.3786967992782593, 0.08985903859138489, 0.42770877480506897, -1.1511900424957275, -0.23589427769184113, -0.32765012979507446, -0.9284653067588806, -0.6942124366760254, -0.4337948262691498, -0.3600434362888336, 1.6742509603500366, 0.0699850395321846, -0.4200931489467621, -0.03010864555835724, -0.7970149517059326, -0.12144850194454193, -1.0305951833724976, 0.41861745715141296, -0.15783217549324036, 0.016060151159763336, -0.14331217110157013, 1.762540578842163, -1.0067507028579712, -2.1920461654663086, 0.2634274661540985, 0.27425557374954224, -0.4568418264389038, 0.1346440613269806, 1.661826252937317, 0.5697853565216064, 1.4044194221496582, 1.3335745334625244, 1.0032148361206055, -0.6491718292236328, -1.3033766746520996, 0.6357731223106384, 1.075812816619873, -1.4299097061157227, 0.806849479675293, -0.0434851236641407, -0.5812121033668518, 0.6396853923797607, 1.2731170654296875, 0.32920441031455994, -1.9974267482757568, 0.736626148223877, -0.8082911968231201, 0.6872637271881104, 0.6713962554931641, 0.8745263814926147, 0.12895826995372772, 0.7806880474090576, -1.3363792896270752, -1.1003193855285645, -0.7244105339050293, -0.529090404510498, 1.8495811223983765, -0.26392239332199097, 0.5581786036491394, -0.2215038686990738, -1.3462892770767212, -0.05660568177700043, 0.7340900897979736, 0.29999980330467224, -0.44138219952583313, 0.8984836935997009, -0.5478911995887756, -1.101839303970337, -1.359682321548462, -0.3960407078266144, -0.9328826665878296, -0.8600021600723267, 1.0426150560379028, 0.7917772531509399, 0.43462154269218445, 1.8571239709854126, 0.5908560752868652, 0.24940504133701324, -2.714510440826416, 0.8840162754058838, 0.2380426824092865, 0.04340077191591263, 0.8484377861022949, 0.31077125668525696, 1.0260096788406372, -0.0835433155298233, 0.5893170237541199, -2.314821481704712, 2.18229341506958, -0.20004703104496002, 0.7008703351020813, 0.023959923535585403, -0.08766171336174011, 0.9936357140541077, 0.5622691512107849, 0.6010534763336182, -1.1088316440582275, 0.7579482197761536, -0.6236468553543091, 1.2067089080810547, 0.8611277341842651, -0.8258790969848633, -0.04276978224515915, 1.292968511581421, 0.5444493889808655, -0.4132723808288574, -0.9061917066574097, -0.8914570212364197, 0.9655272960662842, 1.7928274869918823, -0.010898285545408726, 0.03651808202266693, 0.919405996799469, 0.6297854781150818, -1.3508658409118652, 0.03452090173959732, -0.7680713534355164, -0.5864138007164001, 1.725157618522644, 2.060706615447998, -0.013195330277085304, -0.24496664106845856, -0.7696127891540527, -1.2266995906829834, 0.7894726991653442, 0.03600546717643738, 0.13873480260372162, 0.7785945534706116, -0.6607992053031921, 1.1184680461883545, 0.753000020980835, 0.962321400642395, 0.14071232080459595, 0.30904078483581543, 0.25959664583206177, -0.2762733995914459, -1.2646840810775757, -0.2393917441368103, -1.0498688220977783, -2.4444735050201416, 0.4974321722984314, -0.2639269530773163, -1.465336799621582, 0.05175568535923958, -1.0321946144104004, 0.8314504027366638, -0.5578441619873047, -1.0749659538269043, -1.4752815961837769, 0.27796119451522827, -0.14347553253173828, 0.8544895052909851, -1.5789670944213867, -0.06286324560642242, 1.307705283164978, 0.9574085474014282, -0.5763704180717468, 1.0196824073791504, 0.32032138109207153, 1.0193289518356323, 0.8966434001922607, -0.335518479347229, 0.4388851821422577, 0.16935193538665771, -1.31166410446167, 0.4051643908023834, 1.1357742547988892, 0.25533297657966614, 1.4518827199935913, -0.6998606324195862, 0.07263023406267166, 0.4293534457683563, -0.4126969277858734, -0.4651234447956085, -0.6379504203796387, 0.7405441403388977, 0.08337924629449844, -0.9799068570137024, 0.021643824875354767, -0.13696914911270142, -0.11949248611927032, 0.26607877016067505, -1.445535659790039, -0.13265447318553925, -0.3557640016078949, -0.5849759578704834, -1.3282583951950073, -0.01419149711728096, 1.3426614999771118, -0.8896049857139587, -0.14558188617229462, 0.5597745776176453, 0.2466418594121933, 0.6075887084007263, 0.5804576873779297, -0.5886282324790955, -0.3433712124824524, -0.33358675241470337, -0.2920706570148468, 0.2959018051624298, 1.2051613330841064, -0.11496813595294952, -1.0276401042938232, 0.7665883302688599, -0.4812168478965759, 0.10338347405195236, 2.0414583683013916, 0.07538265734910965, -0.819039523601532, 0.38032522797584534, -0.6577809453010559, 1.8678112030029297, 1.710938572883606, 1.3883572816848755, -0.1355086863040924, -0.9669110178947449, 0.5794348120689392, -0.21129556000232697, -0.37498828768730164, 0.8910794258117676, 0.486324280500412, -0.20149242877960205, -1.4226160049438477, 0.5273234248161316, 1.3048604726791382, -0.9376962780952454, -0.7619177103042603, 0.18310169875621796, -0.911180853843689, 1.1188558340072632, 0.8121718764305115, 0.35228145122528076, 0.17875522375106812, 1.5798180103302002, 0.70632004737854, -0.5050780177116394, 0.48868900537490845, 0.4922136664390564, -0.14193472266197205, -1.9850962162017822, -1.0065655708312988, 0.3401644229888916, -0.4252738952636719, -1.5591351985931396, 1.292018175125122, -1.2859867811203003, -0.9687027931213379, 0.5094682574272156, 0.13665618002414703, 1.415732979774475, 0.27481865882873535, 1.601364254951477, 2.081807851791382, 1.0004518032073975, 0.2995584309101105, 1.3337050676345825, -0.13302242755889893, -0.40458834171295166, 1.7495250701904297, -0.4829002022743225, 0.5603930354118347, 1.0825364589691162, -0.44582313299179077, -1.1037400960922241, -0.8292476534843445, -1.1597886085510254, -0.6862054467201233, 1.2708134651184082, 0.18004892766475677, -1.1190156936645508, 0.24072058498859406, 1.5288622379302979, 0.11601436883211136, -0.2944875955581665, 0.6181343793869019, 0.43316832184791565, -0.779840886592865, -0.07872573286294937, -0.9272758364677429, 0.536975085735321, -0.15048804879188538, -0.2965378165245056, 0.27102938294410706, 0.45310336351394653, 1.2775839567184448, 0.005549749359488487, 0.21035577356815338, 1.2940340042114258, -1.3183900117874146, 1.5143239498138428, -0.6487526893615723, 0.2163216471672058, -2.394412040710449, 1.460132122039795, -0.8537154793739319, 1.7842975854873657, -2.6530001163482666, 0.39922237396240234, -0.5679036378860474, -0.38341057300567627, 0.28555193543434143, -0.41020798683166504, 0.09345416724681854, -0.16368253529071808, -1.1335442066192627, -0.1839253157377243, -0.78290194272995, 0.5539058446884155, 1.1041648387908936, 1.388643503189087, -1.146263599395752, -0.34491708874702454, -1.7648305892944336, -0.2361728847026825, -0.7389687299728394, 0.3941986560821533, -1.8951550722122192, -0.12746934592723846, -1.8963381052017212, -2.516590118408203, -1.3990280628204346, -0.8466169834136963, 1.0825505256652832, 0.12852615118026733, -0.9205595254898071, 1.0614651441574097, -0.40266504883766174, -1.8307361602783203, 1.2079720497131348, -2.2268388271331787 ]
https://github.com/huggingface/datasets/issues/5613
Version mismatch with multiprocess and dill on Python 3.10
Reopening, since I think the docs should inform the user of this problem. For example, [this page](https://huggingface.co/docs/datasets/installation) says > Datasets is tested on Python 3.7+. but it should probably say that Beam Datasets do not work with Python 3.10 (or link to a known issues page).
### Describe the bug Grabbing the latest version of `datasets` and `apache-beam` with `poetry` using Python 3.10 gives a crash at runtime. The crash is ``` File "/Users/adpauls/sc/git/DSI-transformers/data/NQ/create_NQ_train_vali.py", line 1, in <module> import datasets File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 65, in <module> from .arrow_reader import ArrowReader File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/download_manager.py", line 35, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 40, in <module> import multiprocess.pool File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 609, in <module> class ThreadPool(Pool): File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 611, in ThreadPool from .dummy import Process File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/dummy/__init__.py", line 87, in <module> class Condition(threading._Condition): AttributeError: module 'threading' has no attribute '_Condition'. Did you mean: 'Condition'? ``` I think this is a bad interaction of versions from `dill`, `multiprocess`, `apache-beam`, and `threading` from the Python (3.10) standard lib. Upgrading `multiprocess` to a version that does not crash like this is not possible because `apache-beam` pins `dill` to and old version: ``` Because multiprocess (0.70.10) depends on dill (>=0.3.2) and apache-beam (2.45.0) depends on dill (>=0.3.1.1,<0.3.2), multiprocess (0.70.10) is incompatible with apache-beam (2.45.0). And because no versions of apache-beam match >2.45.0,<3.0.0, multiprocess (0.70.10) is incompatible with apache-beam (>=2.45.0,<3.0.0). So, because yyy depends on both apache-beam (^2.45.0) and multiprocess (0.70.10), version solving failed. ``` Perhaps it is not right to file a bug here, but I'm not totally sure whose fault it is. And in any case, this is an immediate blocker to using `datasets` out of the box. Possibly related to https://github.com/huggingface/datasets/issues/5232. ### Steps to reproduce the bug Steps to reproduce: 1. Make a poetry project with this configuration ``` [tool.poetry] name = "yyy" version = "0.1.0" description = "" authors = ["Adam Pauls <[email protected]>"] readme = "README.md" packages = [{ include = "xxx" }] [tool.poetry.dependencies] python = ">=3.10,<3.11" datasets = "^2.10.1" apache-beam = "^2.45.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" ``` 2. `poetry install`. 3. `poetry run python -c "import datasets"`. ### Expected behavior Script runs. ### Environment info Python 3.10. Here are the versions installed by `poetry`: ``` •• Installing frozenlist (1.3.3) • Installing idna (3.4) • Installing multidict (6.0.4) • Installing aiosignal (1.3.1) • Installing async-timeout (4.0.2) • Installing attrs (22.2.0) • Installing certifi (2022.12.7) • Installing charset-normalizer (3.1.0) • Installing six (1.16.0) • Installing urllib3 (1.26.14) • Installing yarl (1.8.2) • Installing aiohttp (3.8.4) • Installing dill (0.3.1.1) • Installing docopt (0.6.2) • Installing filelock (3.9.0) • Installing numpy (1.22.4) • Installing pyparsing (3.0.9) • Installing protobuf (3.19.4) • Installing packaging (23.0) • Installing python-dateutil (2.8.2) • Installing pytz (2022.7.1) • Installing pyyaml (6.0) • Installing requests (2.28.2) • Installing tqdm (4.65.0) • Installing typing-extensions (4.5.0) • Installing cloudpickle (2.2.1) • Installing crcmod (1.7) • Installing fastavro (1.7.2) • Installing fasteners (0.18) • Installing fsspec (2023.3.0) • Installing grpcio (1.51.3) • Installing hdfs (2.7.0) • Installing httplib2 (0.20.4) • Installing huggingface-hub (0.12.1) • Installing multiprocess (0.70.9) • Installing objsize (0.6.1) • Installing orjson (3.8.7) • Installing pandas (1.5.3) • Installing proto-plus (1.22.2) • Installing pyarrow (9.0.0) • Installing pydot (1.4.2) • Installing pymongo (3.13.0) • Installing regex (2022.10.31) • Installing responses (0.18.0) • Installing xxhash (3.2.0) • Installing zstandard (0.20.0) • Installing apache-beam (2.45.0) • Installing datasets (2.10.1) ```
267
46
Version mismatch with multiprocess and dill on Python 3.10 ### Describe the bug Grabbing the latest version of `datasets` and `apache-beam` with `poetry` using Python 3.10 gives a crash at runtime. The crash is ``` File "/Users/adpauls/sc/git/DSI-transformers/data/NQ/create_NQ_train_vali.py", line 1, in <module> import datasets File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 65, in <module> from .arrow_reader import ArrowReader File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/download_manager.py", line 35, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 40, in <module> import multiprocess.pool File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 609, in <module> class ThreadPool(Pool): File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 611, in ThreadPool from .dummy import Process File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/dummy/__init__.py", line 87, in <module> class Condition(threading._Condition): AttributeError: module 'threading' has no attribute '_Condition'. Did you mean: 'Condition'? ``` I think this is a bad interaction of versions from `dill`, `multiprocess`, `apache-beam`, and `threading` from the Python (3.10) standard lib. Upgrading `multiprocess` to a version that does not crash like this is not possible because `apache-beam` pins `dill` to and old version: ``` Because multiprocess (0.70.10) depends on dill (>=0.3.2) and apache-beam (2.45.0) depends on dill (>=0.3.1.1,<0.3.2), multiprocess (0.70.10) is incompatible with apache-beam (2.45.0). And because no versions of apache-beam match >2.45.0,<3.0.0, multiprocess (0.70.10) is incompatible with apache-beam (>=2.45.0,<3.0.0). So, because yyy depends on both apache-beam (^2.45.0) and multiprocess (0.70.10), version solving failed. ``` Perhaps it is not right to file a bug here, but I'm not totally sure whose fault it is. And in any case, this is an immediate blocker to using `datasets` out of the box. Possibly related to https://github.com/huggingface/datasets/issues/5232. ### Steps to reproduce the bug Steps to reproduce: 1. Make a poetry project with this configuration ``` [tool.poetry] name = "yyy" version = "0.1.0" description = "" authors = ["Adam Pauls <[email protected]>"] readme = "README.md" packages = [{ include = "xxx" }] [tool.poetry.dependencies] python = ">=3.10,<3.11" datasets = "^2.10.1" apache-beam = "^2.45.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" ``` 2. `poetry install`. 3. `poetry run python -c "import datasets"`. ### Expected behavior Script runs. ### Environment info Python 3.10. Here are the versions installed by `poetry`: ``` •• Installing frozenlist (1.3.3) • Installing idna (3.4) • Installing multidict (6.0.4) • Installing aiosignal (1.3.1) • Installing async-timeout (4.0.2) • Installing attrs (22.2.0) • Installing certifi (2022.12.7) • Installing charset-normalizer (3.1.0) • Installing six (1.16.0) • Installing urllib3 (1.26.14) • Installing yarl (1.8.2) • Installing aiohttp (3.8.4) • Installing dill (0.3.1.1) • Installing docopt (0.6.2) • Installing filelock (3.9.0) • Installing numpy (1.22.4) • Installing pyparsing (3.0.9) • Installing protobuf (3.19.4) • Installing packaging (23.0) • Installing python-dateutil (2.8.2) • Installing pytz (2022.7.1) • Installing pyyaml (6.0) • Installing requests (2.28.2) • Installing tqdm (4.65.0) • Installing typing-extensions (4.5.0) • Installing cloudpickle (2.2.1) • Installing crcmod (1.7) • Installing fastavro (1.7.2) • Installing fasteners (0.18) • Installing fsspec (2023.3.0) • Installing grpcio (1.51.3) • Installing hdfs (2.7.0) • Installing httplib2 (0.20.4) • Installing huggingface-hub (0.12.1) • Installing multiprocess (0.70.9) • Installing objsize (0.6.1) • Installing orjson (3.8.7) • Installing pandas (1.5.3) • Installing proto-plus (1.22.2) • Installing pyarrow (9.0.0) • Installing pydot (1.4.2) • Installing pymongo (3.13.0) • Installing regex (2022.10.31) • Installing responses (0.18.0) • Installing xxhash (3.2.0) • Installing zstandard (0.20.0) • Installing apache-beam (2.45.0) • Installing datasets (2.10.1) ``` Reopening, since I think the docs should inform the user of this problem. For example, [this page](https://huggingface.co/docs/datasets/installation) says > Datasets is tested on Python 3.7+. but it should probably say that Beam Datasets do not work with Python 3.10 (or link to a known issues page).
[ -1.2203803062438965, -0.8654314875602722, -0.62025386095047, 1.36741042137146, -0.11054454743862152, -1.3439956903457642, 0.06198142096400261, -1.014704942703247, 1.522252082824707, -0.6576555967330933, 0.19666792452335358, -1.6717911958694458, -0.2024473398923874, -0.36462289094924927, -0.6268512606620789, -0.835181713104248, -0.3324916660785675, -0.9709782004356384, 0.9970691800117493, 2.534348487854004, 1.3047358989715576, -1.266240119934082, 2.80416202545166, 0.648078203201294, -0.3425275981426239, -0.9344300031661987, 0.5873773097991943, 0.004488030448555946, -1.3212032318115234, -0.43778252601623535, -0.8927027583122253, 0.004658604972064495, -0.5885247588157654, -0.3762594163417816, 0.21678473055362701, 0.46770647168159485, -0.2355973720550537, -0.1842889040708542, -0.6124379634857178, -0.6677858829498291, 0.5130813717842102, -0.34843510389328003, 0.9635815024375916, -0.3126453757286072, 1.7182188034057617, -0.6355059742927551, 0.33807963132858276, 0.7413142919540405, 1.2443236112594604, 0.07757861167192459, 0.10071803629398346, 0.25696253776550293, 0.3370567858219147, -0.04728096351027489, 0.5608981251716614, 1.308937907218933, 0.5242562294006348, 0.5434370040893555, 0.6583207249641418, -2.1989386081695557, 1.4059876203536987, -0.776667058467865, 0.221205472946167, 1.354369044303894, -0.7890998125076294, 0.42901256680488586, -1.7818198204040527, -0.05357759818434715, 0.5334230065345764, -2.309522867202759, 0.3029678761959076, -1.3016109466552734, -0.5890030264854431, 0.8527214527130127, 0.2770756781101227, -1.200825572013855, 0.15251265466213226, -0.5298209190368652, 1.0903626680374146, 0.5103176236152649, 1.1828703880310059, -1.6017987728118896, -0.07521575689315796, -0.11205507814884186, 0.10471387952566147, -1.3711329698562622, -1.7474982738494873, 0.5447812676429749, 0.5903922915458679, 0.8125520348548889, -0.10670370608568192, 1.0131990909576416, -1.085853934288025, 0.8141329288482666, -0.8383902907371521, -1.5782005786895752, -1.355546236038208, -2.4645445346832275, -2.286175489425659, 0.7921469807624817, -0.5495415925979614, -0.4607974886894226, 1.97315514087677, -0.9925084710121155, -1.8555810451507568, 0.9766654968261719, 0.35008329153060913, 0.06102059409022331, 2.358625888824463, 0.24946826696395874, -0.7333319783210754, 0.36964622139930725, -0.7024034857749939, 0.832788348197937, -0.3757575750350952, 1.1767362356185913, 0.5682936906814575, -0.8967626690864563, 1.5753488540649414, -0.5521896481513977, 0.5907837748527527, -0.7181021571159363, -0.5374283194541931, -0.8199702501296997, 0.2623029053211212, 1.8024952411651611, -0.4364493489265442, 1.5344082117080688, -0.25084295868873596, -1.556962251663208, -1.540755271911621, 0.7535144090652466, 0.48525944352149963, -0.8895766139030457, 0.08345292508602142, -0.4862571060657501, 0.168425053358078, -0.03078998625278473, 1.092969298362732, 1.1669260263442993, 0.721365213394165, -0.2738088369369507, -0.8588415384292603, 0.2853719890117645, -0.17608052492141724, -0.6345193386077881, -1.848305344581604, -0.341605544090271, 0.24723723530769348, 0.6162375807762146, -1.1638199090957642, 1.9089243412017822, 0.9354294538497925, 2.046269655227661, 0.8265497088432312, -0.4882909059524536, 1.4447749853134155, -0.014749793335795403, 1.7893472909927368, -0.4854460656642914, 0.5848780870437622, -0.399763286113739, -1.1448794603347778, 0.8811526894569397, -0.3690583109855652, -1.8994840383529663, -0.7519515752792358, -0.8706488013267517, -0.12685120105743408, -0.7720752954483032, 0.812553346157074, -0.2917396128177643, -1.4363211393356323, 0.022539108991622925, -0.6752119064331055, 0.12593939900398254, -1.2548160552978516, 0.11529909074306488, 0.6921917200088501, -0.666375458240509, -0.11447145789861679, -0.32342982292175293, -1.3335155248641968, -0.5449685454368591, 0.40527328848838806, 1.9282419681549072, -0.48270025849342346, 1.0548126697540283, 0.9973871111869812, -0.8046829104423523, 0.14633159339427948, 0.2277860939502716, -0.36708930134773254, 0.7927342057228088, -1.1477659940719604, -0.34504470229148865, 1.0457056760787964, -0.20429515838623047, -0.7087848782539368, 1.459027886390686, 0.820851743221283, -1.182792067527771, -0.2782891094684601, -0.31976690888404846, -0.8348529934883118, -0.021625440567731857, -1.4927059412002563, -0.20522086322307587, 0.349068284034729, -1.406740427017212, -0.3605514168739319, -0.18932583928108215, 1.3958740234375, -0.2252056747674942, 1.5032192468643188, -0.27083057165145874, -0.16662383079528809, -0.3647242784500122, -0.4770132005214691, 0.22045224905014038, -0.18767260015010834, -0.5495008230209351, 0.20149840414524078, -0.8271880745887756, 0.2562553286552429, 1.6033861637115479, 0.2676786482334137, 0.06874800473451614, 0.44517067074775696, 1.1271088123321533, 0.39468735456466675, 0.011944844387471676, -0.9658231735229492, -1.5331183671951294, 1.8372775316238403, -1.4711816310882568, 1.843544840812683, 0.7367867827415466, -0.0785103291273117, -1.8273144960403442, -1.9249746799468994, 1.190794825553894, 1.1197470426559448, 2.3821306228637695, 0.5271624326705933, 0.4340570569038391, -0.727047860622406, -0.8753479719161987, 0.34420230984687805, -0.9743965268135071, -0.6306157112121582, 0.22146832942962646, 2.2637813091278076, 1.7675111293792725, -0.6407636404037476, -0.3192470073699951, -0.7638610601425171, 1.2850526571273804, -0.21562521159648895, 0.18383555114269257, 2.1450066566467285, -0.32770058512687683, -1.022905945777893, 1.3364909887313843, -2.392707347869873, 0.33199283480644226, 2.0076470375061035, 0.2222255915403366, 0.19387605786323547, -1.370741605758667, -0.6613083481788635, -0.35276612639427185, -0.5322264432907104, -1.2458385229110718, 0.5701233744621277, -0.26501262187957764, -0.8820847868919373, -1.4513452053070068, 0.03739926591515541, -1.1785801649093628, -1.872766375541687, 0.3273583948612213, 1.9963995218276978, 2.092693567276001, -0.8745440244674683, 1.25192129611969, -0.1853613406419754, -0.09924445301294327, 1.341440200805664, 1.3313542604446411, 3.0791208744049072, 1.8811089992523193, -1.2489718198776245, 0.8005971312522888, -0.2302679568529129, -0.46629929542541504, 1.1603533029556274, -1.1119354963302612, 0.9683908820152283, -0.18715626001358032, -1.1991008520126343, -1.1782864332199097, 1.1197998523712158, 0.469769150018692, 0.047008149325847626, -0.44915884733200073, 1.2951031923294067, 0.1885581761598587, 1.4945626258850098, 0.6175839304924011, -0.4330146610736847, 0.5591781139373779, -0.3089730441570282, -0.5383286476135254, 1.7036638259887695, 0.2030344009399414, -1.5572999715805054, -2.451176881790161, -0.3133678436279297, -0.9864256381988525, -0.04200063645839691, -0.6427422165870667, -1.0701738595962524, 1.506774663925171, 0.488893985748291, -1.0919569730758667, -0.20437373220920563, -0.3283998668193817, -0.4892270267009735, 2.6316003799438477, -1.238179087638855, -0.07339482754468918, -0.9325404763221741, -0.4185329079627991, 1.5611377954483032, -1.2103493213653564, -0.2843174636363983, -1.041930913925171, -0.5861935019493103, -1.357981562614441, -0.4684078097343445, 0.04457170516252518, -0.9414166212081909, 0.6927157044410706, 0.12840363383293152, -1.066942572593689, -0.29737263917922974, -0.9000424146652222, 1.087892770767212, -0.03371897712349892, 0.16148409247398376, 1.9182918071746826, 0.31209316849708557, -0.43416115641593933, 0.7690322995185852, 1.2015259265899658, 0.5236920714378357, -0.6551193594932556, 0.0088052274659276, -0.7350035905838013, 0.34349963068962097, -1.387012004852295, 0.1931372880935669, -2.9999477863311768, 0.780487596988678, -0.23208120465278625, -0.12817291915416718, -0.22158995270729065, -1.3331767320632935, 1.013290524482727, 2.5344033241271973, -1.0506855249404907, 0.5521630644798279, 0.41605496406555176, 1.12893807888031, -1.5948877334594727, 0.23396743834018707, -0.5233166217803955, 2.025963544845581, 0.10707253962755203, 1.2434639930725098, -0.5558613538742065, -2.2487363815307617, 0.5433675050735474, -1.1718018054962158, -0.9453188180923462, 0.8654136657714844, -0.8176044225692749, 0.3284573256969452, -1.45954430103302, -0.03738678619265556, -0.936669647693634, -1.2622917890548706, 0.6801168322563171, 0.0005655279383063316, 0.45797863602638245, -0.5613241195678711, 0.4036734402179718, -2.1653642654418945, -1.396957516670227, -0.22019058465957642, -0.9760021567344666, 0.6406837105751038, -0.3278017044067383, 0.6311571598052979, 0.0011868532747030258, 0.18924832344055176, 0.2877708375453949, 1.4906511306762695, 3.326429843902588, 0.06573940068483353, 0.1803525984287262, -0.050042904913425446, -1.1101046800613403, 1.375279426574707, 0.9784134030342102, -0.16559234261512756, -0.6141249537467957, -1.0497678518295288, 1.361299753189087, 1.9981237649917603, 1.1741660833358765, 0.1694744974374771, -0.8308836817741394, -0.7622958421707153, 0.021060161292552948, 0.19894370436668396, 0.5176088809967041, 1.0093588829040527, 0.019701290875673294, 0.12095840275287628, 1.3576010465621948, 1.2078988552093506, -0.3196156919002533, 0.40980666875839233, -0.9767906069755554, -0.37505796551704407, 0.3556972146034241, 0.17096692323684692, 0.06133582815527916, 0.48503923416137695, -1.0151166915893555, -0.34068724513053894, -0.2404375523328781, -0.9020890593528748, -0.8592174053192139, -0.3590772747993469, -0.437921941280365, 1.6215702295303345, 0.045599594712257385, -0.51686030626297, 0.09653379023075104, -0.6415908336639404, -0.1260114163160324, -1.1528040170669556, 0.15868084132671356, -0.15975303947925568, 0.0024820836260914803, -0.08387665450572968, 1.5980794429779053, -0.9212555289268494, -2.020106792449951, 0.19117547571659088, 0.3669288158416748, -0.36712104082107544, 0.14465433359146118, 1.8087037801742554, 0.5435834527015686, 1.3574984073638916, 1.284604549407959, 1.0229520797729492, -0.5349066257476807, -1.241110920906067, 0.8198596835136414, 0.9411278367042542, -1.364977478981018, 0.972235381603241, -0.22052842378616333, -0.5646333694458008, 0.6385588645935059, 1.397792935371399, 0.3190302550792694, -2.0994887351989746, 0.9342994689941406, -0.944481372833252, 0.7963171601295471, 0.7326968312263489, 0.9038678407669067, 0.1920710653066635, 0.8186736702919006, -1.310519814491272, -1.170988917350769, -0.6366679668426514, -0.6017049551010132, 1.8300549983978271, -0.2084132730960846, 0.5317971706390381, -0.32233330607414246, -1.1956217288970947, -0.1821133941411972, 0.7919753193855286, 0.411011666059494, -0.43195709586143494, 0.97552090883255, -0.5992083549499512, -0.9574962258338928, -1.2391581535339355, -0.42185285687446594, -1.0382349491119385, -0.843959629535675, 0.9712091684341431, 0.8059073090553284, 0.49776405096054077, 1.991021752357483, 0.5369932651519775, 0.37682121992111206, -2.5955398082733154, 0.9125909209251404, 0.2920619547367096, -0.03169245645403862, 0.893733561038971, 0.2151854783296585, 1.1451631784439087, -0.08163311332464218, 0.5955718755722046, -2.3499844074249268, 2.2004504203796387, -0.19383493065834045, 0.6605480909347534, 0.10353142768144608, -0.2014589011669159, 1.1446983814239502, 0.5997629761695862, 0.6413573622703552, -1.1706961393356323, 0.7562477588653564, -0.6769570112228394, 1.0490641593933105, 0.9703813195228577, -0.9838201403617859, 0.12361441552639008, 1.4192169904708862, 0.5049707293510437, -0.37917760014533997, -0.9837788939476013, -0.8810086250305176, 1.0246527194976807, 1.6885579824447632, -0.03317121043801308, 0.027355991303920746, 0.8009495735168457, 0.6765939593315125, -1.1975151300430298, 0.10810675472021103, -0.6899704337120056, -0.6212231516838074, 1.8045564889907837, 1.9867393970489502, -0.08666004240512848, -0.20973099768161774, -0.7283502221107483, -1.317579984664917, 0.7931012511253357, -0.07018738240003586, 0.025795631110668182, 0.7091445922851562, -0.6849113702774048, 1.1685882806777954, 0.5544558763504028, 1.0518381595611572, -0.0024590897373855114, 0.3013458251953125, 0.2163306176662445, -0.40177369117736816, -1.2003871202468872, -0.31690341234207153, -1.0572898387908936, -2.6249630451202393, 0.46942031383514404, -0.21194669604301453, -1.6051487922668457, 0.04816653952002525, -1.1271508932113647, 0.8715295791625977, -0.6193332076072693, -1.1070036888122559, -1.3834319114685059, 0.40260156989097595, -0.260802686214447, 0.9899442791938782, -1.6432037353515625, -0.18649785220623016, 1.2588177919387817, 0.9124070405960083, -0.5589324831962585, 0.8900343179702759, 0.25230395793914795, 0.9510689973831177, 0.769645094871521, -0.37505295872688293, 0.5592904686927795, 0.04503687843680382, -1.3752572536468506, 0.38114285469055176, 1.2582658529281616, 0.20763708651065826, 1.2417881488800049, -0.46652498841285706, 0.2563009262084961, 0.4387568533420563, -0.6291795969009399, -0.5606573820114136, -0.40681859850883484, 0.7634027004241943, -0.09120999276638031, -1.1020351648330688, -0.16778691112995148, -0.20650826394557953, -0.2960791289806366, 0.237655371427536, -1.434921383857727, -0.39669594168663025, -0.37746918201446533, -0.4204004406929016, -1.3950501680374146, 0.16008934378623962, 1.250465989112854, -0.8065391182899475, -0.2720974385738373, 0.37869954109191895, 0.3019358217716217, 0.5261702537536621, 0.5446690320968628, -0.7488669157028198, -0.2692851424217224, -0.30035558342933655, -0.26724669337272644, 0.24994590878486633, 1.130647897720337, -0.08901281654834747, -0.9549459218978882, 0.6082517504692078, -0.3348610997200012, 0.19255520403385162, 2.0501720905303955, 0.021689530462026596, -0.6958726048469543, 0.31732451915740967, -0.6734378337860107, 1.6759828329086304, 1.740462064743042, 1.1980921030044556, -0.09172752499580383, -0.7761723399162292, 0.5048385262489319, -0.25173699855804443, -0.26268884539604187, 0.967811107635498, 0.42972615361213684, -0.25577032566070557, -1.451179027557373, 0.6085523962974548, 1.3064743280410767, -0.7474315762519836, -0.7483607530593872, 0.033818021416664124, -0.9272355437278748, 1.2912354469299316, 0.6628031730651855, 0.31306973099708557, 0.2602435350418091, 1.5666019916534424, 0.7150135040283203, -0.5440152883529663, 0.5566109418869019, 0.45554959774017334, -0.16316184401512146, -2.0886998176574707, -0.9277759194374084, 0.24167045950889587, -0.3965036869049072, -1.627564787864685, 1.4332993030548096, -1.1703789234161377, -0.9882292747497559, 0.5389530062675476, 0.18913643062114716, 1.2827425003051758, 0.3044186532497406, 1.7254178524017334, 2.0943803787231445, 0.92536860704422, 0.3050879240036011, 1.1617956161499023, 0.050261955708265305, -0.4262123107910156, 1.8195176124572754, -0.457739919424057, 0.5472487211227417, 0.983525276184082, -0.4034455418586731, -1.1344945430755615, -0.8341844081878662, -1.0895519256591797, -0.665800154209137, 1.2282443046569824, 0.1420828104019165, -1.0536117553710938, 0.19560323655605316, 1.6483495235443115, 0.11025623232126236, -0.08943548798561096, 0.7753012776374817, 0.4196794033050537, -0.686014711856842, -0.08826547861099243, -0.9083547592163086, 0.5077627301216125, -0.08311570435762405, -0.28326302766799927, 0.2264600247144699, 0.5784435272216797, 1.3852784633636475, 0.01839720457792282, 0.09423019737005234, 1.1792573928833008, -1.3571611642837524, 1.5540157556533813, -0.6610617637634277, 0.26348328590393066, -2.4627492427825928, 1.426291584968567, -0.7444235682487488, 1.9798088073730469, -2.4946963787078857, 0.3845815360546112, -0.47722524404525757, -0.502580463886261, 0.22052036225795746, -0.4195535182952881, 0.09913982450962067, -0.09492211043834686, -0.9312178492546082, -0.0572807677090168, -0.8089727759361267, 0.6341772675514221, 1.2018312215805054, 1.484840750694275, -1.1869450807571411, -0.26975199580192566, -1.7156779766082764, -0.21726197004318237, -0.848294198513031, 0.43128812313079834, -1.8953684568405151, -0.16811998188495636, -2.039757251739502, -2.342130422592163, -1.4131295680999756, -0.8692864775657654, 1.0616896152496338, 0.20128601789474487, -0.9294920563697815, 1.1936862468719482, -0.3613206446170807, -1.8116557598114014, 1.2014236450195312, -2.1728434562683105 ]
https://github.com/huggingface/datasets/issues/5613
Version mismatch with multiprocess and dill on Python 3.10
Same problem on Colab using a vanilla setup running : Python 3.10.11 apache-beam 2.47.0 datasets 2.12.0
### Describe the bug Grabbing the latest version of `datasets` and `apache-beam` with `poetry` using Python 3.10 gives a crash at runtime. The crash is ``` File "/Users/adpauls/sc/git/DSI-transformers/data/NQ/create_NQ_train_vali.py", line 1, in <module> import datasets File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 65, in <module> from .arrow_reader import ArrowReader File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/download_manager.py", line 35, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 40, in <module> import multiprocess.pool File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 609, in <module> class ThreadPool(Pool): File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 611, in ThreadPool from .dummy import Process File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/dummy/__init__.py", line 87, in <module> class Condition(threading._Condition): AttributeError: module 'threading' has no attribute '_Condition'. Did you mean: 'Condition'? ``` I think this is a bad interaction of versions from `dill`, `multiprocess`, `apache-beam`, and `threading` from the Python (3.10) standard lib. Upgrading `multiprocess` to a version that does not crash like this is not possible because `apache-beam` pins `dill` to and old version: ``` Because multiprocess (0.70.10) depends on dill (>=0.3.2) and apache-beam (2.45.0) depends on dill (>=0.3.1.1,<0.3.2), multiprocess (0.70.10) is incompatible with apache-beam (2.45.0). And because no versions of apache-beam match >2.45.0,<3.0.0, multiprocess (0.70.10) is incompatible with apache-beam (>=2.45.0,<3.0.0). So, because yyy depends on both apache-beam (^2.45.0) and multiprocess (0.70.10), version solving failed. ``` Perhaps it is not right to file a bug here, but I'm not totally sure whose fault it is. And in any case, this is an immediate blocker to using `datasets` out of the box. Possibly related to https://github.com/huggingface/datasets/issues/5232. ### Steps to reproduce the bug Steps to reproduce: 1. Make a poetry project with this configuration ``` [tool.poetry] name = "yyy" version = "0.1.0" description = "" authors = ["Adam Pauls <[email protected]>"] readme = "README.md" packages = [{ include = "xxx" }] [tool.poetry.dependencies] python = ">=3.10,<3.11" datasets = "^2.10.1" apache-beam = "^2.45.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" ``` 2. `poetry install`. 3. `poetry run python -c "import datasets"`. ### Expected behavior Script runs. ### Environment info Python 3.10. Here are the versions installed by `poetry`: ``` •• Installing frozenlist (1.3.3) • Installing idna (3.4) • Installing multidict (6.0.4) • Installing aiosignal (1.3.1) • Installing async-timeout (4.0.2) • Installing attrs (22.2.0) • Installing certifi (2022.12.7) • Installing charset-normalizer (3.1.0) • Installing six (1.16.0) • Installing urllib3 (1.26.14) • Installing yarl (1.8.2) • Installing aiohttp (3.8.4) • Installing dill (0.3.1.1) • Installing docopt (0.6.2) • Installing filelock (3.9.0) • Installing numpy (1.22.4) • Installing pyparsing (3.0.9) • Installing protobuf (3.19.4) • Installing packaging (23.0) • Installing python-dateutil (2.8.2) • Installing pytz (2022.7.1) • Installing pyyaml (6.0) • Installing requests (2.28.2) • Installing tqdm (4.65.0) • Installing typing-extensions (4.5.0) • Installing cloudpickle (2.2.1) • Installing crcmod (1.7) • Installing fastavro (1.7.2) • Installing fasteners (0.18) • Installing fsspec (2023.3.0) • Installing grpcio (1.51.3) • Installing hdfs (2.7.0) • Installing httplib2 (0.20.4) • Installing huggingface-hub (0.12.1) • Installing multiprocess (0.70.9) • Installing objsize (0.6.1) • Installing orjson (3.8.7) • Installing pandas (1.5.3) • Installing proto-plus (1.22.2) • Installing pyarrow (9.0.0) • Installing pydot (1.4.2) • Installing pymongo (3.13.0) • Installing regex (2022.10.31) • Installing responses (0.18.0) • Installing xxhash (3.2.0) • Installing zstandard (0.20.0) • Installing apache-beam (2.45.0) • Installing datasets (2.10.1) ```
267
16
Version mismatch with multiprocess and dill on Python 3.10 ### Describe the bug Grabbing the latest version of `datasets` and `apache-beam` with `poetry` using Python 3.10 gives a crash at runtime. The crash is ``` File "/Users/adpauls/sc/git/DSI-transformers/data/NQ/create_NQ_train_vali.py", line 1, in <module> import datasets File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 65, in <module> from .arrow_reader import ArrowReader File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/arrow_reader.py", line 30, in <module> from .download.download_config import DownloadConfig File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/download/download_manager.py", line 35, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 40, in <module> import multiprocess.pool File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 609, in <module> class ThreadPool(Pool): File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/pool.py", line 611, in ThreadPool from .dummy import Process File "/Users/adpauls/Library/Caches/pypoetry/virtualenvs/yyy-oPbZ7mKM-py3.10/lib/python3.10/site-packages/multiprocess/dummy/__init__.py", line 87, in <module> class Condition(threading._Condition): AttributeError: module 'threading' has no attribute '_Condition'. Did you mean: 'Condition'? ``` I think this is a bad interaction of versions from `dill`, `multiprocess`, `apache-beam`, and `threading` from the Python (3.10) standard lib. Upgrading `multiprocess` to a version that does not crash like this is not possible because `apache-beam` pins `dill` to and old version: ``` Because multiprocess (0.70.10) depends on dill (>=0.3.2) and apache-beam (2.45.0) depends on dill (>=0.3.1.1,<0.3.2), multiprocess (0.70.10) is incompatible with apache-beam (2.45.0). And because no versions of apache-beam match >2.45.0,<3.0.0, multiprocess (0.70.10) is incompatible with apache-beam (>=2.45.0,<3.0.0). So, because yyy depends on both apache-beam (^2.45.0) and multiprocess (0.70.10), version solving failed. ``` Perhaps it is not right to file a bug here, but I'm not totally sure whose fault it is. And in any case, this is an immediate blocker to using `datasets` out of the box. Possibly related to https://github.com/huggingface/datasets/issues/5232. ### Steps to reproduce the bug Steps to reproduce: 1. Make a poetry project with this configuration ``` [tool.poetry] name = "yyy" version = "0.1.0" description = "" authors = ["Adam Pauls <[email protected]>"] readme = "README.md" packages = [{ include = "xxx" }] [tool.poetry.dependencies] python = ">=3.10,<3.11" datasets = "^2.10.1" apache-beam = "^2.45.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" ``` 2. `poetry install`. 3. `poetry run python -c "import datasets"`. ### Expected behavior Script runs. ### Environment info Python 3.10. Here are the versions installed by `poetry`: ``` •• Installing frozenlist (1.3.3) • Installing idna (3.4) • Installing multidict (6.0.4) • Installing aiosignal (1.3.1) • Installing async-timeout (4.0.2) • Installing attrs (22.2.0) • Installing certifi (2022.12.7) • Installing charset-normalizer (3.1.0) • Installing six (1.16.0) • Installing urllib3 (1.26.14) • Installing yarl (1.8.2) • Installing aiohttp (3.8.4) • Installing dill (0.3.1.1) • Installing docopt (0.6.2) • Installing filelock (3.9.0) • Installing numpy (1.22.4) • Installing pyparsing (3.0.9) • Installing protobuf (3.19.4) • Installing packaging (23.0) • Installing python-dateutil (2.8.2) • Installing pytz (2022.7.1) • Installing pyyaml (6.0) • Installing requests (2.28.2) • Installing tqdm (4.65.0) • Installing typing-extensions (4.5.0) • Installing cloudpickle (2.2.1) • Installing crcmod (1.7) • Installing fastavro (1.7.2) • Installing fasteners (0.18) • Installing fsspec (2023.3.0) • Installing grpcio (1.51.3) • Installing hdfs (2.7.0) • Installing httplib2 (0.20.4) • Installing huggingface-hub (0.12.1) • Installing multiprocess (0.70.9) • Installing objsize (0.6.1) • Installing orjson (3.8.7) • Installing pandas (1.5.3) • Installing proto-plus (1.22.2) • Installing pyarrow (9.0.0) • Installing pydot (1.4.2) • Installing pymongo (3.13.0) • Installing regex (2022.10.31) • Installing responses (0.18.0) • Installing xxhash (3.2.0) • Installing zstandard (0.20.0) • Installing apache-beam (2.45.0) • Installing datasets (2.10.1) ``` Same problem on Colab using a vanilla setup running : Python 3.10.11 apache-beam 2.47.0 datasets 2.12.0
[ -1.2203803062438965, -0.8654314875602722, -0.62025386095047, 1.36741042137146, -0.11054454743862152, -1.3439956903457642, 0.06198142096400261, -1.014704942703247, 1.522252082824707, -0.6576555967330933, 0.19666792452335358, -1.6717911958694458, -0.2024473398923874, -0.36462289094924927, -0.6268512606620789, -0.835181713104248, -0.3324916660785675, -0.9709782004356384, 0.9970691800117493, 2.534348487854004, 1.3047358989715576, -1.266240119934082, 2.80416202545166, 0.648078203201294, -0.3425275981426239, -0.9344300031661987, 0.5873773097991943, 0.004488030448555946, -1.3212032318115234, -0.43778252601623535, -0.8927027583122253, 0.004658604972064495, -0.5885247588157654, -0.3762594163417816, 0.21678473055362701, 0.46770647168159485, -0.2355973720550537, -0.1842889040708542, -0.6124379634857178, -0.6677858829498291, 0.5130813717842102, -0.34843510389328003, 0.9635815024375916, -0.3126453757286072, 1.7182188034057617, -0.6355059742927551, 0.33807963132858276, 0.7413142919540405, 1.2443236112594604, 0.07757861167192459, 0.10071803629398346, 0.25696253776550293, 0.3370567858219147, -0.04728096351027489, 0.5608981251716614, 1.308937907218933, 0.5242562294006348, 0.5434370040893555, 0.6583207249641418, -2.1989386081695557, 1.4059876203536987, -0.776667058467865, 0.221205472946167, 1.354369044303894, -0.7890998125076294, 0.42901256680488586, -1.7818198204040527, -0.05357759818434715, 0.5334230065345764, -2.309522867202759, 0.3029678761959076, -1.3016109466552734, -0.5890030264854431, 0.8527214527130127, 0.2770756781101227, -1.200825572013855, 0.15251265466213226, -0.5298209190368652, 1.0903626680374146, 0.5103176236152649, 1.1828703880310059, -1.6017987728118896, -0.07521575689315796, -0.11205507814884186, 0.10471387952566147, -1.3711329698562622, -1.7474982738494873, 0.5447812676429749, 0.5903922915458679, 0.8125520348548889, -0.10670370608568192, 1.0131990909576416, -1.085853934288025, 0.8141329288482666, -0.8383902907371521, -1.5782005786895752, -1.355546236038208, -2.4645445346832275, -2.286175489425659, 0.7921469807624817, -0.5495415925979614, -0.4607974886894226, 1.97315514087677, -0.9925084710121155, -1.8555810451507568, 0.9766654968261719, 0.35008329153060913, 0.06102059409022331, 2.358625888824463, 0.24946826696395874, -0.7333319783210754, 0.36964622139930725, -0.7024034857749939, 0.832788348197937, -0.3757575750350952, 1.1767362356185913, 0.5682936906814575, -0.8967626690864563, 1.5753488540649414, -0.5521896481513977, 0.5907837748527527, -0.7181021571159363, -0.5374283194541931, -0.8199702501296997, 0.2623029053211212, 1.8024952411651611, -0.4364493489265442, 1.5344082117080688, -0.25084295868873596, -1.556962251663208, -1.540755271911621, 0.7535144090652466, 0.48525944352149963, -0.8895766139030457, 0.08345292508602142, -0.4862571060657501, 0.168425053358078, -0.03078998625278473, 1.092969298362732, 1.1669260263442993, 0.721365213394165, -0.2738088369369507, -0.8588415384292603, 0.2853719890117645, -0.17608052492141724, -0.6345193386077881, -1.848305344581604, -0.341605544090271, 0.24723723530769348, 0.6162375807762146, -1.1638199090957642, 1.9089243412017822, 0.9354294538497925, 2.046269655227661, 0.8265497088432312, -0.4882909059524536, 1.4447749853134155, -0.014749793335795403, 1.7893472909927368, -0.4854460656642914, 0.5848780870437622, -0.399763286113739, -1.1448794603347778, 0.8811526894569397, -0.3690583109855652, -1.8994840383529663, -0.7519515752792358, -0.8706488013267517, -0.12685120105743408, -0.7720752954483032, 0.812553346157074, -0.2917396128177643, -1.4363211393356323, 0.022539108991622925, -0.6752119064331055, 0.12593939900398254, -1.2548160552978516, 0.11529909074306488, 0.6921917200088501, -0.666375458240509, -0.11447145789861679, -0.32342982292175293, -1.3335155248641968, -0.5449685454368591, 0.40527328848838806, 1.9282419681549072, -0.48270025849342346, 1.0548126697540283, 0.9973871111869812, -0.8046829104423523, 0.14633159339427948, 0.2277860939502716, -0.36708930134773254, 0.7927342057228088, -1.1477659940719604, -0.34504470229148865, 1.0457056760787964, -0.20429515838623047, -0.7087848782539368, 1.459027886390686, 0.820851743221283, -1.182792067527771, -0.2782891094684601, -0.31976690888404846, -0.8348529934883118, -0.021625440567731857, -1.4927059412002563, -0.20522086322307587, 0.349068284034729, -1.406740427017212, -0.3605514168739319, -0.18932583928108215, 1.3958740234375, -0.2252056747674942, 1.5032192468643188, -0.27083057165145874, -0.16662383079528809, -0.3647242784500122, -0.4770132005214691, 0.22045224905014038, -0.18767260015010834, -0.5495008230209351, 0.20149840414524078, -0.8271880745887756, 0.2562553286552429, 1.6033861637115479, 0.2676786482334137, 0.06874800473451614, 0.44517067074775696, 1.1271088123321533, 0.39468735456466675, 0.011944844387471676, -0.9658231735229492, -1.5331183671951294, 1.8372775316238403, -1.4711816310882568, 1.843544840812683, 0.7367867827415466, -0.0785103291273117, -1.8273144960403442, -1.9249746799468994, 1.190794825553894, 1.1197470426559448, 2.3821306228637695, 0.5271624326705933, 0.4340570569038391, -0.727047860622406, -0.8753479719161987, 0.34420230984687805, -0.9743965268135071, -0.6306157112121582, 0.22146832942962646, 2.2637813091278076, 1.7675111293792725, -0.6407636404037476, -0.3192470073699951, -0.7638610601425171, 1.2850526571273804, -0.21562521159648895, 0.18383555114269257, 2.1450066566467285, -0.32770058512687683, -1.022905945777893, 1.3364909887313843, -2.392707347869873, 0.33199283480644226, 2.0076470375061035, 0.2222255915403366, 0.19387605786323547, -1.370741605758667, -0.6613083481788635, -0.35276612639427185, -0.5322264432907104, -1.2458385229110718, 0.5701233744621277, -0.26501262187957764, -0.8820847868919373, -1.4513452053070068, 0.03739926591515541, -1.1785801649093628, -1.872766375541687, 0.3273583948612213, 1.9963995218276978, 2.092693567276001, -0.8745440244674683, 1.25192129611969, -0.1853613406419754, -0.09924445301294327, 1.341440200805664, 1.3313542604446411, 3.0791208744049072, 1.8811089992523193, -1.2489718198776245, 0.8005971312522888, -0.2302679568529129, -0.46629929542541504, 1.1603533029556274, -1.1119354963302612, 0.9683908820152283, -0.18715626001358032, -1.1991008520126343, -1.1782864332199097, 1.1197998523712158, 0.469769150018692, 0.047008149325847626, -0.44915884733200073, 1.2951031923294067, 0.1885581761598587, 1.4945626258850098, 0.6175839304924011, -0.4330146610736847, 0.5591781139373779, -0.3089730441570282, -0.5383286476135254, 1.7036638259887695, 0.2030344009399414, -1.5572999715805054, -2.451176881790161, -0.3133678436279297, -0.9864256381988525, -0.04200063645839691, -0.6427422165870667, -1.0701738595962524, 1.506774663925171, 0.488893985748291, -1.0919569730758667, -0.20437373220920563, -0.3283998668193817, -0.4892270267009735, 2.6316003799438477, -1.238179087638855, -0.07339482754468918, -0.9325404763221741, -0.4185329079627991, 1.5611377954483032, -1.2103493213653564, -0.2843174636363983, -1.041930913925171, -0.5861935019493103, -1.357981562614441, -0.4684078097343445, 0.04457170516252518, -0.9414166212081909, 0.6927157044410706, 0.12840363383293152, -1.066942572593689, -0.29737263917922974, -0.9000424146652222, 1.087892770767212, -0.03371897712349892, 0.16148409247398376, 1.9182918071746826, 0.31209316849708557, -0.43416115641593933, 0.7690322995185852, 1.2015259265899658, 0.5236920714378357, -0.6551193594932556, 0.0088052274659276, -0.7350035905838013, 0.34349963068962097, -1.387012004852295, 0.1931372880935669, -2.9999477863311768, 0.780487596988678, -0.23208120465278625, -0.12817291915416718, -0.22158995270729065, -1.3331767320632935, 1.013290524482727, 2.5344033241271973, -1.0506855249404907, 0.5521630644798279, 0.41605496406555176, 1.12893807888031, -1.5948877334594727, 0.23396743834018707, -0.5233166217803955, 2.025963544845581, 0.10707253962755203, 1.2434639930725098, -0.5558613538742065, -2.2487363815307617, 0.5433675050735474, -1.1718018054962158, -0.9453188180923462, 0.8654136657714844, -0.8176044225692749, 0.3284573256969452, -1.45954430103302, -0.03738678619265556, -0.936669647693634, -1.2622917890548706, 0.6801168322563171, 0.0005655279383063316, 0.45797863602638245, -0.5613241195678711, 0.4036734402179718, -2.1653642654418945, -1.396957516670227, -0.22019058465957642, -0.9760021567344666, 0.6406837105751038, -0.3278017044067383, 0.6311571598052979, 0.0011868532747030258, 0.18924832344055176, 0.2877708375453949, 1.4906511306762695, 3.326429843902588, 0.06573940068483353, 0.1803525984287262, -0.050042904913425446, -1.1101046800613403, 1.375279426574707, 0.9784134030342102, -0.16559234261512756, -0.6141249537467957, -1.0497678518295288, 1.361299753189087, 1.9981237649917603, 1.1741660833358765, 0.1694744974374771, -0.8308836817741394, -0.7622958421707153, 0.021060161292552948, 0.19894370436668396, 0.5176088809967041, 1.0093588829040527, 0.019701290875673294, 0.12095840275287628, 1.3576010465621948, 1.2078988552093506, -0.3196156919002533, 0.40980666875839233, -0.9767906069755554, -0.37505796551704407, 0.3556972146034241, 0.17096692323684692, 0.06133582815527916, 0.48503923416137695, -1.0151166915893555, -0.34068724513053894, -0.2404375523328781, -0.9020890593528748, -0.8592174053192139, -0.3590772747993469, -0.437921941280365, 1.6215702295303345, 0.045599594712257385, -0.51686030626297, 0.09653379023075104, -0.6415908336639404, -0.1260114163160324, -1.1528040170669556, 0.15868084132671356, -0.15975303947925568, 0.0024820836260914803, -0.08387665450572968, 1.5980794429779053, -0.9212555289268494, -2.020106792449951, 0.19117547571659088, 0.3669288158416748, -0.36712104082107544, 0.14465433359146118, 1.8087037801742554, 0.5435834527015686, 1.3574984073638916, 1.284604549407959, 1.0229520797729492, -0.5349066257476807, -1.241110920906067, 0.8198596835136414, 0.9411278367042542, -1.364977478981018, 0.972235381603241, -0.22052842378616333, -0.5646333694458008, 0.6385588645935059, 1.397792935371399, 0.3190302550792694, -2.0994887351989746, 0.9342994689941406, -0.944481372833252, 0.7963171601295471, 0.7326968312263489, 0.9038678407669067, 0.1920710653066635, 0.8186736702919006, -1.310519814491272, -1.170988917350769, -0.6366679668426514, -0.6017049551010132, 1.8300549983978271, -0.2084132730960846, 0.5317971706390381, -0.32233330607414246, -1.1956217288970947, -0.1821133941411972, 0.7919753193855286, 0.411011666059494, -0.43195709586143494, 0.97552090883255, -0.5992083549499512, -0.9574962258338928, -1.2391581535339355, -0.42185285687446594, -1.0382349491119385, -0.843959629535675, 0.9712091684341431, 0.8059073090553284, 0.49776405096054077, 1.991021752357483, 0.5369932651519775, 0.37682121992111206, -2.5955398082733154, 0.9125909209251404, 0.2920619547367096, -0.03169245645403862, 0.893733561038971, 0.2151854783296585, 1.1451631784439087, -0.08163311332464218, 0.5955718755722046, -2.3499844074249268, 2.2004504203796387, -0.19383493065834045, 0.6605480909347534, 0.10353142768144608, -0.2014589011669159, 1.1446983814239502, 0.5997629761695862, 0.6413573622703552, -1.1706961393356323, 0.7562477588653564, -0.6769570112228394, 1.0490641593933105, 0.9703813195228577, -0.9838201403617859, 0.12361441552639008, 1.4192169904708862, 0.5049707293510437, -0.37917760014533997, -0.9837788939476013, -0.8810086250305176, 1.0246527194976807, 1.6885579824447632, -0.03317121043801308, 0.027355991303920746, 0.8009495735168457, 0.6765939593315125, -1.1975151300430298, 0.10810675472021103, -0.6899704337120056, -0.6212231516838074, 1.8045564889907837, 1.9867393970489502, -0.08666004240512848, -0.20973099768161774, -0.7283502221107483, -1.317579984664917, 0.7931012511253357, -0.07018738240003586, 0.025795631110668182, 0.7091445922851562, -0.6849113702774048, 1.1685882806777954, 0.5544558763504028, 1.0518381595611572, -0.0024590897373855114, 0.3013458251953125, 0.2163306176662445, -0.40177369117736816, -1.2003871202468872, -0.31690341234207153, -1.0572898387908936, -2.6249630451202393, 0.46942031383514404, -0.21194669604301453, -1.6051487922668457, 0.04816653952002525, -1.1271508932113647, 0.8715295791625977, -0.6193332076072693, -1.1070036888122559, -1.3834319114685059, 0.40260156989097595, -0.260802686214447, 0.9899442791938782, -1.6432037353515625, -0.18649785220623016, 1.2588177919387817, 0.9124070405960083, -0.5589324831962585, 0.8900343179702759, 0.25230395793914795, 0.9510689973831177, 0.769645094871521, -0.37505295872688293, 0.5592904686927795, 0.04503687843680382, -1.3752572536468506, 0.38114285469055176, 1.2582658529281616, 0.20763708651065826, 1.2417881488800049, -0.46652498841285706, 0.2563009262084961, 0.4387568533420563, -0.6291795969009399, -0.5606573820114136, -0.40681859850883484, 0.7634027004241943, -0.09120999276638031, -1.1020351648330688, -0.16778691112995148, -0.20650826394557953, -0.2960791289806366, 0.237655371427536, -1.434921383857727, -0.39669594168663025, -0.37746918201446533, -0.4204004406929016, -1.3950501680374146, 0.16008934378623962, 1.250465989112854, -0.8065391182899475, -0.2720974385738373, 0.37869954109191895, 0.3019358217716217, 0.5261702537536621, 0.5446690320968628, -0.7488669157028198, -0.2692851424217224, -0.30035558342933655, -0.26724669337272644, 0.24994590878486633, 1.130647897720337, -0.08901281654834747, -0.9549459218978882, 0.6082517504692078, -0.3348610997200012, 0.19255520403385162, 2.0501720905303955, 0.021689530462026596, -0.6958726048469543, 0.31732451915740967, -0.6734378337860107, 1.6759828329086304, 1.740462064743042, 1.1980921030044556, -0.09172752499580383, -0.7761723399162292, 0.5048385262489319, -0.25173699855804443, -0.26268884539604187, 0.967811107635498, 0.42972615361213684, -0.25577032566070557, -1.451179027557373, 0.6085523962974548, 1.3064743280410767, -0.7474315762519836, -0.7483607530593872, 0.033818021416664124, -0.9272355437278748, 1.2912354469299316, 0.6628031730651855, 0.31306973099708557, 0.2602435350418091, 1.5666019916534424, 0.7150135040283203, -0.5440152883529663, 0.5566109418869019, 0.45554959774017334, -0.16316184401512146, -2.0886998176574707, -0.9277759194374084, 0.24167045950889587, -0.3965036869049072, -1.627564787864685, 1.4332993030548096, -1.1703789234161377, -0.9882292747497559, 0.5389530062675476, 0.18913643062114716, 1.2827425003051758, 0.3044186532497406, 1.7254178524017334, 2.0943803787231445, 0.92536860704422, 0.3050879240036011, 1.1617956161499023, 0.050261955708265305, -0.4262123107910156, 1.8195176124572754, -0.457739919424057, 0.5472487211227417, 0.983525276184082, -0.4034455418586731, -1.1344945430755615, -0.8341844081878662, -1.0895519256591797, -0.665800154209137, 1.2282443046569824, 0.1420828104019165, -1.0536117553710938, 0.19560323655605316, 1.6483495235443115, 0.11025623232126236, -0.08943548798561096, 0.7753012776374817, 0.4196794033050537, -0.686014711856842, -0.08826547861099243, -0.9083547592163086, 0.5077627301216125, -0.08311570435762405, -0.28326302766799927, 0.2264600247144699, 0.5784435272216797, 1.3852784633636475, 0.01839720457792282, 0.09423019737005234, 1.1792573928833008, -1.3571611642837524, 1.5540157556533813, -0.6610617637634277, 0.26348328590393066, -2.4627492427825928, 1.426291584968567, -0.7444235682487488, 1.9798088073730469, -2.4946963787078857, 0.3845815360546112, -0.47722524404525757, -0.502580463886261, 0.22052036225795746, -0.4195535182952881, 0.09913982450962067, -0.09492211043834686, -0.9312178492546082, -0.0572807677090168, -0.8089727759361267, 0.6341772675514221, 1.2018312215805054, 1.484840750694275, -1.1869450807571411, -0.26975199580192566, -1.7156779766082764, -0.21726197004318237, -0.848294198513031, 0.43128812313079834, -1.8953684568405151, -0.16811998188495636, -2.039757251739502, -2.342130422592163, -1.4131295680999756, -0.8692864775657654, 1.0616896152496338, 0.20128601789474487, -0.9294920563697815, 1.1936862468719482, -0.3613206446170807, -1.8116557598114014, 1.2014236450195312, -2.1728434562683105 ]
https://github.com/huggingface/datasets/issues/5612
Arrow map type in parquet files unsupported
I'm attaching a minimal reproducible example: ```python from datasets import load_dataset import pyarrow as pa import pyarrow.parquet as pq table_with_map = pa.Table.from_pydict( {"a": [1, 2], "b": [[("a", 2)], [("b", 4)]]}, schema=pa.schema({"a": pa.int32(), "b": pa.map_(pa.string(), pa.int32())}) ) pq.write_table(table_with_map, "parquet_with_map.parquet") dset = load_dataset("parquet", data_files="parquet_with_map.parquet", split="train") # error unless streaming=True ``` For a dataset generated with the packaged loaders (CSV, JSON, Parquet), `streaming=True` sets the dataset's features to `None` (unless explicitly provided in `load_dataset`), hence no error will be thrown as long as the features stay "unresolved" (resolving the features with `_resolve_features` will lead to an error).
### Describe the bug When I try to load parquet files that were processed with Spark, I get the following issue: `ValueError: Arrow type map<string, string ('warc_headers')> does not have a datasets dtype equivalent.` Strangely, loading the dataset with `streaming=True` solves the issue. ### Steps to reproduce the bug The dataset is private, but this can be reproduced with any dataset that has Arrow maps. ### Expected behavior Loading the dataset no matter whether streaming is True or not. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-5.15.0-1029-gcp-x86_64-with-glibc2.31 - Python version: 3.10.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2
268
94
Arrow map type in parquet files unsupported ### Describe the bug When I try to load parquet files that were processed with Spark, I get the following issue: `ValueError: Arrow type map<string, string ('warc_headers')> does not have a datasets dtype equivalent.` Strangely, loading the dataset with `streaming=True` solves the issue. ### Steps to reproduce the bug The dataset is private, but this can be reproduced with any dataset that has Arrow maps. ### Expected behavior Loading the dataset no matter whether streaming is True or not. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-5.15.0-1029-gcp-x86_64-with-glibc2.31 - Python version: 3.10.7 - PyArrow version: 8.0.0 - Pandas version: 1.4.2 I'm attaching a minimal reproducible example: ```python from datasets import load_dataset import pyarrow as pa import pyarrow.parquet as pq table_with_map = pa.Table.from_pydict( {"a": [1, 2], "b": [[("a", 2)], [("b", 4)]]}, schema=pa.schema({"a": pa.int32(), "b": pa.map_(pa.string(), pa.int32())}) ) pq.write_table(table_with_map, "parquet_with_map.parquet") dset = load_dataset("parquet", data_files="parquet_with_map.parquet", split="train") # error unless streaming=True ``` For a dataset generated with the packaged loaders (CSV, JSON, Parquet), `streaming=True` sets the dataset's features to `None` (unless explicitly provided in `load_dataset`), hence no error will be thrown as long as the features stay "unresolved" (resolving the features with `_resolve_features` will lead to an error).
[ -1.2015632390975952, -0.8567219972610474, -0.6773289442062378, 1.4378821849822998, -0.18681499361991882, -1.2755796909332275, 0.20724272727966309, -1.0972925424575806, 1.644755244255066, -0.8304726481437683, 0.3374823331832886, -1.66536283493042, 0.08009473234415054, -0.5665971636772156, -0.7289941310882568, -0.8500356078147888, -0.45145148038864136, -0.7479646801948547, 1.0669859647750854, 2.5003721714019775, 1.2221887111663818, -1.3850563764572144, 2.7298123836517334, 0.7259371280670166, -0.17843039333820343, -0.9396824240684509, 0.559249222278595, -0.046951036900281906, -1.3576585054397583, -0.37929192185401917, -0.9999432563781738, -0.1394091248512268, -0.519558846950531, -0.554111897945404, 0.029516924172639847, 0.3967931568622589, -0.2936953604221344, -0.4821642339229584, -0.5449439883232117, -0.8157380223274231, 0.45092570781707764, -0.3333342671394348, 0.9539695978164673, -0.38379958271980286, 1.8003714084625244, -0.5923315286636353, 0.522127628326416, 0.7383570075035095, 1.3055500984191895, 0.23065267503261566, -0.03808031231164932, 0.40780889987945557, 0.4227551221847534, -0.022289711982011795, 0.5887091755867004, 1.1168073415756226, 0.6588565707206726, 0.5025993585586548, 0.7722247838973999, -2.2225446701049805, 1.2997478246688843, -1.062873363494873, 0.28285080194473267, 1.339771032333374, -0.906091034412384, 0.34679511189460754, -1.7036843299865723, -0.044679902493953705, 0.5583871603012085, -2.2666594982147217, 0.27255746722221375, -1.4051001071929932, -0.5560128688812256, 1.0336064100265503, 0.4135179817676544, -1.1899555921554565, 0.10740573704242706, -0.3639357388019562, 0.9878458976745605, 0.41453349590301514, 1.1522563695907593, -1.6842241287231445, -0.0457003228366375, -0.329243004322052, 0.11949706822633743, -1.223612666130066, -1.5394630432128906, 0.5569977760314941, 0.6685037612915039, 0.5579923987388611, -0.10997610539197922, 1.023485779762268, -1.102033257484436, 0.7501039505004883, -0.9886817336082458, -1.705269455909729, -1.4003700017929077, -2.2982349395751953, -2.260565996170044, 0.7151515483856201, -0.5062830448150635, -0.42954960465431213, 2.10760235786438, -1.045236587524414, -1.661702036857605, 1.1247724294662476, 0.23402169346809387, -0.05863723158836365, 2.3847014904022217, 0.273536741733551, -0.6581249237060547, 0.45967233180999756, -0.7815900444984436, 0.7325319647789001, -0.3715977668762207, 1.2806514501571655, 0.3762204051017761, -1.071047067642212, 1.5851601362228394, -0.3798886835575104, 0.5960974097251892, -0.5533111691474915, -0.459496408700943, -0.6538950204849243, 0.2873966097831726, 1.9266310930252075, -0.2998746931552887, 1.4898890256881714, -0.32096928358078003, -1.5670181512832642, -1.6194020509719849, 0.911655068397522, 0.47252941131591797, -0.739253044128418, 0.13055597245693207, -0.3474520146846771, 0.10377851873636246, -0.07469551265239716, 1.1949185132980347, 1.2470102310180664, 0.8129027485847473, -0.4134393334388733, -0.8570675849914551, 0.1806710958480835, 0.0002858079969882965, -0.7916903495788574, -1.7141402959823608, -0.3437688648700714, 0.07200398296117783, 0.6301379203796387, -1.1336420774459839, 1.8175804615020752, 0.8932808637619019, 1.8694531917572021, 1.0278962850570679, -0.3737785816192627, 1.4988176822662354, 0.11913170665502548, 1.827319860458374, -0.5092405080795288, 0.6293358206748962, -0.4173094630241394, -1.1980963945388794, 0.8326363563537598, -0.314071387052536, -2.076833963394165, -0.6976220607757568, -0.7443269491195679, -0.22479337453842163, -0.7830854058265686, 0.9315192699432373, -0.33596184849739075, -1.4140236377716064, 0.20771880447864532, -0.7255224585533142, 0.07330550998449326, -1.2385755777359009, 0.3355844020843506, 0.7139026522636414, -0.609272837638855, 0.06181880831718445, -0.26342257857322693, -1.263698935508728, -0.399070143699646, 0.2613958418369293, 1.8888388872146606, -0.7543266415596008, 0.9453534483909607, 1.0985853672027588, -0.6954472064971924, -0.0719822496175766, 0.2823500633239746, -0.3559722602367401, 0.8065372705459595, -1.0036917924880981, -0.4883034825325012, 1.1519070863723755, -0.15497559309005737, -0.5648605227470398, 1.4390877485275269, 0.690410852432251, -1.0137304067611694, -0.24040542542934418, -0.14619112014770508, -0.8139011859893799, 0.08267753571271896, -1.5849392414093018, -0.0969790667295456, 0.4537889361381531, -1.5984530448913574, -0.4872699975967407, -0.13899867236614227, 1.3043732643127441, -0.13233040273189545, 1.4031710624694824, -0.4566335082054138, -0.20711497962474823, -0.3465818464756012, -0.37734776735305786, 0.21044805645942688, -0.18857063353061676, -0.6038702130317688, 0.15982936322689056, -0.7791538238525391, 0.2766427993774414, 1.47860586643219, 0.2898041903972626, 0.08046542853116989, 0.5157158374786377, 1.0287940502166748, 0.43475082516670227, -0.03512798994779587, -0.8751524686813354, -1.5852311849594116, 2.083441972732544, -1.476027488708496, 2.027198553085327, 0.7459906339645386, -0.048667456954717636, -1.87423574924469, -1.9228435754776, 1.3280062675476074, 1.136444330215454, 2.282737970352173, 0.4307469129562378, 0.41333675384521484, -0.8221009373664856, -0.6729797124862671, 0.4265481233596802, -0.9545863270759583, -0.6705724000930786, 0.18305863440036774, 2.3669111728668213, 1.721971869468689, -0.43865564465522766, -0.1598445028066635, -0.9570444822311401, 1.4485256671905518, -0.17217539250850677, 0.22517666220664978, 1.9968039989471436, -0.30296775698661804, -1.0179144144058228, 1.3194776773452759, -2.375887632369995, 0.1607871949672699, 2.0125813484191895, 0.23620301485061646, 0.05744650214910507, -1.306056261062622, -0.6600731611251831, -0.29761675000190735, -0.4276079833507538, -1.217456579208374, 0.5656479597091675, -0.23989291489124298, -0.7629319429397583, -1.4236557483673096, 0.162650927901268, -1.1324368715286255, -1.7869585752487183, 0.19875459372997284, 1.868579387664795, 2.0440685749053955, -0.793273389339447, 1.5603433847427368, -0.4028208553791046, 0.1753069907426834, 1.2368594408035278, 1.2144221067428589, 3.0502216815948486, 1.8569127321243286, -1.3159774541854858, 0.7027652263641357, -0.08861570805311203, -0.45085033774375916, 1.1224724054336548, -1.1782252788543701, 1.3105190992355347, -0.053728871047496796, -1.1571531295776367, -1.1346529722213745, 0.9176874756813049, 0.46019473671913147, 0.0384179912507534, -0.3809332251548767, 1.2083908319473267, 0.09952304512262344, 1.3744165897369385, 0.6112959384918213, -0.30327439308166504, 0.6361011266708374, -0.31916680932044983, -0.5392534732818604, 1.4975368976593018, 0.25022265315055847, -1.4106788635253906, -2.2581145763397217, -0.25953710079193115, -0.8608010411262512, 0.08231004327535629, -0.6383275985717773, -0.9772796034812927, 1.6797637939453125, 0.3727841079235077, -1.2371400594711304, -0.22351816296577454, -0.36422231793403625, -0.44700169563293457, 2.7412846088409424, -1.4094294309616089, -0.22877512872219086, -0.9919941425323486, -0.7096548676490784, 1.630204439163208, -1.2761375904083252, -0.15606413781642914, -1.0543313026428223, -0.4368816316127777, -1.2938969135284424, -0.5181430578231812, 0.014049910940229893, -0.9490929245948792, 0.8409013152122498, 0.1619603931903839, -1.2126027345657349, -0.4215288758277893, -0.9516444206237793, 0.8837225437164307, -0.12517757713794708, 0.1659337431192398, 1.92156982421875, 0.3353414535522461, -0.41488584876060486, 0.6987640261650085, 1.1315616369247437, 0.6507846713066101, -0.5925758481025696, 0.2744613587856293, -0.6531426310539246, 0.36560818552970886, -1.2908918857574463, 0.1953512579202652, -2.8503777980804443, 0.6151233911514282, -0.11712897568941116, -0.05105508118867874, -0.08840060979127884, -1.380695104598999, 1.0112073421478271, 2.53031587600708, -1.199654459953308, 0.4857487976551056, 0.32905182242393494, 1.229649305343628, -1.5648210048675537, 0.28323253989219666, -0.4092880189418793, 2.1180546283721924, 0.23595896363258362, 1.118539810180664, -0.43681973218917847, -2.2605245113372803, 0.6342294812202454, -1.2749109268188477, -1.1316732168197632, 0.720024824142456, -0.8460185527801514, 0.15634021162986755, -1.3623254299163818, -0.19861768186092377, -0.8194018006324768, -1.1384567022323608, 0.5831480622291565, 0.15309841930866241, 0.45042985677719116, -0.641543984413147, 0.31084898114204407, -2.177851915359497, -1.339641809463501, -0.18658818304538727, -0.8506919741630554, 0.5064987540245056, -0.3110138475894928, 0.7384437918663025, -0.23603543639183044, 0.01879848912358284, 0.38859352469444275, 1.4243896007537842, 3.471496105194092, 0.1431533843278885, 0.32312247157096863, -0.2923104166984558, -0.9688658118247986, 1.473179817199707, 0.8912500143051147, -0.14022685587406158, -0.536797046661377, -1.0791730880737305, 1.2292894124984741, 1.9572405815124512, 1.0126781463623047, -0.026453088968992233, -0.8059878945350647, -0.7586919665336609, 0.005331413820385933, 0.1636427789926529, 0.44767114520072937, 0.9481595158576965, 0.07880806922912598, 0.10371775180101395, 1.4827412366867065, 1.141257405281067, -0.41141438484191895, 0.322454035282135, -0.8190257549285889, -0.48695552349090576, 0.5442856550216675, 0.355508029460907, -0.027382373809814453, 0.33608052134513855, -0.9533397555351257, -0.25610169768333435, -0.40994346141815186, -0.9075257182121277, -0.6916942000389099, -0.44410842657089233, -0.3797750771045685, 1.6481260061264038, 0.13230715692043304, -0.5274168848991394, -0.035051893442869186, -0.7827183604240417, -0.09434609115123749, -1.0718437433242798, 0.2798285186290741, -0.15739436447620392, -0.08591098338365555, -0.11503534018993378, 1.794302225112915, -0.9084730744361877, -2.0009610652923584, 0.2059534192085266, 0.2196102738380432, -0.23856377601623535, 0.20980538427829742, 1.6655614376068115, 0.5746558308601379, 1.4031208753585815, 1.3623766899108887, 0.878506600856781, -0.6573315858840942, -1.3183971643447876, 0.669503927230835, 1.0298198461532593, -1.436356544494629, 0.7543930411338806, 0.023751497268676758, -0.5016590356826782, 0.6134922504425049, 1.2759736776351929, 0.5397089719772339, -2.0549240112304688, 0.8158236145973206, -0.9640211462974548, 0.7540119886398315, 0.753390371799469, 0.6694958806037903, 0.17051614820957184, 0.8241601586341858, -1.2014435529708862, -1.161073923110962, -0.708113968372345, -0.7235537171363831, 1.9359822273254395, -0.310054212808609, 0.612757682800293, -0.27316418290138245, -1.3717572689056396, -0.05600658431649208, 0.6742255091667175, 0.3086801767349243, -0.5344632863998413, 0.7824657559394836, -0.663733184337616, -1.102627158164978, -1.3795042037963867, -0.4506044387817383, -1.1085153818130493, -0.9680661559104919, 1.0402809381484985, 0.8120383620262146, 0.32309743762016296, 1.8967745304107666, 0.6408773064613342, 0.22191449999809265, -2.572070360183716, 0.8488494753837585, 0.2586003541946411, -0.05623843893408775, 0.8629360795021057, 0.32093459367752075, 1.0346871614456177, -0.0775240808725357, 0.5550462007522583, -2.438943862915039, 2.3445208072662354, -0.21195901930332184, 0.7398930191993713, 0.0019807852804660797, -0.1672970950603485, 1.083221435546875, 0.6376692056655884, 0.5491864085197449, -1.0322409868240356, 0.564172089099884, -0.6105350852012634, 1.2837104797363281, 0.9262272119522095, -0.8333983421325684, -0.005387715995311737, 1.3927313089370728, 0.4792858362197876, -0.5768728256225586, -0.9413546323776245, -1.0471737384796143, 0.9192094206809998, 1.7374780178070068, -0.09487013518810272, 0.015676096081733704, 0.788174569606781, 0.681878924369812, -1.2879724502563477, 0.034329596906900406, -0.7298656105995178, -0.7762100696563721, 1.6673465967178345, 2.108729839324951, -0.19045871496200562, -0.08734703809022903, -0.6869169473648071, -1.3069427013397217, 0.8237684369087219, -0.06399796158075333, 0.09136201441287994, 0.6423924565315247, -0.590602457523346, 1.0939867496490479, 0.8362038731575012, 0.9440227746963501, 0.288754940032959, 0.2655496299266815, 0.3052230775356293, -0.3418710231781006, -1.1605031490325928, -0.26573851704597473, -1.0755709409713745, -2.5389320850372314, 0.46810904145240784, -0.2422548234462738, -1.4505325555801392, -0.04146542027592659, -1.0508512258529663, 0.9112183451652527, -0.5577695965766907, -1.0113009214401245, -1.4085359573364258, 0.2232944816350937, 0.008240981958806515, 0.9741841554641724, -1.5762125253677368, -0.16095209121704102, 1.239548683166504, 0.942857563495636, -0.6920949816703796, 1.0164482593536377, 0.23979146778583527, 1.0729502439498901, 0.8363325595855713, -0.3660903871059418, 0.5649550557136536, 0.021370593458414078, -1.3821749687194824, 0.41985902190208435, 1.2781394720077515, 0.20577913522720337, 1.4848607778549194, -0.5091698169708252, 0.0973702073097229, 0.3813137114048004, -0.5945723056793213, -0.4423910677433014, -0.5524104237556458, 0.6808258295059204, -0.037400562316179276, -0.9340382218360901, -0.0017852084711194038, 0.01583995297551155, -0.2620811462402344, 0.19376404583454132, -1.4691423177719116, -0.12439627200365067, -0.3940383791923523, -0.6338915824890137, -1.2704880237579346, -0.17510013282299042, 1.4273078441619873, -0.7742635607719421, -0.1718427836894989, 0.4629860818386078, 0.33161649107933044, 0.5631642937660217, 0.6526965498924255, -0.7276266813278198, -0.32951444387435913, -0.19170598685741425, -0.3774689733982086, 0.3375566601753235, 1.387025237083435, -0.0915546789765358, -0.933675229549408, 0.6615540981292725, -0.3180784583091736, 0.08349620550870895, 1.9300878047943115, 0.10911674052476883, -0.7631868124008179, 0.27342453598976135, -0.7103292942047119, 1.9123905897140503, 1.7920575141906738, 1.303562045097351, -0.10761067271232605, -0.9208194017410278, 0.6485280394554138, -0.3565712869167328, -0.3730667233467102, 0.8898723125457764, 0.32676151394844055, -0.24668847024440765, -1.419427514076233, 0.7336429953575134, 1.2321081161499023, -0.8317584991455078, -0.8172755837440491, 0.0908249169588089, -0.7739318609237671, 1.102134108543396, 0.6516972184181213, 0.3857153058052063, 0.31775474548339844, 1.6319775581359863, 0.8129971623420715, -0.4935138523578644, 0.5056198239326477, 0.561410129070282, -0.1469954401254654, -2.1341285705566406, -1.1382038593292236, 0.3565496802330017, -0.5811039805412292, -1.646981954574585, 1.4492576122283936, -1.1480474472045898, -1.0162177085876465, 0.5315747261047363, 0.03539294749498367, 1.3169105052947998, 0.36490973830223083, 1.5608028173446655, 2.0348212718963623, 0.9068526029586792, 0.418993204832077, 1.2930688858032227, -0.14622917771339417, -0.43410444259643555, 1.7652719020843506, -0.48623567819595337, 0.49224159121513367, 1.0774904489517212, -0.3359667956829071, -1.0168030261993408, -0.7797567248344421, -1.1650488376617432, -0.7904135584831238, 1.1573233604431152, 0.04942461475729942, -1.1353312730789185, 0.261101096868515, 1.5570155382156372, 0.09087280184030533, -0.38405942916870117, 0.6991520524024963, 0.3261217176914215, -0.7900989055633545, -0.07682931423187256, -0.9052175283432007, 0.5025307536125183, -0.2774384319782257, -0.3729677200317383, 0.38074398040771484, 0.42695263028144836, 1.3794749975204468, -0.11162526160478592, 0.10255559533834457, 1.0966099500656128, -1.464673399925232, 1.4272234439849854, -0.7110866904258728, 0.27109426259994507, -2.3276970386505127, 1.4094904661178589, -0.7556717991828918, 1.9468567371368408, -2.6501376628875732, 0.5260502099990845, -0.4628898799419403, -0.47137296199798584, 0.28171947598457336, -0.3375265896320343, 0.11219228059053421, -0.08067915588617325, -1.186113715171814, -0.021023038774728775, -0.755120038986206, 0.5860949158668518, 1.0635414123535156, 1.4158451557159424, -1.124549388885498, -0.30364683270454407, -1.6970254182815552, -0.10134698450565338, -0.7483672499656677, 0.27983951568603516, -1.9988033771514893, -0.22752924263477325, -1.924159049987793, -2.3949968814849854, -1.2922133207321167, -0.8486626744270325, 1.1566722393035889, 0.11958632618188858, -0.8437576293945312, 1.1684165000915527, -0.4059399962425232, -1.9203429222106934, 1.1270630359649658, -2.1613852977752686 ]
https://github.com/huggingface/datasets/issues/5610
use datasets streaming mode in trainer ddp mode cause memory leak
Same problem, transformers 4.28.1 datasets 2.12.0 leak around 100Mb per 10 seconds when use dataloader_num_werker > 0 in training argumennts for transformer train, possile bug in transformers repo, but still not found solution :(
### Describe the bug use datasets streaming mode in trainer ddp mode cause memory leak ### Steps to reproduce the bug import os import time import datetime import sys import numpy as np import random import torch from torch.utils.data import Dataset, DataLoader, random_split, RandomSampler, SequentialSampler,DistributedSampler,BatchSampler torch.manual_seed(42) from transformers import GPT2LMHeadModel, GPT2Tokenizer, GPT2Config, GPT2Model,DataCollatorForLanguageModeling,AutoModelForCausalLM from transformers import AdamW, get_linear_schedule_with_warmup hf_model_path ='./Wenzhong-GPT2-110M' tokenizer = GPT2Tokenizer.from_pretrained(hf_model_path) tokenizer.add_special_tokens({'pad_token': '<|pad|>'}) from datasets import load_dataset gpus=8 max_len = 576 batch_size_node = 17 save_step = 5000 gradient_accumulation = 2 dataloader_num = 4 max_step = 351000*1000//batch_size_node//gradient_accumulation//gpus #max_step = -1 print("total_step:%d"%(max_step)) import datasets datasets.version dataset = load_dataset("text", data_files="./gpt_data_v1/*",split='train',cache_dir='./dataset_cache',streaming=True) print('load over') shuffled_dataset = dataset.shuffle(seed=42) print('shuffle over') def dataset_tokener(example,max_lenth=max_len): example['text'] = list(map(lambda x : x.strip()+'<|endoftext|>',example['text'] )) return tokenizer(example['text'], truncation=True, max_length=max_lenth, padding="longest") new_new_dataset = shuffled_dataset.map(dataset_tokener, batched=True, remove_columns=["text"]) print('map over') configuration = GPT2Config.from_pretrained(hf_model_path, output_hidden_states=False) model = AutoModelForCausalLM.from_pretrained(hf_model_path) model.resize_token_embeddings(len(tokenizer)) seed_val = 42 random.seed(seed_val) np.random.seed(seed_val) torch.manual_seed(seed_val) torch.cuda.manual_seed_all(seed_val) from transformers import Trainer,TrainingArguments import os print("strat train") training_args = TrainingArguments(output_dir="./test_trainer", num_train_epochs=1.0, report_to="none", do_train=True, dataloader_num_workers=dataloader_num, local_rank=int(os.environ.get('LOCAL_RANK', -1)), overwrite_output_dir=True, logging_strategy='steps', logging_first_step=True, logging_dir="./logs", log_on_each_node=False, per_device_train_batch_size=batch_size_node, warmup_ratio=0.03, save_steps=save_step, save_total_limit=5, gradient_accumulation_steps=gradient_accumulation, max_steps=max_step, disable_tqdm=False, data_seed=42 ) trainer = Trainer( model=model, args=training_args, train_dataset=new_new_dataset, eval_dataset=None, tokenizer=tokenizer, data_collator=DataCollatorForLanguageModeling(tokenizer,mlm=False), #compute_metrics=compute_metrics if training_args.do_eval and not is_torch_tpu_available() else None, #preprocess_logits_for_metrics=preprocess_logits_for_metrics #if training_args.do_eval and not is_torch_tpu_available() #else None, ) trainer.train(resume_from_checkpoint=True) ### Expected behavior use the train code uppper my dataset ./gpt_data_v1 have 1000 files, each file size is 120mb start cmd is : python -m torch.distributed.launch --nproc_per_node=8 my_train.py here is result: ![image](https://user-images.githubusercontent.com/15223544/223026042-1a81489f-897a-43e4-8339-65a202fd5dc7.png) here is memory usage monitor in 12 hours ![image](https://user-images.githubusercontent.com/15223544/223027076-14e32e8b-9608-4282-9a80-f15d0277026d.png) every dataloader work allocate over 24gb cpu memory according to memory usage monitor in 12 hours,sometime small memory releases, but total memory usage is increase. i think datasets streaming mode should not used so much memery,so maybe somewhere has memory leak. ### Environment info pytorch 1.11.0 py 3.8 cuda 11.3 transformers 4.26.1 datasets 2.9.0
269
34
use datasets streaming mode in trainer ddp mode cause memory leak ### Describe the bug use datasets streaming mode in trainer ddp mode cause memory leak ### Steps to reproduce the bug import os import time import datetime import sys import numpy as np import random import torch from torch.utils.data import Dataset, DataLoader, random_split, RandomSampler, SequentialSampler,DistributedSampler,BatchSampler torch.manual_seed(42) from transformers import GPT2LMHeadModel, GPT2Tokenizer, GPT2Config, GPT2Model,DataCollatorForLanguageModeling,AutoModelForCausalLM from transformers import AdamW, get_linear_schedule_with_warmup hf_model_path ='./Wenzhong-GPT2-110M' tokenizer = GPT2Tokenizer.from_pretrained(hf_model_path) tokenizer.add_special_tokens({'pad_token': '<|pad|>'}) from datasets import load_dataset gpus=8 max_len = 576 batch_size_node = 17 save_step = 5000 gradient_accumulation = 2 dataloader_num = 4 max_step = 351000*1000//batch_size_node//gradient_accumulation//gpus #max_step = -1 print("total_step:%d"%(max_step)) import datasets datasets.version dataset = load_dataset("text", data_files="./gpt_data_v1/*",split='train',cache_dir='./dataset_cache',streaming=True) print('load over') shuffled_dataset = dataset.shuffle(seed=42) print('shuffle over') def dataset_tokener(example,max_lenth=max_len): example['text'] = list(map(lambda x : x.strip()+'<|endoftext|>',example['text'] )) return tokenizer(example['text'], truncation=True, max_length=max_lenth, padding="longest") new_new_dataset = shuffled_dataset.map(dataset_tokener, batched=True, remove_columns=["text"]) print('map over') configuration = GPT2Config.from_pretrained(hf_model_path, output_hidden_states=False) model = AutoModelForCausalLM.from_pretrained(hf_model_path) model.resize_token_embeddings(len(tokenizer)) seed_val = 42 random.seed(seed_val) np.random.seed(seed_val) torch.manual_seed(seed_val) torch.cuda.manual_seed_all(seed_val) from transformers import Trainer,TrainingArguments import os print("strat train") training_args = TrainingArguments(output_dir="./test_trainer", num_train_epochs=1.0, report_to="none", do_train=True, dataloader_num_workers=dataloader_num, local_rank=int(os.environ.get('LOCAL_RANK', -1)), overwrite_output_dir=True, logging_strategy='steps', logging_first_step=True, logging_dir="./logs", log_on_each_node=False, per_device_train_batch_size=batch_size_node, warmup_ratio=0.03, save_steps=save_step, save_total_limit=5, gradient_accumulation_steps=gradient_accumulation, max_steps=max_step, disable_tqdm=False, data_seed=42 ) trainer = Trainer( model=model, args=training_args, train_dataset=new_new_dataset, eval_dataset=None, tokenizer=tokenizer, data_collator=DataCollatorForLanguageModeling(tokenizer,mlm=False), #compute_metrics=compute_metrics if training_args.do_eval and not is_torch_tpu_available() else None, #preprocess_logits_for_metrics=preprocess_logits_for_metrics #if training_args.do_eval and not is_torch_tpu_available() #else None, ) trainer.train(resume_from_checkpoint=True) ### Expected behavior use the train code uppper my dataset ./gpt_data_v1 have 1000 files, each file size is 120mb start cmd is : python -m torch.distributed.launch --nproc_per_node=8 my_train.py here is result: ![image](https://user-images.githubusercontent.com/15223544/223026042-1a81489f-897a-43e4-8339-65a202fd5dc7.png) here is memory usage monitor in 12 hours ![image](https://user-images.githubusercontent.com/15223544/223027076-14e32e8b-9608-4282-9a80-f15d0277026d.png) every dataloader work allocate over 24gb cpu memory according to memory usage monitor in 12 hours,sometime small memory releases, but total memory usage is increase. i think datasets streaming mode should not used so much memery,so maybe somewhere has memory leak. ### Environment info pytorch 1.11.0 py 3.8 cuda 11.3 transformers 4.26.1 datasets 2.9.0 Same problem, transformers 4.28.1 datasets 2.12.0 leak around 100Mb per 10 seconds when use dataloader_num_werker > 0 in training argumennts for transformer train, possile bug in transformers repo, but still not found solution :(
[ -1.3668327331542969, -1.0391124486923218, -0.6425808668136597, 1.5796233415603638, -0.1771867275238037, -1.1103981733322144, 0.11056772619485855, -1.0720235109329224, 1.5092308521270752, -0.8274769186973572, 0.2660912275314331, -1.649958610534668, -0.04564975947141647, -0.5367396473884583, -0.6560992002487183, -0.9146676063537598, -0.3520813286304474, -0.8204137682914734, 1.135377049446106, 2.4010658264160156, 1.2202625274658203, -1.4013400077819824, 2.835766077041626, 0.7069730758666992, -0.20926646888256073, -1.0896333456039429, 0.5381811261177063, 0.00560413021594286, -1.2337487936019897, -0.5509433150291443, -0.9361348748207092, -0.04888539016246796, -0.6135554909706116, -0.37119120359420776, 0.0005720062181353569, 0.4691818654537201, -0.28969505429267883, -0.38926243782043457, -0.5506722331047058, -0.7335134148597717, 0.45391154289245605, -0.3902371823787689, 0.8481424450874329, -0.26151931285858154, 1.7608206272125244, -0.5324848294258118, 0.4299061894416809, 0.6722192168235779, 1.2831095457077026, 0.26464420557022095, 0.019745390862226486, 0.33997878432273865, 0.3257448077201843, -0.08454197645187378, 0.6309683322906494, 1.1301716566085815, 0.6970648169517517, 0.4506921172142029, 0.7694442868232727, -2.2457640171051025, 1.303791880607605, -1.105455756187439, 0.30028119683265686, 1.4176653623580933, -0.9268599152565002, 0.4681501090526581, -1.6931090354919434, -0.036363933235406876, 0.6974858641624451, -2.1633212566375732, 0.3861892521381378, -1.2539657354354858, -0.5344959497451782, 0.9846583008766174, 0.36831095814704895, -1.208510398864746, 0.15554609894752502, -0.5046794414520264, 1.203465461730957, 0.4069706201553345, 0.9986651539802551, -1.7348332405090332, -0.03300655633211136, -0.2003902941942215, 0.08574174344539642, -1.3314223289489746, -1.6434451341629028, 0.5650001764297485, 0.5375781655311584, 0.6006376147270203, -0.14789164066314697, 1.1668249368667603, -1.1839359998703003, 0.7117841839790344, -1.1086939573287964, -1.6457148790359497, -1.3865476846694946, -2.415571928024292, -2.2201099395751953, 0.6755114793777466, -0.4169674515724182, -0.6314138770103455, 2.062648057937622, -0.9965968728065491, -1.706324815750122, 1.1185632944107056, 0.26229673624038696, 0.13124056160449982, 2.471071243286133, 0.23451204597949982, -0.7727141380310059, 0.4530915319919586, -0.8351592421531677, 0.8008486032485962, -0.3670104742050171, 1.4068986177444458, 0.4238675534725189, -0.9310886263847351, 1.5574463605880737, -0.34705623984336853, 0.565604567527771, -0.5986055731773376, -0.5520625710487366, -0.7865932583808899, 0.2096332162618637, 1.9800801277160645, -0.2253505438566208, 1.4599214792251587, -0.4248288869857788, -1.5445324182510376, -1.5951287746429443, 0.9699837565422058, 0.3467521369457245, -0.8746296167373657, 0.1436474621295929, -0.48177146911621094, 0.15344245731830597, -0.106524258852005, 1.2088310718536377, 1.287772297859192, 0.6072439551353455, -0.4463464319705963, -0.8500900268554688, 0.12368564307689667, -0.19324366748332977, -0.6711312532424927, -1.7976149320602417, -0.24097587168216705, 0.05772770941257477, 0.7357727289199829, -1.0859348773956299, 1.6740223169326782, 0.9498943090438843, 1.890385389328003, 0.9937161803245544, -0.42745575308799744, 1.4068034887313843, 0.08494129776954651, 1.7480812072753906, -0.6733034253120422, 0.6536173820495605, -0.3245393931865692, -1.1066471338272095, 0.8828610181808472, -0.32192546129226685, -1.9603627920150757, -0.8100797533988953, -0.6301057934761047, -0.24887152016162872, -0.8110308051109314, 0.8897914290428162, -0.37893685698509216, -1.520448923110962, 0.2407800853252411, -0.8360869884490967, 0.34973978996276855, -1.1347018480300903, 0.32051146030426025, 0.7517464756965637, -0.5103495717048645, 0.07495886832475662, -0.243597611784935, -1.1978293657302856, -0.5147914290428162, 0.3881739377975464, 1.8629851341247559, -0.69228196144104, 0.8768032789230347, 1.0544817447662354, -0.7085387110710144, 0.04825644940137863, 0.18435436487197876, -0.15310460329055786, 0.8132479786872864, -1.0482388734817505, -0.580736517906189, 1.2554093599319458, -0.2946169376373291, -0.6244646906852722, 1.5574486255645752, 0.7926629185676575, -1.0372308492660522, -0.222945436835289, -0.12073972821235657, -0.9031831622123718, 0.0562811940908432, -1.5050044059753418, -0.14843569695949554, 0.5779638290405273, -1.4971989393234253, -0.44304710626602173, -0.21674540638923645, 1.376514196395874, -0.13876007497310638, 1.4765359163284302, -0.40897566080093384, -0.11100181937217712, -0.1790868043899536, -0.3557080626487732, 0.23503582179546356, -0.26361674070358276, -0.5380186438560486, 0.0902758538722992, -0.8775079846382141, 0.3870109021663666, 1.4943113327026367, 0.31351029872894287, -0.001565597951412201, 0.40579891204833984, 1.1902618408203125, 0.43841099739074707, -0.07651614397764206, -0.7592645883560181, -1.585655689239502, 1.8686492443084717, -1.4732897281646729, 2.0054240226745605, 0.7791169881820679, -0.017124170437455177, -1.7707043886184692, -1.7727150917053223, 1.2444870471954346, 1.0940531492233276, 2.3735463619232178, 0.4582548439502716, 0.2962064743041992, -0.8869179487228394, -0.8001576066017151, 0.2645626962184906, -0.9652920365333557, -0.6253299713134766, 0.1670786738395691, 2.3577370643615723, 1.8650528192520142, -0.3884734511375427, -0.15582232177257538, -0.9012914299964905, 1.429867148399353, -0.29763689637184143, 0.2984333634376526, 2.00665545463562, -0.19079278409481049, -1.0693527460098267, 1.355074167251587, -2.4417192935943604, 0.1698342114686966, 2.124638080596924, 0.3598950505256653, 0.11903417110443115, -1.3199843168258667, -0.6882457733154297, -0.4071277678012848, -0.3308209180831909, -1.2697981595993042, 0.4710160791873932, -0.32126808166503906, -0.7640462517738342, -1.4588558673858643, 0.1530328243970871, -1.158536434173584, -1.6113702058792114, 0.3387625813484192, 1.8909626007080078, 2.1505391597747803, -0.7785740494728088, 1.5757806301116943, -0.2916698753833771, 0.15203829109668732, 1.218332052230835, 1.307913899421692, 2.9290709495544434, 1.8277188539505005, -1.2685163021087646, 0.6336923837661743, -0.1800314038991928, -0.5476199984550476, 1.1306692361831665, -1.2506898641586304, 1.2384326457977295, -0.04143590107560158, -1.1538578271865845, -1.283177375793457, 1.0522388219833374, 0.45499661564826965, 0.0019590454176068306, -0.532177209854126, 1.2599750757217407, -0.014854870736598969, 1.3396605253219604, 0.5845266580581665, -0.3501916229724884, 0.5185141563415527, -0.4557482600212097, -0.6108927130699158, 1.522275447845459, 0.15916584432125092, -1.5097252130508423, -2.170698642730713, -0.27246057987213135, -0.7697058916091919, 0.07289506494998932, -0.6479898691177368, -1.0533772706985474, 1.5866787433624268, 0.2942650318145752, -1.239597201347351, -0.31999996304512024, -0.33652445673942566, -0.49506402015686035, 2.696617364883423, -1.2171093225479126, -0.1659778207540512, -1.0221027135849, -0.6569278836250305, 1.604886531829834, -1.254900336265564, -0.2833092510700226, -1.1022679805755615, -0.5886591672897339, -1.2640317678451538, -0.4487714469432831, 0.052299149334430695, -0.9671773314476013, 0.8183653950691223, 0.20305000245571136, -1.1645737886428833, -0.2787609398365021, -0.8238654136657715, 1.0734121799468994, -0.2067663073539734, 0.19354072213172913, 1.7565568685531616, 0.24267852306365967, -0.40295615792274475, 0.8497991561889648, 1.1690044403076172, 0.6685390472412109, -0.6452783942222595, 0.0032673925161361694, -0.5872859954833984, 0.41904017329216003, -1.3514076471328735, 0.27463778853416443, -2.977004289627075, 0.6395624279975891, -0.040238719433546066, -0.07315777242183685, -0.0498284287750721, -1.3254770040512085, 1.1075104475021362, 2.477832317352295, -1.2534552812576294, 0.5429326891899109, 0.36049315333366394, 1.2442549467086792, -1.6514196395874023, 0.35179853439331055, -0.4582446217536926, 2.0255959033966064, 0.27385735511779785, 1.2538189888000488, -0.5088689923286438, -2.338998794555664, 0.5912749767303467, -1.2057729959487915, -1.1075321435928345, 0.7308690547943115, -0.9919279217720032, 0.22593609988689423, -1.519134283065796, -0.36119696497917175, -0.9511969685554504, -1.150638461112976, 0.6853379607200623, 0.19853118062019348, 0.25920313596725464, -0.5403940677642822, 0.3582012355327606, -2.2251429557800293, -1.3339492082595825, -0.20893022418022156, -0.9581717848777771, 0.5863862037658691, -0.5248233079910278, 0.5491761565208435, -0.1220257431268692, 0.07838433235883713, 0.2939062714576721, 1.5263398885726929, 3.410602569580078, 0.20317812263965607, 0.2921716570854187, -0.15787646174430847, -0.9564040303230286, 1.4804502725601196, 0.9284219145774841, -0.12992045283317566, -0.5953778028488159, -1.07758629322052, 1.3159774541854858, 1.901027798652649, 0.9239152073860168, -0.006785090081393719, -0.8780271410942078, -0.7047721743583679, -0.08819062262773514, 0.20718064904212952, 0.5265073776245117, 0.9307947158813477, 0.1025896668434143, 0.06826014071702957, 1.4383834600448608, 1.1363295316696167, -0.38374999165534973, 0.2599564492702484, -0.942927360534668, -0.4318864345550537, 0.4543190896511078, 0.14768046140670776, -0.11478745937347412, 0.3732493221759796, -1.0378260612487793, -0.1588938683271408, -0.4272029995918274, -0.8516915440559387, -0.7084969282150269, -0.42650628089904785, -0.3623203635215759, 1.581076741218567, 0.23587344586849213, -0.5424680709838867, -0.019483715295791626, -0.6790761947631836, -0.212560772895813, -1.2040077447891235, 0.2462862730026245, -0.10146420449018478, -0.2181655615568161, -0.20192408561706543, 1.6938889026641846, -0.8930194973945618, -2.079052686691284, 0.11929017305374146, 0.3184516429901123, -0.1672598421573639, 0.20078285038471222, 1.7259652614593506, 0.502932071685791, 1.4391164779663086, 1.2266160249710083, 0.9298797845840454, -0.5831217765808105, -1.2963141202926636, 0.7553057074546814, 1.0001065731048584, -1.3535397052764893, 0.9095029234886169, -0.0827835202217102, -0.5537794828414917, 0.6573430895805359, 1.3363760709762573, 0.49266353249549866, -1.9683512449264526, 0.8504928946495056, -1.1731630563735962, 0.854101836681366, 0.7575206160545349, 0.6563409566879272, 0.1894489824771881, 0.9084808230400085, -1.2299703359603882, -1.1863231658935547, -0.7878265380859375, -0.7703530192375183, 1.9525359869003296, -0.35899490118026733, 0.6108166575431824, -0.21560612320899963, -1.1643093824386597, -0.08171357959508896, 0.7148962616920471, 0.28649890422821045, -0.43543344736099243, 0.8737882971763611, -0.69304358959198, -1.0504437685012817, -1.2748149633407593, -0.39613956212997437, -1.0588771104812622, -0.9913751482963562, 1.0423434972763062, 0.7016472220420837, 0.22454863786697388, 1.8504750728607178, 0.6117141246795654, 0.27967262268066406, -2.588019609451294, 0.8781875371932983, 0.16312113404273987, -0.03450984135270119, 0.9012162089347839, 0.3695748448371887, 1.123042106628418, 0.170360267162323, 0.5082976818084717, -2.5111923217773438, 2.2318434715270996, -0.23492193222045898, 0.6566860675811768, -0.1167522445321083, -0.14638572931289673, 1.2017894983291626, 0.6203990578651428, 0.516447901725769, -0.945867657661438, 0.7088785171508789, -0.5248180031776428, 1.1691004037857056, 0.9018404483795166, -0.7527725696563721, -0.019555162638425827, 1.4275342226028442, 0.3890106678009033, -0.6446654796600342, -0.9513994455337524, -0.9129320979118347, 0.8790730237960815, 1.7214783430099487, 0.0055891042575240135, -0.13856372237205505, 0.6794394254684448, 0.6649708151817322, -1.2227880954742432, 0.09532848000526428, -0.5275745987892151, -0.7023558616638184, 1.7033216953277588, 2.09142804145813, -0.23738349974155426, -0.17260178923606873, -0.618757963180542, -1.2759166955947876, 0.6594468951225281, -0.10472331941127777, 0.0730566531419754, 0.6398950815200806, -0.6091504096984863, 0.9756420254707336, 0.71031653881073, 0.8993117809295654, 0.11900463700294495, 0.25017619132995605, 0.5260688066482544, -0.34739556908607483, -1.196726679801941, -0.25489068031311035, -1.112398386001587, -2.574770212173462, 0.32891473174095154, -0.2199944108724594, -1.4085839986801147, 0.09413906931877136, -1.0541821718215942, 1.0053915977478027, -0.5682490468025208, -1.1966214179992676, -1.5357898473739624, 0.22264988720417023, 0.036564961075782776, 0.9365147948265076, -1.5668132305145264, -0.1029512882232666, 1.190682291984558, 0.8316824436187744, -0.6223283410072327, 1.0636498928070068, 0.25201547145843506, 1.087099313735962, 0.7323563098907471, -0.3204868733882904, 0.5908724069595337, -0.01322921086102724, -1.3635845184326172, 0.48520785570144653, 1.2558062076568604, 0.24495550990104675, 1.4765137434005737, -0.3696661591529846, -0.021375425159931183, 0.38311195373535156, -0.7707071304321289, -0.42814645171165466, -0.28827089071273804, 0.65187007188797, 0.08896194398403168, -0.875980794429779, -0.09402798861265182, -0.12637218832969666, -0.3846137523651123, 0.18218393623828888, -1.5300166606903076, -0.24822603166103363, -0.479665607213974, -0.480379194021225, -1.2584785223007202, -0.04089006036520004, 1.4615525007247925, -0.7390180826187134, -0.28005290031433105, 0.5411968231201172, 0.3407476842403412, 0.5163866281509399, 0.6517332196235657, -0.6764280796051025, -0.2145335078239441, -0.18982328474521637, -0.3032410442829132, 0.2804063856601715, 1.3282889127731323, -0.1114225760102272, -0.9184427261352539, 0.6578811407089233, -0.36177560687065125, 0.13740721344947815, 1.8632644414901733, 0.03722362220287323, -0.7619401216506958, 0.31113797426223755, -0.7862688302993774, 2.0037055015563965, 1.6910604238510132, 1.3415828943252563, -0.22186897695064545, -0.8365944027900696, 0.5995625853538513, -0.3476274311542511, -0.38562414050102234, 0.8316473364830017, 0.4633311629295349, -0.26946502923965454, -1.363999605178833, 0.7910869121551514, 1.1780065298080444, -0.8406429290771484, -0.7587617039680481, 0.22186963260173798, -0.7950677871704102, 1.2167326211929321, 0.5641412138938904, 0.33379077911376953, 0.3171727955341339, 1.6470106840133667, 0.7561549544334412, -0.46001681685447693, 0.6023129820823669, 0.5461911559104919, -0.2405768483877182, -2.090416431427002, -1.0934083461761475, 0.3376965820789337, -0.5443407893180847, -1.6291184425354004, 1.361795425415039, -1.0546867847442627, -1.0077850818634033, 0.601707398891449, 0.08898629248142242, 1.3391789197921753, 0.4271579682826996, 1.5797840356826782, 2.038043260574341, 0.7553302645683289, 0.47314587235450745, 1.236098051071167, -0.14455027878284454, -0.488238126039505, 1.8608734607696533, -0.3826121687889099, 0.5064979791641235, 1.1339401006698608, -0.33257749676704407, -1.1443272829055786, -0.7328369617462158, -1.2451046705245972, -0.6554283499717712, 1.1295713186264038, 0.12559419870376587, -1.077405333518982, 0.23778104782104492, 1.4783893823623657, 0.1436202973127365, -0.22476501762866974, 0.6977636814117432, 0.39824146032333374, -0.7850080728530884, -0.019431238994002342, -0.8974089622497559, 0.4836339056491852, -0.2470625340938568, -0.33645015954971313, 0.3261147141456604, 0.5008853673934937, 1.3595561981201172, -0.0498947873711586, 0.18759825825691223, 1.0931469202041626, -1.4272512197494507, 1.4918212890625, -0.6555524468421936, 0.3385261297225952, -2.3909859657287598, 1.3085206747055054, -0.7023332715034485, 2.051985502243042, -2.6722464561462402, 0.47838059067726135, -0.6201736927032471, -0.5546677708625793, 0.3163337707519531, -0.35001277923583984, 0.09756506979465485, -0.0822930634021759, -1.121382474899292, 0.03740696236491203, -0.613177478313446, 0.613425612449646, 1.1612969636917114, 1.4296890497207642, -1.1178197860717773, -0.18675348162651062, -1.765792965888977, -0.10590415447950363, -0.8832048773765564, 0.27199339866638184, -2.0547378063201904, -0.19988560676574707, -1.934736967086792, -2.3505561351776123, -1.213819146156311, -0.7315061092376709, 1.051676630973816, 0.22551074624061584, -0.8383181095123291, 1.2950361967086792, -0.3450608253479004, -1.7359280586242676, 1.0618010759353638, -2.083235502243042 ]
https://github.com/huggingface/datasets/issues/5610
use datasets streaming mode in trainer ddp mode cause memory leak
found an article described a problem, may be helpful for somebody: https://ppwwyyxx.com/blog/2022/Demystify-RAM-Usage-in-Multiprocess-DataLoader/ I confirm, it`s not memory leak, after some time memory growing has stopped
### Describe the bug use datasets streaming mode in trainer ddp mode cause memory leak ### Steps to reproduce the bug import os import time import datetime import sys import numpy as np import random import torch from torch.utils.data import Dataset, DataLoader, random_split, RandomSampler, SequentialSampler,DistributedSampler,BatchSampler torch.manual_seed(42) from transformers import GPT2LMHeadModel, GPT2Tokenizer, GPT2Config, GPT2Model,DataCollatorForLanguageModeling,AutoModelForCausalLM from transformers import AdamW, get_linear_schedule_with_warmup hf_model_path ='./Wenzhong-GPT2-110M' tokenizer = GPT2Tokenizer.from_pretrained(hf_model_path) tokenizer.add_special_tokens({'pad_token': '<|pad|>'}) from datasets import load_dataset gpus=8 max_len = 576 batch_size_node = 17 save_step = 5000 gradient_accumulation = 2 dataloader_num = 4 max_step = 351000*1000//batch_size_node//gradient_accumulation//gpus #max_step = -1 print("total_step:%d"%(max_step)) import datasets datasets.version dataset = load_dataset("text", data_files="./gpt_data_v1/*",split='train',cache_dir='./dataset_cache',streaming=True) print('load over') shuffled_dataset = dataset.shuffle(seed=42) print('shuffle over') def dataset_tokener(example,max_lenth=max_len): example['text'] = list(map(lambda x : x.strip()+'<|endoftext|>',example['text'] )) return tokenizer(example['text'], truncation=True, max_length=max_lenth, padding="longest") new_new_dataset = shuffled_dataset.map(dataset_tokener, batched=True, remove_columns=["text"]) print('map over') configuration = GPT2Config.from_pretrained(hf_model_path, output_hidden_states=False) model = AutoModelForCausalLM.from_pretrained(hf_model_path) model.resize_token_embeddings(len(tokenizer)) seed_val = 42 random.seed(seed_val) np.random.seed(seed_val) torch.manual_seed(seed_val) torch.cuda.manual_seed_all(seed_val) from transformers import Trainer,TrainingArguments import os print("strat train") training_args = TrainingArguments(output_dir="./test_trainer", num_train_epochs=1.0, report_to="none", do_train=True, dataloader_num_workers=dataloader_num, local_rank=int(os.environ.get('LOCAL_RANK', -1)), overwrite_output_dir=True, logging_strategy='steps', logging_first_step=True, logging_dir="./logs", log_on_each_node=False, per_device_train_batch_size=batch_size_node, warmup_ratio=0.03, save_steps=save_step, save_total_limit=5, gradient_accumulation_steps=gradient_accumulation, max_steps=max_step, disable_tqdm=False, data_seed=42 ) trainer = Trainer( model=model, args=training_args, train_dataset=new_new_dataset, eval_dataset=None, tokenizer=tokenizer, data_collator=DataCollatorForLanguageModeling(tokenizer,mlm=False), #compute_metrics=compute_metrics if training_args.do_eval and not is_torch_tpu_available() else None, #preprocess_logits_for_metrics=preprocess_logits_for_metrics #if training_args.do_eval and not is_torch_tpu_available() #else None, ) trainer.train(resume_from_checkpoint=True) ### Expected behavior use the train code uppper my dataset ./gpt_data_v1 have 1000 files, each file size is 120mb start cmd is : python -m torch.distributed.launch --nproc_per_node=8 my_train.py here is result: ![image](https://user-images.githubusercontent.com/15223544/223026042-1a81489f-897a-43e4-8339-65a202fd5dc7.png) here is memory usage monitor in 12 hours ![image](https://user-images.githubusercontent.com/15223544/223027076-14e32e8b-9608-4282-9a80-f15d0277026d.png) every dataloader work allocate over 24gb cpu memory according to memory usage monitor in 12 hours,sometime small memory releases, but total memory usage is increase. i think datasets streaming mode should not used so much memery,so maybe somewhere has memory leak. ### Environment info pytorch 1.11.0 py 3.8 cuda 11.3 transformers 4.26.1 datasets 2.9.0
269
25
use datasets streaming mode in trainer ddp mode cause memory leak ### Describe the bug use datasets streaming mode in trainer ddp mode cause memory leak ### Steps to reproduce the bug import os import time import datetime import sys import numpy as np import random import torch from torch.utils.data import Dataset, DataLoader, random_split, RandomSampler, SequentialSampler,DistributedSampler,BatchSampler torch.manual_seed(42) from transformers import GPT2LMHeadModel, GPT2Tokenizer, GPT2Config, GPT2Model,DataCollatorForLanguageModeling,AutoModelForCausalLM from transformers import AdamW, get_linear_schedule_with_warmup hf_model_path ='./Wenzhong-GPT2-110M' tokenizer = GPT2Tokenizer.from_pretrained(hf_model_path) tokenizer.add_special_tokens({'pad_token': '<|pad|>'}) from datasets import load_dataset gpus=8 max_len = 576 batch_size_node = 17 save_step = 5000 gradient_accumulation = 2 dataloader_num = 4 max_step = 351000*1000//batch_size_node//gradient_accumulation//gpus #max_step = -1 print("total_step:%d"%(max_step)) import datasets datasets.version dataset = load_dataset("text", data_files="./gpt_data_v1/*",split='train',cache_dir='./dataset_cache',streaming=True) print('load over') shuffled_dataset = dataset.shuffle(seed=42) print('shuffle over') def dataset_tokener(example,max_lenth=max_len): example['text'] = list(map(lambda x : x.strip()+'<|endoftext|>',example['text'] )) return tokenizer(example['text'], truncation=True, max_length=max_lenth, padding="longest") new_new_dataset = shuffled_dataset.map(dataset_tokener, batched=True, remove_columns=["text"]) print('map over') configuration = GPT2Config.from_pretrained(hf_model_path, output_hidden_states=False) model = AutoModelForCausalLM.from_pretrained(hf_model_path) model.resize_token_embeddings(len(tokenizer)) seed_val = 42 random.seed(seed_val) np.random.seed(seed_val) torch.manual_seed(seed_val) torch.cuda.manual_seed_all(seed_val) from transformers import Trainer,TrainingArguments import os print("strat train") training_args = TrainingArguments(output_dir="./test_trainer", num_train_epochs=1.0, report_to="none", do_train=True, dataloader_num_workers=dataloader_num, local_rank=int(os.environ.get('LOCAL_RANK', -1)), overwrite_output_dir=True, logging_strategy='steps', logging_first_step=True, logging_dir="./logs", log_on_each_node=False, per_device_train_batch_size=batch_size_node, warmup_ratio=0.03, save_steps=save_step, save_total_limit=5, gradient_accumulation_steps=gradient_accumulation, max_steps=max_step, disable_tqdm=False, data_seed=42 ) trainer = Trainer( model=model, args=training_args, train_dataset=new_new_dataset, eval_dataset=None, tokenizer=tokenizer, data_collator=DataCollatorForLanguageModeling(tokenizer,mlm=False), #compute_metrics=compute_metrics if training_args.do_eval and not is_torch_tpu_available() else None, #preprocess_logits_for_metrics=preprocess_logits_for_metrics #if training_args.do_eval and not is_torch_tpu_available() #else None, ) trainer.train(resume_from_checkpoint=True) ### Expected behavior use the train code uppper my dataset ./gpt_data_v1 have 1000 files, each file size is 120mb start cmd is : python -m torch.distributed.launch --nproc_per_node=8 my_train.py here is result: ![image](https://user-images.githubusercontent.com/15223544/223026042-1a81489f-897a-43e4-8339-65a202fd5dc7.png) here is memory usage monitor in 12 hours ![image](https://user-images.githubusercontent.com/15223544/223027076-14e32e8b-9608-4282-9a80-f15d0277026d.png) every dataloader work allocate over 24gb cpu memory according to memory usage monitor in 12 hours,sometime small memory releases, but total memory usage is increase. i think datasets streaming mode should not used so much memery,so maybe somewhere has memory leak. ### Environment info pytorch 1.11.0 py 3.8 cuda 11.3 transformers 4.26.1 datasets 2.9.0 found an article described a problem, may be helpful for somebody: https://ppwwyyxx.com/blog/2022/Demystify-RAM-Usage-in-Multiprocess-DataLoader/ I confirm, it`s not memory leak, after some time memory growing has stopped
[ -1.3668327331542969, -1.0391124486923218, -0.6425808668136597, 1.5796233415603638, -0.1771867275238037, -1.1103981733322144, 0.11056772619485855, -1.0720235109329224, 1.5092308521270752, -0.8274769186973572, 0.2660912275314331, -1.649958610534668, -0.04564975947141647, -0.5367396473884583, -0.6560992002487183, -0.9146676063537598, -0.3520813286304474, -0.8204137682914734, 1.135377049446106, 2.4010658264160156, 1.2202625274658203, -1.4013400077819824, 2.835766077041626, 0.7069730758666992, -0.20926646888256073, -1.0896333456039429, 0.5381811261177063, 0.00560413021594286, -1.2337487936019897, -0.5509433150291443, -0.9361348748207092, -0.04888539016246796, -0.6135554909706116, -0.37119120359420776, 0.0005720062181353569, 0.4691818654537201, -0.28969505429267883, -0.38926243782043457, -0.5506722331047058, -0.7335134148597717, 0.45391154289245605, -0.3902371823787689, 0.8481424450874329, -0.26151931285858154, 1.7608206272125244, -0.5324848294258118, 0.4299061894416809, 0.6722192168235779, 1.2831095457077026, 0.26464420557022095, 0.019745390862226486, 0.33997878432273865, 0.3257448077201843, -0.08454197645187378, 0.6309683322906494, 1.1301716566085815, 0.6970648169517517, 0.4506921172142029, 0.7694442868232727, -2.2457640171051025, 1.303791880607605, -1.105455756187439, 0.30028119683265686, 1.4176653623580933, -0.9268599152565002, 0.4681501090526581, -1.6931090354919434, -0.036363933235406876, 0.6974858641624451, -2.1633212566375732, 0.3861892521381378, -1.2539657354354858, -0.5344959497451782, 0.9846583008766174, 0.36831095814704895, -1.208510398864746, 0.15554609894752502, -0.5046794414520264, 1.203465461730957, 0.4069706201553345, 0.9986651539802551, -1.7348332405090332, -0.03300655633211136, -0.2003902941942215, 0.08574174344539642, -1.3314223289489746, -1.6434451341629028, 0.5650001764297485, 0.5375781655311584, 0.6006376147270203, -0.14789164066314697, 1.1668249368667603, -1.1839359998703003, 0.7117841839790344, -1.1086939573287964, -1.6457148790359497, -1.3865476846694946, -2.415571928024292, -2.2201099395751953, 0.6755114793777466, -0.4169674515724182, -0.6314138770103455, 2.062648057937622, -0.9965968728065491, -1.706324815750122, 1.1185632944107056, 0.26229673624038696, 0.13124056160449982, 2.471071243286133, 0.23451204597949982, -0.7727141380310059, 0.4530915319919586, -0.8351592421531677, 0.8008486032485962, -0.3670104742050171, 1.4068986177444458, 0.4238675534725189, -0.9310886263847351, 1.5574463605880737, -0.34705623984336853, 0.565604567527771, -0.5986055731773376, -0.5520625710487366, -0.7865932583808899, 0.2096332162618637, 1.9800801277160645, -0.2253505438566208, 1.4599214792251587, -0.4248288869857788, -1.5445324182510376, -1.5951287746429443, 0.9699837565422058, 0.3467521369457245, -0.8746296167373657, 0.1436474621295929, -0.48177146911621094, 0.15344245731830597, -0.106524258852005, 1.2088310718536377, 1.287772297859192, 0.6072439551353455, -0.4463464319705963, -0.8500900268554688, 0.12368564307689667, -0.19324366748332977, -0.6711312532424927, -1.7976149320602417, -0.24097587168216705, 0.05772770941257477, 0.7357727289199829, -1.0859348773956299, 1.6740223169326782, 0.9498943090438843, 1.890385389328003, 0.9937161803245544, -0.42745575308799744, 1.4068034887313843, 0.08494129776954651, 1.7480812072753906, -0.6733034253120422, 0.6536173820495605, -0.3245393931865692, -1.1066471338272095, 0.8828610181808472, -0.32192546129226685, -1.9603627920150757, -0.8100797533988953, -0.6301057934761047, -0.24887152016162872, -0.8110308051109314, 0.8897914290428162, -0.37893685698509216, -1.520448923110962, 0.2407800853252411, -0.8360869884490967, 0.34973978996276855, -1.1347018480300903, 0.32051146030426025, 0.7517464756965637, -0.5103495717048645, 0.07495886832475662, -0.243597611784935, -1.1978293657302856, -0.5147914290428162, 0.3881739377975464, 1.8629851341247559, -0.69228196144104, 0.8768032789230347, 1.0544817447662354, -0.7085387110710144, 0.04825644940137863, 0.18435436487197876, -0.15310460329055786, 0.8132479786872864, -1.0482388734817505, -0.580736517906189, 1.2554093599319458, -0.2946169376373291, -0.6244646906852722, 1.5574486255645752, 0.7926629185676575, -1.0372308492660522, -0.222945436835289, -0.12073972821235657, -0.9031831622123718, 0.0562811940908432, -1.5050044059753418, -0.14843569695949554, 0.5779638290405273, -1.4971989393234253, -0.44304710626602173, -0.21674540638923645, 1.376514196395874, -0.13876007497310638, 1.4765359163284302, -0.40897566080093384, -0.11100181937217712, -0.1790868043899536, -0.3557080626487732, 0.23503582179546356, -0.26361674070358276, -0.5380186438560486, 0.0902758538722992, -0.8775079846382141, 0.3870109021663666, 1.4943113327026367, 0.31351029872894287, -0.001565597951412201, 0.40579891204833984, 1.1902618408203125, 0.43841099739074707, -0.07651614397764206, -0.7592645883560181, -1.585655689239502, 1.8686492443084717, -1.4732897281646729, 2.0054240226745605, 0.7791169881820679, -0.017124170437455177, -1.7707043886184692, -1.7727150917053223, 1.2444870471954346, 1.0940531492233276, 2.3735463619232178, 0.4582548439502716, 0.2962064743041992, -0.8869179487228394, -0.8001576066017151, 0.2645626962184906, -0.9652920365333557, -0.6253299713134766, 0.1670786738395691, 2.3577370643615723, 1.8650528192520142, -0.3884734511375427, -0.15582232177257538, -0.9012914299964905, 1.429867148399353, -0.29763689637184143, 0.2984333634376526, 2.00665545463562, -0.19079278409481049, -1.0693527460098267, 1.355074167251587, -2.4417192935943604, 0.1698342114686966, 2.124638080596924, 0.3598950505256653, 0.11903417110443115, -1.3199843168258667, -0.6882457733154297, -0.4071277678012848, -0.3308209180831909, -1.2697981595993042, 0.4710160791873932, -0.32126808166503906, -0.7640462517738342, -1.4588558673858643, 0.1530328243970871, -1.158536434173584, -1.6113702058792114, 0.3387625813484192, 1.8909626007080078, 2.1505391597747803, -0.7785740494728088, 1.5757806301116943, -0.2916698753833771, 0.15203829109668732, 1.218332052230835, 1.307913899421692, 2.9290709495544434, 1.8277188539505005, -1.2685163021087646, 0.6336923837661743, -0.1800314038991928, -0.5476199984550476, 1.1306692361831665, -1.2506898641586304, 1.2384326457977295, -0.04143590107560158, -1.1538578271865845, -1.283177375793457, 1.0522388219833374, 0.45499661564826965, 0.0019590454176068306, -0.532177209854126, 1.2599750757217407, -0.014854870736598969, 1.3396605253219604, 0.5845266580581665, -0.3501916229724884, 0.5185141563415527, -0.4557482600212097, -0.6108927130699158, 1.522275447845459, 0.15916584432125092, -1.5097252130508423, -2.170698642730713, -0.27246057987213135, -0.7697058916091919, 0.07289506494998932, -0.6479898691177368, -1.0533772706985474, 1.5866787433624268, 0.2942650318145752, -1.239597201347351, -0.31999996304512024, -0.33652445673942566, -0.49506402015686035, 2.696617364883423, -1.2171093225479126, -0.1659778207540512, -1.0221027135849, -0.6569278836250305, 1.604886531829834, -1.254900336265564, -0.2833092510700226, -1.1022679805755615, -0.5886591672897339, -1.2640317678451538, -0.4487714469432831, 0.052299149334430695, -0.9671773314476013, 0.8183653950691223, 0.20305000245571136, -1.1645737886428833, -0.2787609398365021, -0.8238654136657715, 1.0734121799468994, -0.2067663073539734, 0.19354072213172913, 1.7565568685531616, 0.24267852306365967, -0.40295615792274475, 0.8497991561889648, 1.1690044403076172, 0.6685390472412109, -0.6452783942222595, 0.0032673925161361694, -0.5872859954833984, 0.41904017329216003, -1.3514076471328735, 0.27463778853416443, -2.977004289627075, 0.6395624279975891, -0.040238719433546066, -0.07315777242183685, -0.0498284287750721, -1.3254770040512085, 1.1075104475021362, 2.477832317352295, -1.2534552812576294, 0.5429326891899109, 0.36049315333366394, 1.2442549467086792, -1.6514196395874023, 0.35179853439331055, -0.4582446217536926, 2.0255959033966064, 0.27385735511779785, 1.2538189888000488, -0.5088689923286438, -2.338998794555664, 0.5912749767303467, -1.2057729959487915, -1.1075321435928345, 0.7308690547943115, -0.9919279217720032, 0.22593609988689423, -1.519134283065796, -0.36119696497917175, -0.9511969685554504, -1.150638461112976, 0.6853379607200623, 0.19853118062019348, 0.25920313596725464, -0.5403940677642822, 0.3582012355327606, -2.2251429557800293, -1.3339492082595825, -0.20893022418022156, -0.9581717848777771, 0.5863862037658691, -0.5248233079910278, 0.5491761565208435, -0.1220257431268692, 0.07838433235883713, 0.2939062714576721, 1.5263398885726929, 3.410602569580078, 0.20317812263965607, 0.2921716570854187, -0.15787646174430847, -0.9564040303230286, 1.4804502725601196, 0.9284219145774841, -0.12992045283317566, -0.5953778028488159, -1.07758629322052, 1.3159774541854858, 1.901027798652649, 0.9239152073860168, -0.006785090081393719, -0.8780271410942078, -0.7047721743583679, -0.08819062262773514, 0.20718064904212952, 0.5265073776245117, 0.9307947158813477, 0.1025896668434143, 0.06826014071702957, 1.4383834600448608, 1.1363295316696167, -0.38374999165534973, 0.2599564492702484, -0.942927360534668, -0.4318864345550537, 0.4543190896511078, 0.14768046140670776, -0.11478745937347412, 0.3732493221759796, -1.0378260612487793, -0.1588938683271408, -0.4272029995918274, -0.8516915440559387, -0.7084969282150269, -0.42650628089904785, -0.3623203635215759, 1.581076741218567, 0.23587344586849213, -0.5424680709838867, -0.019483715295791626, -0.6790761947631836, -0.212560772895813, -1.2040077447891235, 0.2462862730026245, -0.10146420449018478, -0.2181655615568161, -0.20192408561706543, 1.6938889026641846, -0.8930194973945618, -2.079052686691284, 0.11929017305374146, 0.3184516429901123, -0.1672598421573639, 0.20078285038471222, 1.7259652614593506, 0.502932071685791, 1.4391164779663086, 1.2266160249710083, 0.9298797845840454, -0.5831217765808105, -1.2963141202926636, 0.7553057074546814, 1.0001065731048584, -1.3535397052764893, 0.9095029234886169, -0.0827835202217102, -0.5537794828414917, 0.6573430895805359, 1.3363760709762573, 0.49266353249549866, -1.9683512449264526, 0.8504928946495056, -1.1731630563735962, 0.854101836681366, 0.7575206160545349, 0.6563409566879272, 0.1894489824771881, 0.9084808230400085, -1.2299703359603882, -1.1863231658935547, -0.7878265380859375, -0.7703530192375183, 1.9525359869003296, -0.35899490118026733, 0.6108166575431824, -0.21560612320899963, -1.1643093824386597, -0.08171357959508896, 0.7148962616920471, 0.28649890422821045, -0.43543344736099243, 0.8737882971763611, -0.69304358959198, -1.0504437685012817, -1.2748149633407593, -0.39613956212997437, -1.0588771104812622, -0.9913751482963562, 1.0423434972763062, 0.7016472220420837, 0.22454863786697388, 1.8504750728607178, 0.6117141246795654, 0.27967262268066406, -2.588019609451294, 0.8781875371932983, 0.16312113404273987, -0.03450984135270119, 0.9012162089347839, 0.3695748448371887, 1.123042106628418, 0.170360267162323, 0.5082976818084717, -2.5111923217773438, 2.2318434715270996, -0.23492193222045898, 0.6566860675811768, -0.1167522445321083, -0.14638572931289673, 1.2017894983291626, 0.6203990578651428, 0.516447901725769, -0.945867657661438, 0.7088785171508789, -0.5248180031776428, 1.1691004037857056, 0.9018404483795166, -0.7527725696563721, -0.019555162638425827, 1.4275342226028442, 0.3890106678009033, -0.6446654796600342, -0.9513994455337524, -0.9129320979118347, 0.8790730237960815, 1.7214783430099487, 0.0055891042575240135, -0.13856372237205505, 0.6794394254684448, 0.6649708151817322, -1.2227880954742432, 0.09532848000526428, -0.5275745987892151, -0.7023558616638184, 1.7033216953277588, 2.09142804145813, -0.23738349974155426, -0.17260178923606873, -0.618757963180542, -1.2759166955947876, 0.6594468951225281, -0.10472331941127777, 0.0730566531419754, 0.6398950815200806, -0.6091504096984863, 0.9756420254707336, 0.71031653881073, 0.8993117809295654, 0.11900463700294495, 0.25017619132995605, 0.5260688066482544, -0.34739556908607483, -1.196726679801941, -0.25489068031311035, -1.112398386001587, -2.574770212173462, 0.32891473174095154, -0.2199944108724594, -1.4085839986801147, 0.09413906931877136, -1.0541821718215942, 1.0053915977478027, -0.5682490468025208, -1.1966214179992676, -1.5357898473739624, 0.22264988720417023, 0.036564961075782776, 0.9365147948265076, -1.5668132305145264, -0.1029512882232666, 1.190682291984558, 0.8316824436187744, -0.6223283410072327, 1.0636498928070068, 0.25201547145843506, 1.087099313735962, 0.7323563098907471, -0.3204868733882904, 0.5908724069595337, -0.01322921086102724, -1.3635845184326172, 0.48520785570144653, 1.2558062076568604, 0.24495550990104675, 1.4765137434005737, -0.3696661591529846, -0.021375425159931183, 0.38311195373535156, -0.7707071304321289, -0.42814645171165466, -0.28827089071273804, 0.65187007188797, 0.08896194398403168, -0.875980794429779, -0.09402798861265182, -0.12637218832969666, -0.3846137523651123, 0.18218393623828888, -1.5300166606903076, -0.24822603166103363, -0.479665607213974, -0.480379194021225, -1.2584785223007202, -0.04089006036520004, 1.4615525007247925, -0.7390180826187134, -0.28005290031433105, 0.5411968231201172, 0.3407476842403412, 0.5163866281509399, 0.6517332196235657, -0.6764280796051025, -0.2145335078239441, -0.18982328474521637, -0.3032410442829132, 0.2804063856601715, 1.3282889127731323, -0.1114225760102272, -0.9184427261352539, 0.6578811407089233, -0.36177560687065125, 0.13740721344947815, 1.8632644414901733, 0.03722362220287323, -0.7619401216506958, 0.31113797426223755, -0.7862688302993774, 2.0037055015563965, 1.6910604238510132, 1.3415828943252563, -0.22186897695064545, -0.8365944027900696, 0.5995625853538513, -0.3476274311542511, -0.38562414050102234, 0.8316473364830017, 0.4633311629295349, -0.26946502923965454, -1.363999605178833, 0.7910869121551514, 1.1780065298080444, -0.8406429290771484, -0.7587617039680481, 0.22186963260173798, -0.7950677871704102, 1.2167326211929321, 0.5641412138938904, 0.33379077911376953, 0.3171727955341339, 1.6470106840133667, 0.7561549544334412, -0.46001681685447693, 0.6023129820823669, 0.5461911559104919, -0.2405768483877182, -2.090416431427002, -1.0934083461761475, 0.3376965820789337, -0.5443407893180847, -1.6291184425354004, 1.361795425415039, -1.0546867847442627, -1.0077850818634033, 0.601707398891449, 0.08898629248142242, 1.3391789197921753, 0.4271579682826996, 1.5797840356826782, 2.038043260574341, 0.7553302645683289, 0.47314587235450745, 1.236098051071167, -0.14455027878284454, -0.488238126039505, 1.8608734607696533, -0.3826121687889099, 0.5064979791641235, 1.1339401006698608, -0.33257749676704407, -1.1443272829055786, -0.7328369617462158, -1.2451046705245972, -0.6554283499717712, 1.1295713186264038, 0.12559419870376587, -1.077405333518982, 0.23778104782104492, 1.4783893823623657, 0.1436202973127365, -0.22476501762866974, 0.6977636814117432, 0.39824146032333374, -0.7850080728530884, -0.019431238994002342, -0.8974089622497559, 0.4836339056491852, -0.2470625340938568, -0.33645015954971313, 0.3261147141456604, 0.5008853673934937, 1.3595561981201172, -0.0498947873711586, 0.18759825825691223, 1.0931469202041626, -1.4272512197494507, 1.4918212890625, -0.6555524468421936, 0.3385261297225952, -2.3909859657287598, 1.3085206747055054, -0.7023332715034485, 2.051985502243042, -2.6722464561462402, 0.47838059067726135, -0.6201736927032471, -0.5546677708625793, 0.3163337707519531, -0.35001277923583984, 0.09756506979465485, -0.0822930634021759, -1.121382474899292, 0.03740696236491203, -0.613177478313446, 0.613425612449646, 1.1612969636917114, 1.4296890497207642, -1.1178197860717773, -0.18675348162651062, -1.765792965888977, -0.10590415447950363, -0.8832048773765564, 0.27199339866638184, -2.0547378063201904, -0.19988560676574707, -1.934736967086792, -2.3505561351776123, -1.213819146156311, -0.7315061092376709, 1.051676630973816, 0.22551074624061584, -0.8383181095123291, 1.2950361967086792, -0.3450608253479004, -1.7359280586242676, 1.0618010759353638, -2.083235502243042 ]
https://github.com/huggingface/datasets/issues/5609
`load_from_disk` vs `load_dataset` performance.
Hi! We've recently made some improvements to `save_to_disk`/`list_to_disk` (100x faster in some scenarios), so it would help if you could install `datasets` directly from `main` (`pip install git+https://github.com/huggingface/datasets.git`) and re-run the "benchmark".
### Describe the bug I have downloaded `openwebtext` (~12GB) and filtered out a small amount of junk (it's still huge). Now, I would like to use this filtered version for future work. It seems I have two choices: 1. Use `load_dataset` each time, relying on the cache mechanism, and re-run my filtering. 2. `save_to_disk` and then use `load_from_disk` to load the filtered version. The performance of these two approaches is wildly different: * Using `load_dataset` takes about 20 seconds to load the dataset, and a few seconds to re-filter (thanks to the brilliant filter/map caching) * Using `load_from_disk` takes 14 minutes! And the second time I tried, the session just crashed (on a machine with 32GB of RAM) I don't know if you'd call this a bug, but it seems like there shouldn't need to be two methods to load from disk, or that they should not take such wildly different amounts of time, or that one should not crash. Or maybe that the docs could offer some guidance about when to pick which method and why two methods exist, or just how do most people do it? Something I couldn't work out from reading the docs was this: can I modify a dataset from the hub, save it (locally) and use `load_dataset` to load it? This [post seemed to suggest that the answer is no](https://discuss.huggingface.co/t/save-and-load-datasets/9260). ### Steps to reproduce the bug See above ### Expected behavior Load times should be about the same. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
270
32
`load_from_disk` vs `load_dataset` performance. ### Describe the bug I have downloaded `openwebtext` (~12GB) and filtered out a small amount of junk (it's still huge). Now, I would like to use this filtered version for future work. It seems I have two choices: 1. Use `load_dataset` each time, relying on the cache mechanism, and re-run my filtering. 2. `save_to_disk` and then use `load_from_disk` to load the filtered version. The performance of these two approaches is wildly different: * Using `load_dataset` takes about 20 seconds to load the dataset, and a few seconds to re-filter (thanks to the brilliant filter/map caching) * Using `load_from_disk` takes 14 minutes! And the second time I tried, the session just crashed (on a machine with 32GB of RAM) I don't know if you'd call this a bug, but it seems like there shouldn't need to be two methods to load from disk, or that they should not take such wildly different amounts of time, or that one should not crash. Or maybe that the docs could offer some guidance about when to pick which method and why two methods exist, or just how do most people do it? Something I couldn't work out from reading the docs was this: can I modify a dataset from the hub, save it (locally) and use `load_dataset` to load it? This [post seemed to suggest that the answer is no](https://discuss.huggingface.co/t/save-and-load-datasets/9260). ### Steps to reproduce the bug See above ### Expected behavior Load times should be about the same. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Hi! We've recently made some improvements to `save_to_disk`/`list_to_disk` (100x faster in some scenarios), so it would help if you could install `datasets` directly from `main` (`pip install git+https://github.com/huggingface/datasets.git`) and re-run the "benchmark".
[ -1.1461586952209473, -0.9332696795463562, -0.7413451075553894, 1.4626514911651611, -0.14524132013320923, -1.210001826286316, 0.1552080363035202, -1.0253177881240845, 1.6445262432098389, -0.8235805630683899, 0.35147538781166077, -1.6538468599319458, 0.05077756941318512, -0.6181231141090393, -0.731784999370575, -0.810588002204895, -0.4466480016708374, -0.6839421391487122, 0.9942367076873779, 2.513770341873169, 1.1730412244796753, -1.4350224733352661, 2.6800291538238525, 0.6933383345603943, -0.13196690380573273, -1.0177931785583496, 0.4396047592163086, 0.019226577132940292, -1.3306399583816528, -0.40648457407951355, -0.8668926954269409, -0.07116228342056274, -0.5844420790672302, -0.5831778049468994, 0.029273197054862976, 0.3667314946651459, -0.29217565059661865, -0.4835579991340637, -0.5595471262931824, -0.7363156676292419, 0.5342403650283813, -0.3700176477432251, 0.989437460899353, -0.3073553144931793, 1.8289014101028442, -0.53078693151474, 0.5105192065238953, 0.7539682388305664, 1.3409620523452759, 0.14306247234344482, 0.031751565635204315, 0.353086918592453, 0.4397658407688141, -0.0018004495650529861, 0.4890151917934418, 1.1634867191314697, 0.681307852268219, 0.5238683223724365, 0.7253702878952026, -2.18157958984375, 1.3001502752304077, -0.9915745854377747, 0.34125688672065735, 1.2998743057250977, -1.0073084831237793, 0.3419201076030731, -1.7588224411010742, -0.06972327083349228, 0.46773120760917664, -2.2165327072143555, 0.2511065602302551, -1.2321821451187134, -0.453799307346344, 0.9790936708450317, 0.3379058241844177, -1.2655971050262451, 0.13799038529396057, -0.4511669874191284, 0.9701935648918152, 0.4239746630191803, 1.1480116844177246, -1.7074816226959229, -0.04390059411525726, -0.28183406591415405, 0.10493369400501251, -1.2211838960647583, -1.4935522079467773, 0.5283395648002625, 0.6729629039764404, 0.5646602511405945, -0.09058310836553574, 0.979570209980011, -0.9715884923934937, 0.7594000697135925, -0.9668075442314148, -1.7240443229675293, -1.441581130027771, -2.274998903274536, -2.3085224628448486, 0.801215648651123, -0.43062424659729004, -0.5037676095962524, 2.040356397628784, -1.0623217821121216, -1.7782179117202759, 1.131011724472046, 0.2661098837852478, -0.07551302015781403, 2.3222458362579346, 0.19274482131004333, -0.7281556129455566, 0.5441705584526062, -0.7333799600601196, 0.7515520453453064, -0.4895462393760681, 1.3373459577560425, 0.3898271918296814, -1.0771352052688599, 1.5800392627716064, -0.3649805188179016, 0.609297513961792, -0.6841863393783569, -0.5024973750114441, -0.7944071888923645, 0.29104888439178467, 1.9287371635437012, -0.2992035746574402, 1.5310349464416504, -0.33756399154663086, -1.5821038484573364, -1.54231595993042, 0.9344000220298767, 0.42976030707359314, -0.7076347470283508, 0.1508541852235794, -0.334465891122818, 0.07243494689464569, -0.04464959353208542, 1.1199462413787842, 1.2787412405014038, 0.7255138754844666, -0.3174259066581726, -0.9045585989952087, 0.18787729740142822, -0.12614549696445465, -0.6693743467330933, -1.81328284740448, -0.3808756470680237, 0.16098657250404358, 0.5890849232673645, -1.1531791687011719, 1.7857756614685059, 0.8825318813323975, 1.9340876340866089, 1.0804251432418823, -0.3181333541870117, 1.5076017379760742, 0.11430253088474274, 1.9206347465515137, -0.45501700043678284, 0.6408855319023132, -0.38385918736457825, -1.1622674465179443, 0.8069213628768921, -0.37040337920188904, -2.0441834926605225, -0.6158385872840881, -0.8826024532318115, -0.16729062795639038, -0.7466910481452942, 0.9666077494621277, -0.24263718724250793, -1.3828449249267578, 0.24251689016819, -0.668125569820404, 0.16737100481987, -1.189417839050293, 0.34095293283462524, 0.8033171892166138, -0.6224686503410339, 0.035888321697711945, -0.2865253984928131, -1.3437204360961914, -0.4573379456996918, 0.38514357805252075, 1.7610383033752441, -0.7694329619407654, 0.9879352450370789, 1.0269745588302612, -0.6551122069358826, -0.03473254665732384, 0.43185317516326904, -0.32152608036994934, 0.8851029276847839, -1.0374782085418701, -0.3848741948604584, 1.2370548248291016, -0.2231648713350296, -0.5319859981536865, 1.4422028064727783, 0.71122145652771, -0.9723038673400879, -0.18099690973758698, -0.14075474441051483, -0.9088161587715149, -0.01019404735416174, -1.5979937314987183, -0.03496280312538147, 0.3305167853832245, -1.5668871402740479, -0.5030269026756287, -0.19733712077140808, 1.2860729694366455, -0.09257245808839798, 1.4122048616409302, -0.3366345465183258, -0.22134588658809662, -0.3907904624938965, -0.46172764897346497, 0.09720566868782043, -0.26086142659187317, -0.6168197393417358, 0.23058025538921356, -0.7400849461555481, 0.3716762065887451, 1.4610599279403687, 0.24562786519527435, 0.05079534649848938, 0.5716119408607483, 1.0748982429504395, 0.38310545682907104, -0.0785030871629715, -0.8360413908958435, -1.5952060222625732, 2.0647125244140625, -1.4190914630889893, 2.0019125938415527, 0.8052911758422852, -0.05825576186180115, -1.7855299711227417, -1.8442474603652954, 1.4239379167556763, 1.1484013795852661, 2.3735573291778564, 0.5325234532356262, 0.433052122592926, -0.8465065360069275, -0.6845054030418396, 0.3276742100715637, -0.9927957057952881, -0.786805272102356, 0.11785348504781723, 2.3897645473480225, 1.7875856161117554, -0.4589276611804962, -0.22898176312446594, -1.0978773832321167, 1.501347303390503, -0.2448800951242447, 0.1811705082654953, 1.9516775608062744, -0.2659584879875183, -1.0266040563583374, 1.3584667444229126, -2.336024284362793, 0.22910478711128235, 1.9906103610992432, 0.26989462971687317, 0.05923893675208092, -1.3929367065429688, -0.6086284518241882, -0.19230766594409943, -0.355644553899765, -1.2375026941299438, 0.5072378516197205, -0.2899109125137329, -0.7502135038375854, -1.4181954860687256, 0.1846144199371338, -1.10862135887146, -1.656780481338501, 0.25415119528770447, 1.7974861860275269, 2.0405287742614746, -0.7219247817993164, 1.5542372465133667, -0.2541063725948334, 0.22213654220104218, 1.2394647598266602, 1.1873054504394531, 3.1701784133911133, 1.9632610082626343, -1.2769196033477783, 0.6604507565498352, -0.15470056235790253, -0.5051507949829102, 1.1243371963500977, -1.1519067287445068, 1.324462652206421, -0.22924430668354034, -1.1789178848266602, -1.2314082384109497, 0.9565359950065613, 0.48622453212738037, 0.11958802491426468, -0.4695255756378174, 1.196027398109436, 0.053542960435152054, 1.246382236480713, 0.5976767539978027, -0.35845398902893066, 0.6415305733680725, -0.4143299162387848, -0.5711520314216614, 1.5416339635849, 0.24870850145816803, -1.394895076751709, -2.272054672241211, -0.26577702164649963, -0.8569349646568298, 0.0723230242729187, -0.6345489621162415, -0.9141530394554138, 1.6050044298171997, 0.4309616684913635, -1.222368597984314, -0.2835303544998169, -0.3289456367492676, -0.6306412816047668, 2.6826157569885254, -1.4142321348190308, -0.2846512794494629, -1.0080058574676514, -0.6521361470222473, 1.618617057800293, -1.1739572286605835, -0.22289514541625977, -1.0156517028808594, -0.6117810010910034, -1.247193694114685, -0.5366652607917786, -0.05908162146806717, -0.888426661491394, 0.7623979449272156, 0.15580454468727112, -1.2188764810562134, -0.3081008493900299, -0.9441406726837158, 0.8402885794639587, -0.18697230517864227, 0.17072084546089172, 1.79750394821167, 0.3969151973724365, -0.40601038932800293, 0.7282609939575195, 1.1995075941085815, 0.590192973613739, -0.6963057518005371, 0.1961727887392044, -0.6729896068572998, 0.2557517886161804, -1.3403247594833374, 0.34199613332748413, -2.8440003395080566, 0.6345880627632141, -0.03306077420711517, -0.06959284842014313, -0.016289785504341125, -1.3388148546218872, 1.0436136722564697, 2.5890719890594482, -1.1760519742965698, 0.5129863023757935, 0.28865835070610046, 1.20028555393219, -1.543349027633667, 0.27447864413261414, -0.44472184777259827, 2.1426916122436523, 0.16670474410057068, 1.1708712577819824, -0.4696342945098877, -2.334131956100464, 0.5387269854545593, -1.2341868877410889, -1.1299043893814087, 0.7882831692695618, -0.7994906306266785, 0.058603543788194656, -1.3700255155563354, -0.16234903037548065, -0.8216702938079834, -1.2064788341522217, 0.6197192072868347, 0.10500910878181458, 0.5212646722793579, -0.6231573820114136, 0.32312342524528503, -2.1706669330596924, -1.3905385732650757, -0.22231490910053253, -0.9321765303611755, 0.45600956678390503, -0.3485199809074402, 0.7505733370780945, -0.2557138502597809, -0.006715624127537012, 0.248252734541893, 1.3569982051849365, 3.366804361343384, 0.12439735978841782, 0.3834577798843384, -0.16215524077415466, -0.8910603523254395, 1.4372087717056274, 0.930823802947998, -0.14489305019378662, -0.5965914726257324, -1.0095272064208984, 1.267458200454712, 1.9638023376464844, 1.0041148662567139, 0.06455300748348236, -0.8323397040367126, -0.7014656662940979, -0.03518746793270111, 0.1253730058670044, 0.49731793999671936, 0.9042800664901733, 0.08675229549407959, 0.10184934735298157, 1.3538312911987305, 1.2207101583480835, -0.35163530707359314, 0.3865628242492676, -0.8114645481109619, -0.4090757369995117, 0.4865391254425049, 0.4231436550617218, 0.006327533163130283, 0.26239854097366333, -1.1078746318817139, -0.19842208921909332, -0.4344429671764374, -0.9020585417747498, -0.7410414218902588, -0.4727416932582855, -0.39035671949386597, 1.711027979850769, 0.11148392409086227, -0.5185766816139221, -0.055761728435754776, -0.7677287459373474, -0.053026918321847916, -1.0210984945297241, 0.3010062873363495, -0.12372272461652756, -0.04247325658798218, -0.06701800227165222, 1.731196403503418, -0.9551863074302673, -2.1346263885498047, 0.2338716685771942, 0.18597567081451416, -0.2892846465110779, 0.1281813383102417, 1.6236579418182373, 0.5626006722450256, 1.423014521598816, 1.4213610887527466, 1.0132795572280884, -0.6772761940956116, -1.3118470907211304, 0.689853847026825, 1.0237164497375488, -1.4006924629211426, 0.7449658513069153, 0.049594853073358536, -0.5698074698448181, 0.6635672450065613, 1.2435693740844727, 0.47607511281967163, -2.0636961460113525, 0.7536285519599915, -0.9412229657173157, 0.7928695678710938, 0.7921839356422424, 0.702687680721283, 0.2588452696800232, 0.7876049280166626, -1.239047884941101, -1.160889983177185, -0.7747797966003418, -0.7285237908363342, 1.9947009086608887, -0.32851141691207886, 0.5840494632720947, -0.20461729168891907, -1.3723411560058594, -0.12290087342262268, 0.7458754181861877, 0.3872138559818268, -0.48576247692108154, 0.7421059608459473, -0.6591552495956421, -1.1629949808120728, -1.4111818075180054, -0.4370957612991333, -1.0830497741699219, -0.9192885160446167, 1.0632473230361938, 0.7937049865722656, 0.3724949061870575, 1.8692213296890259, 0.7312049865722656, 0.22263562679290771, -2.6542105674743652, 0.8518863320350647, 0.31367388367652893, -0.09116379916667938, 0.837506115436554, 0.32629162073135376, 1.0024391412734985, 0.0016995007172226906, 0.6162799000740051, -2.4358768463134766, 2.252603054046631, -0.1665317714214325, 0.6843509078025818, -0.04176374897360802, -0.16960231959819794, 1.0480983257293701, 0.5389180183410645, 0.5880638957023621, -1.1239013671875, 0.7273563146591187, -0.5668385624885559, 1.2449402809143066, 0.7974370121955872, -0.824565589427948, -0.030370492488145828, 1.3973679542541504, 0.42523032426834106, -0.5025845766067505, -0.9398868680000305, -1.0180225372314453, 0.9190853238105774, 1.8122438192367554, -0.051200490444898605, 0.012262118048965931, 0.8654011487960815, 0.6864393949508667, -1.3621773719787598, 0.06788083165884018, -0.6600261330604553, -0.7671961188316345, 1.6619102954864502, 2.039689064025879, -0.1295558214187622, -0.1452551931142807, -0.7865575551986694, -1.2963980436325073, 0.7912377119064331, 0.09321469068527222, 0.08729320764541626, 0.6601298451423645, -0.633076012134552, 1.1442674398422241, 0.849668562412262, 0.8919618725776672, 0.16156554222106934, 0.19440299272537231, 0.3626451790332794, -0.36429157853126526, -1.1906245946884155, -0.3010725975036621, -1.0832033157348633, -2.4813711643218994, 0.4205721318721771, -0.17051701247692108, -1.5123695135116577, 0.030864208936691284, -1.0291599035263062, 0.852995753288269, -0.5673493146896362, -1.122232437133789, -1.5511047840118408, 0.20694127678871155, -0.12838123738765717, 0.9061869382858276, -1.6143654584884644, -0.10570309311151505, 1.1444305181503296, 0.94859778881073, -0.6318635940551758, 1.0547128915786743, 0.19185777008533478, 0.9920456409454346, 0.8677027225494385, -0.41576629877090454, 0.5312360525131226, 0.24725504219532013, -1.3850468397140503, 0.48281756043434143, 1.1787348985671997, 0.19296538829803467, 1.4647314548492432, -0.6450891494750977, 0.031851619482040405, 0.42657673358917236, -0.44731974601745605, -0.4875502288341522, -0.5882618427276611, 0.68721604347229, -0.012203304097056389, -0.8836307525634766, 0.04024842754006386, -0.10504777729511261, -0.21938978135585785, 0.1420988291501999, -1.501159906387329, -0.10175771266222, -0.40827733278274536, -0.6156173348426819, -1.2233587503433228, -0.0020625730976462364, 1.4084904193878174, -0.703200101852417, -0.12964922189712524, 0.5365931987762451, 0.4010125994682312, 0.48447930812835693, 0.6495733857154846, -0.6395294666290283, -0.2863020598888397, -0.2300185114145279, -0.4056728482246399, 0.32861649990081787, 1.338681697845459, -0.13243761658668518, -0.8734553456306458, 0.7178035378456116, -0.4093436002731323, 0.07281024754047394, 1.928207516670227, 0.15777501463890076, -0.8005125522613525, 0.3146403729915619, -0.7520869970321655, 1.9922447204589844, 1.744136095046997, 1.319932460784912, -0.06901688873767853, -1.0139936208724976, 0.653540313243866, -0.2785319983959198, -0.35880351066589355, 0.9535648822784424, 0.36053308844566345, -0.22386051714420319, -1.4091875553131104, 0.6629311442375183, 1.279347538948059, -0.8206308484077454, -0.8423479795455933, 0.06633912771940231, -0.8628700971603394, 1.0401058197021484, 0.6949652433395386, 0.4379427433013916, 0.20215201377868652, 1.665037989616394, 0.7796341776847839, -0.4844162166118622, 0.6301859021186829, 0.5168215036392212, -0.14125820994377136, -2.0555546283721924, -1.1879974603652954, 0.35330238938331604, -0.5204456448554993, -1.6132076978683472, 1.3045918941497803, -1.1905056238174438, -1.0073387622833252, 0.5327802896499634, 0.05085276439785957, 1.462285041809082, 0.3723386228084564, 1.4970085620880127, 2.078866958618164, 0.8815597295761108, 0.3801453113555908, 1.3108384609222412, -0.21124181151390076, -0.4265829920768738, 1.8310186862945557, -0.46233126521110535, 0.5207037329673767, 1.1266828775405884, -0.40834760665893555, -1.1114870309829712, -0.7392145395278931, -1.1279429197311401, -0.7038120627403259, 1.1382509469985962, 0.07196934521198273, -1.0628873109817505, 0.28116267919540405, 1.6214487552642822, 0.11133255809545517, -0.2903708815574646, 0.6688662171363831, 0.3558632433414459, -0.7892078161239624, -0.002345211338251829, -0.9519268870353699, 0.6009920239448547, -0.21276544034481049, -0.3626148998737335, 0.3627256453037262, 0.48587286472320557, 1.2333741188049316, -0.0641428753733635, 0.08676894754171371, 1.1940585374832153, -1.459503412246704, 1.4474180936813354, -0.6825034022331238, 0.23267941176891327, -2.368368148803711, 1.3988566398620605, -0.7629330158233643, 1.9552496671676636, -2.632685422897339, 0.3545265197753906, -0.6217321157455444, -0.5121976733207703, 0.34468111395835876, -0.27162227034568787, 0.09207110106945038, -0.17507149279117584, -1.1704031229019165, -0.05160307511687279, -0.6846394538879395, 0.4928891956806183, 1.1318128108978271, 1.3434959650039673, -1.0879942178726196, -0.26571863889694214, -1.7068958282470703, -0.1244436576962471, -0.6789610385894775, 0.31903332471847534, -1.934261679649353, -0.22244952619075775, -1.9089256525039673, -2.3769655227661133, -1.3297693729400635, -0.9078075885772705, 1.067779779434204, 0.11950891464948654, -0.9103271961212158, 1.241767168045044, -0.34708014130592346, -1.9021378755569458, 1.0704100131988525, -2.1792893409729004 ]
https://github.com/huggingface/datasets/issues/5609
`load_from_disk` vs `load_dataset` performance.
@mariosasko is that fix released to pip in the meantime? Asking cause im facing still the same issue (regarding loading images from local paths): ``` dataset = load_dataset("csv", cache_dir="cache", data_files=["/STORAGE/DATA/mijam/vit/code/list_filtered.csv"], num_proc=16, split="train").cast_column("image", Image()) dataset = dataset.class_encode_column("label") ``` quite fast. Then I do `save_to_disk()` and some time later: ``` dataset = load_from_disk('/STORAGE/DATA/mijam/accel/saved_arrow_big') ``` really slow. In theory it should be quicked since it only loads arrow files, no conversions and so on.
### Describe the bug I have downloaded `openwebtext` (~12GB) and filtered out a small amount of junk (it's still huge). Now, I would like to use this filtered version for future work. It seems I have two choices: 1. Use `load_dataset` each time, relying on the cache mechanism, and re-run my filtering. 2. `save_to_disk` and then use `load_from_disk` to load the filtered version. The performance of these two approaches is wildly different: * Using `load_dataset` takes about 20 seconds to load the dataset, and a few seconds to re-filter (thanks to the brilliant filter/map caching) * Using `load_from_disk` takes 14 minutes! And the second time I tried, the session just crashed (on a machine with 32GB of RAM) I don't know if you'd call this a bug, but it seems like there shouldn't need to be two methods to load from disk, or that they should not take such wildly different amounts of time, or that one should not crash. Or maybe that the docs could offer some guidance about when to pick which method and why two methods exist, or just how do most people do it? Something I couldn't work out from reading the docs was this: can I modify a dataset from the hub, save it (locally) and use `load_dataset` to load it? This [post seemed to suggest that the answer is no](https://discuss.huggingface.co/t/save-and-load-datasets/9260). ### Steps to reproduce the bug See above ### Expected behavior Load times should be about the same. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
270
71
`load_from_disk` vs `load_dataset` performance. ### Describe the bug I have downloaded `openwebtext` (~12GB) and filtered out a small amount of junk (it's still huge). Now, I would like to use this filtered version for future work. It seems I have two choices: 1. Use `load_dataset` each time, relying on the cache mechanism, and re-run my filtering. 2. `save_to_disk` and then use `load_from_disk` to load the filtered version. The performance of these two approaches is wildly different: * Using `load_dataset` takes about 20 seconds to load the dataset, and a few seconds to re-filter (thanks to the brilliant filter/map caching) * Using `load_from_disk` takes 14 minutes! And the second time I tried, the session just crashed (on a machine with 32GB of RAM) I don't know if you'd call this a bug, but it seems like there shouldn't need to be two methods to load from disk, or that they should not take such wildly different amounts of time, or that one should not crash. Or maybe that the docs could offer some guidance about when to pick which method and why two methods exist, or just how do most people do it? Something I couldn't work out from reading the docs was this: can I modify a dataset from the hub, save it (locally) and use `load_dataset` to load it? This [post seemed to suggest that the answer is no](https://discuss.huggingface.co/t/save-and-load-datasets/9260). ### Steps to reproduce the bug See above ### Expected behavior Load times should be about the same. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 @mariosasko is that fix released to pip in the meantime? Asking cause im facing still the same issue (regarding loading images from local paths): ``` dataset = load_dataset("csv", cache_dir="cache", data_files=["/STORAGE/DATA/mijam/vit/code/list_filtered.csv"], num_proc=16, split="train").cast_column("image", Image()) dataset = dataset.class_encode_column("label") ``` quite fast. Then I do `save_to_disk()` and some time later: ``` dataset = load_from_disk('/STORAGE/DATA/mijam/accel/saved_arrow_big') ``` really slow. In theory it should be quicked since it only loads arrow files, no conversions and so on.
[ -1.1504758596420288, -0.9288638830184937, -0.7494857311248779, 1.460647702217102, -0.14338603615760803, -1.2090320587158203, 0.14476484060287476, -1.0342321395874023, 1.668833613395691, -0.8153769373893738, 0.33879122138023376, -1.6526466608047485, 0.06922627985477448, -0.6100777983665466, -0.7421555519104004, -0.8165311217308044, -0.4613332152366638, -0.7008547186851501, 0.9989265203475952, 2.5019168853759766, 1.1819268465042114, -1.4289050102233887, 2.6909983158111572, 0.7023049592971802, -0.12508930265903473, -1.0198720693588257, 0.4400022327899933, 0.022542227059602737, -1.3426281213760376, -0.4011399745941162, -0.8780921697616577, -0.06699836999177933, -0.589260458946228, -0.5948283672332764, 0.028447657823562622, 0.3592893183231354, -0.28535130620002747, -0.4819040298461914, -0.5511372089385986, -0.7433841824531555, 0.5279857516288757, -0.3485940396785736, 0.9851800799369812, -0.32052069902420044, 1.8358845710754395, -0.5266752243041992, 0.4879339039325714, 0.7572706341743469, 1.3466492891311646, 0.15339767932891846, 0.01763816922903061, 0.33923712372779846, 0.4260577857494354, -0.0004962803795933723, 0.4807042181491852, 1.1619818210601807, 0.676124095916748, 0.5196257829666138, 0.7214628458023071, -2.1829891204833984, 1.3006610870361328, -0.9933269023895264, 0.342119038105011, 1.3062052726745605, -1.0258488655090332, 0.32852229475975037, -1.7721118927001953, -0.07067544758319855, 0.4565349817276001, -2.2142012119293213, 0.22835920751094818, -1.2315380573272705, -0.45663437247276306, 0.9759409427642822, 0.31889212131500244, -1.2756941318511963, 0.13204443454742432, -0.4446929097175598, 0.9752427935600281, 0.4386979639530182, 1.1638789176940918, -1.6908174753189087, -0.03467833623290062, -0.27904075384140015, 0.12813076376914978, -1.23137366771698, -1.50315260887146, 0.5408338308334351, 0.700623095035553, 0.553890585899353, -0.10415395349264145, 0.9783540964126587, -0.9701886177062988, 0.7685447931289673, -0.93522047996521, -1.7281602621078491, -1.4305309057235718, -2.271547794342041, -2.3156344890594482, 0.8092634677886963, -0.44586846232414246, -0.49480539560317993, 2.0473601818084717, -1.0695143938064575, -1.7752889394760132, 1.12788724899292, 0.2565079927444458, -0.07369403541088104, 2.325251340866089, 0.1850566565990448, -0.725358784198761, 0.5187636017799377, -0.7231625914573669, 0.751093327999115, -0.4562360346317291, 1.3557615280151367, 0.3907470107078552, -1.0775667428970337, 1.5608078241348267, -0.3498549163341522, 0.6023447513580322, -0.6792909502983093, -0.4928172826766968, -0.7757055163383484, 0.2847294211387634, 1.925011396408081, -0.3117447793483734, 1.5518128871917725, -0.32346102595329285, -1.593080759048462, -1.5434297323226929, 0.9137042164802551, 0.4546046555042267, -0.6918407082557678, 0.16398663818836212, -0.32676446437835693, 0.07131592184305191, -0.027486246079206467, 1.127732515335083, 1.28219473361969, 0.7444714307785034, -0.31300410628318787, -0.9003190994262695, 0.19170358777046204, -0.11520373821258545, -0.6651965379714966, -1.8054255247116089, -0.37980031967163086, 0.14658574759960175, 0.5968769788742065, -1.1667059659957886, 1.7793298959732056, 0.8801750540733337, 1.9277403354644775, 1.0904872417449951, -0.3116094172000885, 1.5278788805007935, 0.11768490821123123, 1.8925672769546509, -0.44517913460731506, 0.6492820978164673, -0.3896517753601074, -1.1520243883132935, 0.7927445769309998, -0.36436042189598083, -2.0416769981384277, -0.6241925954818726, -0.8951142430305481, -0.17308609187602997, -0.7438810467720032, 0.9704107046127319, -0.2357344925403595, -1.3771202564239502, 0.24766241014003754, -0.649868905544281, 0.14388348162174225, -1.1997365951538086, 0.3561278283596039, 0.7986822724342346, -0.622437596321106, 0.04251265153288841, -0.2881113290786743, -1.3369168043136597, -0.46353664994239807, 0.3622727394104004, 1.7689461708068848, -0.7927926182746887, 0.9804505705833435, 1.0275532007217407, -0.6686118245124817, -0.017424166202545166, 0.43639785051345825, -0.319902628660202, 0.8896195292472839, -1.0317577123641968, -0.3806029260158539, 1.2236889600753784, -0.21099795401096344, -0.5171520709991455, 1.4391775131225586, 0.7059929370880127, -0.9753545522689819, -0.1850801408290863, -0.12952673435211182, -0.9103647470474243, -0.025275256484746933, -1.5971639156341553, -0.048484496772289276, 0.3124256432056427, -1.561521053314209, -0.5157209038734436, -0.20574015378952026, 1.2740461826324463, -0.09214278310537338, 1.42739737033844, -0.34941208362579346, -0.23543775081634521, -0.3869544267654419, -0.43844175338745117, 0.09488186240196228, -0.2541847825050354, -0.6242448687553406, 0.24553249776363373, -0.7480701208114624, 0.36897167563438416, 1.4451241493225098, 0.2703548073768616, 0.033382438123226166, 0.5715941190719604, 1.0741149187088013, 0.3809269666671753, -0.07200371474027634, -0.8381300568580627, -1.5875695943832397, 2.0749924182891846, -1.4163293838500977, 1.9860992431640625, 0.810886561870575, -0.05848410725593567, -1.7782618999481201, -1.8484830856323242, 1.4441471099853516, 1.1503669023513794, 2.379154682159424, 0.5490306615829468, 0.426641047000885, -0.8382562398910522, -0.6908162832260132, 0.34962692856788635, -0.9990760684013367, -0.794535219669342, 0.11928962916135788, 2.3889474868774414, 1.7783467769622803, -0.46170711517333984, -0.23462940752506256, -1.0842052698135376, 1.467965006828308, -0.2308836132287979, 0.1578260213136673, 1.9617670774459839, -0.27680087089538574, -1.0337108373641968, 1.343496322631836, -2.331808567047119, 0.20781473815441132, 1.9913173913955688, 0.27575284242630005, 0.041027236729860306, -1.4005639553070068, -0.6133486032485962, -0.1794964224100113, -0.36720237135887146, -1.2323590517044067, 0.5215010643005371, -0.288982093334198, -0.7570126056671143, -1.4389663934707642, 0.1811869889497757, -1.1051390171051025, -1.6553962230682373, 0.24750839173793793, 1.809653401374817, 2.03088641166687, -0.7184568047523499, 1.5401159524917603, -0.2576223909854889, 0.22271627187728882, 1.2438223361968994, 1.1830475330352783, 3.179779052734375, 1.966538429260254, -1.2766180038452148, 0.6579787731170654, -0.1321616917848587, -0.5109614133834839, 1.127685546875, -1.157078742980957, 1.3108022212982178, -0.2378576546907425, -1.1910921335220337, -1.2206577062606812, 0.9632329940795898, 0.47501635551452637, 0.1260654181241989, -0.46433940529823303, 1.1943942308425903, 0.04413028061389923, 1.2334342002868652, 0.5982937812805176, -0.34208181500434875, 0.6519777774810791, -0.42634475231170654, -0.5746392607688904, 1.5342483520507812, 0.23837514221668243, -1.3853691816329956, -2.272282123565674, -0.27014365792274475, -0.8544616103172302, 0.08915433287620544, -0.6218164563179016, -0.9144654870033264, 1.605954885482788, 0.45027804374694824, -1.229959487915039, -0.29466497898101807, -0.34055501222610474, -0.6408663988113403, 2.6689863204956055, -1.4365675449371338, -0.2758161723613739, -1.0067464113235474, -0.6485736966133118, 1.6136106252670288, -1.1609916687011719, -0.21478000283241272, -1.021313190460205, -0.6045776009559631, -1.272779941558838, -0.5626842975616455, -0.05788807570934296, -0.8711425065994263, 0.7688543200492859, 0.14972487092018127, -1.1939092874526978, -0.30797404050827026, -0.9503546953201294, 0.8452960252761841, -0.17673996090888977, 0.17751312255859375, 1.8096323013305664, 0.4211411476135254, -0.430139422416687, 0.7206994891166687, 1.1881968975067139, 0.5975303649902344, -0.6830488443374634, 0.20416584610939026, -0.6826759576797485, 0.2730010151863098, -1.3545444011688232, 0.33523786067962646, -2.8406951427459717, 0.6332467794418335, -0.026414349675178528, -0.06599941104650497, -0.014124016277492046, -1.3474591970443726, 1.042138934135437, 2.599707841873169, -1.1595134735107422, 0.4943786859512329, 0.2896479666233063, 1.2156192064285278, -1.5481468439102173, 0.2685762941837311, -0.4495282769203186, 2.1380677223205566, 0.16459012031555176, 1.1717219352722168, -0.4663192629814148, -2.330481767654419, 0.5559211373329163, -1.2553824186325073, -1.1353347301483154, 0.788063108921051, -0.8011287450790405, 0.04754669964313507, -1.3612101078033447, -0.16468776762485504, -0.8008447289466858, -1.1920753717422485, 0.6305153369903564, 0.09231912344694138, 0.523414671421051, -0.6288717985153198, 0.3351435363292694, -2.162109375, -1.3764787912368774, -0.20904390513896942, -0.9384000897407532, 0.43678832054138184, -0.35569095611572266, 0.7587288618087769, -0.25884565711021423, -0.000774722546339035, 0.26631221175193787, 1.3293472528457642, 3.3723056316375732, 0.1241690143942833, 0.3894200623035431, -0.1485721915960312, -0.8949012756347656, 1.4511984586715698, 0.9199473261833191, -0.13496346771717072, -0.6044797897338867, -1.026280403137207, 1.250613808631897, 1.9539029598236084, 1.0128449201583862, 0.05275805667042732, -0.8295003771781921, -0.7135335206985474, -0.01632254756987095, 0.1331932693719864, 0.5162132978439331, 0.9026817679405212, 0.09280238300561905, 0.10162696987390518, 1.365370750427246, 1.2259451150894165, -0.3521818518638611, 0.40304675698280334, -0.8153613805770874, -0.4365127384662628, 0.4996922016143799, 0.4267410933971405, -0.00047957897186279297, 0.264130562543869, -1.11128830909729, -0.20063824951648712, -0.4356553256511688, -0.9190617799758911, -0.7258931398391724, -0.4661320447921753, -0.36920928955078125, 1.7067631483078003, 0.11074072122573853, -0.5219264626502991, -0.076118603348732, -0.7845299243927002, -0.04946047440171242, -1.0200339555740356, 0.32085487246513367, -0.11929494142532349, -0.05133076384663582, -0.08216757327318192, 1.7397432327270508, -0.9359740018844604, -2.1125879287719727, 0.25114771723747253, 0.18061164021492004, -0.3052102029323578, 0.12213670462369919, 1.6101289987564087, 0.5581852197647095, 1.4201205968856812, 1.4185447692871094, 1.0056354999542236, -0.6766084432601929, -1.314839482307434, 0.6804119348526001, 1.0165603160858154, -1.3955235481262207, 0.7404655814170837, 0.05887138098478317, -0.566750705242157, 0.6447511315345764, 1.2570828199386597, 0.47189798951148987, -2.058454990386963, 0.7663758397102356, -0.9218597412109375, 0.7685943841934204, 0.7802552580833435, 0.7120836973190308, 0.24529482424259186, 0.7891053557395935, -1.2422078847885132, -1.1662068367004395, -0.7848365902900696, -0.7172555923461914, 1.9828587770462036, -0.31371933221817017, 0.5870375633239746, -0.20439279079437256, -1.3837498426437378, -0.12518298625946045, 0.7466205358505249, 0.3731800615787506, -0.46812865138053894, 0.7503665685653687, -0.6562985181808472, -1.1807100772857666, -1.4130414724349976, -0.43190574645996094, -1.0769121646881104, -0.919054388999939, 1.0680779218673706, 0.7981685400009155, 0.37365707755088806, 1.8741168975830078, 0.706777036190033, 0.2074727714061737, -2.650071144104004, 0.8463374376296997, 0.32131427526474, -0.0784117579460144, 0.8438794612884521, 0.3183855712413788, 0.9951671361923218, 0.007223854772746563, 0.5963709950447083, -2.430908441543579, 2.2610647678375244, -0.167170450091362, 0.7013363838195801, -0.0299990214407444, -0.19533327221870422, 1.0433775186538696, 0.5481386184692383, 0.602172315120697, -1.1201914548873901, 0.7333549857139587, -0.5758283734321594, 1.2397212982177734, 0.8021800518035889, -0.8015627264976501, -0.026321612298488617, 1.374359130859375, 0.4394257962703705, -0.48969417810440063, -0.9291788935661316, -1.010032296180725, 0.922943651676178, 1.821898102760315, -0.04329578951001167, 0.03263721242547035, 0.8526379466056824, 0.700641930103302, -1.3694018125534058, 0.06694065034389496, -0.687021791934967, -0.770099937915802, 1.6537222862243652, 2.049051523208618, -0.1109946221113205, -0.15119852125644684, -0.7904835343360901, -1.2890210151672363, 0.791835367679596, 0.10852658748626709, 0.09817706048488617, 0.6702982783317566, -0.6437305212020874, 1.143080234527588, 0.8687229752540588, 0.884880781173706, 0.17264720797538757, 0.22124646604061127, 0.3646679222583771, -0.34452489018440247, -1.1956582069396973, -0.2855689823627472, -1.0740947723388672, -2.484761953353882, 0.42965349555015564, -0.1928720623254776, -1.514830231666565, 0.03408673033118248, -1.0200575590133667, 0.8437054753303528, -0.5654920935630798, -1.1165937185287476, -1.5520730018615723, 0.19659264385700226, -0.13469012081623077, 0.9064004421234131, -1.6059738397598267, -0.09751037508249283, 1.14914071559906, 0.9560679793357849, -0.6207783222198486, 1.0395647287368774, 0.18784458935260773, 1.0049902200698853, 0.8863592147827148, -0.40746405720710754, 0.5188333988189697, 0.25930747389793396, -1.387864589691162, 0.4592592120170593, 1.1773064136505127, 0.19628161191940308, 1.4854286909103394, -0.642665684223175, 0.014391285367310047, 0.4407936930656433, -0.4405501186847687, -0.4812553822994232, -0.5942093133926392, 0.7133156061172485, -0.008034118451178074, -0.8787822723388672, 0.03478202968835831, -0.10188407450914383, -0.2183101326227188, 0.15592116117477417, -1.5004962682724, -0.09346888214349747, -0.4000049829483032, -0.5998615026473999, -1.234874963760376, -0.002035506535321474, 1.409711241722107, -0.722288191318512, -0.15158309042453766, 0.5193912386894226, 0.38172459602355957, 0.47767508029937744, 0.645700991153717, -0.6405789256095886, -0.30659249424934387, -0.20979323983192444, -0.4080652892589569, 0.3311249017715454, 1.3392672538757324, -0.13532334566116333, -0.8717873692512512, 0.7102674245834351, -0.38661888241767883, 0.0629693940281868, 1.935478925704956, 0.15982720255851746, -0.7942246198654175, 0.2950427532196045, -0.7554574012756348, 1.976739525794983, 1.7535731792449951, 1.3262903690338135, -0.06475513428449631, -1.0256080627441406, 0.6423965096473694, -0.27497002482414246, -0.36218100786209106, 0.9595582485198975, 0.3693351745605469, -0.21142853796482086, -1.4108375310897827, 0.6460571885108948, 1.2714142799377441, -0.8476250171661377, -0.8426276445388794, 0.065889872610569, -0.8532198667526245, 1.022782325744629, 0.6938283443450928, 0.4301918148994446, 0.19213567674160004, 1.6490751504898071, 0.7687538862228394, -0.4878036081790924, 0.6290830373764038, 0.5156810283660889, -0.14007568359375, -2.0763423442840576, -1.1877938508987427, 0.36698853969573975, -0.5150277614593506, -1.6161251068115234, 1.3020942211151123, -1.1913546323776245, -1.017364263534546, 0.5251351594924927, 0.04549076780676842, 1.4636609554290771, 0.3402428925037384, 1.5211422443389893, 2.0793962478637695, 0.8870716094970703, 0.36511319875717163, 1.319489598274231, -0.19377201795578003, -0.43036988377571106, 1.825039029121399, -0.4847595989704132, 0.5139739513397217, 1.122478723526001, -0.41204923391342163, -1.1087990999221802, -0.7493337988853455, -1.112782597541809, -0.7100251317024231, 1.1317288875579834, 0.08022451400756836, -1.077297329902649, 0.27644816040992737, 1.6165169477462769, 0.10865052789449692, -0.28454869985580444, 0.6396607160568237, 0.38644322752952576, -0.7883431911468506, 0.014367557130753994, -0.9534072875976562, 0.5915690064430237, -0.21492333710193634, -0.38072532415390015, 0.3544014096260071, 0.47393175959587097, 1.248043417930603, -0.05512043088674545, 0.07265961170196533, 1.219419240951538, -1.445009469985962, 1.4567723274230957, -0.6902477741241455, 0.22511212527751923, -2.376375436782837, 1.411470651626587, -0.7905643582344055, 1.951298475265503, -2.629375457763672, 0.37026283144950867, -0.611076295375824, -0.49479106068611145, 0.33896273374557495, -0.28682035207748413, 0.10041569918394089, -0.16473247110843658, -1.1484200954437256, -0.05369066819548607, -0.7081408500671387, 0.49633485078811646, 1.121290922164917, 1.3464540243148804, -1.0839693546295166, -0.298415869474411, -1.7052323818206787, -0.14542256295681, -0.6460903882980347, 0.33313143253326416, -1.9293447732925415, -0.22255952656269073, -1.921547532081604, -2.385087251663208, -1.319033145904541, -0.9116007685661316, 1.0561788082122803, 0.1086319163441658, -0.9067580699920654, 1.2102406024932861, -0.3613510727882385, -1.8985302448272705, 1.0769789218902588, -2.1695008277893066 ]
https://github.com/huggingface/datasets/issues/5609
`load_from_disk` vs `load_dataset` performance.
@mjamroz I assume your CSV file stores image file paths. This means `save_to_disk` needs to embed the image bytes resulting in a much bigger Arrow file (than the initial one). Maybe specifying `num_shards` to make the Arrow files smaller can help (large Arrow files on some systems take a long time to load).
### Describe the bug I have downloaded `openwebtext` (~12GB) and filtered out a small amount of junk (it's still huge). Now, I would like to use this filtered version for future work. It seems I have two choices: 1. Use `load_dataset` each time, relying on the cache mechanism, and re-run my filtering. 2. `save_to_disk` and then use `load_from_disk` to load the filtered version. The performance of these two approaches is wildly different: * Using `load_dataset` takes about 20 seconds to load the dataset, and a few seconds to re-filter (thanks to the brilliant filter/map caching) * Using `load_from_disk` takes 14 minutes! And the second time I tried, the session just crashed (on a machine with 32GB of RAM) I don't know if you'd call this a bug, but it seems like there shouldn't need to be two methods to load from disk, or that they should not take such wildly different amounts of time, or that one should not crash. Or maybe that the docs could offer some guidance about when to pick which method and why two methods exist, or just how do most people do it? Something I couldn't work out from reading the docs was this: can I modify a dataset from the hub, save it (locally) and use `load_dataset` to load it? This [post seemed to suggest that the answer is no](https://discuss.huggingface.co/t/save-and-load-datasets/9260). ### Steps to reproduce the bug See above ### Expected behavior Load times should be about the same. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
270
53
`load_from_disk` vs `load_dataset` performance. ### Describe the bug I have downloaded `openwebtext` (~12GB) and filtered out a small amount of junk (it's still huge). Now, I would like to use this filtered version for future work. It seems I have two choices: 1. Use `load_dataset` each time, relying on the cache mechanism, and re-run my filtering. 2. `save_to_disk` and then use `load_from_disk` to load the filtered version. The performance of these two approaches is wildly different: * Using `load_dataset` takes about 20 seconds to load the dataset, and a few seconds to re-filter (thanks to the brilliant filter/map caching) * Using `load_from_disk` takes 14 minutes! And the second time I tried, the session just crashed (on a machine with 32GB of RAM) I don't know if you'd call this a bug, but it seems like there shouldn't need to be two methods to load from disk, or that they should not take such wildly different amounts of time, or that one should not crash. Or maybe that the docs could offer some guidance about when to pick which method and why two methods exist, or just how do most people do it? Something I couldn't work out from reading the docs was this: can I modify a dataset from the hub, save it (locally) and use `load_dataset` to load it? This [post seemed to suggest that the answer is no](https://discuss.huggingface.co/t/save-and-load-datasets/9260). ### Steps to reproduce the bug See above ### Expected behavior Load times should be about the same. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 @mjamroz I assume your CSV file stores image file paths. This means `save_to_disk` needs to embed the image bytes resulting in a much bigger Arrow file (than the initial one). Maybe specifying `num_shards` to make the Arrow files smaller can help (large Arrow files on some systems take a long time to load).
[ -1.1552221775054932, -0.9428613781929016, -0.7493132948875427, 1.4506059885025024, -0.15418574213981628, -1.2171801328659058, 0.1420518457889557, -1.0230222940444946, 1.663267731666565, -0.8269370198249817, 0.33807772397994995, -1.652201771736145, 0.06728407740592957, -0.6163331270217896, -0.7341881990432739, -0.8170708417892456, -0.4471023678779602, -0.6979467868804932, 1.0070024728775024, 2.502577304840088, 1.1610952615737915, -1.439833402633667, 2.67630934715271, 0.692698061466217, -0.12140579521656036, -1.0222296714782715, 0.43571120500564575, 0.023665502667427063, -1.3466047048568726, -0.3927549123764038, -0.8724821209907532, -0.05559214577078819, -0.589055061340332, -0.5772601366043091, 0.033463820815086365, 0.3545375168323517, -0.2841857969760895, -0.4751913249492645, -0.5545820593833923, -0.7417957186698914, 0.5292074680328369, -0.3731529414653778, 0.9845309257507324, -0.3054729998111725, 1.8208670616149902, -0.5387771129608154, 0.4925883114337921, 0.7669274210929871, 1.329683780670166, 0.1501222550868988, 0.04658128321170807, 0.34220144152641296, 0.4327579736709595, -0.0037163421511650085, 0.46901822090148926, 1.146563172340393, 0.6813578605651855, 0.5181304216384888, 0.7294327616691589, -2.1826164722442627, 1.3118000030517578, -0.9830579161643982, 0.34299981594085693, 1.3108315467834473, -1.0217689275741577, 0.3425852358341217, -1.7677743434906006, -0.0808037519454956, 0.4664386212825775, -2.2039222717285156, 0.2579468786716461, -1.240194320678711, -0.4461277425289154, 0.9814292192459106, 0.32989761233329773, -1.260298490524292, 0.1449143886566162, -0.45027515292167664, 0.9676940441131592, 0.42360326647758484, 1.1491711139678955, -1.7032861709594727, -0.047523487359285355, -0.2758488059043884, 0.11542035639286041, -1.2354196310043335, -1.4983036518096924, 0.5312530994415283, 0.6828328371047974, 0.5616043210029602, -0.0832507312297821, 0.9666733145713806, -0.9572898745536804, 0.7600275278091431, -0.9337236881256104, -1.7222449779510498, -1.424100637435913, -2.2781240940093994, -2.316990375518799, 0.8214429020881653, -0.44656914472579956, -0.4889286756515503, 2.041849136352539, -1.0807784795761108, -1.772131085395813, 1.1385576725006104, 0.26055583357810974, -0.07013975083827972, 2.322941303253174, 0.1951085478067398, -0.7190998196601868, 0.5404906272888184, -0.7332820296287537, 0.7544379830360413, -0.4740661084651947, 1.3312896490097046, 0.3812268078327179, -1.0756081342697144, 1.5560225248336792, -0.36391687393188477, 0.6115119457244873, -0.6919169425964355, -0.49548065662384033, -0.7916803359985352, 0.29258546233177185, 1.9103078842163086, -0.2968708872795105, 1.537115454673767, -0.3290883004665375, -1.6172105073928833, -1.556436538696289, 0.907579243183136, 0.46106722950935364, -0.6890208721160889, 0.15760059654712677, -0.321399450302124, 0.07066357135772705, -0.02099882811307907, 1.1225922107696533, 1.2928001880645752, 0.7385809421539307, -0.3208223879337311, -0.9080583453178406, 0.18742898106575012, -0.1215725988149643, -0.6667094230651855, -1.8216111660003662, -0.3722483813762665, 0.1828109323978424, 0.5925474762916565, -1.1608225107192993, 1.7817095518112183, 0.8871151208877563, 1.9435807466506958, 1.084132194519043, -0.320697158575058, 1.5026127099990845, 0.12353956699371338, 1.9075043201446533, -0.44425609707832336, 0.6444753408432007, -0.37439829111099243, -1.1645299196243286, 0.8182806968688965, -0.3702314794063568, -2.0430259704589844, -0.6178874969482422, -0.884232759475708, -0.17188535630702972, -0.7446492314338684, 0.9808416366577148, -0.25388047099113464, -1.388536810874939, 0.2531910836696625, -0.6596307754516602, 0.14651697874069214, -1.1952712535858154, 0.3355640470981598, 0.8002421259880066, -0.6332609057426453, 0.03538691624999046, -0.28364014625549316, -1.344831109046936, -0.4501705765724182, 0.3784274458885193, 1.744663953781128, -0.7922636866569519, 1.002296805381775, 1.0050148963928223, -0.6627718210220337, -0.029710320755839348, 0.43741375207901, -0.3188209533691406, 0.8752156496047974, -1.0471724271774292, -0.3637085556983948, 1.2233768701553345, -0.2157907783985138, -0.5243416428565979, 1.4280201196670532, 0.7087107300758362, -0.9772367477416992, -0.18156346678733826, -0.14216528832912445, -0.9080265164375305, -0.038531623780727386, -1.6079009771347046, -0.04910486936569214, 0.31148120760917664, -1.5629656314849854, -0.5024136304855347, -0.20889361202716827, 1.283846378326416, -0.09952668845653534, 1.4189835786819458, -0.3381875157356262, -0.23703452944755554, -0.3963983356952667, -0.4427160918712616, 0.10894517600536346, -0.2706463932991028, -0.6195318102836609, 0.2447744458913803, -0.7564579248428345, 0.35326239466667175, 1.4673548936843872, 0.2574954926967621, 0.04694510996341705, 0.5685189366340637, 1.0634242296218872, 0.38179153203964233, -0.06286951899528503, -0.8427229523658752, -1.5811772346496582, 2.0719311237335205, -1.4184842109680176, 1.9898197650909424, 0.8009737133979797, -0.05969592556357384, -1.7866419553756714, -1.8472639322280884, 1.4348984956741333, 1.1526470184326172, 2.3844473361968994, 0.5391038060188293, 0.4346703290939331, -0.8446173071861267, -0.6873098015785217, 0.34521061182022095, -1.0044671297073364, -0.7974116206169128, 0.12028919160366058, 2.3847239017486572, 1.774905800819397, -0.4626149535179138, -0.22572529315948486, -1.097089171409607, 1.4827821254730225, -0.2253050059080124, 0.170822411775589, 1.9628913402557373, -0.2712530493736267, -1.031388521194458, 1.3459446430206299, -2.3200490474700928, 0.21116873621940613, 1.9936678409576416, 0.2573619782924652, 0.05323566868901253, -1.4030981063842773, -0.621442437171936, -0.1694863736629486, -0.3755689263343811, -1.2275766134262085, 0.5211437940597534, -0.2871289551258087, -0.7508112788200378, -1.4280548095703125, 0.18297535181045532, -1.0872234106063843, -1.6639823913574219, 0.2501421868801117, 1.7926692962646484, 2.0530526638031006, -0.7344687581062317, 1.539273977279663, -0.2568952143192291, 0.2273688018321991, 1.2290759086608887, 1.182199239730835, 3.162598133087158, 1.973549246788025, -1.267627477645874, 0.6624071598052979, -0.13996800780296326, -0.5037708282470703, 1.1114004850387573, -1.1389591693878174, 1.315222144126892, -0.23881839215755463, -1.1736482381820679, -1.232802391052246, 0.9564624428749084, 0.47941693663597107, 0.12602199614048004, -0.4680081605911255, 1.2069529294967651, 0.043660543859004974, 1.2535593509674072, 0.603025496006012, -0.3485983610153198, 0.6556882262229919, -0.4225468635559082, -0.5777367353439331, 1.55842125415802, 0.23645153641700745, -1.4044344425201416, -2.2780985832214355, -0.27290284633636475, -0.8556594848632812, 0.06648339331150055, -0.6190525889396667, -0.9120112061500549, 1.6036872863769531, 0.4424096643924713, -1.2302435636520386, -0.29061606526374817, -0.3329531252384186, -0.640564501285553, 2.6740691661834717, -1.4298644065856934, -0.2745732367038727, -0.9939836263656616, -0.6456142663955688, 1.6133291721343994, -1.1671198606491089, -0.226393461227417, -1.0260125398635864, -0.6066306829452515, -1.2622628211975098, -0.5392315983772278, -0.06645018607378006, -0.8874866366386414, 0.7663581371307373, 0.14830122888088226, -1.2049344778060913, -0.30090564489364624, -0.9546988606452942, 0.8422544002532959, -0.1639571189880371, 0.19379180669784546, 1.8129371404647827, 0.4061591327190399, -0.4026865065097809, 0.7232822775840759, 1.174614667892456, 0.6014896631240845, -0.6923108696937561, 0.18419553339481354, -0.6787574291229248, 0.2596089243888855, -1.3407078981399536, 0.32959845662117004, -2.847365617752075, 0.6417381167411804, -0.029942115768790245, -0.063313327729702, -0.019503343850374222, -1.3201888799667358, 1.0523830652236938, 2.6011741161346436, -1.1660854816436768, 0.5176523327827454, 0.2978436350822449, 1.2195781469345093, -1.5359110832214355, 0.27641984820365906, -0.4307915270328522, 2.160726308822632, 0.16522471606731415, 1.1767979860305786, -0.4608384370803833, -2.3236985206604004, 0.5611958503723145, -1.2446330785751343, -1.1328997611999512, 0.7915376424789429, -0.7874865531921387, 0.05141653120517731, -1.3674489259719849, -0.1694614738225937, -0.7980676293373108, -1.2289599180221558, 0.620877742767334, 0.09645575284957886, 0.5339569449424744, -0.6121922135353088, 0.3315623104572296, -2.1780710220336914, -1.3816478252410889, -0.22893033921718597, -0.9382296204566956, 0.45071232318878174, -0.3504568934440613, 0.7697213292121887, -0.25638893246650696, 0.0005125468596816063, 0.2604975700378418, 1.3294082880020142, 3.382636785507202, 0.12158423662185669, 0.3915025591850281, -0.15340493619441986, -0.8829800486564636, 1.438513994216919, 0.9342739582061768, -0.14041906595230103, -0.6032452583312988, -1.0314360857009888, 1.256522297859192, 1.9691541194915771, 1.0092319250106812, 0.06437273323535919, -0.8378094434738159, -0.7140650153160095, -0.010030467063188553, 0.1271757185459137, 0.5086296796798706, 0.8929247260093689, 0.09424062073230743, 0.10051056742668152, 1.3763397932052612, 1.2138969898223877, -0.348313570022583, 0.39112338423728943, -0.8152613639831543, -0.42030107975006104, 0.4955744445323944, 0.4266240894794464, 0.010944478213787079, 0.2679866850376129, -1.126021146774292, -0.1993022859096527, -0.4201274514198303, -0.9218803644180298, -0.7370739579200745, -0.46522611379623413, -0.37878182530403137, 1.708193063735962, 0.1193973571062088, -0.5138047933578491, -0.07479676604270935, -0.7702559232711792, -0.06146564334630966, -1.0143424272537231, 0.3135441541671753, -0.1197807788848877, -0.03956732898950577, -0.07411760091781616, 1.75336754322052, -0.9485941529273987, -2.114055871963501, 0.2370501011610031, 0.20090192556381226, -0.2972671687602997, 0.11724656820297241, 1.6283570528030396, 0.5606364607810974, 1.4253196716308594, 1.3960843086242676, 1.0016930103302002, -0.678782045841217, -1.3118417263031006, 0.6862960457801819, 1.0213544368743896, -1.4081990718841553, 0.7327582240104675, 0.03922831639647484, -0.5610527396202087, 0.6573044061660767, 1.2596492767333984, 0.4596102237701416, -2.0718719959259033, 0.7449959516525269, -0.9293094873428345, 0.7780742645263672, 0.7853841781616211, 0.7134691476821899, 0.22848285734653473, 0.7948727011680603, -1.2473664283752441, -1.1566815376281738, -0.7738508582115173, -0.7120007872581482, 1.9989652633666992, -0.3228113651275635, 0.5711592435836792, -0.20302040874958038, -1.3705838918685913, -0.12019811570644379, 0.7599892020225525, 0.37752506136894226, -0.45590633153915405, 0.7350109815597534, -0.6572791337966919, -1.1685335636138916, -1.4183447360992432, -0.4369165599346161, -1.0790010690689087, -0.9354992508888245, 1.0615595579147339, 0.79676753282547, 0.37367185950279236, 1.87177312374115, 0.7199020981788635, 0.20853611826896667, -2.648693084716797, 0.8538610935211182, 0.3122403025627136, -0.0678127110004425, 0.8629189133644104, 0.3254217207431793, 0.9947752952575684, -0.00022486038506031036, 0.6087467670440674, -2.4366676807403564, 2.2446908950805664, -0.17596563696861267, 0.6873080730438232, -0.03622701019048691, -0.18763795495033264, 1.0382719039916992, 0.5366254448890686, 0.6028729677200317, -1.1263551712036133, 0.7351695895195007, -0.5727962851524353, 1.2442684173583984, 0.7955164909362793, -0.8045793175697327, -0.023284345865249634, 1.3858805894851685, 0.42532992362976074, -0.4878755509853363, -0.9270578026771545, -1.0244125127792358, 0.9122968912124634, 1.8290551900863647, -0.05327609181404114, 0.01569768786430359, 0.8449912071228027, 0.6815475821495056, -1.3776051998138428, 0.05804770812392235, -0.6814498901367188, -0.7617937922477722, 1.645185112953186, 2.0384719371795654, -0.11412400007247925, -0.1510682851076126, -0.7881311774253845, -1.2919224500656128, 0.7966994047164917, 0.10058809816837311, 0.11048585176467896, 0.6576554179191589, -0.644819974899292, 1.1360456943511963, 0.864852786064148, 0.8920143246650696, 0.17304673790931702, 0.2101876437664032, 0.3584558665752411, -0.34768250584602356, -1.1836163997650146, -0.31373488903045654, -1.0752062797546387, -2.468031167984009, 0.4308159649372101, -0.17160506546497345, -1.5239602327346802, 0.032016780227422714, -1.0213260650634766, 0.8453943729400635, -0.5582321882247925, -1.1022166013717651, -1.5571064949035645, 0.2053769826889038, -0.15232235193252563, 0.9155927896499634, -1.6086472272872925, -0.10460993647575378, 1.1480671167373657, 0.9599612951278687, -0.6292110681533813, 1.059300422668457, 0.18121451139450073, 0.9970581531524658, 0.8718063831329346, -0.41379037499427795, 0.5036665201187134, 0.2632509469985962, -1.386854648590088, 0.4703396260738373, 1.178260087966919, 0.1933673918247223, 1.4802647829055786, -0.6494210362434387, 0.03227071836590767, 0.42712801694869995, -0.44063398241996765, -0.4918583929538727, -0.5955188274383545, 0.7095313668251038, 0.006234805099666119, -0.8749294877052307, 0.046213310211896896, -0.11537592113018036, -0.21243958175182343, 0.16061492264270782, -1.492773175239563, -0.10001380741596222, -0.40978944301605225, -0.6196454763412476, -1.219710111618042, 0.006388501264154911, 1.4092507362365723, -0.7238463759422302, -0.1282404363155365, 0.5355638861656189, 0.3983045816421509, 0.47080981731414795, 0.6501148343086243, -0.6484188437461853, -0.29774630069732666, -0.22924524545669556, -0.39344045519828796, 0.33647313714027405, 1.3287652730941772, -0.12156575918197632, -0.8788051009178162, 0.7315129637718201, -0.39234182238578796, 0.06131846830248833, 1.9393149614334106, 0.1627025157213211, -0.8035852909088135, 0.3091873228549957, -0.7496485710144043, 1.9972457885742188, 1.728244662284851, 1.327157735824585, -0.05456507205963135, -1.0234452486038208, 0.6439090967178345, -0.25130927562713623, -0.3718462586402893, 0.9713429808616638, 0.3756590783596039, -0.22084258496761322, -1.4235284328460693, 0.647244393825531, 1.2711920738220215, -0.8237753510475159, -0.8479365110397339, 0.06174832209944725, -0.8592431545257568, 1.0218865871429443, 0.7036620378494263, 0.45479369163513184, 0.191169872879982, 1.6442443132400513, 0.7781009078025818, -0.49638310074806213, 0.6292757391929626, 0.515869140625, -0.13112428784370422, -2.056504011154175, -1.180906057357788, 0.35354283452033997, -0.5039891600608826, -1.610913872718811, 1.3013434410095215, -1.1902904510498047, -1.0222561359405518, 0.5369935035705566, 0.04269750043749809, 1.4496355056762695, 0.3586433529853821, 1.4899431467056274, 2.076831817626953, 0.8766465783119202, 0.3538137674331665, 1.3163951635360718, -0.22550225257873535, -0.44827938079833984, 1.839957594871521, -0.4681057333946228, 0.5243446826934814, 1.1213035583496094, -0.42966705560684204, -1.0957170724868774, -0.7421751618385315, -1.1085952520370483, -0.6861935257911682, 1.1262201070785522, 0.08066734671592712, -1.0544548034667969, 0.26411542296409607, 1.6126251220703125, 0.11595870554447174, -0.2925238013267517, 0.6699015498161316, 0.3744938373565674, -0.8024644255638123, 0.008529553189873695, -0.9537495970726013, 0.5975448489189148, -0.20272643864154816, -0.36799103021621704, 0.3590996563434601, 0.47042110562324524, 1.23957359790802, -0.07931286096572876, 0.0814264565706253, 1.2162591218948364, -1.431057095527649, 1.44779634475708, -0.67710942029953, 0.22334882616996765, -2.3736588954925537, 1.3914213180541992, -0.7796945571899414, 1.9515445232391357, -2.632723093032837, 0.3504910469055176, -0.613807201385498, -0.5096204876899719, 0.34054914116859436, -0.27538809180259705, 0.10547065734863281, -0.16646035015583038, -1.1707414388656616, -0.06620800495147705, -0.709496021270752, 0.48761239647865295, 1.130539894104004, 1.351245403289795, -1.0810723304748535, -0.26779481768608093, -1.7149327993392944, -0.14534848928451538, -0.673319935798645, 0.3333267569541931, -1.926465630531311, -0.2241336554288864, -1.9029611349105835, -2.3884785175323486, -1.3364100456237793, -0.9097623825073242, 1.0595635175704956, 0.12549304962158203, -0.9219314455986023, 1.2137236595153809, -0.35341790318489075, -1.9082602262496948, 1.0815173387527466, -2.1731247901916504 ]
https://github.com/huggingface/datasets/issues/5608
audiofolder only creates dataset of 13 rows (files) when the data folder it's reading from has 20,000 mp3 files.
Hi! > naming convention of mp3 files Yes, this could be the problem. MP3 files should end with `.mp3`/`.MP3` to be recognized as audio files. If the file names are not the culprit, can you paste the audio folder's directory structure to help us reproduce the error (e.g., by running the `tree "x"` command)?
### Describe the bug x = load_dataset("audiofolder", data_dir="x") When running this, x is a dataset of 13 rows (files) when it should be 20,000 rows (files) as the data_dir "x" has 20,000 mp3 files. Does anyone know what could possibly cause this (naming convention of mp3 files, etc.) ### Steps to reproduce the bug x = load_dataset("audiofolder", data_dir="x") ### Expected behavior x = load_dataset("audiofolder", data_dir="x") should create a dataset of 20,000 rows (files). ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
271
54
audiofolder only creates dataset of 13 rows (files) when the data folder it's reading from has 20,000 mp3 files. ### Describe the bug x = load_dataset("audiofolder", data_dir="x") When running this, x is a dataset of 13 rows (files) when it should be 20,000 rows (files) as the data_dir "x" has 20,000 mp3 files. Does anyone know what could possibly cause this (naming convention of mp3 files, etc.) ### Steps to reproduce the bug x = load_dataset("audiofolder", data_dir="x") ### Expected behavior x = load_dataset("audiofolder", data_dir="x") should create a dataset of 20,000 rows (files). ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Hi! > naming convention of mp3 files Yes, this could be the problem. MP3 files should end with `.mp3`/`.MP3` to be recognized as audio files. If the file names are not the culprit, can you paste the audio folder's directory structure to help us reproduce the error (e.g., by running the `tree "x"` command)?
[ -1.1904871463775635, -0.9062251448631287, -0.7016420364379883, 1.4522279500961304, -0.2260921150445938, -1.0890953540802002, 0.19326183199882507, -0.9768805503845215, 1.6433956623077393, -0.8800054788589478, 0.2999725043773651, -1.7013241052627563, 0.052340276539325714, -0.48808833956718445, -0.7342322468757629, -0.9673752188682556, -0.4519054591655731, -0.6882796883583069, 1.0177861452102661, 2.51396107673645, 1.2141093015670776, -1.3734081983566284, 2.6848039627075195, 0.7133026719093323, -0.14861159026622772, -1.0312814712524414, 0.5243163704872131, 0.06611652672290802, -1.3565150499343872, -0.41370531916618347, -0.9444694519042969, -0.13689886033535004, -0.5189957022666931, -0.4729268252849579, 0.019988538697361946, 0.2954218089580536, -0.30529239773750305, -0.38792723417282104, -0.5106716156005859, -0.7804061770439148, 0.4289870262145996, -0.3956543803215027, 0.925006091594696, -0.3465593755245209, 1.842933177947998, -0.6093767285346985, 0.5816988348960876, 0.7011829614639282, 1.2579556703567505, 0.3657577335834503, -0.019817747175693512, 0.4032887816429138, 0.41265565156936646, 0.04362227022647858, 0.5059277415275574, 1.1447193622589111, 0.6370030641555786, 0.45959198474884033, 0.7337115406990051, -2.2351832389831543, 1.272843837738037, -1.0882980823516846, 0.24113811552524567, 1.4236369132995605, -1.0058164596557617, 0.33060553669929504, -1.7623621225357056, -0.1443854123353958, 0.6050624847412109, -2.304994821548462, 0.28430816531181335, -1.3773359060287476, -0.4974583387374878, 1.0766701698303223, 0.3928583860397339, -1.2516753673553467, 0.03841372951865196, -0.4105062186717987, 0.9569083452224731, 0.42594778537750244, 1.059017539024353, -1.660239815711975, -0.05275150015950203, -0.3492732644081116, 0.08389289677143097, -1.262447476387024, -1.4814038276672363, 0.556988000869751, 0.6679245233535767, 0.5154550671577454, -0.1208956241607666, 1.0027000904083252, -1.0716204643249512, 0.8525884747505188, -1.0015506744384766, -1.7767680883407593, -1.46004056930542, -2.34417462348938, -2.3175270557403564, 0.8185924291610718, -0.4219267964363098, -0.5600650906562805, 2.0831449031829834, -1.0431159734725952, -1.6408404111862183, 1.1814491748809814, 0.18185357749462128, -0.042538195848464966, 2.5350942611694336, 0.24730564653873444, -0.715751051902771, 0.45541322231292725, -0.8568758368492126, 0.7762833833694458, -0.36696696281433105, 1.2324681282043457, 0.40316224098205566, -1.1142877340316772, 1.6032406091690063, -0.3443077802658081, 0.5040336847305298, -0.6130567193031311, -0.6022542119026184, -0.7584971785545349, 0.2529611885547638, 1.8803578615188599, -0.2721845507621765, 1.5893080234527588, -0.2379796802997589, -1.5294667482376099, -1.5650748014450073, 0.8175923824310303, 0.42232799530029297, -0.7326381206512451, 0.06345778703689575, -0.2885359823703766, 0.1361112743616104, 0.005569541826844215, 1.1146336793899536, 1.3333334922790527, 0.6203104853630066, -0.3559166491031647, -0.8742133975028992, 0.2053917944431305, -0.10815262794494629, -0.7479721307754517, -1.733110785484314, -0.321216881275177, -0.0023399307392537594, 0.58713698387146, -1.2418371438980103, 1.7302303314208984, 0.8947344422340393, 1.8690261840820312, 1.037743091583252, -0.295011430978775, 1.6045376062393188, 0.10800541937351227, 1.878186821937561, -0.49466994404792786, 0.6549003720283508, -0.46780678629875183, -1.1743637323379517, 0.7820686101913452, -0.32630032300949097, -2.0979583263397217, -0.7341586351394653, -0.8233698010444641, -0.18782161176204681, -0.795511782169342, 0.9572345018386841, -0.20030900835990906, -1.369577169418335, 0.22620102763175964, -0.6743594408035278, 0.07553650438785553, -1.3575866222381592, 0.41876494884490967, 0.7335345149040222, -0.6350758671760559, 0.0647813230752945, -0.2265615016222, -1.3001335859298706, -0.4545563757419586, 0.19945180416107178, 1.851969838142395, -0.7731058597564697, 0.8948261737823486, 0.9844294190406799, -0.7471614480018616, -0.03540132939815521, 0.3240843117237091, -0.30678460001945496, 0.9311020970344543, -1.011690616607666, -0.3766545057296753, 1.2678524255752563, -0.25879091024398804, -0.5980669856071472, 1.415212869644165, 0.6448561549186707, -0.9942777752876282, -0.20963454246520996, -0.11003310978412628, -0.7608551383018494, 0.0435456708073616, -1.6586313247680664, -0.10385307669639587, 0.35440582036972046, -1.5125304460525513, -0.4745882451534271, -0.17451350390911102, 1.2811161279678345, -0.17027032375335693, 1.4233238697052002, -0.4148254096508026, -0.2533207833766937, -0.4093937873840332, -0.39240771532058716, 0.16775508224964142, -0.24318842589855194, -0.5206912159919739, 0.28263768553733826, -0.7974967956542969, 0.30798614025115967, 1.4450409412384033, 0.39774927496910095, 0.07076850533485413, 0.5361294150352478, 1.0349358320236206, 0.4149834215641022, -0.1650102287530899, -0.8198719024658203, -1.5802547931671143, 2.0761044025421143, -1.4477907419204712, 2.044482469558716, 0.6805416345596313, -0.06324009597301483, -1.7420943975448608, -1.9719113111495972, 1.2966382503509521, 1.1498868465423584, 2.3231544494628906, 0.40971797704696655, 0.44364580512046814, -0.8735706210136414, -0.7094771265983582, 0.34329941868782043, -1.0349130630493164, -0.6898047924041748, 0.17286045849323273, 2.391913652420044, 1.6585609912872314, -0.46269312500953674, -0.11579529941082001, -1.0827827453613281, 1.3606934547424316, -0.15421126782894135, 0.2204522043466568, 1.9627951383590698, -0.3083319067955017, -1.0896377563476562, 1.2809630632400513, -2.3074405193328857, 0.10854408144950867, 1.9526230096817017, 0.2845170497894287, 0.04105837270617485, -1.3278069496154785, -0.6278543472290039, -0.3166881203651428, -0.40019330382347107, -1.1909127235412598, 0.5323539972305298, -0.19730274379253387, -0.7431057095527649, -1.3742291927337646, 0.06826484203338623, -1.1351637840270996, -1.7322015762329102, 0.2275363802909851, 1.7809765338897705, 1.969411015510559, -0.7067120671272278, 1.4615886211395264, -0.23138053715229034, 0.15657110512256622, 1.1921066045761108, 1.197434663772583, 3.1219167709350586, 1.944589376449585, -1.2172837257385254, 0.6053235530853271, -0.06864740699529648, -0.3972495198249817, 1.1724786758422852, -1.2349368333816528, 1.3647761344909668, -0.07501359283924103, -1.3076344728469849, -1.2713594436645508, 0.879571795463562, 0.3576031029224396, 0.1081174910068512, -0.5267901420593262, 1.0731945037841797, 0.13987009227275848, 1.3563125133514404, 0.606575608253479, -0.258523166179657, 0.6281015276908875, -0.47005483508110046, -0.5458600521087646, 1.5466196537017822, 0.21724775433540344, -1.538143515586853, -2.268768548965454, -0.25288474559783936, -0.9073941707611084, -0.0008763112127780914, -0.5966421961784363, -1.0324993133544922, 1.6602476835250854, 0.37000522017478943, -1.1703124046325684, -0.34570685029029846, -0.3331240117549896, -0.6019549369812012, 2.8612329959869385, -1.4085936546325684, -0.21383118629455566, -0.9513320326805115, -0.6987680792808533, 1.631229281425476, -1.1996121406555176, -0.16119948029518127, -1.029676079750061, -0.606741726398468, -1.306665301322937, -0.5746790170669556, 0.011585650965571404, -1.0272972583770752, 0.8481449484825134, 0.2103348672389984, -1.2977895736694336, -0.331249862909317, -0.9447601437568665, 0.798864483833313, -0.04010418802499771, 0.21885710954666138, 1.8662925958633423, 0.4349081516265869, -0.35312846302986145, 0.7518549561500549, 1.2173948287963867, 0.682541012763977, -0.6001015901565552, 0.2827620208263397, -0.6859514117240906, 0.27002498507499695, -1.1831341981887817, 0.25522705912590027, -2.8132693767547607, 0.6018685698509216, -0.13567155599594116, -0.10046988725662231, -0.03323637694120407, -1.183183193206787, 1.0823397636413574, 2.510129451751709, -1.1352226734161377, 0.4759007692337036, 0.3038288950920105, 1.2891180515289307, -1.5858756303787231, 0.25910794734954834, -0.5361881256103516, 2.130511999130249, 0.22950051724910736, 1.1327319145202637, -0.4874415099620819, -2.2063159942626953, 0.6845152974128723, -1.3091717958450317, -1.1642146110534668, 0.8143742084503174, -0.9847276210784912, 0.09598366916179657, -1.3448606729507446, -0.22570368647575378, -0.7220593690872192, -1.2034469842910767, 0.6577760577201843, 0.09643225371837616, 0.4870728850364685, -0.45308271050453186, 0.2953154742717743, -2.3692972660064697, -1.3273069858551025, -0.2775481045246124, -0.9608559608459473, 0.42822641134262085, -0.28697097301483154, 0.7173999547958374, -0.29347360134124756, 0.033700887113809586, 0.44705381989479065, 1.518923044204712, 3.3437306880950928, 0.22887904942035675, 0.3831724524497986, -0.13780879974365234, -0.9614608883857727, 1.4691933393478394, 0.8776637315750122, -0.14778409898281097, -0.5102168917655945, -1.0406211614608765, 1.2715506553649902, 1.8611891269683838, 1.029911756515503, 0.07321672141551971, -0.7450962066650391, -0.6583680510520935, -0.05263492465019226, 0.18338069319725037, 0.5023782849311829, 0.9263891577720642, 0.05195995420217514, 0.08644481003284454, 1.505167841911316, 1.2611238956451416, -0.4916079640388489, 0.29763486981391907, -0.8269532322883606, -0.5449049472808838, 0.5631595849990845, 0.2739502489566803, 0.021303534507751465, 0.3709815740585327, -1.078973412513733, -0.22651167213916779, -0.4174218773841858, -0.8943445086479187, -0.678398609161377, -0.44987380504608154, -0.4104340672492981, 1.6596063375473022, 0.11203162372112274, -0.4628385305404663, 0.003709542565047741, -0.7568798661231995, -0.160556823015213, -1.0389289855957031, 0.3487159013748169, -0.08849859237670898, -0.06780281662940979, -0.1465558260679245, 1.8233535289764404, -0.9349344372749329, -2.151632308959961, 0.23318783938884735, 0.1720600724220276, -0.2873111367225647, 0.17687276005744934, 1.63906729221344, 0.5237773060798645, 1.5182280540466309, 1.3020168542861938, 0.9715586304664612, -0.6238148212432861, -1.295563817024231, 0.7105730175971985, 0.9620158672332764, -1.3987140655517578, 0.7644344568252563, -0.049699895083904266, -0.4967658221721649, 0.608049213886261, 1.1297669410705566, 0.4125305414199829, -1.9407399892807007, 0.8384082913398743, -0.9269489049911499, 0.7790336608886719, 0.6952500939369202, 0.7792569398880005, 0.14311793446540833, 0.8500293493270874, -1.1138046979904175, -1.082446813583374, -0.6992197036743164, -0.6676974892616272, 1.9538078308105469, -0.24655091762542725, 0.5942122340202332, -0.18674521148204803, -1.3306243419647217, 0.0854564905166626, 0.5642246603965759, 0.2516692578792572, -0.4872784912586212, 0.9237753748893738, -0.5848215818405151, -1.117242455482483, -1.4892487525939941, -0.4639902710914612, -1.1845269203186035, -0.9294348359107971, 1.0234850645065308, 0.7631124258041382, 0.2625160813331604, 1.781270980834961, 0.6463679075241089, 0.3203762471675873, -2.7261152267456055, 0.949020266532898, 0.18834853172302246, -0.08705417811870575, 0.7816076278686523, 0.26176145672798157, 1.040508508682251, -0.1961691528558731, 0.48299115896224976, -2.4360005855560303, 2.3560307025909424, -0.35417458415031433, 0.8059523701667786, 0.05763285979628563, -0.059037044644355774, 1.0213658809661865, 0.6519359350204468, 0.557783842086792, -1.0455653667449951, 0.6659943461418152, -0.5424413681030273, 1.237940788269043, 0.9694809913635254, -0.8081852793693542, -0.036471180617809296, 1.3335400819778442, 0.4576171934604645, -0.4867236316204071, -0.9290561079978943, -0.9344676733016968, 0.9588494300842285, 1.7035778760910034, -0.024747703224420547, 0.02687441185116768, 0.8805309534072876, 0.6705886125564575, -1.2267723083496094, 0.03789510577917099, -0.798227846622467, -0.7743104100227356, 1.6242716312408447, 2.0958313941955566, -0.09970293939113617, -0.23810692131519318, -0.6694740653038025, -1.2719074487686157, 0.7379187941551208, -0.035285625606775284, 0.15257540345191956, 0.6845973134040833, -0.6644507050514221, 1.026872992515564, 0.8830257058143616, 0.9816641807556152, 0.3541496694087982, 0.23550984263420105, 0.32296445965766907, -0.27774837613105774, -1.2046327590942383, -0.24734631180763245, -1.073914647102356, -2.528766393661499, 0.4684653878211975, -0.3631962537765503, -1.3885040283203125, 0.10315218567848206, -1.021428108215332, 0.8971989154815674, -0.6044015288352966, -1.1297645568847656, -1.5066066980361938, 0.10004293918609619, -0.07000509649515152, 0.920071005821228, -1.5955731868743896, -0.14765769243240356, 1.2588948011398315, 0.8881077766418457, -0.6231971979141235, 0.9857236742973328, 0.28576159477233887, 1.150782585144043, 0.8631284832954407, -0.441093772649765, 0.5236766934394836, 0.09839987754821777, -1.4160127639770508, 0.432219922542572, 1.191542148590088, 0.20100137591362, 1.5822124481201172, -0.6319946646690369, -0.043873343616724014, 0.4562133252620697, -0.4810498356819153, -0.4495338797569275, -0.6085665822029114, 0.6496046781539917, -0.02290596440434456, -0.931788444519043, -0.09463053941726685, -0.08761006593704224, -0.15395069122314453, 0.13612593710422516, -1.4607234001159668, -0.050264548510313034, -0.3822334408760071, -0.6502470970153809, -1.2388629913330078, -0.16685566306114197, 1.420384168624878, -0.828994870185852, -0.07799075543880463, 0.4958810806274414, 0.28461718559265137, 0.6073226928710938, 0.6718170046806335, -0.580489456653595, -0.3196868598461151, -0.230886310338974, -0.32621899247169495, 0.37106868624687195, 1.3144795894622803, -0.08692926168441772, -0.9304618239402771, 0.7103970050811768, -0.25264984369277954, 0.16457663476467133, 1.9619954824447632, 0.14269918203353882, -0.8177682161331177, 0.37806200981140137, -0.6181879043579102, 1.8696421384811401, 1.7283211946487427, 1.3012454509735107, -0.08005715906620026, -0.9245609045028687, 0.6487119197845459, -0.35361629724502563, -0.39627504348754883, 0.8054009675979614, 0.4456866681575775, -0.20679332315921783, -1.3066476583480835, 0.8295555710792542, 1.259074091911316, -0.9249967932701111, -0.8083016276359558, 0.251502126455307, -0.7955465912818909, 1.0420299768447876, 0.7067728638648987, 0.4014752507209778, 0.25699037313461304, 1.6873242855072021, 0.8743498921394348, -0.46297550201416016, 0.47380760312080383, 0.5720417499542236, -0.13312877714633942, -2.042268753051758, -1.1581838130950928, 0.33829283714294434, -0.5443961024284363, -1.4933184385299683, 1.3785663843154907, -1.1268261671066284, -0.96251380443573, 0.5740973949432373, 0.07904650270938873, 1.4235728979110718, 0.37830042839050293, 1.5658117532730103, 2.1101834774017334, 0.9392604231834412, 0.4528968036174774, 1.3851031064987183, -0.08990214765071869, -0.4309982657432556, 1.7152633666992188, -0.4306451976299286, 0.4614599049091339, 1.1388282775878906, -0.3603331446647644, -1.0321282148361206, -0.803970992565155, -1.1894055604934692, -0.6912118196487427, 1.1725634336471558, 0.09602998197078705, -1.0636969804763794, 0.24165086448192596, 1.5379061698913574, 0.052295178174972534, -0.40964412689208984, 0.620482325553894, 0.32920417189598083, -0.6943226456642151, -0.10569097101688385, -0.956866443157196, 0.5209661722183228, -0.3078222870826721, -0.4136233329772949, 0.30301278829574585, 0.40518179535865784, 1.3195585012435913, -0.0006179837509989738, 0.11870704591274261, 1.1478989124298096, -1.4290728569030762, 1.4563745260238647, -0.6603813171386719, 0.26080313324928284, -2.1995809078216553, 1.4355340003967285, -0.805788516998291, 1.8914146423339844, -2.6971209049224854, 0.4514724016189575, -0.5339018702507019, -0.4703250527381897, 0.1998581439256668, -0.4317393898963928, 0.16953790187835693, -0.10461293160915375, -1.1481376886367798, -0.10104595124721527, -0.7370245456695557, 0.6239925026893616, 1.1651945114135742, 1.2964109182357788, -1.0673004388809204, -0.4306733012199402, -1.6522148847579956, -0.14785899221897125, -0.6209960579872131, 0.30877113342285156, -1.942378282546997, -0.17590905725955963, -1.9029580354690552, -2.379436731338501, -1.2779470682144165, -0.8746585249900818, 1.1418585777282715, 0.13519597053527832, -0.8959274888038635, 1.279827356338501, -0.32709190249443054, -1.8499653339385986, 1.1417077779769897, -2.2129273414611816 ]
https://github.com/huggingface/datasets/issues/5608
audiofolder only creates dataset of 13 rows (files) when the data folder it's reading from has 20,000 mp3 files.
Hi! I'm sorry, I don't want to reveal my entire dataset, but here's a snippet (all of the mp3 files below are some of the ones not being recognized by audiofolder. Also, for another dataset, audiofolder loaded zero mp3 files because "train" was in the name of one of the mp3 files. my_dataset ├── data │   ├── VHA_Innovation_Stories_-_Day_2-123.mp3 │   ├── VHA_Innovation_Stories_-_Day_2-124.mp3 │   ├── ASSOCIATION_OF_GENERAL_PRACTITIONERS_OF_JAMAICA_NEPHROLOGY_CONFERENCE_-_JULY_3,_2022-93.mp3 │   ├── ASSOCIATION_OF_GENERAL_PRACTITIONERS_OF_JAMAICA_NEPHROLOGY_CONFERENCE_-_JULY_3,_2022-94.mp3 │   ├── ASSOCIATION_OF_GENERAL_PRACTITIONERS_OF_JAMAICA_NEPHROLOGY_CONFERENCE_-_JULY_3,_2022-95.mp3 │   ├── Your_Impact\357\274\232_Neurosurgery_equipment-5.mp3 │   └── Your_Impact\357\274\232_Neurosurgery_equipment-6.mp3 └── metadata.csv Here's a few of the 13 files recognized by the dataset: British_Heart_Foundation_-_Your_guide_to_a_Coronary_Angiogram,_a_test_for_heart_disease-1.mp3 British_Heart_Foundation_-_Your_guide_to_a_Coronary_Angiogram,_a_test_for_heart_disease-2.mp3 British_Heart_Foundation_-_Your_guide_to_a_Coronary_Angiogram,_a_test_for_heart_disease-3.mp3 IVP_⧸_IVU_test_Procedure_for_Kidneys_intravenous_pyelogram_-_medical_radiology_X-ray_ivp-1.mp3 IVP_⧸_IVU_test_Procedure_for_Kidneys_intravenous_pyelogram_-_medical_radiology_X-ray_ivp-2.mp3
### Describe the bug x = load_dataset("audiofolder", data_dir="x") When running this, x is a dataset of 13 rows (files) when it should be 20,000 rows (files) as the data_dir "x" has 20,000 mp3 files. Does anyone know what could possibly cause this (naming convention of mp3 files, etc.) ### Steps to reproduce the bug x = load_dataset("audiofolder", data_dir="x") ### Expected behavior x = load_dataset("audiofolder", data_dir="x") should create a dataset of 20,000 rows (files). ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
271
94
audiofolder only creates dataset of 13 rows (files) when the data folder it's reading from has 20,000 mp3 files. ### Describe the bug x = load_dataset("audiofolder", data_dir="x") When running this, x is a dataset of 13 rows (files) when it should be 20,000 rows (files) as the data_dir "x" has 20,000 mp3 files. Does anyone know what could possibly cause this (naming convention of mp3 files, etc.) ### Steps to reproduce the bug x = load_dataset("audiofolder", data_dir="x") ### Expected behavior x = load_dataset("audiofolder", data_dir="x") should create a dataset of 20,000 rows (files). ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Hi! I'm sorry, I don't want to reveal my entire dataset, but here's a snippet (all of the mp3 files below are some of the ones not being recognized by audiofolder. Also, for another dataset, audiofolder loaded zero mp3 files because "train" was in the name of one of the mp3 files. my_dataset ├── data │   ├── VHA_Innovation_Stories_-_Day_2-123.mp3 │   ├── VHA_Innovation_Stories_-_Day_2-124.mp3 │   ├── ASSOCIATION_OF_GENERAL_PRACTITIONERS_OF_JAMAICA_NEPHROLOGY_CONFERENCE_-_JULY_3,_2022-93.mp3 │   ├── ASSOCIATION_OF_GENERAL_PRACTITIONERS_OF_JAMAICA_NEPHROLOGY_CONFERENCE_-_JULY_3,_2022-94.mp3 │   ├── ASSOCIATION_OF_GENERAL_PRACTITIONERS_OF_JAMAICA_NEPHROLOGY_CONFERENCE_-_JULY_3,_2022-95.mp3 │   ├── Your_Impact\357\274\232_Neurosurgery_equipment-5.mp3 │   └── Your_Impact\357\274\232_Neurosurgery_equipment-6.mp3 └── metadata.csv Here's a few of the 13 files recognized by the dataset: British_Heart_Foundation_-_Your_guide_to_a_Coronary_Angiogram,_a_test_for_heart_disease-1.mp3 British_Heart_Foundation_-_Your_guide_to_a_Coronary_Angiogram,_a_test_for_heart_disease-2.mp3 British_Heart_Foundation_-_Your_guide_to_a_Coronary_Angiogram,_a_test_for_heart_disease-3.mp3 IVP_⧸_IVU_test_Procedure_for_Kidneys_intravenous_pyelogram_-_medical_radiology_X-ray_ivp-1.mp3 IVP_⧸_IVU_test_Procedure_for_Kidneys_intravenous_pyelogram_-_medical_radiology_X-ray_ivp-2.mp3
[ -1.209779143333435, -0.905281662940979, -0.6140527129173279, 1.4679198265075684, -0.18320265412330627, -1.2238426208496094, 0.2682182490825653, -0.9476800560951233, 1.6219302415847778, -0.915643572807312, 0.2681034803390503, -1.6018048524856567, 0.08765868842601776, -0.5242804288864136, -0.6935635209083557, -0.946397602558136, -0.4248880445957184, -0.7026677131652832, 1.1282604932785034, 2.415311574935913, 1.2256696224212646, -1.3540436029434204, 2.761671304702759, 0.6923068165779114, -0.2502467632293701, -0.9668094515800476, 0.47010287642478943, 0.06122123822569847, -1.3055258989334106, -0.4822293817996979, -0.8449246287345886, -0.11040167510509491, -0.5320082902908325, -0.33957338333129883, -0.030400479212403297, 0.46900108456611633, -0.30494290590286255, -0.40387940406799316, -0.5582783818244934, -0.7404793500900269, 0.4590829014778137, -0.3373328149318695, 0.9120755195617676, -0.28598570823669434, 1.8202491998672485, -0.6149739027023315, 0.5248128771781921, 0.7364164590835571, 1.2296608686447144, 0.2561318576335907, -0.0003422880545258522, 0.2930896282196045, 0.4031014144420624, 0.045111652463674545, 0.5397562980651855, 1.1739485263824463, 0.6719656586647034, 0.5291473865509033, 0.7054307460784912, -2.209503650665283, 1.3897947072982788, -1.0236425399780273, 0.23802651464939117, 1.4668524265289307, -0.999657928943634, 0.381136029958725, -1.707150936126709, -0.049519188702106476, 0.6219867467880249, -2.2506184577941895, 0.2694854438304901, -1.3797425031661987, -0.5211508274078369, 0.9561512470245361, 0.399394154548645, -1.1484285593032837, 0.07901152968406677, -0.5005377531051636, 1.1013556718826294, 0.4511224627494812, 0.9631309509277344, -1.616379737854004, -0.04115866497159004, -0.23010393977165222, 0.1112784594297409, -1.3046106100082397, -1.5895605087280273, 0.5530890822410583, 0.6417633295059204, 0.5404534935951233, -0.12693578004837036, 1.0808182954788208, -1.1901918649673462, 0.8393481969833374, -1.0990893840789795, -1.6942881345748901, -1.4524681568145752, -2.4822232723236084, -2.341195821762085, 0.7291862368583679, -0.3920512795448303, -0.538718044757843, 2.0977156162261963, -1.0469722747802734, -1.5093027353286743, 1.1301029920578003, 0.16044872999191284, 0.034996822476387024, 2.4871926307678223, 0.25315061211586, -0.7843313217163086, 0.47377702593803406, -0.9303987622261047, 0.7926616668701172, -0.34750914573669434, 1.2167710065841675, 0.3964439928531647, -1.1131430864334106, 1.4642386436462402, -0.32080981135368347, 0.5952507257461548, -0.5878666639328003, -0.6087928414344788, -0.7255594730377197, 0.19725747406482697, 1.8257650136947632, -0.20058295130729675, 1.6023162603378296, -0.2719278633594513, -1.522045612335205, -1.5906308889389038, 0.8470717072486877, 0.36276963353157043, -0.8332713842391968, 0.10308156907558441, -0.45813554525375366, 0.14457985758781433, -0.02545907348394394, 1.2234442234039307, 1.337450623512268, 0.6425802111625671, -0.4529847800731659, -0.7998791933059692, 0.10166370868682861, -0.14938132464885712, -0.7251141667366028, -1.7858396768569946, -0.23391889035701752, 0.007212042808532715, 0.6056835055351257, -1.095997929573059, 1.7473883628845215, 0.9166259765625, 1.937192440032959, 1.0064146518707275, -0.3661618232727051, 1.5086275339126587, 0.06885744631290436, 1.7686185836791992, -0.5686250329017639, 0.6050738096237183, -0.4417685568332672, -1.1641360521316528, 0.8040151000022888, -0.2963647246360779, -2.075059652328491, -0.7099745273590088, -0.7032533884048462, -0.2008257657289505, -0.7934197783470154, 0.8672024607658386, -0.23643182218074799, -1.4192306995391846, 0.19169320166110992, -0.6720853447914124, 0.17196008563041687, -1.2414286136627197, 0.34594133496284485, 0.7450934052467346, -0.6018975377082825, 0.035984233021736145, -0.1536635458469391, -1.2770237922668457, -0.46148446202278137, 0.43433907628059387, 1.7448674440383911, -0.6192739605903625, 0.8488556742668152, 1.0498528480529785, -0.6131224632263184, 0.06592144072055817, 0.17947426438331604, -0.2452375292778015, 0.8451218605041504, -0.9861687421798706, -0.43500813841819763, 1.2684849500656128, -0.42499613761901855, -0.6032192707061768, 1.5226091146469116, 0.6616636514663696, -1.027855634689331, -0.24103909730911255, -0.08269712328910828, -0.8548463582992554, 0.1217641681432724, -1.5681318044662476, -0.12684154510498047, 0.4943064749240875, -1.5268458127975464, -0.36615467071533203, -0.13585351407527924, 1.3676958084106445, -0.18160822987556458, 1.4422366619110107, -0.3743515908718109, -0.16607537865638733, -0.38091954588890076, -0.4646051824092865, 0.22529937326908112, -0.1772550791501999, -0.47405344247817993, 0.14050468802452087, -0.8136705160140991, 0.3251776695251465, 1.4324926137924194, 0.23882922530174255, 0.0606127567589283, 0.40138864517211914, 1.13375723361969, 0.35488370060920715, -0.14996206760406494, -0.7993701696395874, -1.5804530382156372, 2.0104479789733887, -1.4373831748962402, 2.052999258041382, 0.7775373458862305, -0.08079548180103302, -1.7531582117080688, -1.8836627006530762, 1.2181825637817383, 1.0828194618225098, 2.2615110874176025, 0.3131016194820404, 0.368811696767807, -0.9111407995223999, -0.7697578072547913, 0.3627086877822876, -1.0021889209747314, -0.575896680355072, 0.1308954805135727, 2.36588716506958, 1.7298475503921509, -0.36634930968284607, -0.12471182644367218, -0.9950096011161804, 1.414846420288086, -0.16360722482204437, 0.260558158159256, 2.029757499694824, -0.27452483773231506, -1.0067503452301025, 1.3066736459732056, -2.388713836669922, 0.2393995225429535, 2.0614540576934814, 0.30967846512794495, 0.08981460332870483, -1.3499647378921509, -0.5909898281097412, -0.4374978542327881, -0.37769946455955505, -1.2279510498046875, 0.5285447239875793, -0.26374319195747375, -0.7582401633262634, -1.4002045392990112, 0.1632501631975174, -1.1327710151672363, -1.7087421417236328, 0.2764649987220764, 1.867926836013794, 2.06880521774292, -0.6834636926651001, 1.4299063682556152, -0.2965685725212097, 0.1051056981086731, 1.1840059757232666, 1.272721529006958, 3.10811710357666, 1.8967907428741455, -1.1966408491134644, 0.6121777296066284, -0.12923288345336914, -0.4071389436721802, 1.047790288925171, -1.27130925655365, 1.3980703353881836, -0.03710116446018219, -1.2701088190078735, -1.3013032674789429, 0.9844643473625183, 0.4562774896621704, 0.09958921372890472, -0.5256776213645935, 1.1635068655014038, 0.13463623821735382, 1.4199210405349731, 0.6136010885238647, -0.3108389377593994, 0.5214282870292664, -0.4965524971485138, -0.6274387836456299, 1.5450173616409302, 0.2247096300125122, -1.6127439737319946, -2.211987257003784, -0.3297484815120697, -0.8605742454528809, 0.056254927068948746, -0.6678158044815063, -1.0216045379638672, 1.666251301765442, 0.31676384806632996, -1.1925042867660522, -0.3117614984512329, -0.32498884201049805, -0.5094567537307739, 2.8752076625823975, -1.2830737829208374, -0.10318335890769958, -0.9738919734954834, -0.6905272603034973, 1.5963189601898193, -1.3057790994644165, -0.2765929102897644, -1.0618691444396973, -0.6020564436912537, -1.2084510326385498, -0.4161180555820465, 0.03931589052081108, -1.0151318311691284, 0.8390462398529053, 0.15688975155353546, -1.2554062604904175, -0.35887107253074646, -0.9220799207687378, 0.9819053411483765, -0.11726923286914825, 0.13299475610256195, 1.7226310968399048, 0.24405741691589355, -0.360673725605011, 0.8368767499923706, 1.2154428958892822, 0.7080325484275818, -0.6555166244506836, 0.007387623190879822, -0.6116140484809875, 0.3862621784210205, -1.1162582635879517, 0.39390891790390015, -2.9235293865203857, 0.5946191549301147, -0.13484281301498413, -0.12856513261795044, -0.10062293708324432, -1.3487708568572998, 1.0234116315841675, 2.4628753662109375, -1.1743370294570923, 0.4991489350795746, 0.3657524287700653, 1.1640808582305908, -1.6099728345870972, 0.3066021502017975, -0.5719698071479797, 2.062882423400879, 0.2139894664287567, 1.251180648803711, -0.5186443328857422, -2.323115110397339, 0.6322279572486877, -1.2337088584899902, -1.099604606628418, 0.8324796557426453, -0.9991680979728699, 0.20683932304382324, -1.3370325565338135, -0.3664990961551666, -0.8537081480026245, -1.2578091621398926, 0.5552892684936523, 0.1915169358253479, 0.42548492550849915, -0.4986160099506378, 0.2087039351463318, -2.416036367416382, -1.296379566192627, -0.20188535749912262, -1.0146701335906982, 0.5192400217056274, -0.4619975686073303, 0.5976390838623047, -0.10208259522914886, 0.06066150590777397, 0.3506768047809601, 1.6470013856887817, 3.366745710372925, 0.12187467515468597, 0.2594970464706421, -0.2198306918144226, -0.9532787203788757, 1.4385112524032593, 0.8637159466743469, -0.04385330528020859, -0.5509936809539795, -0.9992140531539917, 1.2985872030258179, 1.9702231884002686, 1.0299099683761597, -0.014888225123286247, -0.8231073617935181, -0.6930640339851379, -0.13271310925483704, 0.21824009716510773, 0.5755097270011902, 0.8810281753540039, 0.051808249205350876, 0.08813999593257904, 1.459830641746521, 1.168707251548767, -0.44166886806488037, 0.2880561053752899, -0.8547375202178955, -0.4626091718673706, 0.48038250207901, 0.247147798538208, 0.001913752406835556, 0.4149021804332733, -1.0434858798980713, -0.15414202213287354, -0.46415188908576965, -0.7792285084724426, -0.7046716809272766, -0.387658029794693, -0.41601333022117615, 1.59906005859375, 0.19217714667320251, -0.5213021039962769, 0.03798273205757141, -0.6504719257354736, -0.3000238835811615, -1.1003597974777222, 0.3362584114074707, -0.10876631736755371, -0.0316690057516098, -0.19213680922985077, 1.730958104133606, -0.916838526725769, -2.159930467605591, 0.18572182953357697, 0.15844964981079102, -0.2371668666601181, 0.14931048452854156, 1.6359493732452393, 0.4485733211040497, 1.4761426448822021, 1.246993064880371, 0.9953402876853943, -0.6759421825408936, -1.3690310716629028, 0.7847822904586792, 0.9639167785644531, -1.3805073499679565, 0.7908759117126465, -0.18474382162094116, -0.5108866691589355, 0.7310401797294617, 1.1784322261810303, 0.4736555218696594, -2.0356855392456055, 0.8942413926124573, -1.1616332530975342, 0.8682513236999512, 0.7876555919647217, 0.7135942578315735, 0.24603581428527832, 0.9059754014015198, -1.1148062944412231, -1.0533841848373413, -0.6285896301269531, -0.7865443229675293, 1.951192021369934, -0.40415000915527344, 0.6434240937232971, -0.17160478234291077, -1.2588543891906738, 0.08610005676746368, 0.6881735324859619, 0.36446255445480347, -0.4527779519557953, 0.9254659414291382, -0.6970924735069275, -1.0478479862213135, -1.352360486984253, -0.42253080010414124, -1.1510945558547974, -1.0276837348937988, 1.0335761308670044, 0.6921176910400391, 0.3206903338432312, 1.8361823558807373, 0.6585620045661926, 0.4220714271068573, -2.630906820297241, 0.8858710527420044, 0.15590353310108185, -0.07815805077552795, 0.7911036610603333, 0.32076773047447205, 1.1173205375671387, 0.0007425146177411079, 0.4956897795200348, -2.472074508666992, 2.37143611907959, -0.28964921832084656, 0.7811439633369446, -0.046687331050634384, -0.11075049638748169, 1.1133761405944824, 0.6905509233474731, 0.5327067375183105, -1.0501503944396973, 0.772251307964325, -0.4770006239414215, 1.1901118755340576, 0.8592334389686584, -0.7751997709274292, -0.016401169821619987, 1.3970417976379395, 0.4460107982158661, -0.5826579928398132, -0.9459583163261414, -0.9809954762458801, 0.8362459540367126, 1.6358681917190552, -0.03445984423160553, -0.044765133410692215, 0.7406538128852844, 0.7053562998771667, -1.1387660503387451, 0.09543740749359131, -0.6633521318435669, -0.7804622650146484, 1.6046581268310547, 2.0817978382110596, -0.17961621284484863, -0.06901818513870239, -0.6772852540016174, -1.264736294746399, 0.6535925269126892, -0.07102052867412567, -0.011657108552753925, 0.5241734385490417, -0.6519766449928284, 0.9388190507888794, 0.7469103336334229, 0.937656819820404, 0.26609861850738525, 0.2359393984079361, 0.40157774090766907, -0.3123421370983124, -1.231446623802185, -0.41270723938941956, -1.102160096168518, -2.5582263469696045, 0.36973273754119873, -0.3583887815475464, -1.4513380527496338, 0.0978042483329773, -1.0251442193984985, 0.8555412888526917, -0.6127098202705383, -1.1768596172332764, -1.4812723398208618, 0.17128869891166687, -0.013043350540101528, 0.9542232155799866, -1.572479486465454, -0.24564436078071594, 1.207290530204773, 0.8004688024520874, -0.5813992023468018, 1.0028046369552612, 0.2493841052055359, 1.0247395038604736, 0.7979866862297058, -0.43226274847984314, 0.5368618965148926, 0.14864660799503326, -1.4161776304244995, 0.5361719131469727, 1.2465957403182983, 0.1654597520828247, 1.5636788606643677, -0.5019263625144958, -0.05064602568745613, 0.42409947514533997, -0.5930466651916504, -0.44212573766708374, -0.41188234090805054, 0.6537575125694275, -0.043043289333581924, -0.8906062245368958, -0.08962465822696686, -0.22446110844612122, -0.2851761281490326, 0.18382133543491364, -1.4726954698562622, -0.13855038583278656, -0.48209595680236816, -0.5889379382133484, -1.345710039138794, -0.10570003092288971, 1.4738532304763794, -0.7282034754753113, -0.14835301041603088, 0.46444398164749146, 0.4590270519256592, 0.5938817858695984, 0.7759172320365906, -0.6840387582778931, -0.22992867231369019, -0.2822805643081665, -0.25053754448890686, 0.36087939143180847, 1.3074092864990234, -0.09347277879714966, -0.9661911129951477, 0.6687643527984619, -0.3236292004585266, 0.23465164005756378, 2.0463573932647705, 0.2080480009317398, -0.7641414999961853, 0.4624920189380646, -0.7457081079483032, 1.8878580331802368, 1.7025848627090454, 1.2915587425231934, -0.12531806528568268, -0.9167678356170654, 0.6630050539970398, -0.3862698972225189, -0.3689192831516266, 0.8203282952308655, 0.36812230944633484, -0.33736109733581543, -1.3171627521514893, 0.9304651618003845, 1.1745598316192627, -0.9272541999816895, -0.7679110765457153, 0.3203013241291046, -0.7734537720680237, 1.2408406734466553, 0.5785451531410217, 0.41924697160720825, 0.27925968170166016, 1.706250548362732, 0.8193432688713074, -0.45789963006973267, 0.4798312187194824, 0.5818438529968262, -0.2211950719356537, -2.0508716106414795, -1.1689006090164185, 0.3065875470638275, -0.6714644432067871, -1.5091558694839478, 1.4792487621307373, -1.100284457206726, -1.0707958936691284, 0.5838378071784973, 0.025864694267511368, 1.3080942630767822, 0.3707582652568817, 1.6288177967071533, 2.1061208248138428, 0.8553338646888733, 0.5890063643455505, 1.3131624460220337, -0.1675817370414734, -0.47288402915000916, 1.7479124069213867, -0.4596651792526245, 0.4468773603439331, 1.2513443231582642, -0.4491497278213501, -1.1209969520568848, -0.7846671342849731, -1.0708070993423462, -0.6367334723472595, 1.133041262626648, 0.07642428576946259, -1.0159013271331787, 0.2840120196342468, 1.5274125337600708, 0.14946474134922028, -0.30052483081817627, 0.5988892316818237, 0.3310392498970032, -0.7069723010063171, -0.13029257953166962, -0.999468207359314, 0.5597885251045227, -0.43657246232032776, -0.4483470916748047, 0.29165104031562805, 0.4624110460281372, 1.2734010219573975, -0.05675792694091797, 0.14929983019828796, 1.0766124725341797, -1.4688466787338257, 1.388013482093811, -0.6118188500404358, 0.25421276688575745, -2.1974871158599854, 1.3412739038467407, -0.6326067447662354, 2.0414721965789795, -2.713813304901123, 0.42214512825012207, -0.6210659742355347, -0.5592813491821289, 0.24311131238937378, -0.2937888205051422, 0.12239202857017517, -0.13874027132987976, -1.0995179414749146, -0.03061709925532341, -0.7332956790924072, 0.6322098970413208, 1.1814956665039062, 1.3567376136779785, -1.0553274154663086, -0.34742555022239685, -1.479622483253479, -0.1266077160835266, -0.7711470127105713, 0.2908921539783478, -1.9465177059173584, -0.18744340538978577, -1.9789009094238281, -2.39064884185791, -1.225775957107544, -0.8690861463546753, 1.1524183750152588, 0.230352982878685, -0.8761175870895386, 1.3813109397888184, -0.28432753682136536, -1.7916508913040161, 1.078892469406128, -2.0821738243103027 ]
https://github.com/huggingface/datasets/issues/5606
Add `Dataset.to_list` to the API
Hello, I have an interest in this issue. Is the `Dataset.to_dict` you are describing correct in the code here? https://github.com/huggingface/datasets/blob/35b789e8f6826b6b5a6b48fcc2416c890a1f326a/src/datasets/arrow_dataset.py#L4633-L4667
Since there is `Dataset.from_list` in the API, we should also add `Dataset.to_list` to be consistent. Regarding the implementation, we can re-use `Dataset.to_dict`'s code and replace the `to_pydict` calls with `to_pylist`.
272
20
Add `Dataset.to_list` to the API Since there is `Dataset.from_list` in the API, we should also add `Dataset.to_list` to be consistent. Regarding the implementation, we can re-use `Dataset.to_dict`'s code and replace the `to_pydict` calls with `to_pylist`. Hello, I have an interest in this issue. Is the `Dataset.to_dict` you are describing correct in the code here? https://github.com/huggingface/datasets/blob/35b789e8f6826b6b5a6b48fcc2416c890a1f326a/src/datasets/arrow_dataset.py#L4633-L4667
[ -1.1085078716278076, -0.7848642468452454, -0.7754935622215271, 1.4184117317199707, -0.15377268195152283, -1.3009488582611084, 0.2207460254430771, -1.2125113010406494, 1.70610511302948, -0.8192591071128845, 0.3086867928504944, -1.6503373384475708, -0.025359585881233215, -0.5635589361190796, -0.7227445244789124, -0.8868139982223511, -0.3546053171157837, -0.6998957991600037, 0.8806122541427612, 2.5237128734588623, 1.1940240859985352, -1.1644203662872314, 2.6388792991638184, 0.6337488293647766, -0.2523050904273987, -1.0928394794464111, 0.5563040971755981, 0.050782714039087296, -1.2642614841461182, -0.4037972688674927, -0.8950324654579163, 0.02530447021126747, -0.6043661832809448, -0.60441654920578, 0.05490054190158844, 0.4670598804950714, -0.31241005659103394, -0.29371222853660583, -0.503615140914917, -0.9334619045257568, 0.571919322013855, -0.4334810674190521, 0.9300481081008911, -0.35488274693489075, 1.761353850364685, -0.5319750308990479, 0.4745018184185028, 0.8221637010574341, 1.398393988609314, 0.009500485844910145, -0.09195739775896072, 0.20824065804481506, 0.33848056197166443, 0.11965587735176086, 0.4250333309173584, 1.11130690574646, 0.573702871799469, 0.5793179869651794, 0.6015531420707703, -2.348968505859375, 1.4069937467575073, -0.9083721041679382, 0.2268638163805008, 1.3388586044311523, -0.9309090375900269, 0.3194696307182312, -1.8508620262145996, -0.10203815251588821, 0.4569365084171295, -2.352621078491211, 0.2587122917175293, -1.351012110710144, -0.5479176640510559, 0.9453229308128357, 0.3093879222869873, -1.203400731086731, 0.1813969612121582, -0.43960317969322205, 0.9830139875411987, 0.6722115874290466, 1.0731441974639893, -1.73305344581604, -0.0013089682906866074, -0.3249616026878357, 0.07710395753383636, -1.394142508506775, -1.5178076028823853, 0.4971809983253479, 0.6127680540084839, 0.5913812518119812, -0.030398007482290268, 0.9194375872612, -1.0062971115112305, 0.7466956973075867, -0.9727964401245117, -1.6632864475250244, -1.1849817037582397, -2.1891121864318848, -2.324075937271118, 0.6920821666717529, -0.46899574995040894, -0.490897536277771, 2.0397605895996094, -1.0657050609588623, -1.8708117008209229, 1.0907779932022095, 0.29383447766304016, 0.009633510373532772, 2.3632919788360596, 0.23226512968540192, -0.632246196269989, 0.30344632267951965, -0.6458561420440674, 0.8056480288505554, -0.40515223145484924, 1.416332483291626, 0.5512569546699524, -1.0531436204910278, 1.7086374759674072, -0.41132304072380066, 0.6047385334968567, -0.7322110533714294, -0.5650526881217957, -0.8108674883842468, 0.30917179584503174, 1.831156849861145, -0.36892667412757874, 1.5127698183059692, -0.3545042872428894, -1.498181700706482, -1.5016984939575195, 0.9805432558059692, 0.619372546672821, -0.7881953716278076, 0.04395893216133118, -0.4442620277404785, 0.09661643952131271, -0.10056648403406143, 1.165915608406067, 1.167716383934021, 0.7445241808891296, -0.3405156433582306, -0.8628097772598267, 0.21816682815551758, -0.013854960910975933, -0.6809026598930359, -1.9613713026046753, -0.2994990050792694, 0.201294407248497, 0.6655879616737366, -1.0948662757873535, 1.7137619256973267, 0.95356684923172, 1.960516095161438, 0.9806726574897766, -0.3640461564064026, 1.4458783864974976, -0.07471463084220886, 1.8822908401489258, -0.4160425364971161, 0.6978274583816528, -0.27630236744880676, -1.107930064201355, 0.9152985215187073, -0.280124694108963, -1.992933988571167, -0.8440627455711365, -0.8969375491142273, -0.25276076793670654, -0.6822606325149536, 1.0050715208053589, -0.27924346923828125, -1.3180867433547974, 0.05526825785636902, -0.6115943193435669, 0.17410768568515778, -1.241425633430481, 0.26951512694358826, 0.6645594239234924, -0.6905184984207153, -0.05899839848279953, -0.38266804814338684, -1.3232653141021729, -0.5384427905082703, 0.29280802607536316, 1.816588282585144, -0.7361583113670349, 0.8814390301704407, 1.0053138732910156, -0.7879772782325745, -0.015515613369643688, 0.27167993783950806, -0.3457591235637665, 0.7709516286849976, -1.0496119260787964, -0.36690840125083923, 1.156777024269104, -0.19432079792022705, -0.8239100575447083, 1.517106533050537, 0.7903752326965332, -0.9505502581596375, -0.17455291748046875, -0.2844104468822479, -0.8265262842178345, 0.08048287034034729, -1.5913341045379639, -0.14952601492404938, 0.3877891004085541, -1.4139328002929688, -0.38760432600975037, -0.17966601252555847, 1.4013437032699585, -0.17983444035053253, 1.4001656770706177, -0.2046249806880951, -0.28668203949928284, -0.36648544669151306, -0.4169158339500427, 0.15282109379768372, -0.0365644171833992, -0.6163129210472107, 0.21992364525794983, -0.804568350315094, 0.34051448106765747, 1.4515185356140137, 0.33191341161727905, -0.014312360435724258, 0.5177996158599854, 1.0584214925765991, 0.2844565510749817, -0.10743328928947449, -0.8989139199256897, -1.6287511587142944, 1.9891775846481323, -1.5061850547790527, 1.8979955911636353, 0.6324397325515747, -0.04691316559910774, -1.8358607292175293, -1.831516146659851, 1.4011815786361694, 1.1272611618041992, 2.297919988632202, 0.6493282318115234, 0.41987594962120056, -0.8100639581680298, -0.7250892519950867, 0.4553528130054474, -1.0335049629211426, -0.659794807434082, 0.11339742690324783, 2.287416696548462, 1.7589378356933594, -0.5462778806686401, -0.1693681925535202, -1.0327359437942505, 1.1812217235565186, -0.16001035273075104, 0.262911856174469, 2.0678248405456543, -0.39258143305778503, -1.094666838645935, 1.2484153509140015, -2.2875800132751465, 0.19253242015838623, 1.950852870941162, 0.19714567065238953, 0.07292026281356812, -1.374120831489563, -0.6280094385147095, -0.1902717798948288, -0.43549561500549316, -1.3467276096343994, 0.5304420590400696, -0.32011017203330994, -0.8534888625144958, -1.4680262804031372, 0.16006672382354736, -1.082643985748291, -1.6412016153335571, 0.36477530002593994, 1.9494004249572754, 1.937951922416687, -0.674728274345398, 1.5005089044570923, -0.3092789649963379, 0.1343785673379898, 1.2668513059616089, 1.239065170288086, 2.9645116329193115, 1.9268361330032349, -1.335815191268921, 0.8240319490432739, -0.05055473744869232, -0.6361369490623474, 1.283807396888733, -1.0347462892532349, 1.2296233177185059, -0.29472458362579346, -1.209124207496643, -1.3113723993301392, 0.9578262567520142, 0.5180031061172485, 0.17188170552253723, -0.5034019947052002, 1.3042426109313965, 0.10064353048801422, 1.3113211393356323, 0.5988030433654785, -0.41942933201789856, 0.7556443810462952, -0.4877447485923767, -0.4933587610721588, 1.6209205389022827, 0.1929212510585785, -1.4601789712905884, -2.4373226165771484, -0.2894531488418579, -0.7788877487182617, -0.046708427369594574, -0.5661106109619141, -0.9768218994140625, 1.6171151399612427, 0.4771592915058136, -1.2637611627578735, -0.29863518476486206, -0.2830590605735779, -0.6064587831497192, 2.60660457611084, -1.3177909851074219, -0.11548270285129547, -1.0250288248062134, -0.544109582901001, 1.6440587043762207, -1.1979566812515259, -0.161253422498703, -0.9621310234069824, -0.4962872564792633, -1.4722346067428589, -0.5136762857437134, -0.022133203223347664, -0.9808869361877441, 0.7638976573944092, 0.1565931886434555, -1.0815668106079102, -0.2999601364135742, -0.7788653373718262, 0.9283697605133057, -0.18277572095394135, 0.19040827453136444, 1.915044903755188, 0.5188629627227783, -0.39160048961639404, 0.6938647627830505, 1.0211894512176514, 0.5817350745201111, -0.6458078622817993, 0.2211485654115677, -0.8122352361679077, 0.23844082653522491, -1.4045907258987427, 0.22678859531879425, -2.95550799369812, 0.6300463676452637, -0.09677030146121979, -0.08457791805267334, -0.009183106943964958, -1.4416943788528442, 1.0619112253189087, 2.6530206203460693, -1.3019468784332275, 0.4977317452430725, 0.3391532301902771, 1.1196397542953491, -1.4823544025421143, 0.24632912874221802, -0.43114688992500305, 2.0913987159729004, 0.1609121561050415, 1.273795485496521, -0.47330039739608765, -2.14658260345459, 0.6514443159103394, -1.1893121004104614, -1.2554454803466797, 0.8436676263809204, -0.7663305401802063, 0.08208958804607391, -1.3687106370925903, -0.17876523733139038, -0.9473230838775635, -1.276734709739685, 0.7827799916267395, 0.18562829494476318, 0.5559002161026001, -0.6462495923042297, 0.37356993556022644, -2.095020055770874, -1.2374486923217773, -0.18723052740097046, -0.9513795375823975, 0.5207801461219788, -0.18702152371406555, 0.6377093195915222, -0.16422688961029053, 0.168848916888237, 0.3740270435810089, 1.4317601919174194, 3.444115400314331, 0.165557861328125, 0.25223714113235474, -0.2365218698978424, -0.9614854454994202, 1.4691680669784546, 1.0302166938781738, 0.007553993724286556, -0.5052152276039124, -0.9476855993270874, 1.0550079345703125, 2.0691208839416504, 0.9590948820114136, 0.04673519730567932, -0.8838374018669128, -0.6202118992805481, 0.021174591034650803, 0.13591903448104858, 0.46083661913871765, 0.9380555748939514, 0.1041673794388771, 0.059674300253391266, 1.2727152109146118, 1.286328673362732, -0.4288393557071686, 0.4164374768733978, -0.8886262774467468, -0.286722868680954, 0.520348846912384, 0.270401269197464, -0.06383273005485535, 0.4414120614528656, -0.9413172006607056, -0.13910320401191711, -0.34859898686408997, -1.0226075649261475, -0.7724888920783997, -0.4474755525588989, -0.47984573245048523, 1.6266286373138428, 0.04830467700958252, -0.4517797529697418, -0.02299937978386879, -0.6956393718719482, -0.10575765371322632, -1.0426843166351318, 0.23084060847759247, -0.12959179282188416, -0.0958188995718956, -0.0933334231376648, 1.7471222877502441, -1.007234811782837, -2.0676302909851074, 0.28079837560653687, 0.18138040602207184, -0.47831887006759644, 0.270577073097229, 1.7088851928710938, 0.5309709310531616, 1.4690972566604614, 1.2739979028701782, 1.1231812238693237, -0.6137519478797913, -1.257212519645691, 0.6687048673629761, 0.9442610740661621, -1.3838473558425903, 0.8123023509979248, 0.16754503548145294, -0.5310617089271545, 0.7980085015296936, 1.2508350610733032, 0.4548840820789337, -2.043646812438965, 0.8007537722587585, -0.8682230710983276, 0.6945904493331909, 0.6958414316177368, 0.8125209808349609, 0.2929385304450989, 0.9127511978149414, -1.1221405267715454, -1.2322090864181519, -0.6745455265045166, -0.655161440372467, 1.9495536088943481, -0.3200414776802063, 0.6062808036804199, -0.09526611864566803, -1.2831002473831177, -0.12586121261119843, 0.8627631068229675, 0.42238110303878784, -0.3626744747161865, 0.7201058268547058, -0.5235545039176941, -1.050376296043396, -1.370303988456726, -0.5078253746032715, -1.0644663572311401, -0.9388992190361023, 0.9962055087089539, 0.7799131274223328, 0.3784007728099823, 1.850158929824829, 0.5796865224838257, 0.24007996916770935, -2.674020767211914, 0.7998411059379578, 0.37463924288749695, -0.015912193804979324, 0.9000983834266663, 0.3874393701553345, 1.1396596431732178, -0.07635509222745895, 0.6003086566925049, -2.332308292388916, 2.258610963821411, -0.2337317019701004, 0.5769014954566956, 0.040023960173130035, -0.2067982256412506, 1.0571911334991455, 0.4143495261669159, 0.6592596769332886, -1.2488603591918945, 0.7691376209259033, -0.6235076785087585, 1.149295687675476, 0.9658157825469971, -0.8875365257263184, 0.015690680593252182, 1.5248955488204956, 0.5328335165977478, -0.5076968669891357, -0.7469008564949036, -0.9637374877929688, 0.8623661398887634, 1.727203607559204, -0.20684032142162323, -0.021550796926021576, 0.8041688203811646, 0.6868446469306946, -1.3210402727127075, 0.08874612301588058, -0.7691863179206848, -0.7030489444732666, 1.665188193321228, 1.914372444152832, -0.07211346179246902, -0.17562051117420197, -0.859672486782074, -1.1173901557922363, 0.7803804278373718, 0.03336373716592789, 0.060698121786117554, 0.6057484745979309, -0.6010808944702148, 1.1605178117752075, 0.7427335977554321, 0.9841476082801819, 0.060784079134464264, 0.41845694184303284, 0.3681938052177429, -0.35426780581474304, -1.1057019233703613, -0.3044908940792084, -1.1371004581451416, -2.6597166061401367, 0.5117195248603821, -0.39684656262397766, -1.4741811752319336, -0.09568881243467331, -1.0363261699676514, 0.8838508129119873, -0.6049373745918274, -1.1103718280792236, -1.5643056631088257, 0.308267742395401, -0.14242567121982574, 0.8736054301261902, -1.6453239917755127, -0.04423452541232109, 1.3501793146133423, 0.924157440662384, -0.6813777685165405, 1.0346345901489258, 0.3172157406806946, 1.0544835329055786, 0.7866387963294983, -0.4725378453731537, 0.4982728362083435, 0.043652333319187164, -1.356492280960083, 0.5201869010925293, 1.192349910736084, 0.11949914693832397, 1.3745051622390747, -0.45741283893585205, 0.030484113842248917, 0.4041147530078888, -0.46654754877090454, -0.4626811742782593, -0.464701771736145, 0.7686595916748047, 0.098023422062397, -0.9258392453193665, 0.13049809634685516, -0.1756083369255066, -0.17171718180179596, 0.19311970472335815, -1.45211660861969, -0.27064910531044006, -0.4313892722129822, -0.505930483341217, -1.2391563653945923, -0.034686505794525146, 1.3773940801620483, -0.6709757447242737, -0.18393030762672424, 0.48777657747268677, 0.4218190312385559, 0.5726684331893921, 0.5812934041023254, -0.7357889413833618, -0.35193583369255066, -0.3621506690979004, -0.36742880940437317, 0.3900582790374756, 1.335303783416748, -0.15520019829273224, -1.0333718061447144, 0.788794755935669, -0.29506734013557434, 0.07432597875595093, 1.9531563520431519, -0.03649606555700302, -0.8269957304000854, 0.2999330759048462, -0.6377320289611816, 1.8783093690872192, 1.7853975296020508, 1.3041926622390747, -0.10263928771018982, -0.9686179757118225, 0.48739609122276306, -0.3527829647064209, -0.27253636717796326, 0.990606963634491, 0.5440456867218018, -0.13487014174461365, -1.3154011964797974, 0.5501145720481873, 1.3020234107971191, -0.8181109428405762, -0.7600334882736206, -0.04195479676127434, -0.793319046497345, 1.1459203958511353, 0.6699122786521912, 0.32030192017555237, 0.2542395293712616, 1.4883253574371338, 0.5929911136627197, -0.47499170899391174, 0.6392002105712891, 0.45058995485305786, -0.1694316864013672, -2.1442198753356934, -1.1301571130752563, 0.42286890745162964, -0.4216056168079376, -1.6139912605285645, 1.401524305343628, -1.1965221166610718, -0.9123175144195557, 0.4465980529785156, 0.2183302640914917, 1.4817320108413696, 0.3459647297859192, 1.6352417469024658, 2.0758488178253174, 0.9042497277259827, 0.37101277709007263, 1.5266507863998413, -0.1274784803390503, -0.462054967880249, 1.8373315334320068, -0.5287073254585266, 0.3937615752220154, 1.072802186012268, -0.3942353129386902, -1.0483202934265137, -0.8921051025390625, -1.160095453262329, -0.5580270886421204, 1.252790093421936, 0.05802600085735321, -1.171167016029358, 0.19694791734218597, 1.6187599897384644, 0.19054600596427917, -0.26976752281188965, 0.6685819029808044, 0.35472357273101807, -0.7553043961524963, -0.04764372110366821, -0.9146295189857483, 0.5072745680809021, -0.21992620825767517, -0.16731736063957214, 0.3608568608760834, 0.49933505058288574, 1.1892327070236206, -0.09905039519071579, 0.21366359293460846, 1.1859132051467896, -1.360175371170044, 1.417389988899231, -0.589491605758667, 0.22230708599090576, -2.3747458457946777, 1.4023874998092651, -0.6576958894729614, 1.8852405548095703, -2.6059582233428955, 0.251007616519928, -0.5500878691673279, -0.3823707699775696, 0.21893279254436493, -0.32281774282455444, 0.11256615072488785, -0.22584952414035797, -1.0723328590393066, -0.1367894560098648, -0.7837900519371033, 0.5843319892883301, 1.121362328529358, 1.2985554933547974, -1.1245478391647339, -0.3012234568595886, -1.7728699445724487, -0.254987895488739, -0.7602725625038147, 0.3986873924732208, -1.9991117715835571, -0.22037050127983093, -2.030910015106201, -2.533843517303467, -1.332521677017212, -0.8025349974632263, 1.072466492652893, 0.16972725093364716, -0.8677089810371399, 1.043381929397583, -0.2466849386692047, -1.8985486030578613, 1.1525676250457764, -2.1631085872650146 ]
https://github.com/huggingface/datasets/issues/5604
Problems with downloading The Pile
Hi! You can specify `download_config=DownloadConfig(resume_download=True))` in `load_dataset` to resume the download when re-running the code after the timeout error: ```python from datasets import load_dataset, DownloadConfig dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets', download_config=DownloadConfig(resume_download=True)) ```
### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2
273
32
Problems with downloading The Pile ### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2 Hi! You can specify `download_config=DownloadConfig(resume_download=True))` in `load_dataset` to resume the download when re-running the code after the timeout error: ```python from datasets import load_dataset, DownloadConfig dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets', download_config=DownloadConfig(resume_download=True)) ```
[ -1.2368625402450562, -0.8774968981742859, -0.7400590777397156, 1.444351077079773, -0.1186927780508995, -1.2102718353271484, 0.055873047560453415, -0.9798559546470642, 1.5522856712341309, -0.7297624349594116, 0.2441541701555252, -1.6731832027435303, -0.014697623439133167, -0.5624513030052185, -0.7345198392868042, -0.7995545864105225, -0.4214818775653839, -0.7502201795578003, 1.0686304569244385, 2.4360599517822266, 1.2270268201828003, -1.4172900915145874, 2.7534728050231934, 0.6954878568649292, -0.1435050219297409, -1.0164169073104858, 0.5660277009010315, -0.003127853851765394, -1.3858215808868408, -0.3529435098171234, -0.9759738445281982, -0.02234046161174774, -0.6313686370849609, -0.53370600938797, 0.022548697888851166, 0.44231435656547546, -0.2489672750234604, -0.48422420024871826, -0.5077646374702454, -0.7183362245559692, 0.48801547288894653, -0.3858877420425415, 0.8799526691436768, -0.3227865695953369, 1.7963848114013672, -0.5377112030982971, 0.440443754196167, 0.7059125304222107, 1.2904452085494995, 0.13276295363903046, 0.016596034169197083, 0.4290219843387604, 0.3873606324195862, -0.02835232764482498, 0.5282671451568604, 1.210968017578125, 0.7085568904876709, 0.4574846923351288, 0.7115876078605652, -2.262559652328491, 1.3396865129470825, -0.903715193271637, 0.31009167432785034, 1.3523727655410767, -1.0421236753463745, 0.40703147649765015, -1.8420583009719849, -0.025829996913671494, 0.47328081727027893, -2.271336317062378, 0.29683399200439453, -1.280450701713562, -0.46112141013145447, 1.0438531637191772, 0.33464711904525757, -1.3000895977020264, 0.12945623695850372, -0.5090451836585999, 1.097879409790039, 0.400256484746933, 1.1884281635284424, -1.6599844694137573, -0.07813853025436401, -0.3054084777832031, 0.12160347402095795, -1.2522598505020142, -1.605392575263977, 0.4546269476413727, 0.6219265460968018, 0.6237717866897583, -0.13357290625572205, 0.9960227012634277, -1.0298409461975098, 0.8103273510932922, -0.9738829135894775, -1.7593402862548828, -1.375784158706665, -2.32566499710083, -2.2819583415985107, 0.7130479216575623, -0.4097825884819031, -0.46899813413619995, 2.0788896083831787, -1.0317585468292236, -1.7677339315414429, 1.1054326295852661, 0.26924052834510803, -0.06272418051958084, 2.3580403327941895, 0.2082432508468628, -0.7925232648849487, 0.47231438755989075, -0.7945456504821777, 0.8013038635253906, -0.3699288070201874, 1.3511005640029907, 0.4610462188720703, -1.0092196464538574, 1.6207040548324585, -0.3970063626766205, 0.5635786652565002, -0.7127446532249451, -0.5106551051139832, -0.7685108780860901, 0.18775247037410736, 1.9365276098251343, -0.31893518567085266, 1.5575085878372192, -0.34733161330223083, -1.5818220376968384, -1.4946268796920776, 0.8455324769020081, 0.4913613498210907, -0.8559813499450684, 0.13271082937717438, -0.3250693380832672, 0.105435810983181, -0.03251863270998001, 1.0856941938400269, 1.2450134754180908, 0.7239140868186951, -0.3707828223705292, -0.9712501168251038, 0.13325096666812897, -0.06288576126098633, -0.6451877355575562, -1.7599265575408936, -0.3253149390220642, 0.06867571920156479, 0.6601237058639526, -1.2704920768737793, 1.7576853036880493, 0.8687236309051514, 1.8961412906646729, 1.0342251062393188, -0.44791287183761597, 1.5167230367660522, 0.05311768874526024, 1.8923839330673218, -0.5263122916221619, 0.585026204586029, -0.36198344826698303, -1.2249658107757568, 0.8149409890174866, -0.2856786251068115, -2.051877498626709, -0.6846343278884888, -0.8018583059310913, -0.1817857027053833, -0.7862443327903748, 0.9202216863632202, -0.35973814129829407, -1.4336267709732056, 0.23715424537658691, -0.6897554397583008, 0.17545363306999207, -1.3054741621017456, 0.2807471454143524, 0.7601402401924133, -0.6517046689987183, 0.03045501932501793, -0.3294791877269745, -1.2780554294586182, -0.48797833919525146, 0.3982146680355072, 1.7655006647109985, -0.7448548674583435, 0.9782138466835022, 1.032180905342102, -0.6808338165283203, -0.06764466315507889, 0.3492896854877472, -0.252103328704834, 0.9369733333587646, -1.0480526685714722, -0.5050308108329773, 1.1299855709075928, -0.21158860623836517, -0.5945255756378174, 1.4025970697402954, 0.7489296197891235, -1.048327088356018, -0.28597721457481384, -0.0578184574842453, -0.921639621257782, 0.04727533087134361, -1.6149928569793701, -0.09946856647729874, 0.4024467468261719, -1.6193783283233643, -0.48713675141334534, -0.22518381476402283, 1.3146157264709473, -0.10967730730772018, 1.4387307167053223, -0.28695833683013916, -0.10957134515047073, -0.36067983508110046, -0.4268375635147095, 0.22042304277420044, -0.184919536113739, -0.5538048148155212, 0.19517137110233307, -0.7735638618469238, 0.26780059933662415, 1.4569636583328247, 0.35874292254447937, 0.041810039430856705, 0.5518720746040344, 1.1444497108459473, 0.3958584666252136, -0.07985074818134308, -0.8318980932235718, -1.601161241531372, 1.9992083311080933, -1.5770127773284912, 1.8991540670394897, 0.727706253528595, -0.07251731306314468, -1.8050895929336548, -1.882277011871338, 1.3847601413726807, 1.1026256084442139, 2.359403610229492, 0.5775251984596252, 0.4764644503593445, -0.7745885848999023, -0.6989672780036926, 0.3424396812915802, -0.9689797759056091, -0.7947213053703308, 0.1717493087053299, 2.3639776706695557, 1.747198462486267, -0.394351989030838, -0.2586178183555603, -0.9828546643257141, 1.4448641538619995, -0.13994884490966797, 0.22922922670841217, 1.9540009498596191, -0.2089376300573349, -1.0681003332138062, 1.2526394128799438, -2.3600575923919678, 0.24459443986415863, 1.9652405977249146, 0.29929298162460327, 0.09389109164476395, -1.3462852239608765, -0.6839785575866699, -0.1999838948249817, -0.5045413374900818, -1.2435110807418823, 0.5594251155853271, -0.30387264490127563, -0.7638821005821228, -1.434705138206482, 0.04683683067560196, -1.1393851041793823, -1.7743664979934692, 0.2261158972978592, 1.9127326011657715, 2.0044145584106445, -0.7623288631439209, 1.5401567220687866, -0.3001113533973694, 0.21426542103290558, 1.2884509563446045, 1.2689552307128906, 3.2072067260742188, 1.8741174936294556, -1.2817739248275757, 0.7055450081825256, -0.08410125225782394, -0.4535205364227295, 1.1558839082717896, -1.1410239934921265, 1.2582374811172485, -0.21930725872516632, -1.2628693580627441, -1.148389220237732, 0.966691255569458, 0.4815414845943451, 0.05704355612397194, -0.44973495602607727, 1.1887969970703125, 0.09973685443401337, 1.3343406915664673, 0.6002722382545471, -0.3492143452167511, 0.6148772239685059, -0.3996081054210663, -0.5637748837471008, 1.566684603691101, 0.1645989567041397, -1.4024819135665894, -2.355135440826416, -0.2833797037601471, -0.7844972014427185, 0.05763531103730202, -0.693699836730957, -1.0023473501205444, 1.5940377712249756, 0.419473797082901, -1.201546311378479, -0.32289978861808777, -0.32896527647972107, -0.5781531929969788, 2.6040947437286377, -1.4064624309539795, -0.19316697120666504, -0.9677003026008606, -0.5762472152709961, 1.5756738185882568, -1.16200852394104, -0.30769652128219604, -1.033637523651123, -0.5888286232948303, -1.3295354843139648, -0.5902812480926514, -0.0532551035284996, -0.8923134207725525, 0.7426353096961975, 0.1416017711162567, -1.1543360948562622, -0.24959664046764374, -0.92286616563797, 0.8930470943450928, -0.10628390312194824, 0.18365895748138428, 1.8341820240020752, 0.4399718642234802, -0.3977024257183075, 0.740752637386322, 1.1522433757781982, 0.6577843427658081, -0.5914673805236816, 0.18684907257556915, -0.6637102961540222, 0.3352399468421936, -1.263345718383789, 0.2614748775959015, -2.8585562705993652, 0.621408998966217, -0.059917841106653214, 0.039434581995010376, -0.09187667816877365, -1.35979163646698, 1.0732483863830566, 2.4909491539001465, -1.184868335723877, 0.5620768666267395, 0.35572126507759094, 1.154492974281311, -1.6426010131835938, 0.25679832696914673, -0.5328955054283142, 2.117206573486328, 0.13277898728847504, 1.2265232801437378, -0.47576287388801575, -2.299910306930542, 0.5904585719108582, -1.2355400323867798, -1.0946165323257446, 0.8454313278198242, -0.7563164830207825, 0.1568726748228073, -1.3129405975341797, -0.2338167279958725, -0.8878218531608582, -1.191004753112793, 0.6701992750167847, 0.1433936506509781, 0.4492107629776001, -0.5953221917152405, 0.3407655954360962, -2.1502914428710938, -1.3116511106491089, -0.19778934121131897, -0.9018306732177734, 0.492138534784317, -0.33475828170776367, 0.6424629092216492, -0.09896086901426315, 0.05577391758561134, 0.28461953997612, 1.396469235420227, 3.3658831119537354, 0.1171160638332367, 0.27147746086120605, -0.12808938324451447, -0.9955938458442688, 1.483342170715332, 0.9351386427879333, -0.19534063339233398, -0.6418785452842712, -1.0532305240631104, 1.2747464179992676, 1.8975682258605957, 1.037177562713623, 0.03322137892246246, -0.7404786348342896, -0.6897439360618591, 0.05250881612300873, 0.1436070203781128, 0.5056420564651489, 0.944078803062439, 0.11544017493724823, 0.13637518882751465, 1.3764381408691406, 1.1355983018875122, -0.3685948848724365, 0.39297011494636536, -0.8825784921646118, -0.46980589628219604, 0.4788593649864197, 0.23214535415172577, -0.04642879217863083, 0.3229082524776459, -1.077165961265564, -0.2111085057258606, -0.35827136039733887, -0.9016479253768921, -0.6880794763565063, -0.3183116614818573, -0.37448376417160034, 1.6152092218399048, 0.07387636601924896, -0.5144829154014587, -0.03199002891778946, -0.7584631443023682, -0.11686322093009949, -1.041908860206604, 0.3114543557167053, -0.21016672253608704, -0.05734335631132126, -0.11310209333896637, 1.7502700090408325, -0.9436693787574768, -2.143636703491211, 0.20813968777656555, 0.2794409990310669, -0.3074705898761749, 0.12887579202651978, 1.7137023210525513, 0.5602008104324341, 1.3713808059692383, 1.3936946392059326, 0.9689998626708984, -0.6710339188575745, -1.2956321239471436, 0.6419809460639954, 1.0234928131103516, -1.3974391222000122, 0.7374258041381836, -0.006972210481762886, -0.5553217530250549, 0.6846385598182678, 1.3367360830307007, 0.4150855839252472, -2.0266175270080566, 0.8460515141487122, -0.9084650874137878, 0.8034913539886475, 0.7268064618110657, 0.757641077041626, 0.19487136602401733, 0.8345353007316589, -1.256151795387268, -1.1155165433883667, -0.6737567782402039, -0.6301708817481995, 1.9534199237823486, -0.2762477695941925, 0.4821595847606659, -0.1707339584827423, -1.271621823310852, -0.052292678505182266, 0.677463173866272, 0.28081467747688293, -0.5003413558006287, 0.7864436507225037, -0.6434990167617798, -1.2187830209732056, -1.373857855796814, -0.46358799934387207, -0.985041618347168, -0.8980557918548584, 0.9589052200317383, 0.7496970891952515, 0.34716129302978516, 1.98167884349823, 0.607028067111969, 0.13086581230163574, -2.6895298957824707, 0.830196738243103, 0.3331919312477112, -0.07493363320827484, 0.9407457709312439, 0.25611141324043274, 1.0990287065505981, -0.054926518350839615, 0.5690422654151917, -2.361018419265747, 2.283998727798462, -0.265031099319458, 0.7098577618598938, -0.037081196904182434, -0.10698869824409485, 1.0934686660766602, 0.6013123393058777, 0.5852448344230652, -1.0618541240692139, 0.7887181639671326, -0.5648522973060608, 1.2026453018188477, 0.869834303855896, -0.8998072147369385, 0.01605883613228798, 1.327999472618103, 0.4567050635814667, -0.4671577513217926, -0.9523425102233887, -0.9363289475440979, 0.9463006854057312, 1.808716058731079, -0.01221012044698, 0.1253541260957718, 0.7950718998908997, 0.6708295941352844, -1.3166792392730713, 0.07891462743282318, -0.650727391242981, -0.7135003209114075, 1.7131314277648926, 2.0743908882141113, -0.13807569444179535, -0.1811194270849228, -0.8130066394805908, -1.362245798110962, 0.8355497717857361, 0.038029465824365616, 0.07817717641592026, 0.692888617515564, -0.6787588596343994, 1.12796950340271, 0.7667908072471619, 0.9039058685302734, 0.1813202053308487, 0.20733173191547394, 0.2788487672805786, -0.24020196497440338, -1.1835685968399048, -0.20865435898303986, -1.0684858560562134, -2.564086675643921, 0.44029635190963745, -0.15718279778957367, -1.4646786451339722, 0.09421365708112717, -1.0117279291152954, 0.910670280456543, -0.5708911418914795, -1.188647747039795, -1.4533735513687134, 0.2893540561199188, -0.06836669147014618, 0.8469148874282837, -1.6088787317276, -0.10907642543315887, 1.2769641876220703, 0.9513750672340393, -0.6347113251686096, 0.9992344379425049, 0.26896798610687256, 1.0140599012374878, 0.8761117458343506, -0.35299286246299744, 0.4869610071182251, 0.1529218703508377, -1.3843296766281128, 0.42656049132347107, 1.2783764600753784, 0.13099201023578644, 1.5579254627227783, -0.5695425271987915, -0.03576350212097168, 0.4117469787597656, -0.4660141170024872, -0.4932713210582733, -0.5304528474807739, 0.6353041529655457, -0.032420478761196136, -0.9296415448188782, 0.009262978099286556, -0.09113869816064835, -0.21548861265182495, 0.25465109944343567, -1.4341859817504883, -0.1985517293214798, -0.40391969680786133, -0.5909789800643921, -1.3300241231918335, -0.042621221393346786, 1.361173152923584, -0.7749626636505127, -0.23418712615966797, 0.5488041043281555, 0.2855938971042633, 0.5424365401268005, 0.6575305461883545, -0.666534960269928, -0.2996370494365692, -0.19772455096244812, -0.39196622371673584, 0.3135829567909241, 1.310678243637085, -0.162663996219635, -0.9359238743782043, 0.6632288098335266, -0.28480231761932373, 0.07813304662704468, 1.8920834064483643, -0.00353966373950243, -0.7877275347709656, 0.36843061447143555, -0.7013280987739563, 1.9414074420928955, 1.6796770095825195, 1.3473929166793823, -0.17524532973766327, -0.906786322593689, 0.6007320880889893, -0.24083851277828217, -0.3678734004497528, 0.9254931211471558, 0.44969189167022705, -0.18156440556049347, -1.374945044517517, 0.6721184253692627, 1.2567179203033447, -0.9050816893577576, -0.7500623464584351, 0.14024193584918976, -0.7760804295539856, 1.1238188743591309, 0.7288634777069092, 0.43197521567344666, 0.2145603448152542, 1.625842809677124, 0.7693096399307251, -0.49352967739105225, 0.6179776787757874, 0.4586161673069, -0.1772926300764084, -2.074648141860962, -1.1062064170837402, 0.2909340262413025, -0.489197701215744, -1.606680154800415, 1.3916264772415161, -1.132171630859375, -0.9780284762382507, 0.5162138938903809, 0.0939275249838829, 1.4012835025787354, 0.35138076543807983, 1.609811544418335, 2.028602361679077, 0.8696551322937012, 0.377096951007843, 1.2703919410705566, -0.12091824412345886, -0.3810907006263733, 1.787546992301941, -0.4365138113498688, 0.5129017233848572, 1.1096380949020386, -0.35655203461647034, -1.0865521430969238, -0.7434709668159485, -1.2376270294189453, -0.698729932308197, 1.1318931579589844, 0.11625853180885315, -1.094905972480774, 0.2770299017429352, 1.5483704805374146, 0.0716964527964592, -0.2739001214504242, 0.6523497700691223, 0.3581187129020691, -0.7288392186164856, -0.12000009417533875, -0.9680822491645813, 0.5235139727592468, -0.2268853336572647, -0.390256404876709, 0.25573036074638367, 0.47660377621650696, 1.2877954244613647, 0.07349295169115067, 0.14381806552410126, 1.223197340965271, -1.4273796081542969, 1.4430527687072754, -0.7804257273674011, 0.2838610112667084, -2.3562424182891846, 1.4194281101226807, -0.8262256383895874, 1.9638071060180664, -2.6641602516174316, 0.438879132270813, -0.5603342652320862, -0.44678908586502075, 0.293425053358078, -0.30072131752967834, 0.1492571383714676, -0.17297355830669403, -1.047825813293457, -0.12380530685186386, -0.7301696538925171, 0.5881105661392212, 1.2149568796157837, 1.352518916130066, -1.0983861684799194, -0.22108222544193268, -1.705880880355835, -0.19836337864398956, -0.6497059464454651, 0.3501376807689667, -1.9391679763793945, -0.1808653026819229, -1.9463276863098145, -2.4155545234680176, -1.2454248666763306, -0.9031923413276672, 1.156805157661438, 0.24122385680675507, -0.8604422807693481, 1.202702283859253, -0.3766278922557831, -1.774977207183838, 1.1357275247573853, -2.217320203781128 ]
https://github.com/huggingface/datasets/issues/5604
Problems with downloading The Pile
@mariosasko , I used your suggestion but its not saving anything , just stops and runs from the same point . below is the script to download and save on disk . ``` from datasets import load_dataset, DownloadConfig #load the Pile dataset from Hugging Face Datasets #dataset = load_dataset('the_pile') dataset = load_dataset('the_pile', split='train', cache_dir='datasets', download_config=DownloadConfig(resume_download=True)) # save each file in the dataset to disk for i, example in enumerate(dataset['train']): filename = f'pile_file_{i}.json' with open(filename, 'w') as f: f.write(str(example)) print("Finished saving Pile dataset files to disk.") ```
### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2
273
86
Problems with downloading The Pile ### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2 @mariosasko , I used your suggestion but its not saving anything , just stops and runs from the same point . below is the script to download and save on disk . ``` from datasets import load_dataset, DownloadConfig #load the Pile dataset from Hugging Face Datasets #dataset = load_dataset('the_pile') dataset = load_dataset('the_pile', split='train', cache_dir='datasets', download_config=DownloadConfig(resume_download=True)) # save each file in the dataset to disk for i, example in enumerate(dataset['train']): filename = f'pile_file_{i}.json' with open(filename, 'w') as f: f.write(str(example)) print("Finished saving Pile dataset files to disk.") ```
[ -1.241477370262146, -0.9204444885253906, -0.7658193707466125, 1.4308555126190186, -0.17130808532238007, -1.1928671598434448, 0.06701197475194931, -0.9976588487625122, 1.5688680410385132, -0.7707803845405579, 0.1920558363199234, -1.6609686613082886, -0.01000867411494255, -0.5565441846847534, -0.6957775354385376, -0.8356699347496033, -0.42847079038619995, -0.7832844853401184, 1.0722944736480713, 2.4502549171447754, 1.1904906034469604, -1.3932793140411377, 2.7669777870178223, 0.715545117855072, -0.15990352630615234, -1.0165400505065918, 0.5799117684364319, 0.018198175355792046, -1.3631149530410767, -0.3501095473766327, -1.0060036182403564, 0.008779071271419525, -0.5984845757484436, -0.5047501921653748, 0.057054586708545685, 0.40827444195747375, -0.25149139761924744, -0.47405049204826355, -0.5010830760002136, -0.7000101804733276, 0.47723230719566345, -0.3969128429889679, 0.9051907658576965, -0.3232175409793854, 1.8037745952606201, -0.5222715735435486, 0.3828875720500946, 0.7169088125228882, 1.3060358762741089, 0.1290883719921112, 0.055507250130176544, 0.4061565697193146, 0.38645973801612854, -0.019743191078305244, 0.49664437770843506, 1.1882297992706299, 0.6651155948638916, 0.4558826684951782, 0.7322297096252441, -2.247152090072632, 1.340580701828003, -0.875206708908081, 0.32620754837989807, 1.3609789609909058, -1.039120078086853, 0.4712665379047394, -1.8142348527908325, -0.007231852039694786, 0.5258932113647461, -2.2682878971099854, 0.2917013168334961, -1.2564780712127686, -0.47410744428634644, 1.0121650695800781, 0.33025792241096497, -1.250881552696228, 0.15619271993637085, -0.5542904138565063, 1.1019750833511353, 0.425557017326355, 1.205765962600708, -1.666995644569397, -0.08202508836984634, -0.25333449244499207, 0.12147463113069534, -1.2998473644256592, -1.6048609018325806, 0.4862738847732544, 0.6797357797622681, 0.6599380373954773, -0.14464092254638672, 0.9879416823387146, -1.0152559280395508, 0.7720897793769836, -0.9382686614990234, -1.734581470489502, -1.3632385730743408, -2.346431255340576, -2.2713029384613037, 0.7324172854423523, -0.3997322618961334, -0.49483928084373474, 2.0696051120758057, -1.0295237302780151, -1.7785671949386597, 1.1392627954483032, 0.26750993728637695, -0.02998880110681057, 2.3968820571899414, 0.2243538349866867, -0.7841582894325256, 0.4719065725803375, -0.7513598799705505, 0.7997193336486816, -0.400825172662735, 1.3442726135253906, 0.43525058031082153, -0.9796708822250366, 1.6110143661499023, -0.4195327162742615, 0.5617653727531433, -0.6914325952529907, -0.49238383769989014, -0.833896815776825, 0.20047679543495178, 1.9465768337249756, -0.30435243248939514, 1.5637344121932983, -0.3668472170829773, -1.6266686916351318, -1.5557595491409302, 0.8250526785850525, 0.4797261953353882, -0.831525444984436, 0.11665105074644089, -0.3564079701900482, 0.11909755319356918, -0.04662954807281494, 1.066333532333374, 1.2371748685836792, 0.6995908617973328, -0.34583351016044617, -0.9882319569587708, 0.16694675385951996, -0.1122613474726677, -0.6678693294525146, -1.8086241483688354, -0.2947080433368683, 0.11090913414955139, 0.6636378765106201, -1.2506219148635864, 1.6884870529174805, 0.8678300976753235, 1.9227386713027954, 1.0452165603637695, -0.43991678953170776, 1.5090137720108032, 0.1153365895152092, 1.8400639295578003, -0.5602160096168518, 0.6122366786003113, -0.33673524856567383, -1.2253080606460571, 0.7885251641273499, -0.30566293001174927, -2.0226128101348877, -0.6846933960914612, -0.7879946827888489, -0.1922825127840042, -0.7905309200286865, 0.9041023254394531, -0.38441208004951477, -1.4438492059707642, 0.2636473774909973, -0.6771285533905029, 0.20183949172496796, -1.2716008424758911, 0.2551615238189697, 0.7739107012748718, -0.6359692215919495, 0.006659552454948425, -0.3376207947731018, -1.2907353639602661, -0.462918758392334, 0.4079194664955139, 1.7771650552749634, -0.7528293132781982, 0.9687550663948059, 1.0092289447784424, -0.667685329914093, -0.04922633618116379, 0.32666850090026855, -0.24658824503421783, 0.8795040845870972, -1.0674785375595093, -0.4799993336200714, 1.1607598066329956, -0.2494741678237915, -0.5807135105133057, 1.3899435997009277, 0.7610809206962585, -1.0344585180282593, -0.2982756197452545, -0.09265357255935669, -0.8954726457595825, 0.0025397371500730515, -1.6269025802612305, -0.13170263171195984, 0.38051027059555054, -1.6082979440689087, -0.49635735154151917, -0.2589457929134369, 1.3153897523880005, -0.10797069221735, 1.4144114255905151, -0.291482537984848, -0.13578075170516968, -0.33042091131210327, -0.42970842123031616, 0.24888963997364044, -0.20824365317821503, -0.5489990711212158, 0.18864157795906067, -0.8069587349891663, 0.24413548409938812, 1.459423303604126, 0.3789844214916229, 0.05308905243873596, 0.5840954780578613, 1.1243866682052612, 0.4030649662017822, -0.08421206474304199, -0.8307627439498901, -1.6208817958831787, 2.0014870166778564, -1.548500895500183, 1.9089573621749878, 0.7383835911750793, -0.08311265707015991, -1.8133518695831299, -1.8731776475906372, 1.3431928157806396, 1.1081676483154297, 2.356081008911133, 0.5561057329177856, 0.466678649187088, -0.7675641179084778, -0.727059006690979, 0.2985120415687561, -0.960029661655426, -0.7774770855903625, 0.16046933829784393, 2.3618080615997314, 1.7591466903686523, -0.4035206735134125, -0.22900745272636414, -0.961622416973114, 1.4384291172027588, -0.17311689257621765, 0.2303207367658615, 1.9708387851715088, -0.21404395997524261, -1.0282641649246216, 1.2720295190811157, -2.3751673698425293, 0.2283661812543869, 1.9552732706069946, 0.2734255790710449, 0.08675576001405716, -1.3675371408462524, -0.7267310619354248, -0.20565958321094513, -0.4673334062099457, -1.2919459342956543, 0.5548044443130493, -0.3499232828617096, -0.7596184015274048, -1.4708224534988403, 0.060722291469573975, -1.1203285455703735, -1.714131474494934, 0.2218242883682251, 1.933940052986145, 2.0321061611175537, -0.7898865342140198, 1.5421373844146729, -0.2819092571735382, 0.20030924677848816, 1.2801517248153687, 1.2415416240692139, 3.1680214405059814, 1.8701776266098022, -1.271655559539795, 0.7074474096298218, -0.085680291056633, -0.4351139962673187, 1.1067639589309692, -1.1107442378997803, 1.2563761472702026, -0.2074994295835495, -1.2758934497833252, -1.1646432876586914, 0.9781712889671326, 0.49910682439804077, 0.047728054225444794, -0.42235511541366577, 1.246762752532959, 0.026927782222628593, 1.3621817827224731, 0.6259802579879761, -0.37789711356163025, 0.5883758664131165, -0.39170241355895996, -0.5750521421432495, 1.5797960758209229, 0.15366119146347046, -1.4284425973892212, -2.319295644760132, -0.3508070111274719, -0.7512502074241638, 0.043712444603443146, -0.6660875082015991, -1.0052719116210938, 1.5998491048812866, 0.3985302746295929, -1.1791040897369385, -0.334232360124588, -0.3056677281856537, -0.5656082630157471, 2.5920839309692383, -1.3813451528549194, -0.21409210562705994, -0.9485315084457397, -0.5531718730926514, 1.5847828388214111, -1.1690510511398315, -0.2876438796520233, -1.0662297010421753, -0.5952621698379517, -1.3194352388381958, -0.5579461455345154, -0.03304152190685272, -0.9196745753288269, 0.7419586181640625, 0.1587781310081482, -1.1416083574295044, -0.22495341300964355, -0.9605256915092468, 0.9252246022224426, -0.08760317414999008, 0.18299713730812073, 1.8400887250900269, 0.42627084255218506, -0.42861461639404297, 0.7495123744010925, 1.125296711921692, 0.6402085423469543, -0.650141716003418, 0.13807055354118347, -0.6943527460098267, 0.3283542990684509, -1.3065979480743408, 0.25474342703819275, -2.8974175453186035, 0.6189850568771362, -0.05711956322193146, 0.002273223362863064, -0.06288789957761765, -1.3484934568405151, 1.0651363134384155, 2.5362236499786377, -1.1891144514083862, 0.533881664276123, 0.37252718210220337, 1.2069237232208252, -1.6431766748428345, 0.2737666666507721, -0.47502461075782776, 2.110487222671509, 0.13788940012454987, 1.2387200593948364, -0.46635279059410095, -2.3046159744262695, 0.6001959443092346, -1.2429174184799194, -1.0805014371871948, 0.8183367252349854, -0.7956269383430481, 0.18562792241573334, -1.4006860256195068, -0.23645547032356262, -0.8573449850082397, -1.211412787437439, 0.6328962445259094, 0.14469753205776215, 0.4483107924461365, -0.5735442042350769, 0.34108251333236694, -2.149444103240967, -1.3269035816192627, -0.17452046275138855, -0.9053070545196533, 0.4922965168952942, -0.32537320256233215, 0.6607728004455566, -0.12761713564395905, 0.03180895000696182, 0.2775113880634308, 1.4025394916534424, 3.3557190895080566, 0.11648740619421005, 0.2534004747867584, -0.09251189976930618, -0.9763535857200623, 1.4826494455337524, 0.9333983659744263, -0.16999807953834534, -0.6324180364608765, -1.0456708669662476, 1.2789374589920044, 1.9306155443191528, 1.0359363555908203, 0.04581171274185181, -0.7390639781951904, -0.6721194386482239, 0.05673797428607941, 0.14526398479938507, 0.5522457957267761, 0.9223776459693909, 0.06136145442724228, 0.11097880452871323, 1.420616626739502, 1.142945647239685, -0.33904391527175903, 0.40398576855659485, -0.8874847888946533, -0.5011981725692749, 0.4602601230144501, 0.23929578065872192, -0.06359898298978806, 0.3098091781139374, -1.078263759613037, -0.1888350397348404, -0.36886388063430786, -0.9160844087600708, -0.6595644950866699, -0.304818719625473, -0.3706672489643097, 1.604844570159912, 0.137565016746521, -0.5339798331260681, -0.059945471584796906, -0.7454939484596252, -0.11905761808156967, -1.042669653892517, 0.33850547671318054, -0.2267417013645172, -0.07191532850265503, -0.10055218636989594, 1.7402786016464233, -0.9533594846725464, -2.131702184677124, 0.17028938233852386, 0.2831501066684723, -0.2888684868812561, 0.13808999955654144, 1.711927056312561, 0.5511536002159119, 1.4030637741088867, 1.3833109140396118, 0.9626018404960632, -0.6974713802337646, -1.3007166385650635, 0.6554418206214905, 0.9907996654510498, -1.3625611066818237, 0.777296781539917, -0.04442073404788971, -0.6055353879928589, 0.6824278235435486, 1.3723154067993164, 0.43101435899734497, -2.0173113346099854, 0.8757943511009216, -0.9486303329467773, 0.7531107068061829, 0.752870500087738, 0.7710719704627991, 0.1805376410484314, 0.8529006242752075, -1.2849079370498657, -1.1334394216537476, -0.7043704986572266, -0.6147134304046631, 1.9634112119674683, -0.27871173620224, 0.5111573934555054, -0.18378764390945435, -1.277628779411316, -0.05612269043922424, 0.6614012122154236, 0.28883475065231323, -0.4617917239665985, 0.8142369985580444, -0.6752625703811646, -1.227021336555481, -1.3676553964614868, -0.45953601598739624, -0.9857243895530701, -0.9014846682548523, 0.9702143669128418, 0.7677050232887268, 0.3237876892089844, 1.9308184385299683, 0.6116823554039001, 0.14930717647075653, -2.6515634059906006, 0.8203389048576355, 0.3212112486362457, -0.06194911152124405, 0.9198601841926575, 0.23008620738983154, 1.1098958253860474, -0.007717674598097801, 0.5469620227813721, -2.359332323074341, 2.231443405151367, -0.2696731984615326, 0.729025661945343, -0.043339915573596954, -0.1032852753996849, 1.0906060934066772, 0.5886011719703674, 0.6153386831283569, -1.050396203994751, 0.796083390712738, -0.539919912815094, 1.1935356855392456, 0.9114242196083069, -0.859947681427002, 0.007573280483484268, 1.3599542379379272, 0.4607625901699066, -0.48514610528945923, -0.9427762031555176, -0.9154768586158752, 0.92000412940979, 1.8153162002563477, -0.02987615391612053, 0.10392891615629196, 0.7860886454582214, 0.655113935470581, -1.3408318758010864, 0.036284178495407104, -0.6528832316398621, -0.681854248046875, 1.7134324312210083, 2.062650203704834, -0.13584978878498077, -0.1723482608795166, -0.7759554386138916, -1.3289146423339844, 0.8028910160064697, 0.019582105800509453, 0.11368293315172195, 0.721393883228302, -0.6721786856651306, 1.0869842767715454, 0.7246888279914856, 0.9210858941078186, 0.1580389142036438, 0.22002443671226501, 0.31420010328292847, -0.28159579634666443, -1.1493277549743652, -0.20208929479122162, -1.0477714538574219, -2.505594491958618, 0.4164482057094574, -0.16558457911014557, -1.4856187105178833, 0.10444563627243042, -1.0114202499389648, 0.9482191801071167, -0.5704391598701477, -1.1552785634994507, -1.4500895738601685, 0.3025267422199249, -0.08498096466064453, 0.8459228277206421, -1.5731761455535889, -0.09694569557905197, 1.2641618251800537, 0.9479188919067383, -0.6206174492835999, 1.0407791137695312, 0.24656511843204498, 1.054940938949585, 0.8244072198867798, -0.3414538502693176, 0.45896202325820923, 0.13551892340183258, -1.3497750759124756, 0.44244444370269775, 1.2274364233016968, 0.15483088791370392, 1.5435354709625244, -0.5678912401199341, -0.06599313765764236, 0.4221632778644562, -0.4915025532245636, -0.4769825041294098, -0.4621522128582001, 0.6314866542816162, -0.023731552064418793, -0.9090030789375305, -0.018379177898168564, -0.09578504413366318, -0.24676695466041565, 0.2724113464355469, -1.451412320137024, -0.20558059215545654, -0.4242524802684784, -0.5696277618408203, -1.3210538625717163, 0.0013513388112187386, 1.380091667175293, -0.7669652700424194, -0.27895814180374146, 0.5314757823944092, 0.3301221430301666, 0.527673602104187, 0.6580995321273804, -0.6879618167877197, -0.2520216405391693, -0.19822634756565094, -0.37419676780700684, 0.27088528871536255, 1.3300920724868774, -0.1890859603881836, -0.9428788423538208, 0.6594827175140381, -0.29952797293663025, 0.06913957744836807, 1.9037971496582031, 0.029071668162941933, -0.800594687461853, 0.31133711338043213, -0.7345598936080933, 1.9615219831466675, 1.6741939783096313, 1.395666241645813, -0.16120657324790955, -0.8958720564842224, 0.5861868262290955, -0.23407384753227234, -0.35773587226867676, 0.9238536357879639, 0.48180827498435974, -0.18160460889339447, -1.401550531387329, 0.6734530329704285, 1.2166748046875, -0.8962056040763855, -0.7292589545249939, 0.15302209556102753, -0.7877934575080872, 1.1182866096496582, 0.7285053730010986, 0.441806823015213, 0.20846107602119446, 1.6336886882781982, 0.7660616636276245, -0.5293178558349609, 0.569031298160553, 0.47249409556388855, -0.18546001613140106, -2.083646774291992, -1.0837258100509644, 0.27856215834617615, -0.47153177857398987, -1.618260383605957, 1.388468861579895, -1.1372836828231812, -0.9672257304191589, 0.49811118841171265, 0.09800930321216583, 1.3703275918960571, 0.3815460503101349, 1.608244776725769, 2.0495688915252686, 0.899658203125, 0.3626546859741211, 1.302457571029663, -0.12190894782543182, -0.3898395895957947, 1.7732713222503662, -0.41889265179634094, 0.5291262269020081, 1.1070882081985474, -0.3802979290485382, -1.0701243877410889, -0.7106488347053528, -1.1729508638381958, -0.6452410221099854, 1.1135921478271484, 0.12312517315149307, -1.0781278610229492, 0.2557981014251709, 1.5285392999649048, 0.08705856651067734, -0.2882067561149597, 0.7079218029975891, 0.41027846932411194, -0.7406001687049866, -0.1235722079873085, -0.9329630136489868, 0.5155085921287537, -0.24573658406734467, -0.37264135479927063, 0.26658424735069275, 0.4948328733444214, 1.3383800983428955, 0.04621495306491852, 0.1592041403055191, 1.2448992729187012, -1.39988112449646, 1.4005553722381592, -0.7692286968231201, 0.26149991154670715, -2.4103403091430664, 1.402782678604126, -0.8178874850273132, 1.9923444986343384, -2.6635472774505615, 0.45186614990234375, -0.5791088938713074, -0.44333547353744507, 0.2767278254032135, -0.3218066990375519, 0.13306957483291626, -0.1231931522488594, -1.0708847045898438, -0.08195171505212784, -0.7360861301422119, 0.5693879723548889, 1.2285559177398682, 1.3675199747085571, -1.1088979244232178, -0.2172136753797531, -1.707619547843933, -0.25487658381462097, -0.7337198853492737, 0.3561517298221588, -1.954914927482605, -0.2155384123325348, -1.9217890501022339, -2.4271340370178223, -1.2608036994934082, -0.8976388573646545, 1.1461421251296997, 0.20256780087947845, -0.9250352382659912, 1.2427600622177124, -0.3679344356060028, -1.8026179075241089, 1.1529642343521118, -2.206695556640625 ]
https://github.com/huggingface/datasets/issues/5604
Problems with downloading The Pile
@mariosasko , it shows nothing in dataset folder ``` du -sh /mnt/nlp/hugging_face/* 20K /mnt/nlp/hugging_face/datasets 4.0K /mnt/nlp/hugging_face/download_pile.py ```
### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2
273
17
Problems with downloading The Pile ### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2 @mariosasko , it shows nothing in dataset folder ``` du -sh /mnt/nlp/hugging_face/* 20K /mnt/nlp/hugging_face/datasets 4.0K /mnt/nlp/hugging_face/download_pile.py ```
[ -1.197818636894226, -0.8574449419975281, -0.8052145838737488, 1.445061206817627, -0.07909907400608063, -1.2725484371185303, 0.01774512231349945, -0.933093786239624, 1.5372090339660645, -0.7141402959823608, 0.27452340722084045, -1.6517730951309204, 0.019322596490383148, -0.5421893000602722, -0.7083924412727356, -0.8581047058105469, -0.36823177337646484, -0.8146764636039734, 1.0627293586730957, 2.5198237895965576, 1.2473303079605103, -1.3354859352111816, 2.730659008026123, 0.6928914785385132, -0.2186930775642395, -0.9909492135047913, 0.5494573712348938, 0.010617886669933796, -1.39509117603302, -0.3515152633190155, -0.9468913078308105, 0.0038476260378956795, -0.6136069297790527, -0.5438823103904724, 0.10701485723257065, 0.40414607524871826, -0.222296342253685, -0.44207969307899475, -0.5236512422561646, -0.7458882927894592, 0.48425641655921936, -0.357912540435791, 0.8738484382629395, -0.354987770318985, 1.8173984289169312, -0.6023759245872498, 0.41797807812690735, 0.6785123348236084, 1.2956501245498657, 0.11478931456804276, 0.01785484328866005, 0.3585410714149475, 0.3670956790447235, 0.01760368049144745, 0.5168755054473877, 1.1700236797332764, 0.6715722680091858, 0.48558932542800903, 0.645545482635498, -2.2540106773376465, 1.3367259502410889, -0.8729463815689087, 0.23396359384059906, 1.3635776042938232, -1.0564199686050415, 0.4318816661834717, -1.8617117404937744, -0.0384480357170105, 0.5023294687271118, -2.3321712017059326, 0.23401574790477753, -1.2783604860305786, -0.45102766156196594, 1.0240556001663208, 0.2808210253715515, -1.3158177137374878, 0.12770786881446838, -0.49937474727630615, 1.0934983491897583, 0.4599516689777374, 1.2040627002716064, -1.6625477075576782, -0.12033363431692123, -0.2888721227645874, 0.08266585320234299, -1.301694393157959, -1.6274213790893555, 0.49071258306503296, 0.6603705883026123, 0.6280520558357239, -0.06293685734272003, 0.9291726350784302, -0.9877805709838867, 0.828854501247406, -0.8914199471473694, -1.7558153867721558, -1.391240119934082, -2.3651254177093506, -2.278874158859253, 0.7884649634361267, -0.43255695700645447, -0.43442437052726746, 2.0127675533294678, -1.08077871799469, -1.803391933441162, 1.0546629428863525, 0.28953734040260315, -0.03650445118546486, 2.393521308898926, 0.24164173007011414, -0.7943102717399597, 0.4587119519710541, -0.7905603051185608, 0.7625908255577087, -0.39860448241233826, 1.3408801555633545, 0.4929500222206116, -1.0202080011367798, 1.5791475772857666, -0.4128173589706421, 0.5534070730209351, -0.7577224373817444, -0.48986348509788513, -0.8211227059364319, 0.20144717395305634, 1.9473867416381836, -0.3537638485431671, 1.5679678916931152, -0.30185016989707947, -1.560925006866455, -1.481526494026184, 0.7798752188682556, 0.5123198628425598, -0.8647633194923401, 0.1116887554526329, -0.31745290756225586, 0.08574289083480835, -0.021938255056738853, 1.0743887424468994, 1.1901748180389404, 0.6982776522636414, -0.3473361134529114, -0.9974416494369507, 0.2342873066663742, -0.03366619721055031, -0.6409171223640442, -1.807848334312439, -0.3091413080692291, 0.15110886096954346, 0.66623854637146, -1.2717047929763794, 1.746124505996704, 0.825168788433075, 1.9787766933441162, 1.0652920007705688, -0.42468732595443726, 1.5314290523529053, 0.050350502133369446, 1.9110345840454102, -0.5220921039581299, 0.6336398720741272, -0.3701644539833069, -1.2507765293121338, 0.7671679854393005, -0.3063327372074127, -2.0451548099517822, -0.6729754209518433, -0.8306375741958618, -0.1913047432899475, -0.7541406750679016, 0.9199496507644653, -0.32816487550735474, -1.3895524740219116, 0.21179820597171783, -0.6945111155509949, 0.1477719098329544, -1.3599815368652344, 0.2306981384754181, 0.7792267203330994, -0.6499629020690918, -0.008948223665356636, -0.36725375056266785, -1.2717665433883667, -0.5200026035308838, 0.322505921125412, 1.8358062505722046, -0.7047954797744751, 1.046733021736145, 0.996589720249176, -0.6632895469665527, -0.027073338627815247, 0.36485418677330017, -0.3055354654788971, 0.9493788480758667, -1.0752217769622803, -0.4383389949798584, 1.1523422002792358, -0.217071071267128, -0.6194350123405457, 1.372107744216919, 0.8151286840438843, -1.022951364517212, -0.3305293619632721, -0.0886821374297142, -0.8135870695114136, 0.07278711348772049, -1.6166025400161743, -0.10658396780490875, 0.35891687870025635, -1.5600508451461792, -0.4891090989112854, -0.23978517949581146, 1.3713263273239136, -0.14497436583042145, 1.4068610668182373, -0.21905112266540527, -0.16476520895957947, -0.39020097255706787, -0.4203508198261261, 0.24056655168533325, -0.17888787388801575, -0.5597921013832092, 0.2554332911968231, -0.7720208168029785, 0.2588053345680237, 1.4270917177200317, 0.35092881321907043, 0.06579187512397766, 0.5205614566802979, 1.083367943763733, 0.348629891872406, -0.07201825082302094, -0.8472144603729248, -1.6449697017669678, 2.059095859527588, -1.5052778720855713, 1.91141676902771, 0.7802308797836304, -0.10024257004261017, -1.7988210916519165, -1.9177541732788086, 1.3264068365097046, 1.0783754587173462, 2.381831407546997, 0.5683273673057556, 0.5015784502029419, -0.7203899621963501, -0.7270157933235168, 0.35073402523994446, -0.9477905035018921, -0.8705954551696777, 0.14434808492660522, 2.354003667831421, 1.7003713846206665, -0.41028085350990295, -0.2674204409122467, -0.969025194644928, 1.3185023069381714, -0.12443282455205917, 0.19727849960327148, 1.9707856178283691, -0.21536540985107422, -1.0583218336105347, 1.2203761339187622, -2.3366827964782715, 0.27711185812950134, 1.9907807111740112, 0.31906750798225403, 0.06328944116830826, -1.4258568286895752, -0.7039069533348083, -0.2064443975687027, -0.4837576150894165, -1.2702256441116333, 0.552901029586792, -0.3023711144924164, -0.8444123268127441, -1.4776802062988281, 0.006286277435719967, -1.1064341068267822, -1.7814120054244995, 0.25678780674934387, 1.8716583251953125, 1.9906152486801147, -0.7691813111305237, 1.4450844526290894, -0.24317507445812225, 0.1265556961297989, 1.2893657684326172, 1.2929227352142334, 3.2241103649139404, 1.9004932641983032, -1.245835781097412, 0.7444003820419312, -0.1239105612039566, -0.4288325011730194, 1.1574838161468506, -1.1052343845367432, 1.1972551345825195, -0.26704856753349304, -1.3060868978500366, -1.1862990856170654, 0.9866066575050354, 0.48730164766311646, 0.039831019937992096, -0.4491574466228485, 1.2251508235931396, 0.11242567002773285, 1.327136516571045, 0.6005166172981262, -0.3423194885253906, 0.6008000373840332, -0.39601603150367737, -0.5293688774108887, 1.5874472856521606, 0.16219530999660492, -1.4191091060638428, -2.3903703689575195, -0.29323986172676086, -0.8429157733917236, -0.036393389105796814, -0.7017495036125183, -1.0340975522994995, 1.582265853881836, 0.44515156745910645, -1.1942603588104248, -0.3078085780143738, -0.3370966911315918, -0.6147449612617493, 2.6169965267181396, -1.428086280822754, -0.16205228865146637, -0.9766943454742432, -0.5001364946365356, 1.5703638792037964, -1.1843209266662598, -0.2562899887561798, -1.061349868774414, -0.5924606323242188, -1.3040590286254883, -0.5413962602615356, -0.07662481814622879, -0.899116039276123, 0.6916061639785767, 0.09806431829929352, -1.1376763582229614, -0.2445124089717865, -0.971649169921875, 0.8577611446380615, -0.04976674169301987, 0.22201058268547058, 1.8503637313842773, 0.4485434889793396, -0.40073999762535095, 0.6995857357978821, 1.140597939491272, 0.6282049417495728, -0.654822051525116, 0.18544797599315643, -0.653559148311615, 0.3008565306663513, -1.2683929204940796, 0.30440837144851685, -2.8450777530670166, 0.6652836203575134, -0.09160280972719193, 0.017522137612104416, -0.08226145803928375, -1.3414407968521118, 1.118611216545105, 2.5305891036987305, -1.162962794303894, 0.5430205464363098, 0.34522509574890137, 1.1668020486831665, -1.6436837911605835, 0.23942840099334717, -0.5161219835281372, 2.1736977100372314, 0.09577898681163788, 1.2218979597091675, -0.44802525639533997, -2.2264788150787354, 0.6029820442199707, -1.2321250438690186, -1.0485913753509521, 0.8518339991569519, -0.7563208341598511, 0.12231627106666565, -1.3212270736694336, -0.19193096458911896, -0.8785591125488281, -1.227112889289856, 0.6980748176574707, 0.08386501669883728, 0.5252982378005981, -0.5651742815971375, 0.34435585141181946, -2.145756483078003, -1.3398001194000244, -0.1788322627544403, -0.9319168925285339, 0.44720491766929626, -0.2992657423019409, 0.6858243942260742, -0.06923652440309525, 0.06694406270980835, 0.3275960087776184, 1.393558144569397, 3.377678394317627, 0.12678195536136627, 0.29086965322494507, -0.1029515266418457, -1.0238747596740723, 1.4440333843231201, 0.9371594786643982, -0.16768771409988403, -0.6600030064582825, -0.9650869369506836, 1.2679980993270874, 1.9490433931350708, 1.1057281494140625, 0.08427158743143082, -0.7941418886184692, -0.7470995783805847, 0.05777415260672569, 0.1726125031709671, 0.4986497759819031, 0.9627911448478699, 0.06529953330755234, 0.1669647991657257, 1.3824626207351685, 1.1667494773864746, -0.3528878092765808, 0.42377960681915283, -0.9027512669563293, -0.4308004379272461, 0.476175993680954, 0.2099597305059433, -0.007024044170975685, 0.35102006793022156, -1.0795220136642456, -0.2147875428199768, -0.3342565894126892, -0.9514173269271851, -0.6874849200248718, -0.34851017594337463, -0.36808905005455017, 1.6437697410583496, 0.046924035996198654, -0.45951366424560547, -0.005965073127299547, -0.7584470510482788, -0.06320754438638687, -1.0679097175598145, 0.2923160493373871, -0.21044357120990753, -0.06934542953968048, -0.04681699723005295, 1.7315635681152344, -0.9569754004478455, -2.1777918338775635, 0.22557446360588074, 0.2923584580421448, -0.4128551781177521, 0.10176331549882889, 1.751153588294983, 0.5747541785240173, 1.4008148908615112, 1.3379206657409668, 1.0307813882827759, -0.6732910871505737, -1.2990957498550415, 0.6429852843284607, 1.0101821422576904, -1.3741422891616821, 0.8051027059555054, -0.05981422960758209, -0.492374449968338, 0.6793034672737122, 1.3469407558441162, 0.3745059072971344, -1.9904526472091675, 0.832467794418335, -0.8938435912132263, 0.7592094540596008, 0.6646932363510132, 0.8055481910705566, 0.1891789436340332, 0.8320625424385071, -1.287109136581421, -1.099385142326355, -0.6449810862541199, -0.5692752599716187, 1.8727905750274658, -0.21389007568359375, 0.475801944732666, -0.18984001874923706, -1.2583109140396118, -0.0567898154258728, 0.7170843482017517, 0.29706209897994995, -0.42013582587242126, 0.8406524658203125, -0.6781235337257385, -1.1977124214172363, -1.3866180181503296, -0.4855039417743683, -0.944522500038147, -0.8847581744194031, 0.9557342529296875, 0.7358189821243286, 0.39721623063087463, 1.984164834022522, 0.5861650109291077, 0.14026212692260742, -2.7396275997161865, 0.8386183977127075, 0.3183029294013977, -0.02241026796400547, 0.9942514300346375, 0.19264312088489532, 1.154816746711731, -0.04779161512851715, 0.5228594541549683, -2.314523696899414, 2.2740638256073, -0.25477975606918335, 0.6853986978530884, 0.03464888781309128, -0.12705224752426147, 1.0462957620620728, 0.5577308535575867, 0.6596032381057739, -1.112265944480896, 0.8497121334075928, -0.5818518996238708, 1.1892577409744263, 0.8638046979904175, -0.9163163304328918, 0.030458766967058182, 1.3178908824920654, 0.48740312457084656, -0.4218861162662506, -0.9350811839103699, -0.8967377543449402, 0.9293333292007446, 1.7910996675491333, 0.018511109054088593, 0.1131288930773735, 0.8602806329727173, 0.6322994232177734, -1.3250688314437866, 0.051044221967458725, -0.6730497479438782, -0.6913684606552124, 1.7059624195098877, 2.073087692260742, -0.047663286328315735, -0.24427218735218048, -0.8074249029159546, -1.2873139381408691, 0.7897449135780334, 0.017770562320947647, 0.0856500118970871, 0.7277773022651672, -0.660071074962616, 1.1497986316680908, 0.7300878167152405, 0.9508219957351685, 0.12086020410060883, 0.2338358461856842, 0.24937599897384644, -0.31697335839271545, -1.1527010202407837, -0.23208686709403992, -1.090569019317627, -2.5909979343414307, 0.4411289691925049, -0.20981281995773315, -1.4919551610946655, 0.11719213426113129, -1.02553129196167, 0.8671314120292664, -0.5923766493797302, -1.1010061502456665, -1.413103461265564, 0.3260839283466339, -0.1420770287513733, 0.8207084536552429, -1.593622088432312, -0.11679824441671371, 1.282057762145996, 0.9728362560272217, -0.5735877156257629, 0.9512755870819092, 0.23575252294540405, 1.0253511667251587, 0.8863793015480042, -0.3480513095855713, 0.4542671740055084, 0.21279968321323395, -1.3894827365875244, 0.43651139736175537, 1.2863839864730835, 0.1862998902797699, 1.5195236206054688, -0.5156505107879639, 0.015131688676774502, 0.4336552023887634, -0.44144824147224426, -0.4971221089363098, -0.5272711515426636, 0.6966474056243896, -0.005823871120810509, -1.0041673183441162, 0.02438841387629509, -0.11496423184871674, -0.1689356565475464, 0.24760133028030396, -1.4245507717132568, -0.2194308489561081, -0.3393758237361908, -0.6055846810340881, -1.3638195991516113, -0.028889305889606476, 1.3236485719680786, -0.8083814382553101, -0.20217467844486237, 0.513797402381897, 0.28517553210258484, 0.563427746295929, 0.6628624200820923, -0.6709243059158325, -0.31631502509117126, -0.22740128636360168, -0.37989383935928345, 0.3003576397895813, 1.2702038288116455, -0.15797151625156403, -0.9423932433128357, 0.6902541518211365, -0.29189667105674744, 0.09859896451234818, 1.9442715644836426, 0.017664112150669098, -0.8253949284553528, 0.3458915948867798, -0.6437049508094788, 1.9309483766555786, 1.6280862092971802, 1.3091413974761963, -0.16394300758838654, -0.8885367512702942, 0.6144617199897766, -0.2114725410938263, -0.33258256316185, 0.9412336349487305, 0.44041919708251953, -0.20726633071899414, -1.3686754703521729, 0.5777565240859985, 1.2549184560775757, -0.9090875387191772, -0.7644069790840149, 0.16141994297504425, -0.8485204577445984, 1.1278504133224487, 0.718802273273468, 0.43178462982177734, 0.20873543620109558, 1.580762267112732, 0.7260635495185852, -0.5129036903381348, 0.5617603063583374, 0.41117918491363525, -0.21087516844272614, -2.060974597930908, -0.9900864958763123, 0.30146798491477966, -0.45097723603248596, -1.5779342651367188, 1.3771377801895142, -1.1947977542877197, -0.9738578200340271, 0.5162755846977234, 0.14144369959831238, 1.4176502227783203, 0.3291277587413788, 1.7044583559036255, 2.0269060134887695, 0.8902289867401123, 0.30967947840690613, 1.2856065034866333, -0.07441669702529907, -0.3898380398750305, 1.7618613243103027, -0.42963021993637085, 0.5456845164299011, 1.0797785520553589, -0.40231695771217346, -1.0921002626419067, -0.7765289545059204, -1.161086916923523, -0.6685234308242798, 1.1555267572402954, 0.16196143627166748, -1.0750623941421509, 0.24876901507377625, 1.5833041667938232, 0.04813307896256447, -0.24213807284832, 0.6707942485809326, 0.3994506597518921, -0.7347134351730347, -0.07512542605400085, -0.9835543036460876, 0.5123500823974609, -0.15911921858787537, -0.3255685269832611, 0.245235413312912, 0.4965662956237793, 1.252305507659912, 0.044262390583753586, 0.14056454598903656, 1.2568501234054565, -1.3802934885025024, 1.457992672920227, -0.7325201630592346, 0.24760282039642334, -2.379309892654419, 1.4172104597091675, -0.8579519987106323, 1.920348882675171, -2.5782501697540283, 0.3987334072589874, -0.5039477944374084, -0.4322942793369293, 0.2545299828052521, -0.34786456823349, 0.13466157019138336, -0.21159842610359192, -1.017577052116394, -0.15980800986289978, -0.8371444940567017, 0.5592506527900696, 1.2634962797164917, 1.3154336214065552, -1.0411956310272217, -0.2571595311164856, -1.754213571548462, -0.20861667394638062, -0.6636488437652588, 0.3375547528266907, -1.889585256576538, -0.18018905818462372, -1.9819849729537964, -2.428414821624756, -1.3038679361343384, -0.9166772961616516, 1.1056721210479736, 0.27688345313072205, -0.9100843071937561, 1.1089242696762085, -0.3372204303741455, -1.8078453540802002, 1.1274820566177368, -2.217176914215088 ]
https://github.com/huggingface/datasets/issues/5604
Problems with downloading The Pile
@mariosasko ``` root@d20f0ab8f4f8:/mnt/hugging_face# python3 download_pile.py No config specified, defaulting to: the_pile/all Downloading and preparing dataset the_pile/all to /mnt/hugging_face/datasets/the_pile/all/0.0.0/6fadc480ecb32470826cbf5900a9558b791ce55d5e9a0fdc8ad653e7b64bb349... Downloading data files: 0%| | 0/3 [00:00<?, ?it/s] Downloading data: 70%|████████████████████████████████████████████████████████████████████▊ | 10.7G/15.2G [12:09<11:53, 6.36MB/s] Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 15.2G/15.2G [22:15<00:00, 7.25MB/s] Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 15.2G/15.2G [46:17<00:00, 5.48MB/s] Downloading data: 40%|██████████████████████████████████████▏ | 6.07G/15.3G [50:49<1:17:02, 1.99MB/s] Traceback (most recent call last):██████████████████████████▊ | 6.07G/15.3G [50:49<25:35:23, 99.9kB/s] File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 444, in _error_catcher yield File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 567, in read data = self._fp_read(amt) if not fp_closed else b"" File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 525, in _fp_read data = self._fp.read(chunk_amt) File "/usr/lib/python3.8/http/client.py", line 459, in read n = self.readinto(b) File "/usr/lib/python3.8/http/client.py", line 503, in readinto n = self.fp.readinto(b) File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) ConnectionResetError: [Errno 104] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 816, in generate yield from self.raw.stream(chunk_size, decode_content=True) File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 628, in stream data = self.read(amt=amt, decode_content=decode_content) File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 593, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 461, in _error_catcher raise ProtocolError("Connection broken: %r" % e, e) urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "download_pile.py", line 6, in <module> dataset = load_dataset('the_pile', split='train', cache_dir='datasets', download_config=DownloadConfig(resume_download=True)) File "/usr/local/lib/python3.8/dist-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 945, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/root/.cache/huggingface/modules/datasets_modules/datasets/the_pile/6fadc480ecb32470826cbf5900a9558b791ce55d5e9a0fdc8ad653e7b64bb349/the_pile.py", line 192, in _split_generators data_dir = dl_manager.download(_DATA_URLS[self.config.name]) File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 427, in download downloaded_path_or_paths = map_nested( File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 443, in map_nested mapped = [ File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 444, in <listcomp> _single_map_nested((function, obj, types, None, True, None)) File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 363, in _single_map_nested mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 363, in <listcomp> mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 346, in _single_map_nested return function(data_struct) File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 453, in _download return cached_path(url_or_filename, download_config=download_config) File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 182, in cached_path output_path = get_from_cache( File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 575, in get_from_cache http_get( File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 379, in http_get for chunk in response.iter_content(chunk_size=1024): File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 818, in generate raise ChunkedEncodingError(e) requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')) ```
### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2
273
417
Problems with downloading The Pile ### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2 @mariosasko ``` root@d20f0ab8f4f8:/mnt/hugging_face# python3 download_pile.py No config specified, defaulting to: the_pile/all Downloading and preparing dataset the_pile/all to /mnt/hugging_face/datasets/the_pile/all/0.0.0/6fadc480ecb32470826cbf5900a9558b791ce55d5e9a0fdc8ad653e7b64bb349... Downloading data files: 0%| | 0/3 [00:00<?, ?it/s] Downloading data: 70%|████████████████████████████████████████████████████████████████████▊ | 10.7G/15.2G [12:09<11:53, 6.36MB/s] Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 15.2G/15.2G [22:15<00:00, 7.25MB/s] Downloading data: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 15.2G/15.2G [46:17<00:00, 5.48MB/s] Downloading data: 40%|██████████████████████████████████████▏ | 6.07G/15.3G [50:49<1:17:02, 1.99MB/s] Traceback (most recent call last):██████████████████████████▊ | 6.07G/15.3G [50:49<25:35:23, 99.9kB/s] File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 444, in _error_catcher yield File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 567, in read data = self._fp_read(amt) if not fp_closed else b"" File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 525, in _fp_read data = self._fp.read(chunk_amt) File "/usr/lib/python3.8/http/client.py", line 459, in read n = self.readinto(b) File "/usr/lib/python3.8/http/client.py", line 503, in readinto n = self.fp.readinto(b) File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.8/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) ConnectionResetError: [Errno 104] Connection reset by peer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 816, in generate yield from self.raw.stream(chunk_size, decode_content=True) File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 628, in stream data = self.read(amt=amt, decode_content=decode_content) File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 593, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "/usr/local/lib/python3.8/dist-packages/urllib3/response.py", line 461, in _error_catcher raise ProtocolError("Connection broken: %r" % e, e) urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "download_pile.py", line 6, in <module> dataset = load_dataset('the_pile', split='train', cache_dir='datasets', download_config=DownloadConfig(resume_download=True)) File "/usr/local/lib/python3.8/dist-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/usr/local/lib/python3.8/dist-packages/datasets/builder.py", line 945, in _download_and_prepare split_generators = self._split_generators(dl_manager, **split_generators_kwargs) File "/root/.cache/huggingface/modules/datasets_modules/datasets/the_pile/6fadc480ecb32470826cbf5900a9558b791ce55d5e9a0fdc8ad653e7b64bb349/the_pile.py", line 192, in _split_generators data_dir = dl_manager.download(_DATA_URLS[self.config.name]) File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 427, in download downloaded_path_or_paths = map_nested( File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 443, in map_nested mapped = [ File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 444, in <listcomp> _single_map_nested((function, obj, types, None, True, None)) File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 363, in _single_map_nested mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 363, in <listcomp> mapped = [_single_map_nested((function, v, types, None, True, None)) for v in pbar] File "/usr/local/lib/python3.8/dist-packages/datasets/utils/py_utils.py", line 346, in _single_map_nested return function(data_struct) File "/usr/local/lib/python3.8/dist-packages/datasets/download/download_manager.py", line 453, in _download return cached_path(url_or_filename, download_config=download_config) File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 182, in cached_path output_path = get_from_cache( File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 575, in get_from_cache http_get( File "/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py", line 379, in http_get for chunk in response.iter_content(chunk_size=1024): File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 818, in generate raise ChunkedEncodingError(e) requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')) ```
[ -1.203966736793518, -0.8519333004951477, -0.7993110418319702, 1.381014108657837, -0.12639036774635315, -1.2334026098251343, 0.05667369067668915, -1.0094321966171265, 1.5582407712936401, -0.709533154964447, 0.2136765867471695, -1.6297366619110107, 0.017676159739494324, -0.5309671759605408, -0.7454771995544434, -0.8300597667694092, -0.37824076414108276, -0.8287689089775085, 1.0447235107421875, 2.534965753555298, 1.2001007795333862, -1.358781337738037, 2.753347396850586, 0.7149026393890381, -0.2249961495399475, -0.9714149832725525, 0.5774611830711365, 0.022575926035642624, -1.4127150774002075, -0.36180830001831055, -0.9737446904182434, 0.023259729146957397, -0.6079039573669434, -0.5094675421714783, 0.11097606271505356, 0.3997159004211426, -0.23075151443481445, -0.4311487078666687, -0.5314135551452637, -0.694632887840271, 0.514721691608429, -0.3778483271598816, 0.9026038646697998, -0.30235981941223145, 1.7836192846298218, -0.585488498210907, 0.3942602276802063, 0.7272876501083374, 1.2819494009017944, 0.10786892473697662, 0.03131609410047531, 0.3709774613380432, 0.3750501871109009, -0.006107528693974018, 0.4553840160369873, 1.2151780128479004, 0.6486117839813232, 0.4487847089767456, 0.680493175983429, -2.2279863357543945, 1.3579490184783936, -0.8676320314407349, 0.2516769766807556, 1.3318313360214233, -0.998563826084137, 0.39113664627075195, -1.8630549907684326, -0.010283438488841057, 0.5082973837852478, -2.2926015853881836, 0.2929193377494812, -1.277345895767212, -0.47259819507598877, 0.976401686668396, 0.2654469609260559, -1.2776509523391724, 0.16920845210552216, -0.5816905498504639, 1.0927283763885498, 0.455112099647522, 1.2279685735702515, -1.6787047386169434, -0.121555857360363, -0.27110058069229126, 0.0982079803943634, -1.3025517463684082, -1.608553171157837, 0.49590450525283813, 0.6914812326431274, 0.6240764856338501, -0.049482088536024094, 0.9635546207427979, -1.0104049444198608, 0.8629154562950134, -0.909852921962738, -1.7348518371582031, -1.3814133405685425, -2.3334298133850098, -2.2325799465179443, 0.7519814372062683, -0.4227115511894226, -0.45069217681884766, 2.0361812114715576, -1.0868303775787354, -1.7480024099349976, 1.078552484512329, 0.2937026023864746, -0.04382508248090744, 2.3734335899353027, 0.25458693504333496, -0.7669870853424072, 0.47234922647476196, -0.7622601985931396, 0.7921056151390076, -0.40680891275405884, 1.3115284442901611, 0.4622035622596741, -0.967889130115509, 1.587533950805664, -0.3997155427932739, 0.5638636946678162, -0.7469562292098999, -0.505847156047821, -0.8491000533103943, 0.24244250357151031, 1.9511802196502686, -0.36733484268188477, 1.576271891593933, -0.2981175184249878, -1.6005346775054932, -1.4923937320709229, 0.8161281943321228, 0.5591414570808411, -0.8611310720443726, 0.11699472367763519, -0.37281590700149536, 0.08705887198448181, -0.055772632360458374, 1.041601300239563, 1.230004072189331, 0.7013232707977295, -0.3256206512451172, -0.9554032683372498, 0.22982284426689148, -0.0843939334154129, -0.706899106502533, -1.8353910446166992, -0.2981046438217163, 0.11595553159713745, 0.6948636770248413, -1.3014804124832153, 1.7116732597351074, 0.8443890810012817, 1.970866084098816, 1.0685127973556519, -0.44193804264068604, 1.5235819816589355, 0.057844050228595734, 1.8530070781707764, -0.5628728270530701, 0.6375778317451477, -0.3808795213699341, -1.2015113830566406, 0.7978032231330872, -0.2894284129142761, -2.0315773487091064, -0.6758590936660767, -0.7853624820709229, -0.20495396852493286, -0.7579699158668518, 0.9003067016601562, -0.36305129528045654, -1.4227238893508911, 0.24064548313617706, -0.6904447674751282, 0.12939085066318512, -1.2962751388549805, 0.23861028254032135, 0.7841896414756775, -0.6200032830238342, -0.009912494570016861, -0.3068423271179199, -1.293023943901062, -0.45300740003585815, 0.3362613320350647, 1.8181604146957397, -0.7177494168281555, 1.02119779586792, 1.013130784034729, -0.6421494483947754, -0.006601202301681042, 0.3613320589065552, -0.31620514392852783, 0.9195511937141418, -1.0869468450546265, -0.423642635345459, 1.1296004056930542, -0.19125553965568542, -0.5875652432441711, 1.3842341899871826, 0.7960177659988403, -1.0511986017227173, -0.34863460063934326, -0.08475744724273682, -0.8395653367042542, 0.057854004204273224, -1.6389613151550293, -0.1088719293475151, 0.33556312322616577, -1.5857698917388916, -0.49262624979019165, -0.24421511590480804, 1.3372372388839722, -0.1407107263803482, 1.453877568244934, -0.2419898808002472, -0.13155952095985413, -0.3740381598472595, -0.422224760055542, 0.22932596504688263, -0.1947573572397232, -0.5538963079452515, 0.25852423906326294, -0.7743047475814819, 0.24687768518924713, 1.4732776880264282, 0.3570225238800049, 0.05567912012338638, 0.5380328297615051, 1.0546070337295532, 0.3867749571800232, -0.039366334676742554, -0.8400615453720093, -1.6274523735046387, 2.028153657913208, -1.5295354127883911, 1.9165247678756714, 0.8101628422737122, -0.08256307244300842, -1.8003994226455688, -1.9442459344863892, 1.3568130731582642, 1.085517406463623, 2.3797338008880615, 0.5402747988700867, 0.5050364136695862, -0.7109558582305908, -0.7282419204711914, 0.386657178401947, -0.9878968000411987, -0.7824284434318542, 0.13890601694583893, 2.3831899166107178, 1.7020684480667114, -0.4307491183280945, -0.2904803156852722, -0.95111083984375, 1.3062163591384888, -0.051712293177843094, 0.1960492730140686, 1.9938465356826782, -0.19086921215057373, -1.0544700622558594, 1.230355978012085, -2.3130104541778564, 0.23961704969406128, 1.9639698266983032, 0.2683733105659485, 0.07967310398817062, -1.3929446935653687, -0.6867814064025879, -0.20827537775039673, -0.5026791095733643, -1.2481374740600586, 0.6072155237197876, -0.30477744340896606, -0.8214290738105774, -1.49971604347229, 0.01219811849296093, -1.165363073348999, -1.748814344406128, 0.27751588821411133, 1.9031633138656616, 2.0050785541534424, -0.7887489199638367, 1.4873242378234863, -0.2949674129486084, 0.13118839263916016, 1.236258625984192, 1.2772022485733032, 3.1956939697265625, 1.8568679094314575, -1.2646597623825073, 0.7326191067695618, -0.13334117829799652, -0.44072800874710083, 1.0874320268630981, -1.1201859712600708, 1.210092306137085, -0.264329195022583, -1.2586164474487305, -1.1460758447647095, 0.979862630367279, 0.47833913564682007, 0.07277624309062958, -0.41890645027160645, 1.2414873838424683, 0.09433786571025848, 1.3436812162399292, 0.5898559093475342, -0.33201903104782104, 0.6347657442092896, -0.41444987058639526, -0.5380048155784607, 1.5938235521316528, 0.1437149941921234, -1.4016045331954956, -2.431342124938965, -0.31876951456069946, -0.7951492667198181, 0.03892442584037781, -0.6685940027236938, -1.05105721950531, 1.6257716417312622, 0.40831422805786133, -1.1862539052963257, -0.3205280900001526, -0.3257790207862854, -0.5768048763275146, 2.5743048191070557, -1.4516515731811523, -0.1527801901102066, -0.9551618099212646, -0.5035519003868103, 1.5581759214401245, -1.1812793016433716, -0.27779293060302734, -1.0631343126296997, -0.5688751339912415, -1.2984949350357056, -0.5533995628356934, -0.08565421402454376, -0.9178803563117981, 0.7199835181236267, 0.13866481184959412, -1.1530125141143799, -0.2187880426645279, -0.960213840007782, 0.9108960628509521, -0.026452405378222466, 0.17954663932323456, 1.8359713554382324, 0.46683168411254883, -0.4307287335395813, 0.7200855612754822, 1.1543694734573364, 0.6373536586761475, -0.6789141893386841, 0.123361736536026, -0.7046380043029785, 0.2981519103050232, -1.2865477800369263, 0.2814040184020996, -2.8403282165527344, 0.6781808137893677, -0.07547036558389664, 0.021008607000112534, -0.07478486746549606, -1.3396966457366943, 1.102831482887268, 2.565105438232422, -1.1259136199951172, 0.49956101179122925, 0.37223321199417114, 1.1776630878448486, -1.5712119340896606, 0.25285571813583374, -0.48267364501953125, 2.1406116485595703, 0.12170170247554779, 1.2513309717178345, -0.4765476584434509, -2.2486464977264404, 0.6083582639694214, -1.2619396448135376, -1.105125904083252, 0.8425161242485046, -0.7901606559753418, 0.15003757178783417, -1.3765112161636353, -0.20917676389217377, -0.9090481996536255, -1.243877649307251, 0.6549307703971863, 0.11505153030157089, 0.5126898884773254, -0.5781233310699463, 0.31450986862182617, -2.158682107925415, -1.3442307710647583, -0.1644761711359024, -0.9579647183418274, 0.47070497274398804, -0.30694591999053955, 0.67902672290802, -0.09583865106105804, 0.08104662597179413, 0.33153772354125977, 1.3387768268585205, 3.372105836868286, 0.12460830807685852, 0.26702994108200073, -0.1600281298160553, -1.008769154548645, 1.4377162456512451, 0.9766327738761902, -0.13608410954475403, -0.7021040320396423, -0.9655024409294128, 1.252698540687561, 1.9778355360031128, 1.0733013153076172, 0.04237363114953041, -0.7651669979095459, -0.6975893378257751, 0.04915687069296837, 0.18028393387794495, 0.5144211649894714, 0.9727616310119629, 0.03423388674855232, 0.13592085242271423, 1.419198989868164, 1.1667932271957397, -0.3924134373664856, 0.42973244190216064, -0.8453930616378784, -0.44647514820098877, 0.45461344718933105, 0.27434128522872925, -0.013109743595123291, 0.3769090175628662, -1.0896685123443604, -0.22624967992305756, -0.3676379323005676, -0.9525686502456665, -0.6856156587600708, -0.326058030128479, -0.364760160446167, 1.6301655769348145, 0.0839185118675232, -0.4445760250091553, -0.0374375618994236, -0.7499347925186157, -0.09351140260696411, -1.0469304323196411, 0.29426640272140503, -0.21451008319854736, -0.0640331506729126, -0.05398242920637131, 1.7668588161468506, -0.9497817158699036, -2.1095900535583496, 0.1987219750881195, 0.26220953464508057, -0.3708503842353821, 0.1574418693780899, 1.7338367700576782, 0.5748335719108582, 1.3972684144973755, 1.3361402750015259, 0.9734544157981873, -0.6874528527259827, -1.266450047492981, 0.6307127475738525, 1.0029067993164062, -1.3744299411773682, 0.7909226417541504, -0.055977847427129745, -0.5540671348571777, 0.709097146987915, 1.3896344900131226, 0.4292246103286743, -2.0310516357421875, 0.8380503058433533, -0.8920708894729614, 0.7124618291854858, 0.6814265847206116, 0.7833674550056458, 0.23306624591350555, 0.823369026184082, -1.265290379524231, -1.1054315567016602, -0.6870102882385254, -0.5851169228553772, 1.9526184797286987, -0.23423095047473907, 0.4792683720588684, -0.1496839076280594, -1.2731255292892456, -0.09862291812896729, 0.7214363217353821, 0.29936152696609497, -0.43565309047698975, 0.8153674602508545, -0.648972749710083, -1.1790204048156738, -1.3139671087265015, -0.49286550283432007, -0.9446766376495361, -0.8768342733383179, 0.9543895721435547, 0.7477310299873352, 0.3883911371231079, 1.9722563028335571, 0.5838415026664734, 0.15423861145973206, -2.6829066276550293, 0.8389753699302673, 0.33171921968460083, -0.059516120702028275, 1.0202337503433228, 0.19526492059230804, 1.158944845199585, -0.0356026217341423, 0.5642567276954651, -2.361854314804077, 2.259382963180542, -0.2866508364677429, 0.7183246612548828, 0.028300777077674866, -0.12961584329605103, 1.0943080186843872, 0.5501962304115295, 0.6404573321342468, -1.0697526931762695, 0.7877034544944763, -0.6085242629051208, 1.1819523572921753, 0.890907347202301, -0.8873870372772217, 0.0445142425596714, 1.2904759645462036, 0.47465306520462036, -0.427262544631958, -0.9069597125053406, -0.9176996946334839, 0.9339138269424438, 1.8160181045532227, -0.04652303457260132, 0.14291436970233917, 0.827957808971405, 0.671904981136322, -1.3523849248886108, 0.03542521595954895, -0.704043447971344, -0.725590169429779, 1.6851474046707153, 2.097412347793579, -0.07356998324394226, -0.17530111968517303, -0.7977941036224365, -1.29147207736969, 0.804042637348175, -0.01827622391283512, 0.148400217294693, 0.6563720107078552, -0.6409603953361511, 1.1310592889785767, 0.6939414739608765, 0.9888413548469543, 0.09173821657896042, 0.26411592960357666, 0.28358137607574463, -0.29220259189605713, -1.140207052230835, -0.279870867729187, -1.075077772140503, -2.56864070892334, 0.49053406715393066, -0.18207617104053497, -1.4852246046066284, 0.07851322740316391, -1.0164759159088135, 0.879396915435791, -0.5761559009552002, -1.117003321647644, -1.44886314868927, 0.3007463216781616, -0.1810082644224167, 0.8641459345817566, -1.585301160812378, -0.13633254170417786, 1.2576619386672974, 0.9647178649902344, -0.5982110500335693, 1.0118260383605957, 0.24386654794216156, 0.9974353313446045, 0.8610028028488159, -0.3447573184967041, 0.459497332572937, 0.19566568732261658, -1.3399170637130737, 0.42599523067474365, 1.2903261184692383, 0.17518143355846405, 1.5465654134750366, -0.5499475002288818, -0.03470247983932495, 0.43991369009017944, -0.46120715141296387, -0.47658729553222656, -0.5358790755271912, 0.6912152767181396, 0.017071880400180817, -0.9921768307685852, -0.021759293973445892, -0.16072125732898712, -0.22769467532634735, 0.2508828043937683, -1.4418277740478516, -0.21824675798416138, -0.36773085594177246, -0.5780364871025085, -1.3441855907440186, 0.012981567531824112, 1.3341131210327148, -0.7892314195632935, -0.2570347785949707, 0.46462392807006836, 0.35878753662109375, 0.5720657706260681, 0.6643316149711609, -0.6394371390342712, -0.3725271224975586, -0.23077082633972168, -0.39337778091430664, 0.326834499835968, 1.290347933769226, -0.154800146818161, -0.9658671617507935, 0.6713066697120667, -0.3541973829269409, 0.09129559248685837, 1.967618703842163, 0.0034810127690434456, -0.7776371836662292, 0.33583569526672363, -0.6412950158119202, 1.8979032039642334, 1.6315785646438599, 1.338132381439209, -0.17387375235557556, -0.8685317039489746, 0.6302966475486755, -0.2081337720155716, -0.32670897245407104, 0.9635624885559082, 0.4576050639152527, -0.21077854931354523, -1.4202173948287964, 0.5637736916542053, 1.238403558731079, -0.9175779223442078, -0.7129131555557251, 0.09148330986499786, -0.8268003463745117, 1.1526144742965698, 0.7208026051521301, 0.423112154006958, 0.19928601384162903, 1.589005708694458, 0.7318652868270874, -0.5640103816986084, 0.5609275102615356, 0.4249611496925354, -0.2095068097114563, -2.1177408695220947, -1.0224169492721558, 0.31421542167663574, -0.3985251188278198, -1.6272908449172974, 1.38813316822052, -1.1561546325683594, -0.9781226515769958, 0.49036818742752075, 0.07063435018062592, 1.3618652820587158, 0.33841371536254883, 1.7035545110702515, 2.0573678016662598, 0.9202408194541931, 0.3255656361579895, 1.309502124786377, -0.10795675963163376, -0.4025488495826721, 1.7691534757614136, -0.46567094326019287, 0.528270423412323, 1.0839033126831055, -0.41109347343444824, -1.0460764169692993, -0.7425317764282227, -1.158715009689331, -0.6565201878547668, 1.1684385538101196, 0.12175709009170532, -1.126102089881897, 0.2535364031791687, 1.5708305835723877, 0.07615681737661362, -0.24654890596866608, 0.6903706789016724, 0.4161560535430908, -0.7322752475738525, -0.1356709748506546, -0.9352678060531616, 0.5026073455810547, -0.20417159795761108, -0.34642916917800903, 0.2282358556985855, 0.5068613886833191, 1.2769159078598022, -0.012958134524524212, 0.094403475522995, 1.2486047744750977, -1.416799783706665, 1.4550889730453491, -0.6993224620819092, 0.24529989063739777, -2.400968551635742, 1.3985354900360107, -0.8465635776519775, 1.9429398775100708, -2.6008248329162598, 0.40578514337539673, -0.5374752879142761, -0.42123061418533325, 0.2838212251663208, -0.28109532594680786, 0.1515776664018631, -0.20426411926746368, -1.009791374206543, -0.1591341495513916, -0.8145147562026978, 0.5822222232818604, 1.2144297361373901, 1.304887294769287, -1.0573832988739014, -0.20099583268165588, -1.7255885601043701, -0.24013739824295044, -0.6753591895103455, 0.28878676891326904, -1.9560686349868774, -0.1913861185312271, -1.9943478107452393, -2.3951988220214844, -1.3579113483428955, -0.9211091995239258, 1.1131150722503662, 0.2590863108634949, -0.9390236139297485, 1.1114833354949951, -0.3561241626739502, -1.7924842834472656, 1.1307563781738281, -2.2134711742401123 ]
https://github.com/huggingface/datasets/issues/5604
Problems with downloading The Pile
Users with slow internet speed are doomed (4MB/s). The dataset downloads fine at minimum speed 10MB/s. Also, when the train splits were generated and then I removed the downloads folder to save up disk space, it started redownloading the whole dataset. Is there any way to use the already generated splits instead?
### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2
273
52
Problems with downloading The Pile ### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2 Users with slow internet speed are doomed (4MB/s). The dataset downloads fine at minimum speed 10MB/s. Also, when the train splits were generated and then I removed the downloads folder to save up disk space, it started redownloading the whole dataset. Is there any way to use the already generated splits instead?
[ -1.2314949035644531, -0.8574203848838806, -0.8153257966041565, 1.4107085466384888, -0.10294856131076813, -1.2306573390960693, 0.03640240430831909, -0.9805265069007874, 1.5492911338806152, -0.7054902911186218, 0.23757299780845642, -1.63870370388031, 0.027599677443504333, -0.5107318758964539, -0.7304094433784485, -0.8581042885780334, -0.42435160279273987, -0.8102298974990845, 1.0652559995651245, 2.521651029586792, 1.2243218421936035, -1.394359827041626, 2.7389469146728516, 0.6647071242332458, -0.17628386616706848, -1.0083502531051636, 0.5978608727455139, 0.01367859821766615, -1.3970575332641602, -0.3826485872268677, -0.9574644565582275, -0.011921447701752186, -0.5866881012916565, -0.5428051352500916, 0.10855566710233688, 0.3693825304508209, -0.19768975675106049, -0.46381694078445435, -0.49588775634765625, -0.7035819888114929, 0.4964580237865448, -0.36926203966140747, 0.8498018383979797, -0.33711478114128113, 1.837185263633728, -0.5499188303947449, 0.4272417426109314, 0.7198060750961304, 1.2990994453430176, 0.12848299741744995, 0.011532497592270374, 0.38979610800743103, 0.384922057390213, -0.005659652873873711, 0.4778248965740204, 1.1508485078811646, 0.693376898765564, 0.4791600704193115, 0.651078462600708, -2.22037935256958, 1.3343504667282104, -0.8886329531669617, 0.24743278324604034, 1.3836870193481445, -1.0660353899002075, 0.4420876204967499, -1.855154037475586, -0.023687012493610382, 0.49949589371681213, -2.312575578689575, 0.22705906629562378, -1.246816635131836, -0.4552289843559265, 1.0540544986724854, 0.29819542169570923, -1.3086694478988647, 0.15685875713825226, -0.5677510499954224, 1.0707608461380005, 0.4382281005382538, 1.2924516201019287, -1.6574751138687134, -0.1061638742685318, -0.286208838224411, 0.1058657094836235, -1.3202083110809326, -1.5972752571105957, 0.5005524754524231, 0.6506482362747192, 0.5718891620635986, -0.04671685770153999, 0.9248220324516296, -0.9749041795730591, 0.8410279154777527, -0.8720660209655762, -1.7537096738815308, -1.3967477083206177, -2.3209128379821777, -2.286771059036255, 0.7646726965904236, -0.3868497610092163, -0.46449923515319824, 2.070194721221924, -1.072188377380371, -1.7911722660064697, 1.0850565433502197, 0.2604354918003082, -0.05960256606340408, 2.4154341220855713, 0.25570231676101685, -0.7823110222816467, 0.4522160291671753, -0.7432574033737183, 0.7615843415260315, -0.4404544234275818, 1.3140548467636108, 0.4754197299480438, -1.0132712125778198, 1.5998337268829346, -0.4058693051338196, 0.5497588515281677, -0.7041882276535034, -0.4807165861129761, -0.8275430798530579, 0.20825117826461792, 1.963363528251648, -0.330425888299942, 1.5643738508224487, -0.32366880774497986, -1.58656644821167, -1.5130494832992554, 0.8214731812477112, 0.5253140926361084, -0.8422439098358154, 0.1296372264623642, -0.29816392064094543, 0.06405985355377197, -0.01840539090335369, 1.0307197570800781, 1.2278183698654175, 0.7103694081306458, -0.3428017795085907, -1.0422544479370117, 0.2326526790857315, -0.06136301904916763, -0.6528888940811157, -1.7957905530929565, -0.3345484435558319, 0.07744051516056061, 0.6660788059234619, -1.3025012016296387, 1.7162538766860962, 0.8510916829109192, 1.9324802160263062, 1.0475431680679321, -0.4501572251319885, 1.5241522789001465, 0.06521288305521011, 1.8930234909057617, -0.5218577980995178, 0.6456096768379211, -0.35547593235969543, -1.2603206634521484, 0.7649884819984436, -0.3053678274154663, -2.0391979217529297, -0.6923002600669861, -0.8455352783203125, -0.2055724412202835, -0.7741001844406128, 0.9240802526473999, -0.33576247096061707, -1.3620268106460571, 0.2605394423007965, -0.6830581426620483, 0.13450336456298828, -1.34726881980896, 0.29194578528404236, 0.7634282112121582, -0.613776683807373, 0.026344556361436844, -0.34362417459487915, -1.2708019018173218, -0.46859273314476013, 0.29830360412597656, 1.791237235069275, -0.7655653953552246, 1.0483098030090332, 0.994748055934906, -0.6511548757553101, -0.08863165229558945, 0.37031280994415283, -0.31101804971694946, 0.9847760796546936, -1.0703438520431519, -0.45305928587913513, 1.1235237121582031, -0.19873331487178802, -0.5826901793479919, 1.3857567310333252, 0.7441315054893494, -0.9934142827987671, -0.3325083553791046, -0.0746757984161377, -0.8721656203269958, 0.06310893595218658, -1.6426525115966797, -0.12318138778209686, 0.32916751503944397, -1.6160824298858643, -0.5096739530563354, -0.2330111414194107, 1.3381240367889404, -0.10463052242994308, 1.4445006847381592, -0.28564453125, -0.17124859988689423, -0.3884028196334839, -0.4127815067768097, 0.2535121440887451, -0.1651887744665146, -0.5601156949996948, 0.2696341276168823, -0.797057569026947, 0.24565009772777557, 1.4412586688995361, 0.3908657729625702, 0.04192335531115532, 0.5696348547935486, 1.0973767042160034, 0.3900797665119171, -0.06733953207731247, -0.8621834516525269, -1.6324591636657715, 2.067169427871704, -1.5372610092163086, 1.9306294918060303, 0.8018413186073303, -0.11356550455093384, -1.7931034564971924, -1.904456615447998, 1.3342914581298828, 1.102750539779663, 2.351832151412964, 0.5726088285446167, 0.5131752490997314, -0.7295928597450256, -0.7232618927955627, 0.3391069173812866, -0.9935083985328674, -0.8656688928604126, 0.15047357976436615, 2.348926067352295, 1.6973412036895752, -0.3958371579647064, -0.2261570394039154, -0.9942303895950317, 1.3655962944030762, -0.0859970822930336, 0.19067105650901794, 1.9665257930755615, -0.1946631669998169, -1.0843098163604736, 1.2138018608093262, -2.3330295085906982, 0.2759779095649719, 1.9286963939666748, 0.3247445821762085, 0.008288268931210041, -1.4052200317382812, -0.6969189643859863, -0.19307170808315277, -0.4649709463119507, -1.2111605405807495, 0.5725519061088562, -0.31584393978118896, -0.8123385906219482, -1.4790135622024536, 0.005142789334058762, -1.1559466123580933, -1.7532718181610107, 0.23802292346954346, 1.875414490699768, 2.0156519412994385, -0.7759732604026794, 1.4758018255233765, -0.2590944170951843, 0.12676425278186798, 1.2475056648254395, 1.2313792705535889, 3.2025532722473145, 1.9024215936660767, -1.2413430213928223, 0.7022010684013367, -0.109117291867733, -0.39571523666381836, 1.117763876914978, -1.1191110610961914, 1.258184790611267, -0.22368328273296356, -1.254470705986023, -1.1791709661483765, 0.9680501222610474, 0.5134725570678711, 0.0348326601088047, -0.42562052607536316, 1.2475982904434204, 0.10039040446281433, 1.356188416481018, 0.5993863940238953, -0.31687551736831665, 0.6151028871536255, -0.39370253682136536, -0.5498141646385193, 1.6175040006637573, 0.1542453169822693, -1.4276694059371948, -2.361894369125366, -0.29598963260650635, -0.775037944316864, 0.0190092995762825, -0.6806003451347351, -1.0175679922103882, 1.599402666091919, 0.4444725513458252, -1.1856545209884644, -0.34093061089515686, -0.3519816994667053, -0.6565521359443665, 2.5974326133728027, -1.4665019512176514, -0.16473151743412018, -0.9417471885681152, -0.5296783447265625, 1.5467970371246338, -1.2062349319458008, -0.28448885679244995, -0.9958128333091736, -0.6003832817077637, -1.2884489297866821, -0.5545344948768616, -0.11907785385847092, -0.9165875911712646, 0.6922932267189026, 0.14671318233013153, -1.0965712070465088, -0.21083608269691467, -0.9359184503555298, 0.7990581393241882, -0.04689323902130127, 0.2286875993013382, 1.8562524318695068, 0.4736615717411041, -0.3761949837207794, 0.6992954611778259, 1.1518205404281616, 0.6489498615264893, -0.6575047373771667, 0.16458001732826233, -0.7084983587265015, 0.31518033146858215, -1.2117832899093628, 0.308096319437027, -2.819103240966797, 0.6334063410758972, -0.07661093771457672, 0.052272554486989975, -0.06731057912111282, -1.298417329788208, 1.1157104969024658, 2.507628917694092, -1.1782073974609375, 0.5350915789604187, 0.3339308202266693, 1.1413357257843018, -1.6270264387130737, 0.2768472135066986, -0.4813139736652374, 2.161562442779541, 0.1493852734565735, 1.222141981124878, -0.44922155141830444, -2.2478599548339844, 0.5907674431800842, -1.234989047050476, -1.1212767362594604, 0.8166832327842712, -0.7403180599212646, 0.09300497174263, -1.333196759223938, -0.20851165056228638, -0.8506281971931458, -1.233394742012024, 0.6530908346176147, 0.10830959677696228, 0.5157471895217896, -0.5633207559585571, 0.3299996554851532, -2.1659176349639893, -1.3579598665237427, -0.17326775193214417, -0.912807047367096, 0.46381112933158875, -0.3003372251987457, 0.7165605425834656, -0.11138913780450821, 0.07813158631324768, 0.3230569064617157, 1.3341822624206543, 3.36350154876709, 0.13677218556404114, 0.3076521158218384, -0.1350466012954712, -1.0072942972183228, 1.4730396270751953, 0.9501691460609436, -0.19075828790664673, -0.656161367893219, -1.009364366531372, 1.2902507781982422, 1.935611605644226, 1.0845897197723389, 0.10150930285453796, -0.764580488204956, -0.6723551154136658, 0.04671139642596245, 0.17436543107032776, 0.5360753536224365, 0.9885857701301575, 0.047947484999895096, 0.19861121475696564, 1.4179341793060303, 1.2073333263397217, -0.3777014911174774, 0.42123281955718994, -0.8631746172904968, -0.45291668176651, 0.4808657467365265, 0.2458665817975998, -0.0442856103181839, 0.3410370647907257, -1.0646439790725708, -0.20081278681755066, -0.35828834772109985, -0.964947521686554, -0.7038822174072266, -0.29374101758003235, -0.3760051429271698, 1.6537814140319824, 0.08284458518028259, -0.45427268743515015, -0.04583364725112915, -0.7642835378646851, -0.07791658490896225, -1.0600314140319824, 0.31120312213897705, -0.2162819653749466, -0.07513824850320816, -0.044227708131074905, 1.781691312789917, -0.9462476372718811, -2.1684517860412598, 0.22328048944473267, 0.26233145594596863, -0.3947872519493103, 0.11337237805128098, 1.6949065923690796, 0.5661782026290894, 1.4300278425216675, 1.3618836402893066, 0.9867863655090332, -0.7154861688613892, -1.3150354623794556, 0.6250126957893372, 1.0162899494171143, -1.406355857849121, 0.7279366850852966, -0.022326458245515823, -0.5553216934204102, 0.6754480600357056, 1.3558752536773682, 0.40805280208587646, -2.039393663406372, 0.8616324663162231, -0.8587994575500488, 0.7554831504821777, 0.6845411062240601, 0.7993544340133667, 0.1661342978477478, 0.8035533428192139, -1.3000214099884033, -1.1159188747406006, -0.6345060467720032, -0.5865862369537354, 1.9202865362167358, -0.2263188511133194, 0.48430803418159485, -0.19303648173809052, -1.2854005098342896, -0.06196414306759834, 0.6487842202186584, 0.24519307911396027, -0.40020135045051575, 0.8282315135002136, -0.7020854353904724, -1.259024977684021, -1.427685022354126, -0.4589895009994507, -0.9513631463050842, -0.8679946064949036, 1.0043030977249146, 0.7504539489746094, 0.34444859623908997, 1.9495986700057983, 0.5647664070129395, 0.09778203070163727, -2.726619243621826, 0.8293978571891785, 0.3475818932056427, -0.07214890420436859, 0.9939010739326477, 0.1867367923259735, 1.11566162109375, -0.04604436084628105, 0.5276486873626709, -2.3538241386413574, 2.2873263359069824, -0.27487796545028687, 0.7304519414901733, 0.01405287068337202, -0.0923328697681427, 1.049035906791687, 0.6205738186836243, 0.7097297310829163, -1.11574125289917, 0.8443448543548584, -0.5854263305664062, 1.2097536325454712, 0.9009987711906433, -0.8935640454292297, 0.016160622239112854, 1.3188828229904175, 0.5003827810287476, -0.43235504627227783, -0.9114792943000793, -0.9321314692497253, 0.8820632696151733, 1.8613160848617554, -0.012753311544656754, 0.15346775949001312, 0.8064834475517273, 0.6081233024597168, -1.3688308000564575, 0.03457862511277199, -0.6898621320724487, -0.7224273085594177, 1.6526758670806885, 2.0925662517547607, -0.06173118203878403, -0.2441645711660385, -0.761581540107727, -1.338817834854126, 0.8118926882743835, 0.032222624868154526, 0.16934524476528168, 0.7044253945350647, -0.6573385000228882, 1.1598526239395142, 0.7839639782905579, 0.9624655246734619, 0.1348126083612442, 0.18730737268924713, 0.20807497203350067, -0.24033795297145844, -1.1315364837646484, -0.2013576179742813, -1.0304763317108154, -2.5431883335113525, 0.436280757188797, -0.2239363193511963, -1.482465386390686, 0.0778433158993721, -1.0018408298492432, 0.8476139903068542, -0.5649307370185852, -1.1165844202041626, -1.4586801528930664, 0.2881346344947815, -0.14617200195789337, 0.8352674245834351, -1.5906014442443848, -0.14086495339870453, 1.2919563055038452, 0.9847257137298584, -0.5665021538734436, 1.0137288570404053, 0.2666391134262085, 0.9723175764083862, 0.8368977904319763, -0.35393133759498596, 0.43254244327545166, 0.2172572761774063, -1.3670964241027832, 0.43972843885421753, 1.2547709941864014, 0.17477966845035553, 1.5506037473678589, -0.5699648261070251, -0.02183561399579048, 0.40376362204551697, -0.3934724032878876, -0.479831725358963, -0.5252485871315002, 0.6980499625205994, -0.03362765163183212, -0.9620919823646545, 0.07004975527524948, -0.13926003873348236, -0.1802525520324707, 0.27209246158599854, -1.4310519695281982, -0.22485949099063873, -0.3991438150405884, -0.6181833148002625, -1.3404381275177002, -0.0015070782974362373, 1.3445779085159302, -0.8192270994186401, -0.19832028448581696, 0.5039992332458496, 0.3675193786621094, 0.5680858492851257, 0.7002787590026855, -0.6529468297958374, -0.345737487077713, -0.19677530229091644, -0.3461950421333313, 0.2532598376274109, 1.259270429611206, -0.21671535074710846, -0.9697657823562622, 0.6769528388977051, -0.28969240188598633, 0.06446617841720581, 1.9085649251937866, 0.024180490523576736, -0.7985119223594666, 0.34535279870033264, -0.6574252843856812, 1.9533900022506714, 1.58919358253479, 1.388390064239502, -0.153722882270813, -0.9096404910087585, 0.5977503061294556, -0.18433301150798798, -0.33255165815353394, 0.9221545457839966, 0.4754096269607544, -0.1997746229171753, -1.3989022970199585, 0.5706759095191956, 1.232966423034668, -0.9265009164810181, -0.744744598865509, 0.12038381397724152, -0.8143048286437988, 1.1266117095947266, 0.7141939401626587, 0.4777989685535431, 0.18976272642612457, 1.6175833940505981, 0.7506747245788574, -0.5766162872314453, 0.5410226583480835, 0.42191505432128906, -0.22202441096305847, -2.0533158779144287, -1.0052415132522583, 0.2701573669910431, -0.4647198021411896, -1.5776362419128418, 1.3872103691101074, -1.1592633724212646, -0.9557157158851624, 0.5041826367378235, 0.11716605722904205, 1.4027817249298096, 0.32631343603134155, 1.675017237663269, 2.0077786445617676, 0.923082172870636, 0.303932249546051, 1.3112788200378418, -0.0898243859410286, -0.3786355257034302, 1.7875936031341553, -0.4435398280620575, 0.5149582028388977, 1.1205466985702515, -0.39474496245384216, -1.0375874042510986, -0.7455040216445923, -1.1562145948410034, -0.6577079892158508, 1.139141321182251, 0.13227573037147522, -1.0854891538619995, 0.26122400164604187, 1.5675556659698486, 0.08730495721101761, -0.2874397933483124, 0.6378335952758789, 0.4174337387084961, -0.7090631127357483, -0.11903934925794601, -0.9782450795173645, 0.48826664686203003, -0.16970521211624146, -0.37109002470970154, 0.2677234709262848, 0.46930134296417236, 1.2679328918457031, 0.019398972392082214, 0.11066257208585739, 1.2871654033660889, -1.415471076965332, 1.4458556175231934, -0.7194571495056152, 0.2157914638519287, -2.3597559928894043, 1.4213824272155762, -0.8344627022743225, 1.9459949731826782, -2.5990467071533203, 0.4061119556427002, -0.5770867466926575, -0.3928391635417938, 0.28162798285484314, -0.3367406725883484, 0.15318143367767334, -0.20861037075519562, -1.0213135480880737, -0.20743851363658905, -0.8267351388931274, 0.5441784858703613, 1.2286732196807861, 1.307018518447876, -1.048845887184143, -0.21554560959339142, -1.7327829599380493, -0.24299898743629456, -0.6562376618385315, 0.3302845060825348, -1.9313926696777344, -0.20349952578544617, -1.982789158821106, -2.4224560260772705, -1.3133219480514526, -0.9094080924987793, 1.1283376216888428, 0.21880649030208588, -0.9121648073196411, 1.1227123737335205, -0.3723940849304199, -1.7927536964416504, 1.1313916444778442, -2.1986277103424072 ]
https://github.com/huggingface/datasets/issues/5604
Problems with downloading The Pile
@sentialx @mariosasko , anytime on my above script , am I downloading and saving dataset correctly . Please suggest :)
### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2
273
20
Problems with downloading The Pile ### Describe the bug The downloads in the screenshot seem to be interrupted after some time and the last download throws a "Read timed out" error. ![image](https://user-images.githubusercontent.com/11065386/222687870-ec5fcb65-84e8-467d-9593-4ad7bdac4d50.png) Here are the downloaded files: ![image](https://user-images.githubusercontent.com/11065386/222688200-454c2288-49e5-4682-96e6-1eb69aca0852.png) They should be all 14GB like here (https://the-eye.eu/public/AI/pile/train/). Alternatively, can I somehow download the files by myself and use the datasets preparing script? ### Steps to reproduce the bug dataset = load_dataset('the_pile', split='train', cache_dir='F:\datasets') ### Expected behavior The files should be downloaded correctly. ### Environment info - `datasets` version: 2.10.1 - Platform: Windows-10-10.0.22623-SP0 - Python version: 3.10.5 - PyArrow version: 9.0.0 - Pandas version: 1.4.2 @sentialx @mariosasko , anytime on my above script , am I downloading and saving dataset correctly . Please suggest :)
[ -1.2404416799545288, -0.8615272045135498, -0.7928768396377563, 1.4353107213974, -0.13145187497138977, -1.2064193487167358, 0.03153708204627037, -0.9666385650634766, 1.5105797052383423, -0.7303228378295898, 0.2456180900335312, -1.6523255109786987, 0.008035275153815746, -0.5417928099632263, -0.7180575132369995, -0.8418259024620056, -0.42019158601760864, -0.7777180075645447, 1.0626076459884644, 2.551041603088379, 1.1973708868026733, -1.3947653770446777, 2.711526393890381, 0.7072436213493347, -0.17280694842338562, -1.0179800987243652, 0.6031270027160645, 0.030661653727293015, -1.3965517282485962, -0.32628318667411804, -0.9690331220626831, -0.018692072480916977, -0.5907691717147827, -0.5093902945518494, 0.10380199551582336, 0.3745081424713135, -0.18779997527599335, -0.45474740862846375, -0.48119863867759705, -0.7179766893386841, 0.48471635580062866, -0.38345441222190857, 0.8738714456558228, -0.33102455735206604, 1.8393313884735107, -0.5851570963859558, 0.45512476563453674, 0.6986112594604492, 1.3257191181182861, 0.1391761153936386, 0.02832142636179924, 0.4175397753715515, 0.3679537773132324, 0.0057121384888887405, 0.46580326557159424, 1.1219582557678223, 0.7006261348724365, 0.43745970726013184, 0.6538373827934265, -2.2360270023345947, 1.330169677734375, -0.8697195053100586, 0.2953397035598755, 1.3854467868804932, -1.0703296661376953, 0.42435452342033386, -1.87288498878479, -0.02855105698108673, 0.48826363682746887, -2.2917377948760986, 0.24369899928569794, -1.2563154697418213, -0.4522974491119385, 1.043512225151062, 0.3105791211128235, -1.3375780582427979, 0.11462131887674332, -0.5650275349617004, 1.0714432001113892, 0.43687036633491516, 1.2544394731521606, -1.6570196151733398, -0.10236101597547531, -0.30857235193252563, 0.12150617688894272, -1.2987358570098877, -1.5687681436538696, 0.47390931844711304, 0.6622002720832825, 0.5976781249046326, -0.046904485672712326, 0.8955946564674377, -0.994547426700592, 0.8303174376487732, -0.8800734877586365, -1.7461702823638916, -1.384299635887146, -2.3599777221679688, -2.306875705718994, 0.7747273445129395, -0.4000798165798187, -0.4514952600002289, 2.0359389781951904, -1.0672622919082642, -1.7666442394256592, 1.0919064283370972, 0.2614828050136566, -0.06527052074670792, 2.4240825176239014, 0.24391813576221466, -0.8135458827018738, 0.4784316122531891, -0.7899909615516663, 0.754059910774231, -0.4231242835521698, 1.3356363773345947, 0.4600681662559509, -1.003237247467041, 1.6015355587005615, -0.39423391222953796, 0.5176869630813599, -0.7269939184188843, -0.46939849853515625, -0.8175631761550903, 0.21660657227039337, 1.9474238157272339, -0.3123524487018585, 1.5594462156295776, -0.28109660744667053, -1.5947822332382202, -1.4734541177749634, 0.7888414859771729, 0.5305207967758179, -0.8357530236244202, 0.14653845131397247, -0.3143118917942047, 0.05531949922442436, -0.0006083864718675613, 1.023909091949463, 1.223106026649475, 0.7265914082527161, -0.35285574197769165, -1.0560137033462524, 0.22358976304531097, -0.06906656175851822, -0.6680102348327637, -1.8211479187011719, -0.3136564791202545, 0.07160195708274841, 0.6859805583953857, -1.335165023803711, 1.722370982170105, 0.8316890597343445, 1.9335482120513916, 1.0757473707199097, -0.43592074513435364, 1.5536903142929077, 0.03327789530158043, 1.8835399150848389, -0.5058847665786743, 0.6587808728218079, -0.36668241024017334, -1.2487170696258545, 0.7528840899467468, -0.30271515250205994, -2.053837537765503, -0.6982651352882385, -0.8221128582954407, -0.1904333382844925, -0.800284743309021, 0.9312962293624878, -0.34514135122299194, -1.3765567541122437, 0.2751697301864624, -0.705444872379303, 0.14641916751861572, -1.4015932083129883, 0.27348339557647705, 0.7567811012268066, -0.610040009021759, -0.002649898175150156, -0.3598755896091461, -1.2921279668807983, -0.48842084407806396, 0.30546435713768005, 1.783400535583496, -0.7527463436126709, 1.021835446357727, 1.004942536354065, -0.6384350657463074, -0.08706876635551453, 0.3798592686653137, -0.3154219090938568, 0.9801502227783203, -1.0487747192382812, -0.4529475271701813, 1.1415812969207764, -0.20750197768211365, -0.5734886527061462, 1.394928216934204, 0.7917221188545227, -1.0011131763458252, -0.337356299161911, -0.08979608863592148, -0.8491811156272888, 0.05481236055493355, -1.6450947523117065, -0.11846780776977539, 0.32115113735198975, -1.6083635091781616, -0.49072349071502686, -0.2192859798669815, 1.351162075996399, -0.10959305614233017, 1.4453545808792114, -0.2830692529678345, -0.15585322678089142, -0.379772424697876, -0.41837677359580994, 0.25600600242614746, -0.17917141318321228, -0.5545023679733276, 0.2855343818664551, -0.7857020497322083, 0.2516935169696808, 1.4349637031555176, 0.39078664779663086, 0.0542340911924839, 0.5728590488433838, 1.0516526699066162, 0.3576183319091797, -0.057916756719350815, -0.8481535911560059, -1.633836030960083, 2.0676605701446533, -1.5507699251174927, 1.9237308502197266, 0.7881549596786499, -0.13951264321804047, -1.7809933423995972, -1.9101881980895996, 1.361924171447754, 1.131047010421753, 2.35396409034729, 0.5712083578109741, 0.5110305547714233, -0.7553043961524963, -0.7116883993148804, 0.3158174455165863, -0.9956141710281372, -0.856557309627533, 0.14947354793548584, 2.364902973175049, 1.6656712293624878, -0.38702553510665894, -0.21207505464553833, -0.982670783996582, 1.3579822778701782, -0.09893590211868286, 0.19156970083713531, 1.973339319229126, -0.185987189412117, -1.0862410068511963, 1.235152006149292, -2.3369405269622803, 0.25984078645706177, 1.9464081525802612, 0.303837388753891, 0.05219106376171112, -1.3796241283416748, -0.7303332686424255, -0.1840834766626358, -0.4562993347644806, -1.20204758644104, 0.5725826025009155, -0.30108940601348877, -0.8123071789741516, -1.4737746715545654, -0.0037075085565447807, -1.1351052522659302, -1.7646182775497437, 0.23748570680618286, 1.8513590097427368, 2.0090208053588867, -0.7840433716773987, 1.4674993753433228, -0.24558080732822418, 0.15915417671203613, 1.241389274597168, 1.2421983480453491, 3.190164566040039, 1.8853260278701782, -1.2562412023544312, 0.7393051981925964, -0.0792614296078682, -0.39893895387649536, 1.0963482856750488, -1.1146386861801147, 1.2248814105987549, -0.24853679537773132, -1.279585599899292, -1.1683756113052368, 0.9569002389907837, 0.476326048374176, 0.029409829527139664, -0.42709410190582275, 1.219338297843933, 0.10954584181308746, 1.373764991760254, 0.6111243963241577, -0.2725859582424164, 0.586334228515625, -0.41770127415657043, -0.5504691004753113, 1.6332433223724365, 0.15785560011863708, -1.456331729888916, -2.4118075370788574, -0.32766255736351013, -0.777188777923584, -0.006284092552959919, -0.6840469837188721, -1.0290195941925049, 1.603525996208191, 0.4469745457172394, -1.1403297185897827, -0.3333301246166229, -0.3253454864025116, -0.6127848625183105, 2.630100727081299, -1.4525705575942993, -0.18085405230522156, -0.9495387673377991, -0.5421894788742065, 1.5641541481018066, -1.1719131469726562, -0.2498260885477066, -1.0278825759887695, -0.5980599522590637, -1.3020645380020142, -0.5655794739723206, -0.11695905029773712, -0.9445174932479858, 0.6810742020606995, 0.11485898494720459, -1.1228740215301514, -0.21434806287288666, -0.9645802974700928, 0.8339115381240845, -0.00824706070125103, 0.23479898273944855, 1.831916093826294, 0.4922250807285309, -0.35657915472984314, 0.7072584629058838, 1.1582449674606323, 0.6684867739677429, -0.647942841053009, 0.1582852452993393, -0.6826923489570618, 0.3082902133464813, -1.227111577987671, 0.31141868233680725, -2.8256382942199707, 0.6417925357818604, -0.053763825446367264, 0.037822917103767395, -0.10344933718442917, -1.3136529922485352, 1.1362252235412598, 2.498507022857666, -1.1669409275054932, 0.5541001558303833, 0.347231388092041, 1.1479934453964233, -1.624918818473816, 0.2562527656555176, -0.4921374022960663, 2.1979000568389893, 0.11878298968076706, 1.2228528261184692, -0.4510156214237213, -2.269523859024048, 0.6163730025291443, -1.2569115161895752, -1.1074961423873901, 0.8194621801376343, -0.7718903422355652, 0.11122135818004608, -1.3272862434387207, -0.18969646096229553, -0.8535174131393433, -1.224111557006836, 0.6358052492141724, 0.10918941348791122, 0.5148022770881653, -0.5432596206665039, 0.32820191979408264, -2.1843931674957275, -1.366633653640747, -0.1626986712217331, -0.9133536219596863, 0.4499606788158417, -0.28331229090690613, 0.7277548313140869, -0.09609261900186539, 0.07102340459823608, 0.3259340822696686, 1.3608887195587158, 3.3652708530426025, 0.1030503660440445, 0.3204818069934845, -0.09645716845989227, -1.0122424364089966, 1.463093876838684, 0.9164730310440063, -0.19969280064105988, -0.6733894944190979, -0.9644728302955627, 1.2890785932540894, 1.9215449094772339, 1.1009912490844727, 0.07917889207601547, -0.7368370294570923, -0.6437289714813232, 0.04252994805574417, 0.1646731048822403, 0.5300230383872986, 0.9580698609352112, 0.03263890743255615, 0.15554426610469818, 1.4222917556762695, 1.1773262023925781, -0.3892602026462555, 0.42684033513069153, -0.8769848346710205, -0.4703485667705536, 0.4926442801952362, 0.23940256237983704, -0.033073484897613525, 0.34777018427848816, -1.081952452659607, -0.21084295213222504, -0.31379082798957825, -0.9582974314689636, -0.6725583672523499, -0.32876768708229065, -0.3764878511428833, 1.6524730920791626, 0.06537988036870956, -0.4477792978286743, -0.05320210009813309, -0.7644974589347839, -0.07047146558761597, -1.047986388206482, 0.30781084299087524, -0.21779251098632812, -0.03926262632012367, -0.07593019306659698, 1.8059481382369995, -0.9495052695274353, -2.1574459075927734, 0.23065024614334106, 0.301959365606308, -0.37606388330459595, 0.10739999264478683, 1.713766098022461, 0.5584328770637512, 1.4117860794067383, 1.3679757118225098, 1.002511978149414, -0.6913748979568481, -1.2858953475952148, 0.6218633651733398, 1.0493205785751343, -1.3891680240631104, 0.744465172290802, -0.038433656096458435, -0.5571975708007812, 0.6347107887268066, 1.3627516031265259, 0.39856061339378357, -2.0085108280181885, 0.8589931130409241, -0.8893715143203735, 0.7461677193641663, 0.6751012206077576, 0.7961761355400085, 0.17102903127670288, 0.8139542937278748, -1.30332612991333, -1.0847573280334473, -0.6653596758842468, -0.5745798945426941, 1.949150800704956, -0.2477533221244812, 0.45825040340423584, -0.16454525291919708, -1.2662125825881958, -0.055828917771577835, 0.6620588898658752, 0.25504809617996216, -0.3980771601200104, 0.8429291844367981, -0.6813809871673584, -1.2709856033325195, -1.4160159826278687, -0.4524136781692505, -0.9223665595054626, -0.8656750321388245, 0.9847279191017151, 0.7356111407279968, 0.3506864607334137, 1.9472496509552002, 0.5676925778388977, 0.09309062361717224, -2.726250171661377, 0.8082247376441956, 0.3274242877960205, -0.05112183094024658, 0.9760767817497253, 0.18379651010036469, 1.1081877946853638, -0.054374318569898605, 0.5252275466918945, -2.330644130706787, 2.2570712566375732, -0.2694571316242218, 0.7384856343269348, 0.04541918635368347, -0.057985879480838776, 1.0279890298843384, 0.6083225607872009, 0.6747801899909973, -1.0927789211273193, 0.8020992279052734, -0.5877201557159424, 1.2208950519561768, 0.8730225563049316, -0.8876425623893738, 0.01722407341003418, 1.2803083658218384, 0.4827929437160492, -0.4188312292098999, -0.9505870938301086, -0.8808969855308533, 0.9372016191482544, 1.8353123664855957, -0.05044163018465042, 0.13583840429782867, 0.802343487739563, 0.6259564757347107, -1.3608826398849487, -0.0014608567580580711, -0.7069902420043945, -0.7288033962249756, 1.6865700483322144, 2.105865955352783, -0.07075465470552444, -0.2344692498445511, -0.7919049263000488, -1.3509818315505981, 0.8193113207817078, -0.005336388014256954, 0.15883347392082214, 0.6903625726699829, -0.627934992313385, 1.1061800718307495, 0.7719923853874207, 0.9444646239280701, 0.19073787331581116, 0.17107371985912323, 0.20247416198253632, -0.22098518908023834, -1.1167852878570557, -0.19736580550670624, -1.06017005443573, -2.5745339393615723, 0.44765785336494446, -0.22343146800994873, -1.514522910118103, 0.124028779566288, -1.0058443546295166, 0.8788931965827942, -0.5623769760131836, -1.083000659942627, -1.428168535232544, 0.2981106638908386, -0.1402403563261032, 0.8199636340141296, -1.603745698928833, -0.11228867620229721, 1.3036681413650513, 0.9626715779304504, -0.5784908533096313, 0.9987543225288391, 0.2754453420639038, 1.0262912511825562, 0.8692973256111145, -0.3447747230529785, 0.4329642057418823, 0.24166320264339447, -1.3564832210540771, 0.4441448450088501, 1.2736085653305054, 0.1739625632762909, 1.5666366815567017, -0.5646149516105652, -0.03823794052004814, 0.40172696113586426, -0.428449809551239, -0.48537424206733704, -0.559106707572937, 0.6794615387916565, -0.007035401649773121, -1.0096443891525269, 0.02238857001066208, -0.14878171682357788, -0.16250824928283691, 0.28533056378364563, -1.4499939680099487, -0.20187604427337646, -0.374287486076355, -0.6082810759544373, -1.362305760383606, -0.02179502323269844, 1.3494715690612793, -0.8239545226097107, -0.17938895523548126, 0.5122619271278381, 0.34465888142585754, 0.597521960735321, 0.6955615282058716, -0.6700540781021118, -0.36067453026771545, -0.189628466963768, -0.3726535141468048, 0.28308597207069397, 1.2560527324676514, -0.20556436479091644, -0.9370889067649841, 0.6898199319839478, -0.26827889680862427, 0.0880957618355751, 1.9152648448944092, 0.03820054605603218, -0.7956385612487793, 0.3469040095806122, -0.668270468711853, 1.965858817100525, 1.5566688776016235, 1.3736279010772705, -0.16890601813793182, -0.9016368985176086, 0.6234487295150757, -0.1590448021888733, -0.35979101061820984, 0.9003610610961914, 0.5023587346076965, -0.18531155586242676, -1.4101629257202148, 0.5979341864585876, 1.243152141571045, -0.914287805557251, -0.761501669883728, 0.1052486002445221, -0.8136863708496094, 1.1156855821609497, 0.7320842742919922, 0.4519476890563965, 0.1884782463312149, 1.6335484981536865, 0.7339850664138794, -0.5890668630599976, 0.5106708407402039, 0.4301328957080841, -0.1868978887796402, -2.0199427604675293, -1.017035722732544, 0.2822573482990265, -0.46942785382270813, -1.5775705575942993, 1.3740826845169067, -1.1477158069610596, -0.9451637864112854, 0.5093238949775696, 0.11622608453035355, 1.4140490293502808, 0.3544681668281555, 1.6651549339294434, 1.973146677017212, 0.9164695739746094, 0.30134716629981995, 1.3180689811706543, -0.09655220061540604, -0.3838030993938446, 1.747697114944458, -0.4268181324005127, 0.5380802750587463, 1.1234033107757568, -0.398695170879364, -1.0635430812835693, -0.7485601902008057, -1.1433194875717163, -0.6753250956535339, 1.1476407051086426, 0.16168931126594543, -1.0821868181228638, 0.22053292393684387, 1.5914057493209839, 0.07854723930358887, -0.2792244851589203, 0.626984715461731, 0.3902778923511505, -0.7435753345489502, -0.10080158710479736, -0.9862433075904846, 0.4856468439102173, -0.18618521094322205, -0.3687571585178375, 0.23246797919273376, 0.49968740344047546, 1.2845429182052612, 0.03347356617450714, 0.12612111866474152, 1.2662607431411743, -1.3939290046691895, 1.4265990257263184, -0.7532605528831482, 0.2530803382396698, -2.3435006141662598, 1.4083751440048218, -0.8520601391792297, 1.9323190450668335, -2.640232801437378, 0.40759339928627014, -0.5492100715637207, -0.4203658699989319, 0.23478981852531433, -0.3418523967266083, 0.16451923549175262, -0.1844424307346344, -1.0332320928573608, -0.21078719198703766, -0.8052834272384644, 0.5336455702781677, 1.2087668180465698, 1.2931958436965942, -1.0387452840805054, -0.2175171971321106, -1.7342826128005981, -0.2839108407497406, -0.6359893679618835, 0.3301807940006256, -1.8947621583938599, -0.19924446940422058, -1.9651390314102173, -2.4242513179779053, -1.298744559288025, -0.9221168756484985, 1.160441279411316, 0.22945614159107208, -0.9208526611328125, 1.110621452331543, -0.3463634252548218, -1.7825230360031128, 1.160050868988037, -2.2221412658691406 ]
https://github.com/huggingface/datasets/issues/5601
Authorization error
Hi! It's better to report this kind of issue in the `huggingface_hub` repo, so if you still haven't resolved it, I suggest you open an issue there.
### Describe the bug Get `Authorization error` when try to push data into hugginface datasets hub. ### Steps to reproduce the bug I did all steps in the [tutorial](https://huggingface.co/docs/datasets/share), 1. `huggingface-cli login` with WRITE token 2. `git lfs install` 3. `git clone https://huggingface.co/datasets/namespace/your_dataset_name` 4. ``` cp /somewhere/data/*.json . git lfs track *.json git add .gitattributes git add *.json git commit -m "add json files" ``` but when I execute `git push` I got the error: ``` Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done. batch response: Authorization error. error: failed to push some refs to 'https://huggingface.co/datasets/zeusfsx/ukrainian-news' ``` Size of data ~100Gb. I have five json files - different parts. ### Expected behavior All my data pushed into hub ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.10.10 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
274
27
Authorization error ### Describe the bug Get `Authorization error` when try to push data into hugginface datasets hub. ### Steps to reproduce the bug I did all steps in the [tutorial](https://huggingface.co/docs/datasets/share), 1. `huggingface-cli login` with WRITE token 2. `git lfs install` 3. `git clone https://huggingface.co/datasets/namespace/your_dataset_name` 4. ``` cp /somewhere/data/*.json . git lfs track *.json git add .gitattributes git add *.json git commit -m "add json files" ``` but when I execute `git push` I got the error: ``` Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done. batch response: Authorization error. error: failed to push some refs to 'https://huggingface.co/datasets/zeusfsx/ukrainian-news' ``` Size of data ~100Gb. I have five json files - different parts. ### Expected behavior All my data pushed into hub ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.10.10 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Hi! It's better to report this kind of issue in the `huggingface_hub` repo, so if you still haven't resolved it, I suggest you open an issue there.
[ -1.1315078735351562, -0.8858757615089417, -0.7515595555305481, 1.4895168542861938, -0.06980527192354202, -1.3011276721954346, 0.1188325583934784, -0.9685966968536377, 1.7310949563980103, -0.6481048464775085, 0.2915382981300354, -1.7327780723571777, -0.05241468548774719, -0.6085132360458374, -0.792027473449707, -0.8976191282272339, -0.44347259402275085, -0.7455432415008545, 1.0423924922943115, 2.556652307510376, 1.1735578775405884, -1.3529044389724731, 2.7042343616485596, 0.6461220979690552, -0.12356112897396088, -0.9475979804992676, 0.5694968104362488, 0.04136604815721512, -1.3261324167251587, -0.3961394727230072, -0.8171351552009583, -0.13922788202762604, -0.6142823100090027, -0.6295462250709534, 0.09015288203954697, 0.40066400170326233, -0.18910972774028778, -0.47250431776046753, -0.4342285692691803, -0.7300517559051514, 0.4655340313911438, -0.32133373618125916, 0.9571381211280823, -0.39827999472618103, 1.791683554649353, -0.5538705587387085, 0.5101621150970459, 0.7129307985305786, 1.365714192390442, 0.27002599835395813, 0.0683751329779625, 0.3567260801792145, 0.45118749141693115, 0.09873444586992264, 0.49040016531944275, 1.159783124923706, 0.634533166885376, 0.48784303665161133, 0.6981925964355469, -2.2090959548950195, 1.2615655660629272, -0.9410103559494019, 0.24429239332675934, 1.3275947570800781, -0.9081128835678101, 0.316620796918869, -1.8141015768051147, -0.01905127801001072, 0.5104783177375793, -2.246959924697876, 0.2420395463705063, -1.26880943775177, -0.4653578996658325, 1.0621167421340942, 0.2995031177997589, -1.3098406791687012, 0.1252758949995041, -0.388089656829834, 1.024365782737732, 0.4310925304889679, 1.211665153503418, -1.6761327981948853, -0.01981709524989128, -0.3340306580066681, 0.06110984832048416, -1.1979011297225952, -1.4921432733535767, 0.449619859457016, 0.6624923348426819, 0.5910182595252991, -0.145375058054924, 0.8867390751838684, -0.9853717684745789, 0.8049367666244507, -0.9248386025428772, -1.8392976522445679, -1.4268451929092407, -2.321643352508545, -2.403353214263916, 0.7931731343269348, -0.4428357481956482, -0.4303044080734253, 1.9713793992996216, -0.9423173666000366, -1.8130004405975342, 1.0551812648773193, 0.38006824254989624, 0.0052784038707613945, 2.263827323913574, 0.22042906284332275, -0.7476580739021301, 0.35063496232032776, -0.8396983742713928, 0.6925618052482605, -0.3776737153530121, 1.384191870689392, 0.49001070857048035, -1.052912950515747, 1.5290255546569824, -0.4336329400539398, 0.627177357673645, -0.7727533578872681, -0.44352835416793823, -0.7531611323356628, 0.2982224225997925, 1.9869661331176758, -0.33618882298469543, 1.542638897895813, -0.24367810785770416, -1.6249041557312012, -1.492834448814392, 0.8101872205734253, 0.4903593361377716, -0.7037240266799927, 0.06505364924669266, -0.33957138657569885, 0.11743074655532837, -0.04956439137458801, 1.0459136962890625, 1.1805514097213745, 0.7689931988716125, -0.3424987196922302, -0.868135392665863, 0.3113813102245331, -0.021760784089565277, -0.7222899794578552, -1.7868974208831787, -0.3585711121559143, 0.15667693316936493, 0.6564508676528931, -1.2431470155715942, 1.6736512184143066, 0.790130078792572, 2.0078999996185303, 0.9915769100189209, -0.41322237253189087, 1.5430423021316528, 0.030560310930013657, 1.9482951164245605, -0.5410587787628174, 0.6634527444839478, -0.4201688766479492, -1.2099088430404663, 0.8315262794494629, -0.350249320268631, -2.074610948562622, -0.6925796270370483, -0.9130458831787109, -0.15073320269584656, -0.7496482133865356, 0.9691464900970459, -0.2647310197353363, -1.3979101181030273, 0.190049409866333, -0.7541206479072571, 0.09746325761079788, -1.356580376625061, 0.2245587706565857, 0.8395426869392395, -0.6075566411018372, 0.10814090818166733, -0.2687046527862549, -1.300254225730896, -0.4949139356613159, 0.3535741865634918, 1.8518476486206055, -0.7888475060462952, 1.0564824342727661, 1.0366532802581787, -0.7779350280761719, 0.04562139883637428, 0.43741944432258606, -0.3321583569049835, 0.9033163189888, -1.0802257061004639, -0.42854368686676025, 1.1586785316467285, -0.1801033318042755, -0.6091033220291138, 1.460958480834961, 0.8846596479415894, -1.0351332426071167, -0.16480322182178497, -0.10615383833646774, -0.8183149695396423, 0.10118680447340012, -1.602385401725769, -0.13298022747039795, 0.3185350000858307, -1.5140974521636963, -0.5173466205596924, -0.2738489806652069, 1.3397514820098877, -0.12342407554388046, 1.4000577926635742, -0.14791874587535858, -0.25003159046173096, -0.5246433615684509, -0.4655458927154541, 0.15920203924179077, -0.3074447214603424, -0.5934407114982605, 0.3566009998321533, -0.6851809620857239, 0.4064730703830719, 1.3335480690002441, 0.22685906291007996, 0.04430326074361801, 0.5579516291618347, 1.0644710063934326, 0.3343387842178345, -0.053417135030031204, -0.947006344795227, -1.629946231842041, 2.079876661300659, -1.4093643426895142, 1.9056473970413208, 0.7393947839736938, -0.0846589207649231, -1.6977381706237793, -1.9436910152435303, 1.4494882822036743, 1.1031181812286377, 2.4644763469696045, 0.6383383870124817, 0.4349544644355774, -0.8833299279212952, -0.67185378074646, 0.2760542035102844, -0.9605095982551575, -0.7627972960472107, 0.17045116424560547, 2.392977237701416, 1.74135422706604, -0.5330019593238831, -0.13732841610908508, -1.0736744403839111, 1.427101969718933, -0.17299777269363403, 0.23660360276699066, 2.0677735805511475, -0.2699407637119293, -1.021459698677063, 1.2131571769714355, -2.3288142681121826, 0.19928571581840515, 1.9765748977661133, 0.30901038646698, 0.11931753158569336, -1.5235270261764526, -0.6987748742103577, -0.2485523223876953, -0.4709770083427429, -1.1593378782272339, 0.6074371337890625, -0.15370802581310272, -0.8785219788551331, -1.5034780502319336, 0.11648468673229218, -1.1157209873199463, -1.7645512819290161, 0.2711765170097351, 1.839215636253357, 1.9329482316970825, -0.741386890411377, 1.5669043064117432, -0.26851049065589905, 0.20205602049827576, 1.2349592447280884, 1.1605430841445923, 3.1350021362304688, 1.9980289936065674, -1.1597262620925903, 0.7460514903068542, -0.1542186439037323, -0.5402442216873169, 1.188430666923523, -1.1377975940704346, 1.238355278968811, -0.24199137091636658, -1.1391748189926147, -1.235152006149292, 0.995103120803833, 0.5200367569923401, 0.05436978489160538, -0.4695907533168793, 1.1700881719589233, 0.11268147826194763, 1.2936630249023438, 0.4810219705104828, -0.24692201614379883, 0.6301373243331909, -0.35276806354522705, -0.483463853597641, 1.5369840860366821, 0.23928676545619965, -1.3892481327056885, -2.3622243404388428, -0.3031710982322693, -0.9259459376335144, -0.12285980582237244, -0.6054526567459106, -0.975342333316803, 1.5739690065383911, 0.46893706917762756, -1.2168666124343872, -0.2428121566772461, -0.3645484745502472, -0.6598051190376282, 2.711909294128418, -1.4406843185424805, -0.23275615274906158, -0.9731577038764954, -0.575984537601471, 1.571516513824463, -1.1771641969680786, -0.14233919978141785, -0.9823583364486694, -0.5787010192871094, -1.324466586112976, -0.6030145287513733, 0.023679662495851517, -0.8770222663879395, 0.8250247836112976, 0.07011526823043823, -1.1780376434326172, -0.2715476453304291, -0.9991177320480347, 0.9220425486564636, -0.07024016231298447, 0.24143041670322418, 1.8757680654525757, 0.4296659231185913, -0.3418991267681122, 0.6574407815933228, 1.0993704795837402, 0.6330870389938354, -0.6698428988456726, 0.3435327708721161, -0.6550849676132202, 0.1730547845363617, -1.3136703968048096, 0.2560844123363495, -2.7464418411254883, 0.6121904850006104, -0.05039191246032715, -0.0685962662100792, -0.07858777791261673, -1.2862584590911865, 1.1755598783493042, 2.5490882396698, -1.2493247985839844, 0.4418010711669922, 0.3440931439399719, 1.225710153579712, -1.5076525211334229, 0.2664155662059784, -0.4630304276943207, 2.169731378555298, 0.1459774523973465, 1.200846791267395, -0.4069206714630127, -2.203258752822876, 0.5781483054161072, -1.3392832279205322, -1.1212903261184692, 0.8056060671806335, -0.8538591861724854, 0.0717022567987442, -1.4053789377212524, -0.0916992723941803, -0.8105690479278564, -1.2984241247177124, 0.74703049659729, 0.08022774010896683, 0.511726975440979, -0.6497461795806885, 0.4109286367893219, -2.150590419769287, -1.3429285287857056, -0.2646871507167816, -0.9501281380653381, 0.3618428111076355, -0.3197668194770813, 0.7206531763076782, -0.15772251784801483, -0.001037808135151863, 0.3670726418495178, 1.3983216285705566, 3.4640138149261475, 0.09967552870512009, 0.37049493193626404, -0.09490187466144562, -1.0373318195343018, 1.4355169534683228, 0.992080569267273, -0.12220863997936249, -0.4918622374534607, -1.0221837759017944, 1.1842443943023682, 2.014232873916626, 1.2314560413360596, 0.03160761669278145, -0.932654619216919, -0.8563929200172424, 0.048013169318437576, 0.1771114617586136, 0.4229944050312042, 0.854637861251831, 0.05667281895875931, 0.06713560968637466, 1.3937679529190063, 1.1455669403076172, -0.40849021077156067, 0.40346822142601013, -0.8539333343505859, -0.427934467792511, 0.48319804668426514, 0.32221469283103943, 0.05037025362253189, 0.33571121096611023, -1.136727213859558, -0.223936066031456, -0.3795253038406372, -0.9294636845588684, -0.7322339415550232, -0.5056763291358948, -0.3499298095703125, 1.6820170879364014, -0.01878143846988678, -0.5209761261940002, -0.012160182930529118, -0.7520094513893127, 0.006954780779778957, -0.9809415936470032, 0.23552411794662476, -0.23700866103172302, 0.028408441692590714, -0.12487640231847763, 1.778177261352539, -1.0234662294387817, -2.108351230621338, 0.3016163408756256, 0.2881954610347748, -0.44265708327293396, 0.164719358086586, 1.5368884801864624, 0.5829934477806091, 1.3565164804458618, 1.3354572057724, 1.026991605758667, -0.6233615875244141, -1.3876434564590454, 0.6269398927688599, 0.9772911071777344, -1.3574193716049194, 0.8095151782035828, -0.008247261866927147, -0.4785827696323395, 0.5906891822814941, 1.315927267074585, 0.3269544839859009, -1.9755840301513672, 0.7218811511993408, -0.7795141339302063, 0.7520933747291565, 0.617551326751709, 0.7599945068359375, 0.10449279099702835, 0.6994845271110535, -1.2923744916915894, -1.0647085905075073, -0.7549721598625183, -0.6165478825569153, 1.8675336837768555, -0.16310083866119385, 0.5110114812850952, -0.1650228500366211, -1.4125388860702515, -0.09280070662498474, 0.6641713380813599, 0.3973816931247711, -0.526189386844635, 0.8339716792106628, -0.5522502660751343, -1.098099708557129, -1.3581044673919678, -0.43612295389175415, -0.9852744936943054, -0.9152147769927979, 0.9999783039093018, 0.7774459719657898, 0.4339337944984436, 1.8188819885253906, 0.6177284121513367, 0.25611376762390137, -2.7045834064483643, 0.9384856820106506, 0.27463290095329285, -0.042162809520959854, 0.8942233920097351, 0.279184490442276, 1.0991129875183105, -0.1495446264743805, 0.58055579662323, -2.3521344661712646, 2.298738718032837, -0.18963319063186646, 0.567299485206604, 0.052604079246520996, -0.19816522300243378, 1.0588349103927612, 0.5123050212860107, 0.5946040749549866, -1.1640856266021729, 0.7132669687271118, -0.6628785133361816, 1.1966041326522827, 0.8371081352233887, -0.8320363759994507, -0.0386752150952816, 1.3073432445526123, 0.5716339945793152, -0.38005438446998596, -0.9280734062194824, -0.9851506352424622, 0.9893739223480225, 1.666841983795166, -0.09563706815242767, -0.007890121079981327, 0.9869193434715271, 0.6504302620887756, -1.3133536577224731, 0.09983530640602112, -0.7876178622245789, -0.6282779574394226, 1.6904305219650269, 2.1040267944335938, -0.06928616762161255, -0.22537066042423248, -0.8618584871292114, -1.1410032510757446, 0.6679758429527283, 0.07670924067497253, 0.07550664991140366, 0.7659522294998169, -0.5991936326026917, 1.2187224626541138, 0.851111888885498, 0.9623698592185974, 0.15071584284305573, 0.2503879964351654, 0.21589279174804688, -0.32728877663612366, -1.2372134923934937, -0.35589906573295593, -0.9644331336021423, -2.5448696613311768, 0.45335766673088074, -0.20977160334587097, -1.3919928073883057, 0.005487004294991493, -1.0802193880081177, 0.8933977484703064, -0.5041769742965698, -1.0448893308639526, -1.4165258407592773, 0.2439003437757492, -0.10352694243192673, 0.8861204981803894, -1.560454249382019, -0.07395985722541809, 1.357344627380371, 0.8470515012741089, -0.6985957026481628, 0.9616997241973877, 0.2681095600128174, 1.0060412883758545, 0.8717716336250305, -0.30713608860969543, 0.46086686849594116, 0.21149836480617523, -1.3216218948364258, 0.4728432595729828, 1.15291166305542, 0.26466888189315796, 1.4134308099746704, -0.6742591857910156, 0.1154470443725586, 0.3878946900367737, -0.47039076685905457, -0.5532611012458801, -0.7238145470619202, 0.7658955454826355, 0.059460751712322235, -0.9700653553009033, 0.168399378657341, -0.07124652713537216, 0.012154645286500454, 0.17639975249767303, -1.5932459831237793, -0.2040395438671112, -0.24944838881492615, -0.647742748260498, -1.1857845783233643, -0.005498469807207584, 1.309081792831421, -0.7840593457221985, -0.2284448891878128, 0.5508376955986023, 0.25845035910606384, 0.5697981715202332, 0.5599464178085327, -0.580458402633667, -0.3646313548088074, -0.3132084310054779, -0.3626735806465149, 0.2793411910533905, 1.3073782920837402, -0.10725383460521698, -1.001459002494812, 0.7594759464263916, -0.4905267357826233, 0.07615701854228973, 1.9725000858306885, 0.04475180804729462, -0.9277734756469727, 0.3638911545276642, -0.589637279510498, 1.9025516510009766, 1.7178820371627808, 1.3300714492797852, -0.12429143488407135, -0.9497485160827637, 0.46513497829437256, -0.2599877119064331, -0.44348037242889404, 0.9427367448806763, 0.38896289467811584, -0.24090777337551117, -1.359208345413208, 0.5587813854217529, 1.3845897912979126, -0.9553598165512085, -0.914308488368988, 0.2703056037425995, -0.8725041151046753, 1.0920196771621704, 0.7765689492225647, 0.4397203028202057, 0.26184484362602234, 1.5290518999099731, 0.7453466653823853, -0.469882071018219, 0.49679502844810486, 0.45857107639312744, -0.17845672369003296, -1.9734466075897217, -1.1056472063064575, 0.3673792779445648, -0.5694040060043335, -1.6112258434295654, 1.3024346828460693, -1.2212363481521606, -0.9088130593299866, 0.6114844679832458, 0.18206745386123657, 1.4856270551681519, 0.3172622621059418, 1.647000789642334, 2.0434019565582275, 0.8974691033363342, 0.33306485414505005, 1.218326449394226, -0.1014380156993866, -0.5010156035423279, 1.798862099647522, -0.466156929731369, 0.5701310038566589, 1.102016568183899, -0.38202372193336487, -1.0322455167770386, -0.8301613926887512, -1.2260395288467407, -0.6214864253997803, 1.2062208652496338, 0.15947715938091278, -1.2368018627166748, 0.27904877066612244, 1.5925520658493042, 0.12220853567123413, -0.2605680227279663, 0.6976802945137024, 0.3293273448944092, -0.7531022429466248, 0.03771016001701355, -0.9981387257575989, 0.4180413782596588, -0.20967042446136475, -0.35130226612091064, 0.2793791592121124, 0.4832440912723541, 1.2796759605407715, 0.049783553928136826, 0.13516440987586975, 1.21450674533844, -1.3337434530258179, 1.530930757522583, -0.7353439331054688, 0.25097617506980896, -2.344316244125366, 1.371102213859558, -0.8254827260971069, 1.7829396724700928, -2.612565279006958, 0.37808772921562195, -0.48241713643074036, -0.42719995975494385, 0.2423381358385086, -0.33494213223457336, 0.1240452378988266, -0.169565811753273, -1.2028617858886719, -0.13822568953037262, -0.8897740840911865, 0.6397272944450378, 1.117860198020935, 1.4591951370239258, -1.0496556758880615, -0.29801759123802185, -1.8220294713974, -0.08766145259141922, -0.610714316368103, 0.45730939507484436, -1.8737175464630127, -0.19326582551002502, -1.8634638786315918, -2.3239524364471436, -1.3774466514587402, -0.8651557564735413, 1.0494365692138672, 0.09000085294246674, -0.8218016624450684, 1.0293421745300293, -0.4189407229423523, -1.865083932876587, 1.0804041624069214, -2.180612802505493 ]
https://github.com/huggingface/datasets/issues/5601
Authorization error
Yeah, I solved it. Problem was in osxkeychain. When I do `hugginface-cli login` it's add token with default account (username)`hg_user` but my repo contain other username. When I changed username in keychain - it works now.
### Describe the bug Get `Authorization error` when try to push data into hugginface datasets hub. ### Steps to reproduce the bug I did all steps in the [tutorial](https://huggingface.co/docs/datasets/share), 1. `huggingface-cli login` with WRITE token 2. `git lfs install` 3. `git clone https://huggingface.co/datasets/namespace/your_dataset_name` 4. ``` cp /somewhere/data/*.json . git lfs track *.json git add .gitattributes git add *.json git commit -m "add json files" ``` but when I execute `git push` I got the error: ``` Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done. batch response: Authorization error. error: failed to push some refs to 'https://huggingface.co/datasets/zeusfsx/ukrainian-news' ``` Size of data ~100Gb. I have five json files - different parts. ### Expected behavior All my data pushed into hub ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.10.10 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
274
36
Authorization error ### Describe the bug Get `Authorization error` when try to push data into hugginface datasets hub. ### Steps to reproduce the bug I did all steps in the [tutorial](https://huggingface.co/docs/datasets/share), 1. `huggingface-cli login` with WRITE token 2. `git lfs install` 3. `git clone https://huggingface.co/datasets/namespace/your_dataset_name` 4. ``` cp /somewhere/data/*.json . git lfs track *.json git add .gitattributes git add *.json git commit -m "add json files" ``` but when I execute `git push` I got the error: ``` Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done. batch response: Authorization error. error: failed to push some refs to 'https://huggingface.co/datasets/zeusfsx/ukrainian-news' ``` Size of data ~100Gb. I have five json files - different parts. ### Expected behavior All my data pushed into hub ### Environment info - `datasets` version: 2.10.1 - Platform: macOS-13.2.1-arm64-arm-64bit - Python version: 3.10.10 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Yeah, I solved it. Problem was in osxkeychain. When I do `hugginface-cli login` it's add token with default account (username)`hg_user` but my repo contain other username. When I changed username in keychain - it works now.
[ -1.1269416809082031, -0.9064958095550537, -0.7256932258605957, 1.4935580492019653, -0.07282377034425735, -1.3066577911376953, 0.13756318390369415, -0.9786835312843323, 1.73699951171875, -0.6406669616699219, 0.29947489500045776, -1.7377969026565552, -0.02259102649986744, -0.5937290787696838, -0.8009529709815979, -0.8320239782333374, -0.4377494156360626, -0.7755899429321289, 1.0755518674850464, 2.5226216316223145, 1.1707162857055664, -1.3722566366195679, 2.7134454250335693, 0.6172546744346619, -0.17529451847076416, -0.9570868015289307, 0.5506119728088379, 0.037306226789951324, -1.3846501111984253, -0.39481213688850403, -0.80073082447052, -0.10853180289268494, -0.5855252742767334, -0.6476535797119141, 0.10286232084035873, 0.417201429605484, -0.2170981913805008, -0.49301469326019287, -0.42771780490875244, -0.7483832240104675, 0.4692709445953369, -0.3315458297729492, 0.9428786039352417, -0.3728119432926178, 1.806358814239502, -0.5493659377098083, 0.5268287658691406, 0.708486020565033, 1.3528324365615845, 0.25236186385154724, 0.04190540313720703, 0.37279385328292847, 0.4495338499546051, 0.10381850600242615, 0.517670214176178, 1.189098834991455, 0.6379501223564148, 0.4890521764755249, 0.715697169303894, -2.1951797008514404, 1.2612345218658447, -0.9291419386863708, 0.23956304788589478, 1.3000149726867676, -0.9314660429954529, 0.3049830496311188, -1.8180338144302368, -0.03033606708049774, 0.5083816051483154, -2.26151180267334, 0.23040373623371124, -1.2741031646728516, -0.4743541479110718, 1.057478427886963, 0.29350242018699646, -1.275390625, 0.13213340938091278, -0.4290081262588501, 0.9808124303817749, 0.4283215403556824, 1.2483129501342773, -1.6488451957702637, -0.025599095970392227, -0.3237750232219696, 0.06374966353178024, -1.1908650398254395, -1.4708497524261475, 0.5115528702735901, 0.6673272848129272, 0.5952149629592896, -0.1791071593761444, 0.9331020712852478, -0.994917631149292, 0.8085076212882996, -0.9218460917472839, -1.8404288291931152, -1.3931833505630493, -2.2977373600006104, -2.391185998916626, 0.7957776188850403, -0.42299091815948486, -0.4325588643550873, 1.9964923858642578, -0.9646244645118713, -1.8114275932312012, 1.0436415672302246, 0.3450765013694763, -0.020392663776874542, 2.279235601425171, 0.23306870460510254, -0.7621959447860718, 0.3854266405105591, -0.8445162773132324, 0.7118937373161316, -0.3835781216621399, 1.3896255493164062, 0.5061887502670288, -1.01805579662323, 1.5440491437911987, -0.40393197536468506, 0.6248905062675476, -0.7676283717155457, -0.43672850728034973, -0.7148579955101013, 0.2761245369911194, 2.0437233448028564, -0.34466472268104553, 1.5225236415863037, -0.28278863430023193, -1.6532888412475586, -1.484452724456787, 0.7876848578453064, 0.4704916775226593, -0.712756335735321, 0.08666523545980453, -0.3569803833961487, 0.12806257605552673, -0.009118551388382912, 1.0542985200881958, 1.2078531980514526, 0.783064067363739, -0.31385499238967896, -0.8873817920684814, 0.30134353041648865, -0.0015653874725103378, -0.7072321772575378, -1.7468162775039673, -0.37948477268218994, 0.14330069720745087, 0.6585555076599121, -1.2482755184173584, 1.6968913078308105, 0.7927020192146301, 2.0131709575653076, 0.9798264503479004, -0.4295205771923065, 1.5384167432785034, 0.04008084908127785, 1.9541383981704712, -0.49507448077201843, 0.6482928991317749, -0.4363694190979004, -1.21229887008667, 0.8379147052764893, -0.33675745129585266, -2.0566656589508057, -0.6665347814559937, -0.9036881923675537, -0.17458683252334595, -0.7927148342132568, 0.9598968625068665, -0.2760876417160034, -1.4043240547180176, 0.2274155467748642, -0.7598270177841187, 0.09905929118394852, -1.3516165018081665, 0.21398456394672394, 0.8330351710319519, -0.6348809003829956, 0.14863432943820953, -0.26419755816459656, -1.2961746454238892, -0.49915602803230286, 0.364655464887619, 1.881514072418213, -0.7896819114685059, 1.090103030204773, 1.0353704690933228, -0.7626653909683228, 0.04056475684046745, 0.4191552996635437, -0.31269240379333496, 0.9104601144790649, -1.0971845388412476, -0.40709275007247925, 1.158875823020935, -0.1907508373260498, -0.5647969245910645, 1.450900912284851, 0.8387070894241333, -1.0086661577224731, -0.18335440754890442, -0.07195492088794708, -0.8147105574607849, 0.0757247656583786, -1.5970289707183838, -0.11289423704147339, 0.3348196744918823, -1.520923376083374, -0.5358378887176514, -0.2562556266784668, 1.300610065460205, -0.09777970612049103, 1.4131094217300415, -0.164463609457016, -0.2454386204481125, -0.5023966431617737, -0.44835278391838074, 0.1482386291027069, -0.31929251551628113, -0.6071366667747498, 0.36062371730804443, -0.6802499890327454, 0.3930773138999939, 1.3856432437896729, 0.20622070133686066, 0.031501464545726776, 0.5320352911949158, 1.109575867652893, 0.3604457974433899, -0.05269445478916168, -0.9358288049697876, -1.6124500036239624, 2.0839879512786865, -1.4205666780471802, 1.8899184465408325, 0.7369204759597778, -0.09003535658121109, -1.699735403060913, -1.9541407823562622, 1.4510831832885742, 1.104398488998413, 2.459886074066162, 0.6494483947753906, 0.4238767921924591, -0.864679753780365, -0.6590098142623901, 0.2864491641521454, -0.949380099773407, -0.7949104905128479, 0.16049814224243164, 2.4011332988739014, 1.7250614166259766, -0.535026490688324, -0.15324947237968445, -1.0657930374145508, 1.4167416095733643, -0.15602809190750122, 0.21578367054462433, 2.02248477935791, -0.2739916443824768, -1.0435856580734253, 1.1767371892929077, -2.315843343734741, 0.21815192699432373, 1.975712537765503, 0.3167959451675415, 0.13055089116096497, -1.5074034929275513, -0.6942601799964905, -0.2399781197309494, -0.47178491950035095, -1.1451847553253174, 0.5886134505271912, -0.1852702498435974, -0.8853512406349182, -1.4973654747009277, 0.11724401265382767, -1.1108338832855225, -1.7631109952926636, 0.24003295600414276, 1.8656964302062988, 1.9586737155914307, -0.762310802936554, 1.5453389883041382, -0.29295942187309265, 0.18981075286865234, 1.2360895872116089, 1.1455440521240234, 3.118828773498535, 2.0061070919036865, -1.160806655883789, 0.7672014832496643, -0.1352902352809906, -0.5137363076210022, 1.1999258995056152, -1.142806887626648, 1.2292883396148682, -0.2601363956928253, -1.1392654180526733, -1.2149746417999268, 0.9835847616195679, 0.5215606689453125, 0.040181275457143784, -0.47603824734687805, 1.171305537223816, 0.10586392134428024, 1.2956104278564453, 0.4958711266517639, -0.24234047532081604, 0.6705790162086487, -0.33610302209854126, -0.44002220034599304, 1.534936785697937, 0.23773877322673798, -1.3989062309265137, -2.3521382808685303, -0.2904443144798279, -0.9338954091072083, -0.06025755777955055, -0.6265206336975098, -0.9916607737541199, 1.583160638809204, 0.47628307342529297, -1.233965516090393, -0.21647223830223083, -0.34735170006752014, -0.6633709669113159, 2.6739861965179443, -1.399680733680725, -0.2625839412212372, -0.9841399192810059, -0.5932007431983948, 1.5990686416625977, -1.194637417793274, -0.17900153994560242, -0.9662020802497864, -0.5715193748474121, -1.3197004795074463, -0.5986604690551758, 0.027302335947752, -0.8511995673179626, 0.7926618456840515, 0.07250885665416718, -1.188849925994873, -0.2760857343673706, -0.9943962693214417, 0.9066891074180603, -0.09840799868106842, 0.2376982718706131, 1.8674345016479492, 0.43733879923820496, -0.36599352955818176, 0.6458045244216919, 1.0864251852035522, 0.639104962348938, -0.6784864664077759, 0.35662469267845154, -0.6528716683387756, 0.21567758917808533, -1.3239320516586304, 0.24993294477462769, -2.7285232543945312, 0.610101580619812, -0.05786796659231186, -0.03573398292064667, -0.08105576038360596, -1.3001651763916016, 1.1656869649887085, 2.525435447692871, -1.2205712795257568, 0.4743223786354065, 0.31933727860450745, 1.235979437828064, -1.4909709692001343, 0.24853339791297913, -0.43814828991889954, 2.2018771171569824, 0.171953946352005, 1.2012298107147217, -0.38308969140052795, -2.1850147247314453, 0.5828095078468323, -1.3232978582382202, -1.1075444221496582, 0.7856115698814392, -0.8319758772850037, 0.03903985768556595, -1.3832828998565674, -0.1021781787276268, -0.8003708124160767, -1.2557580471038818, 0.7636757493019104, 0.08172662556171417, 0.5175995826721191, -0.6752076148986816, 0.4144013524055481, -2.1591670513153076, -1.3521111011505127, -0.2612791061401367, -0.9913300275802612, 0.3612377345561981, -0.34737691283226013, 0.7178835272789001, -0.17679578065872192, -0.02883647382259369, 0.3737490773200989, 1.4068894386291504, 3.44242262840271, 0.09976352751255035, 0.29786965250968933, -0.11380787193775177, -1.0297898054122925, 1.4505209922790527, 0.991750180721283, -0.17097851634025574, -0.47378164529800415, -1.072373867034912, 1.1866062879562378, 2.002678394317627, 1.2095768451690674, 0.033497948199510574, -0.9006752371788025, -0.8678160905838013, 0.04786458611488342, 0.14078089594841003, 0.4496077597141266, 0.8630759716033936, 0.07863540947437286, 0.053526025265455246, 1.3805201053619385, 1.1302417516708374, -0.4161622226238251, 0.45667824149131775, -0.8428966403007507, -0.41168519854545593, 0.48116984963417053, 0.3183686137199402, 0.06498561799526215, 0.29468071460723877, -1.1385678052902222, -0.19629926979541779, -0.38486313819885254, -0.9352820515632629, -0.750625491142273, -0.46721816062927246, -0.34121787548065186, 1.6908246278762817, -0.011612539179623127, -0.5238600373268127, 0.011561025865375996, -0.7471706867218018, 0.019230477511882782, -0.9729984998703003, 0.25372886657714844, -0.2505445182323456, 0.01750708371400833, -0.06588586419820786, 1.7778496742248535, -0.9999430179595947, -2.121206283569336, 0.31795844435691833, 0.24463313817977905, -0.45550286769866943, 0.19037286937236786, 1.5350455045700073, 0.6156491041183472, 1.3460190296173096, 1.353990912437439, 1.0481877326965332, -0.629173994064331, -1.3744139671325684, 0.6523711681365967, 0.9367771148681641, -1.3813114166259766, 0.7894755601882935, -0.007657267153263092, -0.46832865476608276, 0.5830771923065186, 1.3358080387115479, 0.33481350541114807, -1.9836580753326416, 0.7399510145187378, -0.7659595608711243, 0.7487901449203491, 0.6543782949447632, 0.7756279110908508, 0.11853943020105362, 0.7352740168571472, -1.3023322820663452, -1.057307243347168, -0.7377657890319824, -0.6385433673858643, 1.8574639558792114, -0.1605953574180603, 0.4959987998008728, -0.18781442940235138, -1.4042733907699585, -0.09713494032621384, 0.6750697493553162, 0.3837612271308899, -0.5499320030212402, 0.787921667098999, -0.5706513524055481, -1.100549578666687, -1.3348183631896973, -0.4648691415786743, -1.0144990682601929, -0.9482097625732422, 0.9927584528923035, 0.7496537566184998, 0.4479843080043793, 1.8474260568618774, 0.6380206942558289, 0.22855843603610992, -2.686814069747925, 0.9377580285072327, 0.27859199047088623, -0.03415542095899582, 0.901221513748169, 0.2896597385406494, 1.0857110023498535, -0.1375807374715805, 0.5902358293533325, -2.3425118923187256, 2.2995285987854004, -0.18542663753032684, 0.5837404727935791, 0.06989224255084991, -0.20597133040428162, 1.0568323135375977, 0.5314508676528931, 0.5926285982131958, -1.189627766609192, 0.7334240674972534, -0.6827777028083801, 1.194126844406128, 0.8169971108436584, -0.8490482568740845, -0.00940248928964138, 1.2874964475631714, 0.554977297782898, -0.4209156930446625, -0.9013878107070923, -0.9955356121063232, 0.9592612385749817, 1.684167742729187, -0.09074078500270844, 0.004300911910831928, 0.9876961708068848, 0.6716840267181396, -1.3377583026885986, 0.06342014670372009, -0.7788584232330322, -0.637569785118103, 1.7032678127288818, 2.1162967681884766, -0.06678241491317749, -0.25468209385871887, -0.8629330396652222, -1.1900603771209717, 0.6914425492286682, 0.08092464506626129, 0.06380125880241394, 0.7744686603546143, -0.6007720828056335, 1.2389918565750122, 0.8270156979560852, 0.960830807685852, 0.14488059282302856, 0.20638345181941986, 0.2292863130569458, -0.31454578042030334, -1.2140787839889526, -0.3338119089603424, -0.9759668111801147, -2.5359950065612793, 0.46057775616645813, -0.19925959408283234, -1.4184695482254028, 0.019893590360879898, -1.0818052291870117, 0.860203742980957, -0.5273849964141846, -1.0655962228775024, -1.425068974494934, 0.22313661873340607, -0.1424708366394043, 0.8869653940200806, -1.5610536336898804, -0.0840214341878891, 1.3529173135757446, 0.8744136691093445, -0.6959793567657471, 0.9672356843948364, 0.2644938826560974, 0.9966229796409607, 0.8856779932975769, -0.2868838608264923, 0.4667837917804718, 0.19751133024692535, -1.3260325193405151, 0.44791123270988464, 1.1643106937408447, 0.2598828971385956, 1.4269087314605713, -0.6760392189025879, 0.09911353886127472, 0.38764306902885437, -0.4533909857273102, -0.5499188303947449, -0.725551962852478, 0.7416541576385498, 0.00740188080817461, -0.9603664875030518, 0.16349010169506073, -0.031184367835521698, 0.0011891759932041168, 0.18090878427028656, -1.5837794542312622, -0.2058390974998474, -0.2529646158218384, -0.6649957299232483, -1.1609036922454834, -0.012550560757517815, 1.307388424873352, -0.7905436158180237, -0.20812855660915375, 0.5191889405250549, 0.25048279762268066, 0.542178213596344, 0.5521984696388245, -0.5926713347434998, -0.3552953600883484, -0.28843948245048523, -0.36591023206710815, 0.2877325415611267, 1.3257341384887695, -0.09357850253582001, -1.0347257852554321, 0.7209041118621826, -0.4725668728351593, 0.06147016957402229, 1.9730033874511719, 0.0194440595805645, -0.9069720506668091, 0.32965734601020813, -0.6005515456199646, 1.9425841569900513, 1.7097713947296143, 1.3400323390960693, -0.12385130673646927, -0.9711089134216309, 0.46525293588638306, -0.2772481143474579, -0.44773274660110474, 0.9399346113204956, 0.3529347777366638, -0.23443391919136047, -1.356959342956543, 0.5751018524169922, 1.3790056705474854, -0.953462541103363, -0.9209354519844055, 0.262035071849823, -0.8558052778244019, 1.0967718362808228, 0.7676395177841187, 0.44160401821136475, 0.24234819412231445, 1.5247632265090942, 0.7769961953163147, -0.4391258656978607, 0.5473166704177856, 0.4508207142353058, -0.15551507472991943, -1.977085828781128, -1.1059422492980957, 0.3838561773300171, -0.5405687093734741, -1.5898905992507935, 1.3214783668518066, -1.2376165390014648, -0.9199392199516296, 0.5988293290138245, 0.18545545637607574, 1.4602402448654175, 0.31785067915916443, 1.656353235244751, 2.048633575439453, 0.89799565076828, 0.33698877692222595, 1.1986900568008423, -0.12695157527923584, -0.5198497772216797, 1.781107783317566, -0.4599718749523163, 0.5512471795082092, 1.0894068479537964, -0.3670511543750763, -1.0469365119934082, -0.8265277147293091, -1.249240756034851, -0.6415775418281555, 1.1742842197418213, 0.14831054210662842, -1.239904522895813, 0.2698443531990051, 1.576915979385376, 0.10055878013372421, -0.2632441520690918, 0.7094849348068237, 0.3097171485424042, -0.7760956883430481, 0.022925756871700287, -1.0118120908737183, 0.4304715692996979, -0.1730102151632309, -0.41083550453186035, 0.29562321305274963, 0.5078521370887756, 1.272142767906189, 0.055179107934236526, 0.1364843100309372, 1.2688707113265991, -1.3502023220062256, 1.5190306901931763, -0.752784252166748, 0.24354133009910583, -2.3117153644561768, 1.3462437391281128, -0.8438076972961426, 1.8156965970993042, -2.611339807510376, 0.3803185224533081, -0.5037192702293396, -0.44775980710983276, 0.25195860862731934, -0.28860798478126526, 0.15495248138904572, -0.18794433772563934, -1.1968387365341187, -0.17764046788215637, -0.8931837677955627, 0.6405299305915833, 1.1104103326797485, 1.4372601509094238, -1.0568935871124268, -0.296878844499588, -1.8402624130249023, -0.07695197314023972, -0.6135368347167969, 0.423066645860672, -1.8953324556350708, -0.19129076600074768, -1.875984787940979, -2.3155319690704346, -1.38607656955719, -0.8363232016563416, 1.0437649488449097, 0.0773133859038353, -0.8145396709442139, 1.0511633157730103, -0.4248136579990387, -1.8632348775863647, 1.0899806022644043, -2.19618558883667 ]
https://github.com/huggingface/datasets/issues/5600
Dataloader getitem not working for DreamboothDatasets
Hi! > (see example of DreamboothDatasets) Could you please provide a link to it? If you are referring to the example in the `diffusers` repo, your issue is unrelated to `datasets` as that example uses `Dataset` from PyTorch to load data.
### Describe the bug Dataloader getitem is not working as before (see example of [DreamboothDatasets](https://github.com/huggingface/peft/blob/main/examples/lora_dreambooth/train_dreambooth.py#L451C14-L529)) moving Datasets to 2.8.0 solved the issue. ### Steps to reproduce the bug 1- using DreamBoothDataset to load some images 2- error after loading when trying to visualise the images ### Expected behavior I was expecting a numpy array of the image ### Environment info - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5
275
41
Dataloader getitem not working for DreamboothDatasets ### Describe the bug Dataloader getitem is not working as before (see example of [DreamboothDatasets](https://github.com/huggingface/peft/blob/main/examples/lora_dreambooth/train_dreambooth.py#L451C14-L529)) moving Datasets to 2.8.0 solved the issue. ### Steps to reproduce the bug 1- using DreamBoothDataset to load some images 2- error after loading when trying to visualise the images ### Expected behavior I was expecting a numpy array of the image ### Environment info - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5 Hi! > (see example of DreamboothDatasets) Could you please provide a link to it? If you are referring to the example in the `diffusers` repo, your issue is unrelated to `datasets` as that example uses `Dataset` from PyTorch to load data.
[ -1.2297148704528809, -0.8961120843887329, -0.8456498980522156, 1.4584673643112183, -0.1974523812532425, -1.2620317935943604, 0.039972636848688126, -1.0766230821609497, 1.6056658029556274, -0.81531822681427, 0.31427645683288574, -1.7112020254135132, 0.03862027823925018, -0.5696146488189697, -0.799403727054596, -0.8519027233123779, -0.44857674837112427, -0.6904463171958923, 1.0330711603164673, 2.5276496410369873, 1.1832551956176758, -1.3504019975662231, 2.789872169494629, 0.6447328925132751, -0.25566598773002625, -0.974675714969635, 0.5697668790817261, 0.019923662766814232, -1.3067939281463623, -0.4460131525993347, -0.9054831862449646, -0.09628510475158691, -0.5010412335395813, -0.5329434871673584, 0.1444218009710312, 0.32182279229164124, -0.18840141594409943, -0.3767830729484558, -0.5045887231826782, -0.8179221153259277, 0.4568585753440857, -0.4047454297542572, 0.8858179450035095, -0.4059334695339203, 1.7993433475494385, -0.5631386637687683, 0.36566877365112305, 0.7366401553153992, 1.3654026985168457, 0.1548967808485031, 0.012060852721333504, 0.3906215727329254, 0.4103739857673645, -0.011978011578321457, 0.39157167077064514, 1.0693832635879517, 0.5460636019706726, 0.40092769265174866, 0.6815251111984253, -2.1335060596466064, 1.4508650302886963, -0.9664928317070007, 0.21341551840305328, 1.356777548789978, -1.0229077339172363, 0.43863555788993835, -1.7485052347183228, -0.1315901130437851, 0.5697473287582397, -2.286618947982788, 0.22683916985988617, -1.285618543624878, -0.6007552146911621, 1.005496621131897, 0.3276170790195465, -1.219490885734558, 0.07469497621059418, -0.6078564524650574, 1.0567249059677124, 0.5291165709495544, 1.1619877815246582, -1.660596489906311, -0.05417744815349579, -0.23193791508674622, 0.048968419432640076, -1.4182125329971313, -1.4776322841644287, 0.5934226512908936, 0.7109358310699463, 0.5675791501998901, 0.005918413400650024, 0.8503729701042175, -0.9494762420654297, 0.8143869638442993, -0.9148117303848267, -1.738946795463562, -1.3850871324539185, -2.4018537998199463, -2.288158416748047, 0.8403915762901306, -0.41013380885124207, -0.585331380367279, 2.0760135650634766, -1.03578519821167, -1.8220676183700562, 1.1527581214904785, 0.25506123900413513, -0.03997023031115532, 2.457014799118042, 0.25706472992897034, -0.7055436372756958, 0.49052855372428894, -0.7294852137565613, 0.7199757695198059, -0.5477320551872253, 1.2784016132354736, 0.48300403356552124, -1.0525803565979004, 1.602614402770996, -0.5222556591033936, 0.5558837056159973, -0.6890004277229309, -0.41351982951164246, -0.8043709397315979, 0.3663567304611206, 1.9807220697402954, -0.30097219347953796, 1.570862889289856, -0.3227227032184601, -1.5467149019241333, -1.584275245666504, 0.769307553768158, 0.5300407409667969, -0.7433007955551147, 0.15767797827720642, -0.3352898359298706, 0.0807090550661087, 0.009587787091732025, 0.9562759399414062, 1.2099974155426025, 0.6643466353416443, -0.26147255301475525, -0.8812714219093323, 0.2851634919643402, -0.027194540947675705, -0.7184512615203857, -1.8415619134902954, -0.34078866243362427, 0.12355317175388336, 0.712290346622467, -1.298624038696289, 1.6850045919418335, 0.8952033519744873, 1.9270498752593994, 1.0196857452392578, -0.29972565174102783, 1.4452810287475586, 0.024425655603408813, 1.8863840103149414, -0.4827139377593994, 0.7570143342018127, -0.4247272312641144, -1.1396013498306274, 0.6595953702926636, -0.40404263138771057, -2.042210102081299, -0.7080389261245728, -0.8865678310394287, -0.1719067543745041, -0.7406604290008545, 1.0143249034881592, -0.2670378088951111, -1.3058342933654785, 0.23603767156600952, -0.8099879026412964, 0.14105196297168732, -1.3447760343551636, 0.26787087321281433, 0.7521011829376221, -0.5909188389778137, 0.04458239674568176, -0.26883265376091003, -1.2722245454788208, -0.5154582858085632, 0.2655545771121979, 1.9093575477600098, -0.7793206572532654, 0.9986082911491394, 0.9346573948860168, -0.6388014554977417, 0.009799102321267128, 0.37861570715904236, -0.3050253987312317, 0.8511687517166138, -1.0224918127059937, -0.40777963399887085, 1.2581747770309448, -0.2806284427642822, -0.6259158253669739, 1.4224869012832642, 0.8427911996841431, -1.0177488327026367, -0.20658567547798157, -0.21327465772628784, -0.8388006091117859, -0.007275023963302374, -1.6566544771194458, -0.11548778414726257, 0.2389780580997467, -1.5327942371368408, -0.454187273979187, -0.17821677029132843, 1.2841300964355469, -0.10136786103248596, 1.5247093439102173, -0.29593926668167114, -0.1632242500782013, -0.41714754700660706, -0.39974409341812134, 0.10671587288379669, -0.16403664648532867, -0.6100513935089111, 0.28283315896987915, -0.7274110317230225, 0.300051748752594, 1.5057252645492554, 0.43016451597213745, 0.171835258603096, 0.6345751285552979, 0.9789237976074219, 0.2863171398639679, -0.13996277749538422, -0.8540726900100708, -1.6435133218765259, 2.0370335578918457, -1.3956894874572754, 2.0839977264404297, 0.8253200650215149, -0.09534263610839844, -1.8177646398544312, -1.9324522018432617, 1.3947453498840332, 1.1917084455490112, 2.3161368370056152, 0.5840801000595093, 0.4083694815635681, -0.8338030576705933, -0.7186753153800964, 0.27880173921585083, -0.9931054711341858, -0.8001052737236023, 0.069560706615448, 2.4453418254852295, 1.7624818086624146, -0.4788907468318939, -0.14322882890701294, -1.082119107246399, 1.350807785987854, -0.17350150644779205, 0.20647840201854706, 1.9592225551605225, -0.30902400612831116, -1.0040099620819092, 1.1918163299560547, -2.300762891769409, 0.1396147757768631, 1.9087328910827637, 0.1945476233959198, 0.052595119923353195, -1.4338890314102173, -0.667095959186554, -0.3267791271209717, -0.23463475704193115, -1.1760729551315308, 0.5370199084281921, -0.2540632486343384, -0.8506568074226379, -1.4319206476211548, 0.08912988007068634, -1.1454614400863647, -1.6458287239074707, 0.35789626836776733, 1.8429287672042847, 2.0576014518737793, -0.758355975151062, 1.5223979949951172, -0.21771933138370514, 0.10435515642166138, 1.2499796152114868, 1.2490217685699463, 3.1421473026275635, 1.881112813949585, -1.3317737579345703, 0.7256280779838562, -0.0794752985239029, -0.48654061555862427, 1.1953719854354858, -1.1240178346633911, 1.3206959962844849, -0.19873487949371338, -1.2899270057678223, -1.2506444454193115, 0.9916878342628479, 0.5520159602165222, -0.015462920069694519, -0.5113747119903564, 1.2777838706970215, 0.022465985268354416, 1.387904167175293, 0.5451052784919739, -0.29274871945381165, 0.6311551928520203, -0.38149479031562805, -0.4489409029483795, 1.5471194982528687, 0.17515163123607635, -1.5952860116958618, -2.330901622772217, -0.24364914000034332, -0.8100932240486145, -0.11175614595413208, -0.7321243286132812, -1.0435038805007935, 1.582963466644287, 0.4060603380203247, -1.1748148202896118, -0.31286755204200745, -0.3796428442001343, -0.6768453121185303, 2.617757797241211, -1.557219386100769, -0.2761136293411255, -0.9949292540550232, -0.49493518471717834, 1.515030860900879, -1.2464879751205444, -0.1342964768409729, -1.049323558807373, -0.5886216163635254, -1.2991775274276733, -0.5349566340446472, -0.11135701835155487, -0.9643184542655945, 0.7714180946350098, 0.06195830926299095, -1.0800248384475708, -0.29917630553245544, -0.8689152598381042, 0.8068310022354126, -0.06007705256342888, 0.23121578991413116, 1.814497470855713, 0.3989548087120056, -0.3853914737701416, 0.7021399140357971, 1.2230894565582275, 0.6025219559669495, -0.6789354085922241, 0.17397601902484894, -0.6976045966148376, 0.34292489290237427, -1.2377781867980957, 0.33469513058662415, -2.8622539043426514, 0.6495413780212402, -0.06917446106672287, -0.06553694605827332, -0.032571397721767426, -1.250475525856018, 1.0795972347259521, 2.6840426921844482, -1.1770015954971313, 0.4938029944896698, 0.24656575918197632, 1.106787919998169, -1.610895037651062, 0.3009936511516571, -0.430261492729187, 2.0827908515930176, 0.18973423540592194, 1.2236601114273071, -0.4944293200969696, -2.1455843448638916, 0.658359944820404, -1.197306513786316, -1.0612924098968506, 0.7516464591026306, -0.7808682322502136, 0.10923677682876587, -1.3410226106643677, -0.13877205550670624, -0.8060166239738464, -1.3171074390411377, 0.7358605861663818, 0.07298985123634338, 0.5627714395523071, -0.5265337824821472, 0.28928422927856445, -2.210883855819702, -1.3373584747314453, -0.2084221988916397, -0.9169800877571106, 0.5125142335891724, -0.30504366755485535, 0.6996446251869202, -0.15126842260360718, 0.054992835968732834, 0.3698608875274658, 1.3056880235671997, 3.4110238552093506, 0.14654088020324707, 0.3277513086795807, -0.17491139471530914, -0.9240859150886536, 1.4143375158309937, 0.9545628428459167, -0.19542761147022247, -0.49189528822898865, -0.8981434106826782, 1.3384915590286255, 1.9387952089309692, 1.0909719467163086, 0.11565279960632324, -0.8544657230377197, -0.7354670763015747, 0.011992860585451126, 0.16041429340839386, 0.4317612051963806, 0.878689169883728, 0.03286741301417351, 0.20959258079528809, 1.4586529731750488, 1.3080905675888062, -0.4850166440010071, 0.4362683594226837, -0.8358758687973022, -0.41802307963371277, 0.5375474691390991, 0.3621797263622284, -0.07333676517009735, 0.3201424181461334, -1.0386358499526978, -0.18105746805667877, -0.36141908168792725, -0.9639160633087158, -0.7060408592224121, -0.36149686574935913, -0.41534531116485596, 1.6595759391784668, 0.0006651636213064194, -0.43410226702690125, 0.0064576538279652596, -0.8534336686134338, -0.08988052606582642, -0.9484118819236755, 0.24897825717926025, -0.10414130985736847, -0.07943420112133026, -0.1583576500415802, 1.7999072074890137, -1.0008299350738525, -2.15842342376709, 0.3099275231361389, 0.19974422454833984, -0.4304533898830414, 0.10343141853809357, 1.6372997760772705, 0.5562950372695923, 1.4629762172698975, 1.4331284761428833, 0.894498884677887, -0.7661556005477905, -1.2623202800750732, 0.6679384708404541, 0.9825287461280823, -1.4765428304672241, 0.7943662405014038, -0.09164212644100189, -0.5159315466880798, 0.6656734943389893, 1.2753429412841797, 0.44972801208496094, -1.8985294103622437, 0.7822985649108887, -0.8812404274940491, 0.7964326739311218, 0.6913847327232361, 0.7493743896484375, 0.2193702906370163, 0.7926438450813293, -1.2456638813018799, -1.10617196559906, -0.8267195820808411, -0.5533100366592407, 1.913418173789978, -0.16932234168052673, 0.485397607088089, -0.21228812634944916, -1.2974482774734497, -0.07128004729747772, 0.6766507625579834, 0.3380795419216156, -0.3879365026950836, 0.771183431148529, -0.6867058873176575, -1.1311335563659668, -1.396538257598877, -0.4438048005104065, -1.0090456008911133, -0.8479726314544678, 1.0556975603103638, 0.8562853932380676, 0.32831355929374695, 1.852605938911438, 0.5299286842346191, 0.1529661864042282, -2.6774117946624756, 0.9409629702568054, 0.29067152738571167, -0.002743067219853401, 0.887304425239563, 0.2525639235973358, 1.109703540802002, -0.02080620266497135, 0.4740206003189087, -2.3603744506835938, 2.228227376937866, -0.2207004427909851, 0.665314793586731, 0.0020091328769922256, -0.032338328659534454, 1.100870966911316, 0.6609533429145813, 0.5622682571411133, -1.0751184225082397, 0.8030616044998169, -0.5832123756408691, 1.2716610431671143, 0.9309409260749817, -0.8612277507781982, 0.004210302606225014, 1.2867900133132935, 0.4746739864349365, -0.5358332395553589, -0.9430281519889832, -0.8226994872093201, 0.933506190776825, 1.817025899887085, -0.01804574579000473, 0.00109146349132061, 0.8369902968406677, 0.616128146648407, -1.3306058645248413, 0.10822440683841705, -0.7608416080474854, -0.7408727407455444, 1.5500205755233765, 2.032886266708374, -0.044522419571876526, -0.11804947257041931, -0.6833074688911438, -1.2004859447479248, 0.7845351696014404, 0.0250525064766407, 0.1310935616493225, 0.7277591824531555, -0.6004617810249329, 1.2482560873031616, 0.8662077188491821, 0.9438371062278748, 0.11819295585155487, 0.23722483217716217, 0.21241337060928345, -0.25695669651031494, -1.1556925773620605, -0.27454450726509094, -1.0627585649490356, -2.550118923187256, 0.5217181444168091, -0.2725977599620819, -1.4602055549621582, 0.012496577575802803, -0.9928457736968994, 0.8782942891120911, -0.5416978597640991, -1.0612380504608154, -1.5103607177734375, 0.11508527398109436, -0.2027396559715271, 0.8733739256858826, -1.604741096496582, -0.036378756165504456, 1.3330957889556885, 0.9109674692153931, -0.6271840929985046, 1.0893044471740723, 0.2632967233657837, 1.0567445755004883, 0.8911243081092834, -0.3173508048057556, 0.48465538024902344, 0.11570851504802704, -1.3775668144226074, 0.47868189215660095, 1.190428376197815, 0.19225069880485535, 1.4005064964294434, -0.555229902267456, 0.05927565321326256, 0.3960846960544586, -0.4673710763454437, -0.5456860661506653, -0.5716471672058105, 0.7271046042442322, 0.04791615903377533, -0.9455351233482361, 0.020287657156586647, -0.13828523457050323, -0.2018456757068634, 0.22847580909729004, -1.5134708881378174, -0.13342544436454773, -0.3693971037864685, -0.5724206566810608, -1.247766137123108, -0.04715723171830177, 1.3492287397384644, -0.8812899589538574, -0.20323388278484344, 0.4994306266307831, 0.3969239592552185, 0.5413472652435303, 0.6743037104606628, -0.6800085306167603, -0.3604292869567871, -0.2093113660812378, -0.30048370361328125, 0.32741624116897583, 1.258638620376587, -0.18003444373607635, -1.009601354598999, 0.6879388689994812, -0.38712355494499207, 0.09341239929199219, 1.9762555360794067, 0.07480137050151825, -0.8100886940956116, 0.3090275526046753, -0.6755720973014832, 1.9024603366851807, 1.6156944036483765, 1.3975313901901245, -0.09667801856994629, -0.9826676249504089, 0.608299732208252, -0.22090838849544525, -0.2818523347377777, 0.9351659417152405, 0.5028639435768127, -0.20799775421619415, -1.37655508518219, 0.5591443181037903, 1.184483289718628, -0.8431509733200073, -0.7428359389305115, 0.02232050523161888, -0.8482553362846375, 1.0836260318756104, 0.7974858283996582, 0.3860813081264496, 0.2755236029624939, 1.6250016689300537, 0.6774983406066895, -0.5724761486053467, 0.4747861623764038, 0.4212263822555542, -0.19993075728416443, -2.030081033706665, -0.9848703742027283, 0.31772956252098083, -0.4275486171245575, -1.5459702014923096, 1.2690682411193848, -1.1825761795043945, -0.8470847606658936, 0.5487366914749146, 0.15420304238796234, 1.458207368850708, 0.2044672816991806, 1.6837037801742554, 1.9894142150878906, 1.0326998233795166, 0.29637816548347473, 1.3760614395141602, -0.1650465875864029, -0.292549729347229, 1.7554980516433716, -0.43354037404060364, 0.5254356265068054, 1.0910392999649048, -0.4750765562057495, -1.0659123659133911, -0.754684567451477, -1.1153761148452759, -0.640981137752533, 1.1904776096343994, 0.12785139679908752, -1.0592659711837769, 0.16381917893886566, 1.5986775159835815, 0.14948642253875732, -0.2661276161670685, 0.6030076742172241, 0.4259367883205414, -0.753730058670044, -0.07431358098983765, -0.9586576819419861, 0.504247784614563, -0.11509130895137787, -0.3563264012336731, 0.3027157485485077, 0.48059991002082825, 1.2408685684204102, -0.03279044106602669, 0.14172020554542542, 1.3083010911941528, -1.3524112701416016, 1.4263399839401245, -0.6919803023338318, 0.24199426174163818, -2.3700709342956543, 1.39701509475708, -0.8510543704032898, 1.8606387376785278, -2.613778591156006, 0.4420444667339325, -0.6519904732704163, -0.3883034288883209, 0.23146860301494598, -0.31382107734680176, 0.19630832970142365, -0.23056188225746155, -1.0707218647003174, -0.10027468204498291, -0.8451538681983948, 0.5906056761741638, 1.2140083312988281, 1.3732699155807495, -1.1248968839645386, -0.20847007632255554, -1.7891098260879517, -0.13467344641685486, -0.8221295475959778, 0.3895414471626282, -1.9373079538345337, -0.14477753639221191, -1.9201369285583496, -2.3713808059692383, -1.522288203239441, -0.8103651404380798, 1.12140691280365, 0.13962188363075256, -0.8983813524246216, 1.042411208152771, -0.4438570439815521, -1.7789545059204102, 1.1590635776519775, -2.201338052749634 ]
https://github.com/huggingface/datasets/issues/5597
in-place dataset update
We won't support in-place modifications since `datasets` is based on the Apache Arrow format which doesn't support in-place modifications. In your case the old dataset is garbage collected pretty quickly so you won't have memory issues. Note that datasets loaded from disk (memory mapped) are not loaded in memory, and therefore the new dataset actually use the same buffers as the old one.
### Motivation For the circumstance that I creat an empty `Dataset` and keep appending new rows into it, I found that it leads to creating a new dataset at each call. It looks quite memory-consuming. I just wonder if there is any more efficient way to do this. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds = ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Feature request Call for in-place dataset update functions, that update the existing `Dataset` in place without creating a new copy. The interface is supposed to keep the same style as PyTorch, such as the in-place version of a `function` is named `function_`. For example, the in-pace version of `add_item`, i.e., `add_item_`, immediately updates the `Dataset`. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds.add_item_({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Related Functions * `.map` * `.filter` * `.add_item`
276
63
in-place dataset update ### Motivation For the circumstance that I creat an empty `Dataset` and keep appending new rows into it, I found that it leads to creating a new dataset at each call. It looks quite memory-consuming. I just wonder if there is any more efficient way to do this. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds = ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Feature request Call for in-place dataset update functions, that update the existing `Dataset` in place without creating a new copy. The interface is supposed to keep the same style as PyTorch, such as the in-place version of a `function` is named `function_`. For example, the in-pace version of `add_item`, i.e., `add_item_`, immediately updates the `Dataset`. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds.add_item_({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Related Functions * `.map` * `.filter` * `.add_item` We won't support in-place modifications since `datasets` is based on the Apache Arrow format which doesn't support in-place modifications. In your case the old dataset is garbage collected pretty quickly so you won't have memory issues. Note that datasets loaded from disk (memory mapped) are not loaded in memory, and therefore the new dataset actually use the same buffers as the old one.
[ -1.1607862710952759, -0.9026415944099426, -0.7501826286315918, 1.5338371992111206, -0.19454406201839447, -1.325056791305542, 0.15530814230442047, -1.088658094406128, 1.8104037046432495, -0.7365054488182068, 0.24363689124584198, -1.7707486152648926, -0.06863647699356079, -0.657507061958313, -0.7999919056892395, -0.8973699808120728, -0.35790377855300903, -0.8459934592247009, 0.9515306353569031, 2.409996747970581, 1.1674072742462158, -1.3991379737854004, 2.569789171218872, 0.7426453828811646, -0.23239627480506897, -0.9499825835227966, 0.6090900301933289, -0.14003430306911469, -1.2723640203475952, -0.4060620069503784, -0.9211741089820862, -0.050527237355709076, -0.6843131184577942, -0.5582166314125061, -0.09042923152446747, 0.41094592213630676, -0.30776247382164, -0.40861156582832336, -0.4473494589328766, -0.8607316613197327, 0.31663909554481506, -0.36264488101005554, 0.9499028921127319, -0.24028345942497253, 1.5698713064193726, -0.537835955619812, 0.4447577893733978, 0.6326779127120972, 1.3159034252166748, 0.23711737990379333, -0.057524971663951874, 0.3269648849964142, 0.346169650554657, -0.029223991557955742, 0.4622478485107422, 1.1234662532806396, 0.697446346282959, 0.4308074712753296, 0.8541408777236938, -2.3695967197418213, 1.2160966396331787, -1.056416392326355, 0.39458537101745605, 1.3001395463943481, -0.8365545272827148, 0.4036783277988434, -1.7166208028793335, 0.003161161206662655, 0.7263278365135193, -2.277036190032959, 0.31257984042167664, -1.4175949096679688, -0.43916335701942444, 0.8472791314125061, 0.4419240653514862, -1.1928274631500244, 0.009628772735595703, -0.35230663418769836, 0.976258397102356, 0.41784220933914185, 1.0733994245529175, -1.853865623474121, 0.041793204843997955, -0.34370023012161255, 0.22946661710739136, -1.1423760652542114, -1.5377275943756104, 0.6753427386283875, 0.6850544810295105, 0.6585738062858582, -0.20872355997562408, 0.9488512277603149, -0.9611286520957947, 0.49675852060317993, -0.8978539705276489, -1.8118005990982056, -1.3149595260620117, -2.132274866104126, -2.22567081451416, 0.5639259219169617, -0.5891974568367004, -0.46625733375549316, 2.047668695449829, -0.9773036241531372, -1.8168939352035522, 1.1423301696777344, 0.3799424171447754, 0.00003405380994081497, 2.417900323867798, 0.19494155049324036, -0.7180632948875427, 0.5215448141098022, -0.7932522892951965, 0.7230176329612732, -0.3542986512184143, 1.354990005493164, 0.36178335547447205, -0.9382035732269287, 1.6913886070251465, -0.47060462832450867, 0.5805618762969971, -0.6646661162376404, -0.44220253825187683, -0.6724109649658203, 0.23533478379249573, 1.8660991191864014, -0.2079523801803589, 1.5630621910095215, -0.2923573851585388, -1.5326874256134033, -1.5710057020187378, 0.9368062019348145, 0.45022669434547424, -0.913410484790802, 0.22675086557865143, -0.49863195419311523, 0.2045321762561798, -0.10980179160833359, 1.2361676692962646, 1.370153784751892, 0.6780371069908142, -0.31989797949790955, -0.9252638220787048, 0.19055315852165222, -0.0516338124871254, -0.803848147392273, -1.7655521631240845, -0.18576978147029877, 0.051496490836143494, 0.7385115623474121, -1.078183650970459, 1.746120572090149, 0.7949248552322388, 2.001483201980591, 1.0236694812774658, -0.435864120721817, 1.4218820333480835, 0.16313070058822632, 1.8122814893722534, -0.6282978653907776, 0.6934694647789001, -0.4746529161930084, -1.0419360399246216, 0.9992839097976685, -0.351266473531723, -1.890464425086975, -0.5304417014122009, -0.85090172290802, -0.18427392840385437, -0.8665183186531067, 0.9821047782897949, -0.2758060097694397, -1.3612678050994873, 0.4221426844596863, -0.8648742437362671, 0.10679358243942261, -1.2008745670318604, 0.339058518409729, 0.717947781085968, -0.5017696022987366, 0.056352049112319946, -0.3561796247959137, -1.3711199760437012, -0.4685254395008087, 0.2888154089450836, 1.854012131690979, -0.6802732944488525, 0.9215427041053772, 1.004578948020935, -0.5924859046936035, -0.09867831319570541, 0.30223941802978516, -0.14147718250751495, 0.7952362895011902, -1.0472170114517212, -0.4121479094028473, 1.2031874656677246, -0.19303327798843384, -0.5178459882736206, 1.4258053302764893, 0.5760294795036316, -0.9679797887802124, -0.1488591730594635, -0.11333511769771576, -0.7349478006362915, 0.04768671095371246, -1.7300702333450317, 0.008407564833760262, 0.5119432806968689, -1.620139241218567, -0.5845725536346436, -0.1891832798719406, 1.225798487663269, -0.054796695709228516, 1.2509856224060059, -0.2777375876903534, -0.018744703382253647, -0.3969992399215698, -0.36328762769699097, 0.05250994861125946, -0.2971233129501343, -0.5134415626525879, 0.13727350533008575, -0.8172604441642761, 0.33486756682395935, 1.4626057147979736, 0.2020944505929947, 0.014474514871835709, 0.4753192663192749, 1.101083517074585, 0.41415753960609436, -0.07368369400501251, -0.8360485434532166, -1.5451518297195435, 2.0307915210723877, -1.5628856420516968, 1.9748426675796509, 0.5731703042984009, 0.0008034687489271164, -1.719069242477417, -2.0286576747894287, 1.3917838335037231, 1.1259962320327759, 2.2645745277404785, 0.6748645901679993, 0.3936764597892761, -0.7939040660858154, -0.5795601606369019, 0.19162523746490479, -0.8556320071220398, -0.8061514496803284, 0.1709032952785492, 2.438483238220215, 1.6816803216934204, -0.5311571955680847, -0.1272098869085312, -0.9650043249130249, 1.4734243154525757, -0.2232293039560318, 0.28606945276260376, 1.9321078062057495, -0.3197859227657318, -1.1797008514404297, 1.3798748254776, -2.361863136291504, 0.08199293166399002, 1.9978511333465576, 0.14803670346736908, 0.19266493618488312, -1.2688933610916138, -0.744538426399231, -0.29109179973602295, -0.44001108407974243, -1.314841389656067, 0.5248472094535828, -0.23612844944000244, -0.7108478546142578, -1.4849635362625122, 0.25929003953933716, -0.9343857169151306, -1.6662135124206543, 0.07650356739759445, 1.895755410194397, 2.116832733154297, -0.8389309644699097, 1.5787968635559082, -0.438726007938385, 0.17368435859680176, 1.1632379293441772, 1.202376127243042, 3.090968370437622, 1.9678670167922974, -1.2874523401260376, 0.6816312670707703, -0.09111609309911728, -0.5499136447906494, 1.3361358642578125, -1.2322392463684082, 1.110925316810608, -0.24971508979797363, -1.3077313899993896, -1.219211220741272, 0.8902083039283752, 0.3908208906650543, 0.03006589598953724, -0.5523891448974609, 1.2031173706054688, -0.17319601774215698, 1.3224095106124878, 0.6172576546669006, -0.322329044342041, 0.5934895277023315, -0.40282803773880005, -0.4821752905845642, 1.5919122695922852, 0.17772114276885986, -1.356474757194519, -2.3846845626831055, -0.21412229537963867, -0.8646259307861328, 0.1149466261267662, -0.65961754322052, -1.074130892753601, 1.6518223285675049, 0.3249284327030182, -1.1254688501358032, -0.2505483329296112, -0.34655123949050903, -0.4250595271587372, 2.6315736770629883, -1.391747236251831, -0.3439069390296936, -1.07209312915802, -0.631460964679718, 1.6473100185394287, -1.205777883529663, -0.21736247837543488, -1.0835533142089844, -0.44890233874320984, -1.337334156036377, -0.4900587797164917, -0.013529695570468903, -0.9377003908157349, 0.8320178389549255, 0.26602354645729065, -1.2812575101852417, -0.27734583616256714, -0.9133914113044739, 0.8532742857933044, -0.24760358035564423, 0.3050941526889801, 1.9890296459197998, 0.35131990909576416, -0.3528289496898651, 0.7093653678894043, 1.1202280521392822, 0.6074684858322144, -0.6830567717552185, 0.1427205353975296, -0.6062737107276917, 0.5341745018959045, -1.4116567373275757, 0.11526066809892654, -2.826038360595703, 0.6788696646690369, 0.03338216245174408, 0.04215608537197113, 0.015865569934248924, -1.4692201614379883, 1.0317087173461914, 2.633058547973633, -1.2259092330932617, 0.505106508731842, 0.24297402799129486, 1.3028130531311035, -1.6545100212097168, 0.17310094833374023, -0.4880569875240326, 2.357093572616577, 0.09570562094449997, 1.2099536657333374, -0.28315791487693787, -2.508366823196411, 0.5225672721862793, -1.1502732038497925, -1.12627112865448, 0.7314560413360596, -0.926481306552887, 0.02430393360555172, -1.550119161605835, -0.1487402617931366, -0.8699648380279541, -1.039522647857666, 0.8236408233642578, 0.03493655472993851, 0.44112077355384827, -0.734472930431366, 0.3956718146800995, -2.1976397037506104, -1.336857557296753, -0.12689116597175598, -0.9408619403839111, 0.5740347504615784, -0.28921395540237427, 0.739142119884491, -0.21545033156871796, -0.07820658385753632, 0.3665785789489746, 1.4519109725952148, 3.4882891178131104, 0.16223138570785522, 0.28097251057624817, -0.24817359447479248, -0.9171236753463745, 1.3811781406402588, 0.9290122985839844, -0.1207026019692421, -0.5015141367912292, -1.0667028427124023, 1.406044840812683, 2.0162513256073, 0.8500880599021912, 0.06310644000768661, -0.8703385591506958, -0.598783016204834, 0.0005690669640898705, 0.24937541782855988, 0.4536009430885315, 0.8329682350158691, 0.162483811378479, 0.11287716776132584, 1.2981219291687012, 1.1233043670654297, -0.23385140299797058, 0.5562818050384521, -0.8962960839271545, -0.49805358052253723, 0.6632024645805359, 0.3369535505771637, -0.07060300558805466, 0.3412425220012665, -0.9853965640068054, -0.21658384799957275, -0.3110371232032776, -0.7515588402748108, -0.6989877820014954, -0.3528798520565033, -0.18483370542526245, 1.5942461490631104, 0.04680250585079193, -0.6464909911155701, 0.021437140181660652, -0.6971182823181152, -0.12450060993432999, -1.053382396697998, 0.18226583302021027, -0.2592790126800537, -0.07776927947998047, -0.11202595382928848, 1.586699366569519, -0.8076567649841309, -1.9597235918045044, 0.15466706454753876, 0.41892561316490173, -0.4494471251964569, 0.2987489402294159, 1.7855570316314697, 0.6004838347434998, 1.4956274032592773, 1.3744544982910156, 1.0607572793960571, -0.7106296420097351, -1.2275609970092773, 0.6295150518417358, 0.8972538113594055, -1.2671068906784058, 0.9382411241531372, 0.03330397605895996, -0.6368572115898132, 0.46265658736228943, 1.3149501085281372, 0.5773401856422424, -2.0594048500061035, 0.8194615840911865, -1.0075547695159912, 0.9155442118644714, 0.7366209030151367, 0.8943373560905457, 0.2714177370071411, 0.7561321258544922, -1.2627079486846924, -1.0688785314559937, -0.8432852625846863, -0.698019802570343, 1.793977975845337, -0.2363033890724182, 0.5587507486343384, -0.27901944518089294, -1.3195265531539917, -0.15942133963108063, 0.7227743268013, 0.4100845158100128, -0.5142537355422974, 0.7262389063835144, -0.5873417854309082, -1.1163438558578491, -1.2185004949569702, -0.5019048452377319, -0.9944429993629456, -1.0067237615585327, 1.0091973543167114, 0.8326610326766968, 0.3798087537288666, 1.8662257194519043, 0.5406695008277893, 0.05428752303123474, -2.4775421619415283, 0.8734169006347656, 0.3503902554512024, -0.20792408287525177, 0.7899056673049927, 0.531641960144043, 1.1491566896438599, -0.04372774809598923, 0.6497364044189453, -2.3264567852020264, 2.1574418544769287, -0.17998290061950684, 0.7608155608177185, -0.027075331658124924, -0.09257324039936066, 0.8791865110397339, 0.4785383343696594, 0.46037957072257996, -1.04017972946167, 0.7204616665840149, -0.6488091945648193, 1.2408748865127563, 0.9024627208709717, -0.8243309855461121, -0.005716299172490835, 1.3811650276184082, 0.4046691060066223, -0.6825242042541504, -0.9913439154624939, -0.8211304545402527, 0.877595841884613, 1.6737773418426514, -0.11135618388652802, -0.03559618443250656, 0.7314695715904236, 0.724619448184967, -1.2777622938156128, 0.024088693782687187, -0.6898432970046997, -0.645745575428009, 1.7794806957244873, 1.9165000915527344, -0.1884029060602188, -0.03169434890151024, -0.7914502620697021, -1.3505196571350098, 0.8114524483680725, 0.048638537526130676, -0.0916581079363823, 0.6617581844329834, -0.6156910061836243, 1.054073452949524, 0.7283679246902466, 0.9333192706108093, 0.26268017292022705, 0.380849689245224, 0.5143764019012451, -0.3708953559398651, -1.033651351928711, -0.2809929847717285, -1.2016245126724243, -2.4448208808898926, 0.5394878387451172, -0.27513182163238525, -1.3173421621322632, -0.071417436003685, -0.9684024453163147, 1.0238498449325562, -0.6798331141471863, -0.987483561038971, -1.3195667266845703, 0.2643190920352936, 0.02501160092651844, 0.9639880657196045, -1.5593808889389038, 0.0018096687272191048, 1.152215838432312, 0.970849335193634, -0.8133299350738525, 1.0576730966567993, 0.3639122545719147, 1.1300057172775269, 0.8898085355758667, -0.46814513206481934, 0.5123209357261658, -0.03281134366989136, -1.240257740020752, 0.5427456498146057, 1.1697317361831665, 0.2440674751996994, 1.3917254209518433, -0.5267893671989441, -0.22639650106430054, 0.40677711367607117, -0.41198423504829407, -0.3177333474159241, -0.5508999824523926, 0.5817177891731262, 0.0831383690237999, -0.8945052623748779, -0.07957348972558975, 0.02724330686032772, -0.16794204711914062, 0.2441428154706955, -1.5109269618988037, -0.050751760601997375, -0.4362753629684448, -0.42218542098999023, -1.2330293655395508, -0.23173005878925323, 1.5615217685699463, -0.6768773794174194, -0.15713796019554138, 0.5631711483001709, 0.28198009729385376, 0.4067099094390869, 0.6407007575035095, -0.5988339185714722, -0.37428808212280273, -0.3218283951282501, -0.44555288553237915, 0.29664334654808044, 1.297240972518921, -0.11426068842411041, -1.0755424499511719, 0.6877533793449402, -0.34467780590057373, -0.000665910542011261, 1.7459113597869873, 0.020695315673947334, -0.8443685173988342, 0.16429965198040009, -0.6018189191818237, 1.9514474868774414, 1.7837119102478027, 1.295194149017334, -0.1764642596244812, -1.0031224489212036, 0.7099156975746155, -0.40404513478279114, -0.4357534646987915, 0.7084951400756836, 0.38663798570632935, -0.23744866251945496, -1.5119589567184448, 0.7241952419281006, 1.2661893367767334, -0.9493348002433777, -0.8553740382194519, 0.09009529650211334, -0.6912760734558105, 1.0400433540344238, 0.7608553171157837, 0.4054555594921112, 0.3191545605659485, 1.7665001153945923, 0.7045474052429199, -0.45110395550727844, 0.6020524501800537, 0.5212060213088989, -0.16839933395385742, -2.123502016067505, -1.3058644533157349, 0.1696402132511139, -0.374342143535614, -1.5843967199325562, 1.3658087253570557, -1.2102880477905273, -0.8714898228645325, 0.40767011046409607, 0.16124729812145233, 1.4110511541366577, 0.2886454463005066, 1.5902196168899536, 2.059934616088867, 0.8347526788711548, 0.40252619981765747, 1.3285046815872192, -0.24167965352535248, -0.37306860089302063, 1.68339204788208, -0.39930135011672974, 0.5839259624481201, 1.1649518013000488, -0.3732362389564514, -1.1123242378234863, -0.8869630694389343, -1.3434507846832275, -0.8074563145637512, 1.17200767993927, 0.049125827848911285, -1.1889711618423462, 0.37919119000434875, 1.688356637954712, 0.03159884363412857, -0.386337548494339, 0.7312881350517273, 0.4342856705188751, -0.8477815389633179, -0.11236545443534851, -0.9678179621696472, 0.6018601059913635, -0.24607959389686584, -0.26974791288375854, 0.417162150144577, 0.4432375431060791, 1.369797706604004, 0.13446113467216492, 0.14046645164489746, 1.0982470512390137, -1.3159476518630981, 1.4525662660598755, -0.7552419900894165, 0.23311962187290192, -2.3024322986602783, 1.3383735418319702, -0.7310998439788818, 2.049088954925537, -2.7355868816375732, 0.4451718330383301, -0.5158869028091431, -0.38042160868644714, 0.2802779972553253, -0.3023027181625366, 0.1942964792251587, -0.1255173236131668, -1.1637181043624878, 0.020222477614879608, -0.6858874559402466, 0.505608081817627, 1.1018826961517334, 1.4384124279022217, -1.1047946214675903, -0.2377566248178482, -1.7658027410507202, -0.15052728354930878, -0.6484898328781128, 0.16034989058971405, -1.9981887340545654, -0.17149405181407928, -1.927422285079956, -2.49750018119812, -1.2484264373779297, -0.6829439997673035, 1.0925538539886475, -0.03413943946361542, -0.8862951397895813, 1.3374382257461548, -0.31993669271469116, -1.829160451889038, 1.1524111032485962, -2.127626657485962 ]
https://github.com/huggingface/datasets/issues/5597
in-place dataset update
Thank you for your detailed reply. > In your case the old dataset is garbage collected pretty quickly so you won't have memory issues. I understand this, but it still copies the old dataset to create the new one, is this correct? So maybe it is not memory-consuming, but time-consuming?
### Motivation For the circumstance that I creat an empty `Dataset` and keep appending new rows into it, I found that it leads to creating a new dataset at each call. It looks quite memory-consuming. I just wonder if there is any more efficient way to do this. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds = ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Feature request Call for in-place dataset update functions, that update the existing `Dataset` in place without creating a new copy. The interface is supposed to keep the same style as PyTorch, such as the in-place version of a `function` is named `function_`. For example, the in-pace version of `add_item`, i.e., `add_item_`, immediately updates the `Dataset`. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds.add_item_({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Related Functions * `.map` * `.filter` * `.add_item`
276
50
in-place dataset update ### Motivation For the circumstance that I creat an empty `Dataset` and keep appending new rows into it, I found that it leads to creating a new dataset at each call. It looks quite memory-consuming. I just wonder if there is any more efficient way to do this. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds = ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Feature request Call for in-place dataset update functions, that update the existing `Dataset` in place without creating a new copy. The interface is supposed to keep the same style as PyTorch, such as the in-place version of a `function` is named `function_`. For example, the in-pace version of `add_item`, i.e., `add_item_`, immediately updates the `Dataset`. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds.add_item_({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Related Functions * `.map` * `.filter` * `.add_item` Thank you for your detailed reply. > In your case the old dataset is garbage collected pretty quickly so you won't have memory issues. I understand this, but it still copies the old dataset to create the new one, is this correct? So maybe it is not memory-consuming, but time-consuming?
[ -1.1633410453796387, -0.9036456942558289, -0.7431443333625793, 1.5265822410583496, -0.2008284479379654, -1.3133312463760376, 0.15216724574565887, -1.095810055732727, 1.8013856410980225, -0.7358940839767456, 0.2409515380859375, -1.7724872827529907, -0.0718618705868721, -0.6564115285873413, -0.796694815158844, -0.9046146869659424, -0.3655572533607483, -0.8420441746711731, 0.942502498626709, 2.4068100452423096, 1.175197958946228, -1.3941903114318848, 2.569911241531372, 0.7442585825920105, -0.22682109475135803, -0.9608440399169922, 0.6162456274032593, -0.1385965794324875, -1.2690832614898682, -0.39841189980506897, -0.9357030391693115, -0.053267449140548706, -0.6909814476966858, -0.5541093945503235, -0.0911237895488739, 0.41636788845062256, -0.3038827180862427, -0.3987143039703369, -0.453340619802475, -0.860107958316803, 0.3139338791370392, -0.358545184135437, 0.9495086669921875, -0.24289196729660034, 1.554895281791687, -0.5267714262008667, 0.4547542631626129, 0.6398128271102905, 1.3104298114776611, 0.23710015416145325, -0.0632462352514267, 0.3257383406162262, 0.3457963764667511, -0.03600475564599037, 0.459548681974411, 1.118740200996399, 0.7031240463256836, 0.4367237389087677, 0.8446539640426636, -2.3660738468170166, 1.2181280851364136, -1.052200198173523, 0.3964328169822693, 1.2935799360275269, -0.846832811832428, 0.40131765604019165, -1.7235175371170044, 0.0001893211156129837, 0.7292153239250183, -2.280251979827881, 0.3071177005767822, -1.4240878820419312, -0.44899651408195496, 0.8589710593223572, 0.44379520416259766, -1.202864170074463, 0.001790025271475315, -0.35796085000038147, 0.9877412915229797, 0.4204097390174866, 1.071823000907898, -1.8627254962921143, 0.03652522712945938, -0.3549680709838867, 0.2213633805513382, -1.1440303325653076, -1.5344287157058716, 0.686741292476654, 0.6930073499679565, 0.6562331914901733, -0.1960131824016571, 0.9474531412124634, -0.9703130125999451, 0.5037440061569214, -0.9025741219520569, -1.816787600517273, -1.2991942167282104, -2.1380560398101807, -2.2262187004089355, 0.568503737449646, -0.5940054059028625, -0.4733847677707672, 2.056708574295044, -0.9825361371040344, -1.817875623703003, 1.1304439306259155, 0.37429407238960266, 0.007096519693732262, 2.430645227432251, 0.19501769542694092, -0.7124138474464417, 0.5141865015029907, -0.7935708165168762, 0.7357547879219055, -0.3523164987564087, 1.3544867038726807, 0.3617364466190338, -0.9387882947921753, 1.7074819803237915, -0.46195417642593384, 0.5663231015205383, -0.6673734784126282, -0.4513654410839081, -0.667148232460022, 0.24002328515052795, 1.8714216947555542, -0.2141231894493103, 1.5628732442855835, -0.295995831489563, -1.5361534357070923, -1.5793272256851196, 0.9306941628456116, 0.44652339816093445, -0.9199274778366089, 0.2296108901500702, -0.48917990922927856, 0.206825390458107, -0.10759994387626648, 1.2299847602844238, 1.3789736032485962, 0.6820762753486633, -0.3254360258579254, -0.9275084137916565, 0.18059667944908142, -0.04554041475057602, -0.8054568767547607, -1.768833875656128, -0.1838073432445526, 0.04018095135688782, 0.7512776851654053, -1.0720535516738892, 1.7435499429702759, 0.8003809452056885, 1.9931912422180176, 1.0260432958602905, -0.44094380736351013, 1.4177438020706177, 0.16966702044010162, 1.8026092052459717, -0.638420820236206, 0.6959944367408752, -0.48006102442741394, -1.0266728401184082, 1.001150131225586, -0.3407159447669983, -1.8772152662277222, -0.5257898569107056, -0.841597855091095, -0.1847306787967682, -0.8675096035003662, 0.9811856150627136, -0.27654051780700684, -1.3535386323928833, 0.44081947207450867, -0.8737158179283142, 0.09982167929410934, -1.2036864757537842, 0.3425968289375305, 0.7132139205932617, -0.49664726853370667, 0.060019634664058685, -0.366039514541626, -1.3600736856460571, -0.4813705384731293, 0.27902674674987793, 1.8487070798873901, -0.6687753796577454, 0.9244255423545837, 0.9966808557510376, -0.5971861481666565, -0.10984133183956146, 0.3007166087627411, -0.13376609981060028, 0.7946872115135193, -1.0580326318740845, -0.41718554496765137, 1.1970494985580444, -0.19234362244606018, -0.515932559967041, 1.4349180459976196, 0.5764004588127136, -0.9722514748573303, -0.15349385142326355, -0.11993710696697235, -0.7238003015518188, 0.0505613312125206, -1.7373857498168945, -0.0006047850474715233, 0.5178956389427185, -1.6236991882324219, -0.5873857736587524, -0.18173618614673615, 1.2342898845672607, -0.04635555297136307, 1.2550748586654663, -0.2743318974971771, -0.02437649667263031, -0.3977717161178589, -0.3518791198730469, 0.038419775664806366, -0.2873240113258362, -0.49889132380485535, 0.13983185589313507, -0.8245043158531189, 0.32655200362205505, 1.46818208694458, 0.2014445960521698, 0.022096848115324974, 0.4699977934360504, 1.0881789922714233, 0.4094082713127136, -0.07502377033233643, -0.8422465324401855, -1.5315850973129272, 2.03275728225708, -1.5627906322479248, 1.9730132818222046, 0.5796408653259277, -0.012755468487739563, -1.7349510192871094, -2.0337295532226562, 1.39698326587677, 1.1330958604812622, 2.2622644901275635, 0.6785923838615417, 0.39903566241264343, -0.7946544885635376, -0.5810433030128479, 0.20160023868083954, -0.8621768951416016, -0.8107383847236633, 0.1715899109840393, 2.4447667598724365, 1.6780116558074951, -0.5293177366256714, -0.126492440700531, -0.962907612323761, 1.4661918878555298, -0.2014956921339035, 0.284868985414505, 1.9211945533752441, -0.32218819856643677, -1.1809437274932861, 1.3589534759521484, -2.350282669067383, 0.07424930483102798, 2.008411169052124, 0.13775207102298737, 0.19242067635059357, -1.277011752128601, -0.7469483017921448, -0.2907909154891968, -0.4512385129928589, -1.3059790134429932, 0.5234977006912231, -0.2454369217157364, -0.70625239610672, -1.491692066192627, 0.25566792488098145, -0.9270732402801514, -1.6607226133346558, 0.07507991045713425, 1.89161217212677, 2.1180975437164307, -0.8406620621681213, 1.5954804420471191, -0.4317642152309418, 0.16587194800376892, 1.1651763916015625, 1.2043261528015137, 3.0902271270751953, 1.9687316417694092, -1.282555341720581, 0.6827024817466736, -0.08295845240354538, -0.5349130034446716, 1.3364566564559937, -1.2350094318389893, 1.117673397064209, -0.25471723079681396, -1.3143718242645264, -1.2181977033615112, 0.898124635219574, 0.3748646676540375, 0.02434440143406391, -0.5599850416183472, 1.2056477069854736, -0.16628983616828918, 1.3223600387573242, 0.6092967987060547, -0.3191627264022827, 0.6093240976333618, -0.4162355363368988, -0.47974756360054016, 1.6064996719360352, 0.17782102525234222, -1.3601582050323486, -2.3775625228881836, -0.21476323902606964, -0.865472137928009, 0.12170213460922241, -0.6531479358673096, -1.08407723903656, 1.6569703817367554, 0.32133948802948, -1.1291455030441284, -0.2642997205257416, -0.3554171621799469, -0.4282795786857605, 2.6240501403808594, -1.3901911973953247, -0.34317049384117126, -1.0737351179122925, -0.6218709349632263, 1.650028944015503, -1.2101210355758667, -0.20230546593666077, -1.0807875394821167, -0.44991984963417053, -1.3353909254074097, -0.48015880584716797, -0.011818448081612587, -0.930982232093811, 0.821280837059021, 0.27001217007637024, -1.272598147392273, -0.26088961958885193, -0.909112811088562, 0.8513720035552979, -0.2416449934244156, 0.30477195978164673, 1.987374186515808, 0.34435948729515076, -0.35748913884162903, 0.7025773525238037, 1.1054461002349854, 0.6064020395278931, -0.6799162030220032, 0.13763883709907532, -0.5966774225234985, 0.5459113121032715, -1.3980330228805542, 0.10274018347263336, -2.827158212661743, 0.6830708980560303, 0.02983938716351986, 0.04192494601011276, 0.020664874464273453, -1.4710710048675537, 1.0243033170700073, 2.6314749717712402, -1.2298874855041504, 0.5052105188369751, 0.24982306361198425, 1.2996312379837036, -1.6433265209197998, 0.18170112371444702, -0.49490612745285034, 2.3654041290283203, 0.1002955287694931, 1.2047520875930786, -0.2935667037963867, -2.5046420097351074, 0.5181339383125305, -1.142472267150879, -1.1349663734436035, 0.7188838720321655, -0.9250674843788147, 0.023078853264451027, -1.5450372695922852, -0.144069105386734, -0.8718053102493286, -1.0442297458648682, 0.837792694568634, 0.03307966887950897, 0.43653932213783264, -0.7351744174957275, 0.3817366361618042, -2.1902241706848145, -1.33918035030365, -0.12610089778900146, -0.9421052932739258, 0.5706343054771423, -0.2962164282798767, 0.7470831274986267, -0.21934235095977783, -0.07815199345350266, 0.3698229193687439, 1.434535026550293, 3.4886507987976074, 0.15415911376476288, 0.27182233333587646, -0.2592090368270874, -0.9155255556106567, 1.383830189704895, 0.9303475022315979, -0.11088230460882187, -0.5074429512023926, -1.0754179954528809, 1.401511311531067, 2.0178682804107666, 0.8365529775619507, 0.07747908681631088, -0.8619548082351685, -0.582123875617981, -0.00020057708024978638, 0.25485411286354065, 0.4514564871788025, 0.8343128561973572, 0.15419568121433258, 0.11609573662281036, 1.3060411214828491, 1.1421481370925903, -0.23649688065052032, 0.5485059022903442, -0.8941948413848877, -0.4947487711906433, 0.6631425023078918, 0.3439693748950958, -0.07192046195268631, 0.3250432014465332, -0.9847366213798523, -0.22078809142112732, -0.3089512884616852, -0.7639086842536926, -0.7019677758216858, -0.34351739287376404, -0.1811702847480774, 1.5913411378860474, 0.05137915909290314, -0.6403290629386902, 0.028472179546952248, -0.7068265676498413, -0.12445138394832611, -1.0655736923217773, 0.19158241152763367, -0.2642805278301239, -0.07995074987411499, -0.11019212007522583, 1.5993248224258423, -0.8115530014038086, -1.9570809602737427, 0.17285628616809845, 0.4157520830631256, -0.4500585198402405, 0.3121909499168396, 1.775009274482727, 0.6029412150382996, 1.499828815460205, 1.375792384147644, 1.0622036457061768, -0.7104249000549316, -1.2118949890136719, 0.6274212002754211, 0.895522952079773, -1.281302571296692, 0.9372607469558716, 0.03753136098384857, -0.6294682025909424, 0.4662564694881439, 1.3074077367782593, 0.5764811038970947, -2.0535783767700195, 0.8217048048973083, -0.9986048936843872, 0.912351667881012, 0.7276402711868286, 0.8934295177459717, 0.2725417912006378, 0.7701202630996704, -1.257222294807434, -1.0715075731277466, -0.8382012248039246, -0.6955117583274841, 1.8037656545639038, -0.2373870611190796, 0.5719723701477051, -0.2874026894569397, -1.3212170600891113, -0.1601042002439499, 0.7310295701026917, 0.40867307782173157, -0.5191757082939148, 0.729309618473053, -0.5741673111915588, -1.1135393381118774, -1.2143441438674927, -0.5093718767166138, -0.9869670867919922, -1.0024088621139526, 1.006179928779602, 0.8313726186752319, 0.3749566376209259, 1.8750460147857666, 0.5267435908317566, 0.055517733097076416, -2.4789175987243652, 0.8778976798057556, 0.3458581864833832, -0.20097915828227997, 0.8061709403991699, 0.5308167338371277, 1.1450222730636597, -0.05366981029510498, 0.6462955474853516, -2.322214126586914, 2.1601524353027344, -0.1880413442850113, 0.7636862397193909, -0.018672849982976913, -0.0879412516951561, 0.8777185082435608, 0.4873121678829193, 0.46795687079429626, -1.0310893058776855, 0.7103068828582764, -0.6522592902183533, 1.2474035024642944, 0.9053584933280945, -0.821039617061615, -0.003600139170885086, 1.370116949081421, 0.40721097588539124, -0.6787885427474976, -0.9923776388168335, -0.814932107925415, 0.8740023970603943, 1.6734012365341187, -0.11562608927488327, -0.027237780392169952, 0.7289699912071228, 0.7262728214263916, -1.2872240543365479, 0.03139762580394745, -0.7001059055328369, -0.6518518328666687, 1.7727670669555664, 1.9152673482894897, -0.18567167222499847, -0.0321679525077343, -0.788314700126648, -1.3586972951889038, 0.8183103203773499, 0.04772193729877472, -0.08480373024940491, 0.6609060764312744, -0.608292281627655, 1.050246238708496, 0.7184433937072754, 0.9369152784347534, 0.2641400694847107, 0.39500734210014343, 0.5252899527549744, -0.3717460334300995, -1.028267741203308, -0.26473113894462585, -1.2012499570846558, -2.449289083480835, 0.5365034937858582, -0.2741681635379791, -1.3116968870162964, -0.08077990263700485, -0.9578189253807068, 1.0221831798553467, -0.6702143549919128, -0.9910823106765747, -1.3239027261734009, 0.256788969039917, 0.012117207050323486, 0.9925903081893921, -1.5565930604934692, 0.009588653221726418, 1.1477077007293701, 0.97151118516922, -0.8198533654212952, 1.0584673881530762, 0.37378010153770447, 1.1295104026794434, 0.8906049728393555, -0.4689086973667145, 0.5148915648460388, -0.045357346534729004, -1.2386895418167114, 0.5355502367019653, 1.1684441566467285, 0.24061721563339233, 1.3850774765014648, -0.5295791625976562, -0.22825327515602112, 0.4030843675136566, -0.4088139832019806, -0.3242826759815216, -0.5372673273086548, 0.5834793448448181, 0.08168187737464905, -0.8902256488800049, -0.08113592118024826, 0.02768528275191784, -0.17077262699604034, 0.2404225766658783, -1.505276083946228, -0.04750046133995056, -0.4462854862213135, -0.41860514879226685, -1.2345904111862183, -0.232101708650589, 1.558298110961914, -0.6844605207443237, -0.15612028539180756, 0.5519310235977173, 0.2854163944721222, 0.4072314500808716, 0.6313130259513855, -0.5831303000450134, -0.3887311518192291, -0.3268437385559082, -0.4479895234107971, 0.31072402000427246, 1.280416488647461, -0.10986983776092529, -1.0782232284545898, 0.6956650614738464, -0.33409830927848816, 0.010248681530356407, 1.74799644947052, 0.026343466714024544, -0.8385357856750488, 0.1550045609474182, -0.5796111226081848, 1.9451600313186646, 1.779341459274292, 1.2970244884490967, -0.18310636281967163, -1.002724289894104, 0.7148266434669495, -0.3995470404624939, -0.44191306829452515, 0.7013863921165466, 0.3834303915500641, -0.2304418683052063, -1.517568826675415, 0.7220016121864319, 1.2497762441635132, -0.9453485012054443, -0.8558531999588013, 0.09149380028247833, -0.6756442785263062, 1.029596209526062, 0.7770674228668213, 0.4188130497932434, 0.3215803802013397, 1.7713032960891724, 0.6973222494125366, -0.45117613673210144, 0.5963185429573059, 0.5087677240371704, -0.1643894761800766, -2.130023241043091, -1.3100749254226685, 0.1615760177373886, -0.3829939663410187, -1.5934702157974243, 1.3630108833312988, -1.208984375, -0.8762242794036865, 0.39598169922828674, 0.1548035442829132, 1.4161807298660278, 0.28194811940193176, 1.601694941520691, 2.057389497756958, 0.8329604864120483, 0.4095388650894165, 1.3368326425552368, -0.2313915491104126, -0.37906602025032043, 1.6943403482437134, -0.40752115845680237, 0.5994265675544739, 1.1736857891082764, -0.36944547295570374, -1.1085139513015747, -0.880901038646698, -1.3359016180038452, -0.8076420426368713, 1.1690728664398193, 0.04107813537120819, -1.1851232051849365, 0.3732059597969055, 1.6860973834991455, 0.028848698362708092, -0.3912293016910553, 0.7234267592430115, 0.42895567417144775, -0.8452456593513489, -0.1103869304060936, -0.9650371074676514, 0.6044050455093384, -0.25210851430892944, -0.2758696377277374, 0.4217946529388428, 0.4341356158256531, 1.3824101686477661, 0.12592896819114685, 0.14233797788619995, 1.1025725603103638, -1.3154155015945435, 1.4552115201950073, -0.7392386198043823, 0.22936469316482544, -2.301210403442383, 1.3367793560028076, -0.7237123847007751, 2.035247802734375, -2.746626138687134, 0.44214364886283875, -0.512102484703064, -0.384321928024292, 0.2851940095424652, -0.2939563989639282, 0.20070180296897888, -0.13983739912509918, -1.1642813682556152, 0.02448395825922489, -0.6759254932403564, 0.5043731927871704, 1.0936840772628784, 1.4324768781661987, -1.107445240020752, -0.22574904561042786, -1.7760077714920044, -0.146443709731102, -0.6658231616020203, 0.15554547309875488, -2.011561393737793, -0.17723244428634644, -1.9219170808792114, -2.5009689331054688, -1.2527565956115723, -0.6897914409637451, 1.084058165550232, -0.04346958547830582, -0.8893541693687439, 1.3437365293502808, -0.32691332697868347, -1.833155632019043, 1.1447151899337769, -2.123811721801758 ]
https://github.com/huggingface/datasets/issues/5597
in-place dataset update
Indeed, and because of that it is more efficient to add multiple rows at once instead of one by one, using `concatenate_datasets` for example.
### Motivation For the circumstance that I creat an empty `Dataset` and keep appending new rows into it, I found that it leads to creating a new dataset at each call. It looks quite memory-consuming. I just wonder if there is any more efficient way to do this. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds = ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Feature request Call for in-place dataset update functions, that update the existing `Dataset` in place without creating a new copy. The interface is supposed to keep the same style as PyTorch, such as the in-place version of a `function` is named `function_`. For example, the in-pace version of `add_item`, i.e., `add_item_`, immediately updates the `Dataset`. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds.add_item_({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Related Functions * `.map` * `.filter` * `.add_item`
276
24
in-place dataset update ### Motivation For the circumstance that I creat an empty `Dataset` and keep appending new rows into it, I found that it leads to creating a new dataset at each call. It looks quite memory-consuming. I just wonder if there is any more efficient way to do this. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds = ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Feature request Call for in-place dataset update functions, that update the existing `Dataset` in place without creating a new copy. The interface is supposed to keep the same style as PyTorch, such as the in-place version of a `function` is named `function_`. For example, the in-pace version of `add_item`, i.e., `add_item_`, immediately updates the `Dataset`. ```python from datasets import Dataset ds = Dataset.from_list([]) ds.add_item({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: [], >>> num_rows: 0 >>> }) ds.add_item_({'a': [1, 2, 3], 'b': 4}) print(ds) >>> Dataset({ >>> features: ['a', 'b'], >>> num_rows: 1 >>> }) ``` ### Related Functions * `.map` * `.filter` * `.add_item` Indeed, and because of that it is more efficient to add multiple rows at once instead of one by one, using `concatenate_datasets` for example.
[ -1.1636685132980347, -0.9097646474838257, -0.754844069480896, 1.5443434715270996, -0.1957906037569046, -1.3152470588684082, 0.1540081799030304, -1.0803899765014648, 1.8026745319366455, -0.7383818030357361, 0.2480280101299286, -1.7666202783584595, -0.06874053180217743, -0.6501613259315491, -0.7947360277175903, -0.8948507308959961, -0.3631370961666107, -0.8533291816711426, 0.9471455812454224, 2.415069103240967, 1.1790436506271362, -1.407857894897461, 2.5632400512695312, 0.7450188398361206, -0.22097916901111603, -0.954818606376648, 0.6117841005325317, -0.12877467274665833, -1.2661722898483276, -0.4122955799102783, -0.9192677736282349, -0.06174531951546669, -0.6841771006584167, -0.5602166056632996, -0.09575110673904419, 0.4113609790802002, -0.29931148886680603, -0.396418035030365, -0.4534396827220917, -0.8577815890312195, 0.32437482476234436, -0.3707088828086853, 0.9538133144378662, -0.23768939077854156, 1.568826675415039, -0.5256448984146118, 0.4439411461353302, 0.6344478130340576, 1.3216421604156494, 0.240753173828125, -0.0634169727563858, 0.3219633996486664, 0.35198265314102173, -0.04123527929186821, 0.461105078458786, 1.12199068069458, 0.7170885801315308, 0.43829306960105896, 0.8490560054779053, -2.3678102493286133, 1.226670503616333, -1.0565905570983887, 0.39928746223449707, 1.294691801071167, -0.8417354822158813, 0.3967691957950592, -1.7156751155853271, -0.0031173783354461193, 0.719490647315979, -2.27900767326355, 0.3133443295955658, -1.4063891172409058, -0.44133761525154114, 0.8549187779426575, 0.4453316330909729, -1.20634925365448, -0.0024177562445402145, -0.3628230392932892, 0.9781445264816284, 0.41902944445610046, 1.071567177772522, -1.8643239736557007, 0.034486863762140274, -0.35501256585121155, 0.23037000000476837, -1.1428481340408325, -1.532668113708496, 0.6714674234390259, 0.6813365817070007, 0.660274088382721, -0.19425992667675018, 0.9488905668258667, -0.9690481424331665, 0.4999684989452362, -0.9082369804382324, -1.79988431930542, -1.315617561340332, -2.1343159675598145, -2.2324066162109375, 0.5661703944206238, -0.5910959243774414, -0.47495847940444946, 2.0371367931365967, -0.9749209880828857, -1.8114806413650513, 1.1361627578735352, 0.377259761095047, 0.0010795015841722488, 2.4264421463012695, 0.18956294655799866, -0.7164279222488403, 0.5196651220321655, -0.7859879732131958, 0.7367929220199585, -0.3639717400074005, 1.3512933254241943, 0.3652573227882385, -0.9498762488365173, 1.6960139274597168, -0.4617672264575958, 0.5774826407432556, -0.6643479466438293, -0.44905439019203186, -0.6668210625648499, 0.22592779994010925, 1.8584775924682617, -0.2088313102722168, 1.5606348514556885, -0.29286864399909973, -1.5290439128875732, -1.5890297889709473, 0.94825679063797, 0.4395182132720947, -0.9137988686561584, 0.23017805814743042, -0.4936678111553192, 0.20575593411922455, -0.10777939856052399, 1.2280957698822021, 1.3731681108474731, 0.6787047386169434, -0.31407442688941956, -0.9254425168037415, 0.17942850291728973, -0.05858585610985756, -0.7977490425109863, -1.7635486125946045, -0.19527117908000946, 0.03417317941784859, 0.7404788136482239, -1.0722154378890991, 1.7446060180664062, 0.7969125509262085, 1.9973677396774292, 1.0246574878692627, -0.4367206394672394, 1.4185880422592163, 0.15454605221748352, 1.8029379844665527, -0.6286943554878235, 0.6946545839309692, -0.4888002872467041, -1.0326132774353027, 0.9987618923187256, -0.352277934551239, -1.8944200277328491, -0.5403212904930115, -0.8439854383468628, -0.18420518934726715, -0.8658579587936401, 0.98473060131073, -0.2778075933456421, -1.3491840362548828, 0.4271884262561798, -0.8666771650314331, 0.10260020196437836, -1.193672776222229, 0.35066118836402893, 0.71684730052948, -0.5013566613197327, 0.06001685932278633, -0.3555935025215149, -1.355495572090149, -0.47485992312431335, 0.2838198244571686, 1.8630322217941284, -0.6766940951347351, 0.9168029427528381, 1.0007578134536743, -0.5973132848739624, -0.1041448563337326, 0.3004560172557831, -0.12936924397945404, 0.7910327911376953, -1.0474460124969482, -0.41272205114364624, 1.2046552896499634, -0.19211260974407196, -0.5184906721115112, 1.4400445222854614, 0.5758187770843506, -0.9646587371826172, -0.1489185392856598, -0.09795570373535156, -0.7204189300537109, 0.04926149547100067, -1.724963665008545, 0.008197657763957977, 0.5135313868522644, -1.618857979774475, -0.5867279171943665, -0.1891256421804428, 1.229953408241272, -0.051523201167583466, 1.245431900024414, -0.2773279845714569, -0.026917118579149246, -0.39299502968788147, -0.3587505519390106, 0.038048166781663895, -0.29397842288017273, -0.5064883232116699, 0.1422974318265915, -0.8104914426803589, 0.3396069407463074, 1.4671930074691772, 0.20785927772521973, 0.017866218462586403, 0.4602307677268982, 1.0969364643096924, 0.42028123140335083, -0.06688745319843292, -0.8369647860527039, -1.5283727645874023, 2.035198450088501, -1.5631747245788574, 1.9813462495803833, 0.5958117246627808, -0.006000034511089325, -1.7183679342269897, -2.0290660858154297, 1.3935024738311768, 1.1355963945388794, 2.2631802558898926, 0.6815134286880493, 0.3934937119483948, -0.8045258522033691, -0.5806202292442322, 0.19609670341014862, -0.8673906326293945, -0.8159260749816895, 0.16166822612285614, 2.451098680496216, 1.6844295263290405, -0.5231843590736389, -0.11587350070476532, -0.9767893552780151, 1.4752986431121826, -0.20907355844974518, 0.27982595562934875, 1.9341975450515747, -0.3153360188007355, -1.1762843132019043, 1.3723324537277222, -2.356661319732666, 0.0770464688539505, 2.0104217529296875, 0.16058342158794403, 0.18581221997737885, -1.2786909341812134, -0.7426707744598389, -0.2844402492046356, -0.45322826504707336, -1.3049057722091675, 0.525948166847229, -0.2441321760416031, -0.7019825577735901, -1.4894136190414429, 0.2612340748310089, -0.9296813011169434, -1.6527544260025024, 0.07912510633468628, 1.8778921365737915, 2.1188406944274902, -0.8304529190063477, 1.5890368223190308, -0.4304814636707306, 0.16259053349494934, 1.1693170070648193, 1.2063672542572021, 3.0888876914978027, 1.975740671157837, -1.2742985486984253, 0.6775091886520386, -0.09509925544261932, -0.5400681495666504, 1.328194499015808, -1.2382893562316895, 1.121434211730957, -0.25146716833114624, -1.31175696849823, -1.2239413261413574, 0.8888492584228516, 0.38360491394996643, 0.03313485160470009, -0.56052565574646, 1.2057546377182007, -0.16895635426044464, 1.3155301809310913, 0.6151503920555115, -0.3084806203842163, 0.6006299257278442, -0.41541919112205505, -0.482615202665329, 1.599734902381897, 0.18377330899238586, -1.3647427558898926, -2.3824472427368164, -0.21917559206485748, -0.8651147484779358, 0.11950968205928802, -0.6494705080986023, -1.0811899900436401, 1.6645253896713257, 0.3246322572231293, -1.1329028606414795, -0.2544470429420471, -0.35057908296585083, -0.4378630220890045, 2.636122703552246, -1.3970179557800293, -0.34810006618499756, -1.0770342350006104, -0.6300082802772522, 1.6518564224243164, -1.2170069217681885, -0.20683901011943817, -1.0800074338912964, -0.44977378845214844, -1.3298239707946777, -0.47937536239624023, -0.020195921882987022, -0.9374240040779114, 0.825463056564331, 0.27625134587287903, -1.2714002132415771, -0.26803141832351685, -0.9071725010871887, 0.8394266366958618, -0.24127598106861115, 0.3061119019985199, 1.9904197454452515, 0.35821884870529175, -0.3562732934951782, 0.7096564769744873, 1.1234662532806396, 0.6029402017593384, -0.6912108063697815, 0.14379823207855225, -0.5852734446525574, 0.5400120615959167, -1.4034457206726074, 0.11631374061107635, -2.8179590702056885, 0.6795440912246704, 0.029612474143505096, 0.03197696432471275, 0.027598083019256592, -1.4580776691436768, 1.0280749797821045, 2.6273410320281982, -1.227144479751587, 0.5059592723846436, 0.23884686827659607, 1.3009631633758545, -1.6415653228759766, 0.17411018908023834, -0.4968067407608032, 2.3603122234344482, 0.10526646673679352, 1.2005387544631958, -0.29414960741996765, -2.5169479846954346, 0.5177401304244995, -1.153359293937683, -1.132758617401123, 0.7217290997505188, -0.9269728064537048, 0.019170358777046204, -1.5408310890197754, -0.1482602059841156, -0.8619197607040405, -1.039413571357727, 0.8313940167427063, 0.031722541898489, 0.43541640043258667, -0.733749270439148, 0.3879773020744324, -2.1914522647857666, -1.3403615951538086, -0.13196676969528198, -0.9400847554206848, 0.5722244381904602, -0.294924259185791, 0.7454224824905396, -0.2242397964000702, -0.07764223217964172, 0.37008729577064514, 1.4527510404586792, 3.4800896644592285, 0.158610001206398, 0.2868904769420624, -0.2610425651073456, -0.9154286980628967, 1.3821536302566528, 0.9354165196418762, -0.10713116824626923, -0.504770815372467, -1.0775208473205566, 1.4074960947036743, 2.016951084136963, 0.8482447266578674, 0.05790017172694206, -0.8646520376205444, -0.5888907313346863, -0.006757678464055061, 0.25351184606552124, 0.45255008339881897, 0.8345782160758972, 0.16016098856925964, 0.11069080233573914, 1.300176739692688, 1.1393334865570068, -0.23990938067436218, 0.5450830459594727, -0.8896839022636414, -0.49019625782966614, 0.6569010019302368, 0.34122100472450256, -0.07903474569320679, 0.34436389803886414, -0.9937849640846252, -0.21496205031871796, -0.3119753897190094, -0.7693104147911072, -0.7017461061477661, -0.3564647436141968, -0.18527446687221527, 1.6037019491195679, 0.050309013575315475, -0.6431991457939148, 0.03268791735172272, -0.7057971358299255, -0.13111670315265656, -1.063268780708313, 0.18890857696533203, -0.25810709595680237, -0.08347718417644501, -0.11045666038990021, 1.606178879737854, -0.810330331325531, -1.966808557510376, 0.1728518307209015, 0.4094003438949585, -0.4490213990211487, 0.30684399604797363, 1.7681025266647339, 0.597568929195404, 1.4908394813537598, 1.3758114576339722, 1.0660396814346313, -0.716117262840271, -1.2245640754699707, 0.6275460124015808, 0.9111014604568481, -1.2770472764968872, 0.941429615020752, 0.035724520683288574, -0.6335462927818298, 0.47114962339401245, 1.3118042945861816, 0.5836412906646729, -2.0524535179138184, 0.8141705393791199, -1.005174160003662, 0.9196279048919678, 0.7345045208930969, 0.8793063759803772, 0.28323227167129517, 0.758060097694397, -1.2653722763061523, -1.0748281478881836, -0.833748996257782, -0.7051557898521423, 1.7973215579986572, -0.24123132228851318, 0.5750392079353333, -0.2782038748264313, -1.3222744464874268, -0.16109015047550201, 0.7331616282463074, 0.40311986207962036, -0.5178260207176208, 0.729545533657074, -0.5711133480072021, -1.1167707443237305, -1.221961498260498, -0.5132070183753967, -0.9949377775192261, -1.004584550857544, 1.0182862281799316, 0.8235609531402588, 0.36802226305007935, 1.871649980545044, 0.5425378680229187, 0.05928643420338631, -2.4830658435821533, 0.8737726211547852, 0.3462778627872467, -0.20015080273151398, 0.7978095412254333, 0.5329850912094116, 1.1313446760177612, -0.044212762266397476, 0.65316241979599, -2.330240249633789, 2.163795232772827, -0.17935937643051147, 0.7544510960578918, -0.02011704444885254, -0.08094935119152069, 0.8805525302886963, 0.4907893240451813, 0.4550299644470215, -1.0435887575149536, 0.6940407156944275, -0.6501792669296265, 1.2416237592697144, 0.894229531288147, -0.8130260705947876, -0.007434302009642124, 1.38188898563385, 0.40017443895339966, -0.6771983504295349, -0.98390132188797, -0.8252092003822327, 0.8737822771072388, 1.684689998626709, -0.11104512214660645, -0.03056984394788742, 0.7316458821296692, 0.7246131300926208, -1.2818328142166138, 0.023382604122161865, -0.6927677989006042, -0.6540897488594055, 1.7722687721252441, 1.9158387184143066, -0.19009780883789062, -0.031789667904376984, -0.7853107452392578, -1.3561350107192993, 0.8142251372337341, 0.05167590454220772, -0.09289801120758057, 0.6538792252540588, -0.6114367842674255, 1.0468600988388062, 0.7302142381668091, 0.938482940196991, 0.2583777904510498, 0.3858402967453003, 0.5163471698760986, -0.37996816635131836, -1.0381486415863037, -0.2759782075881958, -1.2118172645568848, -2.4552931785583496, 0.5290601849555969, -0.2743723392486572, -1.3091861009597778, -0.0729396790266037, -0.9647310972213745, 1.0182725191116333, -0.6739547848701477, -0.9903268218040466, -1.3242846727371216, 0.2516416013240814, 0.0228387713432312, 0.9830445051193237, -1.5685064792633057, 0.001699327491223812, 1.1369768381118774, 0.9679646492004395, -0.821698784828186, 1.0603746175765991, 0.3659079670906067, 1.1259435415267944, 0.8856067061424255, -0.4796358644962311, 0.5201364159584045, -0.0360046923160553, -1.2424888610839844, 0.5387112498283386, 1.1730819940567017, 0.24770495295524597, 1.3948912620544434, -0.5309375524520874, -0.2266342043876648, 0.4040523171424866, -0.41768360137939453, -0.31486815214157104, -0.5522983074188232, 0.5763472318649292, 0.08419856429100037, -0.9032968282699585, -0.07374003529548645, 0.03048047050833702, -0.16740305721759796, 0.23792649805545807, -1.5039411783218384, -0.04408315196633339, -0.45087820291519165, -0.41832947731018066, -1.2357302904129028, -0.2284463495016098, 1.5662078857421875, -0.6740419268608093, -0.15591546893119812, 0.5550474524497986, 0.29189735651016235, 0.3975168764591217, 0.6341008543968201, -0.59071284532547, -0.389480859041214, -0.310791015625, -0.44580575823783875, 0.3098840117454529, 1.289089322090149, -0.12027062475681305, -1.079595685005188, 0.7087770104408264, -0.33482587337493896, 0.021112199872732162, 1.743385910987854, 0.023112278431653976, -0.8385472297668457, 0.15889960527420044, -0.5941872000694275, 1.953263759613037, 1.7743816375732422, 1.2882474660873413, -0.18913844227790833, -1.0011698007583618, 0.711537778377533, -0.397257536649704, -0.4362296760082245, 0.6986667513847351, 0.38013821840286255, -0.2423137128353119, -1.5112346410751343, 0.7186565399169922, 1.2634145021438599, -0.941133439540863, -0.8651859760284424, 0.08706070482730865, -0.6901284456253052, 1.0382708311080933, 0.7612134218215942, 0.4139862060546875, 0.3177929222583771, 1.763237714767456, 0.7048604488372803, -0.4465504288673401, 0.603770911693573, 0.5167179703712463, -0.1640702188014984, -2.127070188522339, -1.30357825756073, 0.1619701087474823, -0.38782617449760437, -1.5852187871932983, 1.35672926902771, -1.2004544734954834, -0.8735684752464294, 0.40540093183517456, 0.15264618396759033, 1.4173660278320312, 0.281471312046051, 1.5830036401748657, 2.057837963104248, 0.8373779654502869, 0.4080386459827423, 1.326366662979126, -0.23740068078041077, -0.38452401757240295, 1.697433590888977, -0.3995656371116638, 0.5776343941688538, 1.1651115417480469, -0.3648803234100342, -1.1141536235809326, -0.8763560056686401, -1.3390640020370483, -0.8170108795166016, 1.1739022731781006, 0.04980340972542763, -1.1859248876571655, 0.3621860146522522, 1.6840077638626099, 0.04220685362815857, -0.38368237018585205, 0.7160287499427795, 0.4330143332481384, -0.8441990613937378, -0.11057889461517334, -0.963227391242981, 0.6090772151947021, -0.24980969727039337, -0.27479714155197144, 0.4167306125164032, 0.437412828207016, 1.3636703491210938, 0.12639984488487244, 0.13493354618549347, 1.096983790397644, -1.3134742975234985, 1.4585546255111694, -0.7412336468696594, 0.2219657003879547, -2.294870138168335, 1.3398977518081665, -0.7217751145362854, 2.0429370403289795, -2.7305104732513428, 0.4378204047679901, -0.5247055292129517, -0.3787665069103241, 0.2868347465991974, -0.2991858124732971, 0.19419950246810913, -0.13543283939361572, -1.1590912342071533, 0.025615211576223373, -0.6810564994812012, 0.4892748296260834, 1.1011958122253418, 1.4353646039962769, -1.0990641117095947, -0.23854663968086243, -1.771984577178955, -0.14306281507015228, -0.6493987441062927, 0.15517602860927582, -2.014751672744751, -0.17748650908470154, -1.9216989278793335, -2.489769458770752, -1.257786750793457, -0.6895711421966553, 1.0949125289916992, -0.031039996072649956, -0.8766700625419617, 1.340465784072876, -0.31893306970596313, -1.833658218383789, 1.1445002555847168, -2.129803419113159 ]
https://github.com/huggingface/datasets/issues/5596
[TypeError: Couldn't cast array of type] Can only load a subset of the dataset
Apparently some JSON objects have a `"labels"` field. Since this field is not present in every object, you must specify all the fields types in the README.md EDIT: actually specifying the feature types doesn’t solve the issue, it raises an error because “labels” is missing in the data
### Describe the bug I'm trying to load this [dataset](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues) which consists of jsonl files and I get the following error: ``` casted_values = _c(array.values, feature[0]) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 1839, in wrapper return func(array, *args, **kwargs) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 2132, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type struct<type: string, action: string, datetime: timestamp[s], author: string, title: string, description: string, comment_id: int64, comment: string, labels: list<item: string>> to {'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)} ``` But I can succesfully load a subset of the dataset, for example this works: ```python ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train", data_files=[f"data/data-{x}.jsonl" for x in range(10)]) ``` and `ds.features` returns: ``` {'repo': Value(dtype='string', id=None), 'org': Value(dtype='string', id=None), 'issue_id': Value(dtype='int64', id=None), 'issue_number': Value(dtype='int64', id=None), 'pull_request': {'user_login': Value(dtype='string', id=None), 'repo': Value(dtype='string', id=None), 'number': Value(dtype='int64', id=None)}, 'events': [{'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)}]} ``` So I'm not sure if there's an issue with just some of the files. Grateful if you have any suggestions to fix the issue. Side note: I saw this related [issue](https://github.com/huggingface/datasets/issues/3637) and tried to write a loading script to have `events` as a `Sequence` and not `list` [here](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/blob/main/loading.py) (the script was renamed). It worked with a subset locally but doesn't for the remote dataset it can't find https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/resolve/main/data. ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train") ``` ### Expected behavior Load the entire dataset succesfully. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.12 - PyArrow version: 9.0.0 - Pandas version: 1.3.4
277
48
[TypeError: Couldn't cast array of type] Can only load a subset of the dataset ### Describe the bug I'm trying to load this [dataset](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues) which consists of jsonl files and I get the following error: ``` casted_values = _c(array.values, feature[0]) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 1839, in wrapper return func(array, *args, **kwargs) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 2132, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type struct<type: string, action: string, datetime: timestamp[s], author: string, title: string, description: string, comment_id: int64, comment: string, labels: list<item: string>> to {'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)} ``` But I can succesfully load a subset of the dataset, for example this works: ```python ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train", data_files=[f"data/data-{x}.jsonl" for x in range(10)]) ``` and `ds.features` returns: ``` {'repo': Value(dtype='string', id=None), 'org': Value(dtype='string', id=None), 'issue_id': Value(dtype='int64', id=None), 'issue_number': Value(dtype='int64', id=None), 'pull_request': {'user_login': Value(dtype='string', id=None), 'repo': Value(dtype='string', id=None), 'number': Value(dtype='int64', id=None)}, 'events': [{'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)}]} ``` So I'm not sure if there's an issue with just some of the files. Grateful if you have any suggestions to fix the issue. Side note: I saw this related [issue](https://github.com/huggingface/datasets/issues/3637) and tried to write a loading script to have `events` as a `Sequence` and not `list` [here](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/blob/main/loading.py) (the script was renamed). It worked with a subset locally but doesn't for the remote dataset it can't find https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/resolve/main/data. ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train") ``` ### Expected behavior Load the entire dataset succesfully. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.12 - PyArrow version: 9.0.0 - Pandas version: 1.3.4 Apparently some JSON objects have a `"labels"` field. Since this field is not present in every object, you must specify all the fields types in the README.md EDIT: actually specifying the feature types doesn’t solve the issue, it raises an error because “labels” is missing in the data
[ -1.2122060060501099, -1.0282363891601562, -0.7827973365783691, 1.5735336542129517, -0.23098750412464142, -1.0753028392791748, 0.11346933990716934, -1.002651333808899, 1.5741065740585327, -0.636767566204071, 0.25753581523895264, -1.6488094329833984, -0.03603915497660637, -0.7343500256538391, -0.742300271987915, -0.8227526545524597, -0.3101780414581299, -0.8385833501815796, 1.1237374544143677, 2.4967386722564697, 1.2538790702819824, -1.4814244508743286, 2.73787522315979, 0.8072730898857117, -0.12926873564720154, -1.0680471658706665, 0.5579058527946472, -0.04525879770517349, -1.1406198740005493, -0.5026160478591919, -0.9109070897102356, -0.12060979008674622, -0.5945925712585449, -0.39450836181640625, -0.044775038957595825, 0.5352387428283691, -0.2288459837436676, -0.3847539722919464, -0.5850357413291931, -0.7766915559768677, 0.5048232078552246, -0.3390060067176819, 0.8562914729118347, -0.23474453389644623, 1.7582999467849731, -0.4547828137874603, 0.282131165266037, 0.64668208360672, 1.3107843399047852, 0.18507346510887146, 0.06764775514602661, 0.3540361523628235, 0.3500680923461914, -0.05263742431998253, 0.5903177857398987, 1.2156540155410767, 0.7513976693153381, 0.4256071150302887, 0.8574220538139343, -2.284727096557617, 1.2058911323547363, -1.092325210571289, 0.4264126121997833, 1.39757239818573, -0.9031715989112854, 0.4942794144153595, -1.7733021974563599, -0.06377769261598587, 0.6156299114227295, -2.150028705596924, 0.358317106962204, -1.2091070413589478, -0.4642809331417084, 0.8587070107460022, 0.3855578303337097, -1.2251864671707153, 0.19704246520996094, -0.429261177778244, 1.05569326877594, 0.30297914147377014, 1.0677870512008667, -1.7368005514144897, 0.08187317848205566, -0.24146145582199097, 0.16609734296798706, -1.2537976503372192, -1.5236968994140625, 0.4740281403064728, 0.5420891642570496, 0.6488239169120789, -0.16426274180412292, 1.0438101291656494, -1.1279186010360718, 0.6973124146461487, -1.0487172603607178, -1.6391741037368774, -1.42997407913208, -2.363760471343994, -2.2466745376586914, 0.7299225330352783, -0.4098156690597534, -0.49491026997566223, 2.0432240962982178, -0.8594892621040344, -1.7684667110443115, 1.1838963031768799, 0.4714664816856384, 0.01988503336906433, 2.4891209602355957, 0.20531781017780304, -0.7807452082633972, 0.5019235610961914, -0.8240495324134827, 0.7602313756942749, -0.37674906849861145, 1.4629844427108765, 0.4371362626552582, -0.9455709457397461, 1.641108512878418, -0.4346483647823334, 0.561886191368103, -0.6745400428771973, -0.40718701481819153, -0.7633283138275146, 0.33310210704803467, 1.8855457305908203, -0.20290444791316986, 1.3916120529174805, -0.35394927859306335, -1.5095877647399902, -1.495966911315918, 0.9712615013122559, 0.368362694978714, -0.9389597177505493, 0.2016955316066742, -0.421297162771225, 0.17835970222949982, -0.07739638537168503, 1.1769170761108398, 1.200714349746704, 0.619419276714325, -0.27413058280944824, -0.9009518623352051, 0.09009120613336563, -0.1998697817325592, -0.6981191039085388, -1.8137527704238892, -0.30667856335639954, 0.1546577513217926, 0.6650874614715576, -1.2706636190414429, 1.6253283023834229, 0.8944364786148071, 1.9375451803207397, 1.0171796083450317, -0.4933413565158844, 1.5293127298355103, 0.01720920205116272, 1.8366891145706177, -0.6599441170692444, 0.6467564702033997, -0.41646409034729004, -1.2124085426330566, 0.9251036047935486, -0.2897275686264038, -2.010979652404785, -0.7298134565353394, -0.7988556027412415, -0.24229943752288818, -0.8115634918212891, 0.9035559892654419, -0.41729915142059326, -1.4440360069274902, 0.23645299673080444, -0.8238680958747864, 0.2237466722726822, -1.1611733436584473, 0.3372473418712616, 0.718538761138916, -0.6077131032943726, 0.049674082547426224, -0.2980746030807495, -1.270888090133667, -0.5537102222442627, 0.4374123215675354, 1.868579387664795, -0.7268379330635071, 0.7493946552276611, 1.0516020059585571, -0.6386622786521912, 0.10368043929338455, 0.25994694232940674, -0.2929171919822693, 0.8179492354393005, -1.079426884651184, -0.7198783755302429, 1.1366102695465088, -0.17699548602104187, -0.6303921937942505, 1.3380457162857056, 0.8329285979270935, -1.0585713386535645, -0.3083159625530243, -0.19257719814777374, -0.8407480120658875, 0.07381495833396912, -1.5757317543029785, -0.14779895544052124, 0.482382595539093, -1.612621545791626, -0.49139881134033203, -0.19820325076580048, 1.3732435703277588, -0.14986582100391388, 1.3997689485549927, -0.32805630564689636, -0.08128735423088074, -0.22663255035877228, -0.3825688362121582, 0.25222140550613403, -0.22333009541034698, -0.5957381725311279, 0.10827308893203735, -0.8676844835281372, 0.3834254741668701, 1.4831405878067017, 0.366838663816452, 0.04538299888372421, 0.5326984524726868, 1.1736071109771729, 0.45350581407546997, 0.1348850131034851, -0.8832674622535706, -1.4604941606521606, 1.9798914194107056, -1.607507348060608, 1.9851733446121216, 0.7323346734046936, 0.034736230969429016, -1.7151519060134888, -1.8317928314208984, 1.4625180959701538, 1.171035647392273, 2.275785446166992, 0.6611819863319397, 0.3875599801540375, -0.9017025232315063, -0.6641965508460999, 0.19888079166412354, -0.9799522161483765, -0.7711190581321716, 0.2217542827129364, 2.501389741897583, 1.8822962045669556, -0.4974181354045868, -0.26914694905281067, -0.9028036594390869, 1.471985936164856, -0.27230730652809143, 0.22305350005626678, 2.078315496444702, -0.17523473501205444, -1.0261541604995728, 1.2200958728790283, -2.5419530868530273, 0.1810488998889923, 2.0244641304016113, 0.37279900908470154, 0.23128917813301086, -1.4061682224273682, -0.7284428477287292, -0.21478880941867828, -0.5358133316040039, -1.2447669506072998, 0.5006524324417114, -0.31226304173469543, -0.798682689666748, -1.4790256023406982, 0.19710403680801392, -1.1456342935562134, -1.6345436573028564, 0.2454686015844345, 1.9042109251022339, 2.1785857677459717, -0.8037198185920715, 1.6544814109802246, -0.2550070285797119, 0.19168809056282043, 1.2445601224899292, 1.284448504447937, 2.982455015182495, 1.8509756326675415, -1.2225704193115234, 0.5245431661605835, -0.1432974636554718, -0.49548038840293884, 1.0943554639816284, -1.1801915168762207, 1.1207845211029053, -0.12597593665122986, -1.167324185371399, -1.176998496055603, 0.9132130146026611, 0.49553218483924866, -0.033277787268161774, -0.5109545588493347, 1.1196292638778687, 0.04747651144862175, 1.2734429836273193, 0.692825973033905, -0.31885185837745667, 0.46628594398498535, -0.3943157196044922, -0.5014594793319702, 1.5897020101547241, 0.10168350487947464, -1.4770588874816895, -2.2572972774505615, -0.15689581632614136, -0.8405698537826538, -0.012649250216782093, -0.6267898678779602, -1.033220887184143, 1.6340358257293701, 0.2765895128250122, -1.1499459743499756, -0.17176812887191772, -0.3313494026660919, -0.5157503485679626, 2.6772429943084717, -1.322412371635437, -0.36612075567245483, -0.9381424784660339, -0.6018803119659424, 1.619401454925537, -1.0754789113998413, -0.1989152878522873, -1.1201403141021729, -0.6072303056716919, -1.2767269611358643, -0.4962765574455261, -0.006937540136277676, -0.8272031545639038, 0.8828151226043701, 0.2628397047519684, -1.219607949256897, -0.34340542554855347, -0.9467557668685913, 0.9763574004173279, -0.12691330909729004, 0.17394909262657166, 1.9029555320739746, 0.35772520303726196, -0.3899230360984802, 0.8722715973854065, 1.1814051866531372, 0.7205076217651367, -0.5766578912734985, 0.17362655699253082, -0.5277738571166992, 0.25632619857788086, -1.4016515016555786, 0.20513083040714264, -2.8751752376556396, 0.6673938632011414, 0.04793345928192139, -0.08012553304433823, -0.013166192919015884, -1.3146424293518066, 1.1271101236343384, 2.5113918781280518, -1.2300159931182861, 0.5129111409187317, 0.35184428095817566, 1.2779953479766846, -1.7423489093780518, 0.20719660818576813, -0.4128052592277527, 2.1428115367889404, 0.14297515153884888, 1.22492516040802, -0.4683666229248047, -2.4151506423950195, 0.4752906262874603, -1.3258010149002075, -1.0502668619155884, 0.6262811422348022, -0.903986394405365, 0.24192996323108673, -1.6063849925994873, -0.2196464240550995, -0.9866766929626465, -1.2132328748703003, 0.7766558527946472, 0.17676958441734314, 0.2851408123970032, -0.5549599528312683, 0.36305180191993713, -2.1415138244628906, -1.461324691772461, -0.12718461453914642, -0.915026068687439, 0.5630321502685547, -0.44495436549186707, 0.761834442615509, -0.09412623196840286, -0.03294837102293968, 0.27514883875846863, 1.4667983055114746, 3.3541548252105713, 0.14246448874473572, 0.3453364670276642, -0.2251991480588913, -0.978765606880188, 1.4823328256607056, 0.925410807132721, -0.13684266805648804, -0.4881000220775604, -1.0869337320327759, 1.3885869979858398, 1.954561471939087, 1.0439890623092651, 0.017967574298381805, -0.7243282794952393, -0.6751087307929993, 0.01917485147714615, 0.3009505867958069, 0.48216328024864197, 0.8092830181121826, -0.12708888947963715, -0.021008439362049103, 1.4010003805160522, 1.0384308099746704, -0.43193063139915466, 0.3665230870246887, -0.8909436464309692, -0.4240325391292572, 0.5272277593612671, 0.1266416311264038, 0.004424472339451313, 0.3976741433143616, -1.0104185342788696, -0.3019692599773407, -0.28979238867759705, -0.8636087775230408, -0.6103709936141968, -0.3804704546928406, -0.3849429786205292, 1.5709351301193237, 0.24435873329639435, -0.6408425569534302, -0.09306877106428146, -0.6930363178253174, -0.12886817753314972, -1.0899648666381836, 0.10310866683721542, -0.15277421474456787, -0.1406848281621933, -0.2621803879737854, 1.7385238409042358, -0.8428264856338501, -2.13122820854187, 0.07995626330375671, 0.4125256836414337, -0.23899437487125397, 0.275574654340744, 1.7313740253448486, 0.4605860412120819, 1.356801152229309, 1.2875752449035645, 0.9765281677246094, -0.5873944163322449, -1.3184829950332642, 0.6951764822006226, 1.1042932271957397, -1.3576258420944214, 0.8729075789451599, -0.0803840309381485, -0.47232094407081604, 0.6272709965705872, 1.3999497890472412, 0.47954124212265015, -2.0517983436584473, 0.822527289390564, -1.0455331802368164, 0.9578500986099243, 0.6881119608879089, 0.6423822045326233, 0.28936296701431274, 0.8568657636642456, -1.2985652685165405, -1.1008466482162476, -0.7968541383743286, -0.7174519300460815, 2.030447244644165, -0.2204020619392395, 0.5945360660552979, -0.13837671279907227, -1.2884267568588257, -0.040912628173828125, 0.6617344617843628, 0.2943333387374878, -0.5121691226959229, 0.8925872445106506, -0.6992696523666382, -1.1295737028121948, -1.2190779447555542, -0.41772666573524475, -0.9837233424186707, -0.9965736865997314, 1.1109180450439453, 0.8305535912513733, 0.24087657034397125, 1.8549479246139526, 0.6430216431617737, 0.14429374039173126, -2.4837265014648438, 0.8651527166366577, 0.3279070258140564, -0.09857552498579025, 0.7626512050628662, 0.3719319701194763, 1.1232190132141113, 0.07536181062459946, 0.6208986639976501, -2.351062297821045, 2.234759569168091, -0.13047155737876892, 0.7428054809570312, -0.04743325337767601, -0.17768487334251404, 1.0636265277862549, 0.5221017599105835, 0.5008748173713684, -0.8904191851615906, 0.5794342160224915, -0.5203816890716553, 1.216431975364685, 1.0168949365615845, -0.8331977725028992, 0.037580642849206924, 1.269789218902588, 0.4012826979160309, -0.6134483218193054, -0.99671870470047, -0.8412383794784546, 0.9850347638130188, 1.653951644897461, -0.051314353942871094, 0.0380387157201767, 0.8189342021942139, 0.592086136341095, -1.2652168273925781, -0.00183111522346735, -0.6623510718345642, -0.6837602257728577, 1.7813453674316406, 2.012766122817993, -0.4015284478664398, -0.0974573940038681, -0.6267959475517273, -1.3687411546707153, 0.7114370465278625, -0.17582526803016663, 0.08264520764350891, 0.6601707935333252, -0.6260825991630554, 0.948150634765625, 0.775040328502655, 0.8438484072685242, 0.13770009577274323, 0.21177351474761963, 0.38831406831741333, -0.49034926295280457, -1.120063304901123, -0.25425294041633606, -1.2075845003128052, -2.5525567531585693, 0.3641434609889984, -0.17054812610149384, -1.3115489482879639, 0.03627464175224304, -0.9936380386352539, 1.1114654541015625, -0.5260727405548096, -1.0991055965423584, -1.3540414571762085, 0.3024170398712158, -0.013993901200592518, 0.8497637510299683, -1.7111579179763794, -0.053740568459033966, 1.2413220405578613, 0.8693339824676514, -0.7194328904151917, 0.9549318552017212, 0.2839503884315491, 1.2131553888320923, 0.737671434879303, -0.3169277608394623, 0.5666862726211548, -0.014179635792970657, -1.340003490447998, 0.5269564986228943, 1.1594882011413574, 0.11626454442739487, 1.4128074645996094, -0.4140368402004242, -0.06124994158744812, 0.3559117615222931, -0.5893585085868835, -0.5142480731010437, -0.3982357680797577, 0.5347075462341309, 0.04420620948076248, -0.9047900438308716, -0.053328484296798706, 0.036384742707014084, -0.3141323924064636, 0.17862409353256226, -1.5308281183242798, -0.21018147468566895, -0.4715426564216614, -0.432949423789978, -1.3244564533233643, -0.14650696516036987, 1.2943345308303833, -0.6110410690307617, -0.3178206980228424, 0.5660497546195984, 0.3330034017562866, 0.4522269666194916, 0.5934585928916931, -0.6998858451843262, -0.33070361614227295, -0.17670199275016785, -0.4378465712070465, 0.23329181969165802, 1.3941752910614014, -0.0981646254658699, -0.9576940536499023, 0.7089930176734924, -0.33778128027915955, 0.07603523880243301, 1.8112508058547974, -0.05010322853922844, -0.8401237726211548, 0.2805231809616089, -0.7311693429946899, 1.9244318008422852, 1.682593584060669, 1.2813339233398438, -0.3099021017551422, -0.7920565009117126, 0.6841638088226318, -0.3909856081008911, -0.4263628423213959, 0.7914919853210449, 0.4278683662414551, -0.2226196974515915, -1.4759480953216553, 0.745966911315918, 1.3308219909667969, -0.7841638326644897, -0.8079212307929993, 0.22012968361377716, -0.7912904620170593, 1.1355936527252197, 0.6046764254570007, 0.3815990686416626, 0.3152312934398651, 1.6541441679000854, 0.78498375415802, -0.5153518319129944, 0.5721373558044434, 0.5477662086486816, -0.20179025828838348, -2.1530425548553467, -1.2562838792800903, 0.1898425966501236, -0.46618419885635376, -1.6773213148117065, 1.3060874938964844, -1.1059825420379639, -0.9682377576828003, 0.6141631603240967, 0.08249000459909439, 1.211682915687561, 0.40429553389549255, 1.4676060676574707, 2.0117945671081543, 0.6681255102157593, 0.47978201508522034, 1.175796627998352, -0.14776338636875153, -0.43627840280532837, 1.8065823316574097, -0.33636319637298584, 0.5566325187683105, 1.0893771648406982, -0.28197479248046875, -1.1913247108459473, -0.7268000841140747, -1.3145887851715088, -0.6668081879615784, 1.215233325958252, 0.08080504089593887, -1.1226085424423218, 0.2944384515285492, 1.592125415802002, 0.026010733097791672, -0.46272990107536316, 0.6742990016937256, 0.3506097197532654, -0.8861882090568542, -0.04052959382534027, -0.937630832195282, 0.5056790709495544, -0.20754574239253998, -0.2230871617794037, 0.41020289063453674, 0.49869754910469055, 1.3785426616668701, 0.0514034666121006, 0.2313147634267807, 0.9816930294036865, -1.3644436597824097, 1.5418781042099, -0.7607496380805969, 0.3829783499240875, -2.407346487045288, 1.3547515869140625, -0.7165221571922302, 2.0576248168945312, -2.6541030406951904, 0.5093125104904175, -0.583540141582489, -0.4951845407485962, 0.2910543978214264, -0.4015183448791504, 0.07021255791187286, -0.04458438977599144, -0.9940705895423889, 0.13804744184017181, -0.6027079820632935, 0.42934343218803406, 1.281565546989441, 1.3425127267837524, -1.0658109188079834, -0.21532273292541504, -1.7317184209823608, -0.20694486796855927, -0.8102756142616272, 0.2910749316215515, -2.036600351333618, -0.24897941946983337, -1.8460813760757446, -2.254828929901123, -1.2244971990585327, -0.9189204573631287, 1.1848337650299072, 0.14822544157505035, -0.9483820199966431, 1.357865571975708, -0.39527878165245056, -1.758811354637146, 1.0279041528701782, -2.0838873386383057 ]
https://github.com/huggingface/datasets/issues/5596
[TypeError: Couldn't cast array of type] Can only load a subset of the dataset
We've updated the dataset to remove the extra `labels` field from some files, closing this issue. Thanks!
### Describe the bug I'm trying to load this [dataset](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues) which consists of jsonl files and I get the following error: ``` casted_values = _c(array.values, feature[0]) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 1839, in wrapper return func(array, *args, **kwargs) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 2132, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type struct<type: string, action: string, datetime: timestamp[s], author: string, title: string, description: string, comment_id: int64, comment: string, labels: list<item: string>> to {'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)} ``` But I can succesfully load a subset of the dataset, for example this works: ```python ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train", data_files=[f"data/data-{x}.jsonl" for x in range(10)]) ``` and `ds.features` returns: ``` {'repo': Value(dtype='string', id=None), 'org': Value(dtype='string', id=None), 'issue_id': Value(dtype='int64', id=None), 'issue_number': Value(dtype='int64', id=None), 'pull_request': {'user_login': Value(dtype='string', id=None), 'repo': Value(dtype='string', id=None), 'number': Value(dtype='int64', id=None)}, 'events': [{'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)}]} ``` So I'm not sure if there's an issue with just some of the files. Grateful if you have any suggestions to fix the issue. Side note: I saw this related [issue](https://github.com/huggingface/datasets/issues/3637) and tried to write a loading script to have `events` as a `Sequence` and not `list` [here](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/blob/main/loading.py) (the script was renamed). It worked with a subset locally but doesn't for the remote dataset it can't find https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/resolve/main/data. ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train") ``` ### Expected behavior Load the entire dataset succesfully. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.12 - PyArrow version: 9.0.0 - Pandas version: 1.3.4
277
17
[TypeError: Couldn't cast array of type] Can only load a subset of the dataset ### Describe the bug I'm trying to load this [dataset](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues) which consists of jsonl files and I get the following error: ``` casted_values = _c(array.values, feature[0]) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 1839, in wrapper return func(array, *args, **kwargs) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 2132, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type struct<type: string, action: string, datetime: timestamp[s], author: string, title: string, description: string, comment_id: int64, comment: string, labels: list<item: string>> to {'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)} ``` But I can succesfully load a subset of the dataset, for example this works: ```python ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train", data_files=[f"data/data-{x}.jsonl" for x in range(10)]) ``` and `ds.features` returns: ``` {'repo': Value(dtype='string', id=None), 'org': Value(dtype='string', id=None), 'issue_id': Value(dtype='int64', id=None), 'issue_number': Value(dtype='int64', id=None), 'pull_request': {'user_login': Value(dtype='string', id=None), 'repo': Value(dtype='string', id=None), 'number': Value(dtype='int64', id=None)}, 'events': [{'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)}]} ``` So I'm not sure if there's an issue with just some of the files. Grateful if you have any suggestions to fix the issue. Side note: I saw this related [issue](https://github.com/huggingface/datasets/issues/3637) and tried to write a loading script to have `events` as a `Sequence` and not `list` [here](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/blob/main/loading.py) (the script was renamed). It worked with a subset locally but doesn't for the remote dataset it can't find https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/resolve/main/data. ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train") ``` ### Expected behavior Load the entire dataset succesfully. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.12 - PyArrow version: 9.0.0 - Pandas version: 1.3.4 We've updated the dataset to remove the extra `labels` field from some files, closing this issue. Thanks!
[ -1.2122060060501099, -1.0282363891601562, -0.7827973365783691, 1.5735336542129517, -0.23098750412464142, -1.0753028392791748, 0.11346933990716934, -1.002651333808899, 1.5741065740585327, -0.636767566204071, 0.25753581523895264, -1.6488094329833984, -0.03603915497660637, -0.7343500256538391, -0.742300271987915, -0.8227526545524597, -0.3101780414581299, -0.8385833501815796, 1.1237374544143677, 2.4967386722564697, 1.2538790702819824, -1.4814244508743286, 2.73787522315979, 0.8072730898857117, -0.12926873564720154, -1.0680471658706665, 0.5579058527946472, -0.04525879770517349, -1.1406198740005493, -0.5026160478591919, -0.9109070897102356, -0.12060979008674622, -0.5945925712585449, -0.39450836181640625, -0.044775038957595825, 0.5352387428283691, -0.2288459837436676, -0.3847539722919464, -0.5850357413291931, -0.7766915559768677, 0.5048232078552246, -0.3390060067176819, 0.8562914729118347, -0.23474453389644623, 1.7582999467849731, -0.4547828137874603, 0.282131165266037, 0.64668208360672, 1.3107843399047852, 0.18507346510887146, 0.06764775514602661, 0.3540361523628235, 0.3500680923461914, -0.05263742431998253, 0.5903177857398987, 1.2156540155410767, 0.7513976693153381, 0.4256071150302887, 0.8574220538139343, -2.284727096557617, 1.2058911323547363, -1.092325210571289, 0.4264126121997833, 1.39757239818573, -0.9031715989112854, 0.4942794144153595, -1.7733021974563599, -0.06377769261598587, 0.6156299114227295, -2.150028705596924, 0.358317106962204, -1.2091070413589478, -0.4642809331417084, 0.8587070107460022, 0.3855578303337097, -1.2251864671707153, 0.19704246520996094, -0.429261177778244, 1.05569326877594, 0.30297914147377014, 1.0677870512008667, -1.7368005514144897, 0.08187317848205566, -0.24146145582199097, 0.16609734296798706, -1.2537976503372192, -1.5236968994140625, 0.4740281403064728, 0.5420891642570496, 0.6488239169120789, -0.16426274180412292, 1.0438101291656494, -1.1279186010360718, 0.6973124146461487, -1.0487172603607178, -1.6391741037368774, -1.42997407913208, -2.363760471343994, -2.2466745376586914, 0.7299225330352783, -0.4098156690597534, -0.49491026997566223, 2.0432240962982178, -0.8594892621040344, -1.7684667110443115, 1.1838963031768799, 0.4714664816856384, 0.01988503336906433, 2.4891209602355957, 0.20531781017780304, -0.7807452082633972, 0.5019235610961914, -0.8240495324134827, 0.7602313756942749, -0.37674906849861145, 1.4629844427108765, 0.4371362626552582, -0.9455709457397461, 1.641108512878418, -0.4346483647823334, 0.561886191368103, -0.6745400428771973, -0.40718701481819153, -0.7633283138275146, 0.33310210704803467, 1.8855457305908203, -0.20290444791316986, 1.3916120529174805, -0.35394927859306335, -1.5095877647399902, -1.495966911315918, 0.9712615013122559, 0.368362694978714, -0.9389597177505493, 0.2016955316066742, -0.421297162771225, 0.17835970222949982, -0.07739638537168503, 1.1769170761108398, 1.200714349746704, 0.619419276714325, -0.27413058280944824, -0.9009518623352051, 0.09009120613336563, -0.1998697817325592, -0.6981191039085388, -1.8137527704238892, -0.30667856335639954, 0.1546577513217926, 0.6650874614715576, -1.2706636190414429, 1.6253283023834229, 0.8944364786148071, 1.9375451803207397, 1.0171796083450317, -0.4933413565158844, 1.5293127298355103, 0.01720920205116272, 1.8366891145706177, -0.6599441170692444, 0.6467564702033997, -0.41646409034729004, -1.2124085426330566, 0.9251036047935486, -0.2897275686264038, -2.010979652404785, -0.7298134565353394, -0.7988556027412415, -0.24229943752288818, -0.8115634918212891, 0.9035559892654419, -0.41729915142059326, -1.4440360069274902, 0.23645299673080444, -0.8238680958747864, 0.2237466722726822, -1.1611733436584473, 0.3372473418712616, 0.718538761138916, -0.6077131032943726, 0.049674082547426224, -0.2980746030807495, -1.270888090133667, -0.5537102222442627, 0.4374123215675354, 1.868579387664795, -0.7268379330635071, 0.7493946552276611, 1.0516020059585571, -0.6386622786521912, 0.10368043929338455, 0.25994694232940674, -0.2929171919822693, 0.8179492354393005, -1.079426884651184, -0.7198783755302429, 1.1366102695465088, -0.17699548602104187, -0.6303921937942505, 1.3380457162857056, 0.8329285979270935, -1.0585713386535645, -0.3083159625530243, -0.19257719814777374, -0.8407480120658875, 0.07381495833396912, -1.5757317543029785, -0.14779895544052124, 0.482382595539093, -1.612621545791626, -0.49139881134033203, -0.19820325076580048, 1.3732435703277588, -0.14986582100391388, 1.3997689485549927, -0.32805630564689636, -0.08128735423088074, -0.22663255035877228, -0.3825688362121582, 0.25222140550613403, -0.22333009541034698, -0.5957381725311279, 0.10827308893203735, -0.8676844835281372, 0.3834254741668701, 1.4831405878067017, 0.366838663816452, 0.04538299888372421, 0.5326984524726868, 1.1736071109771729, 0.45350581407546997, 0.1348850131034851, -0.8832674622535706, -1.4604941606521606, 1.9798914194107056, -1.607507348060608, 1.9851733446121216, 0.7323346734046936, 0.034736230969429016, -1.7151519060134888, -1.8317928314208984, 1.4625180959701538, 1.171035647392273, 2.275785446166992, 0.6611819863319397, 0.3875599801540375, -0.9017025232315063, -0.6641965508460999, 0.19888079166412354, -0.9799522161483765, -0.7711190581321716, 0.2217542827129364, 2.501389741897583, 1.8822962045669556, -0.4974181354045868, -0.26914694905281067, -0.9028036594390869, 1.471985936164856, -0.27230730652809143, 0.22305350005626678, 2.078315496444702, -0.17523473501205444, -1.0261541604995728, 1.2200958728790283, -2.5419530868530273, 0.1810488998889923, 2.0244641304016113, 0.37279900908470154, 0.23128917813301086, -1.4061682224273682, -0.7284428477287292, -0.21478880941867828, -0.5358133316040039, -1.2447669506072998, 0.5006524324417114, -0.31226304173469543, -0.798682689666748, -1.4790256023406982, 0.19710403680801392, -1.1456342935562134, -1.6345436573028564, 0.2454686015844345, 1.9042109251022339, 2.1785857677459717, -0.8037198185920715, 1.6544814109802246, -0.2550070285797119, 0.19168809056282043, 1.2445601224899292, 1.284448504447937, 2.982455015182495, 1.8509756326675415, -1.2225704193115234, 0.5245431661605835, -0.1432974636554718, -0.49548038840293884, 1.0943554639816284, -1.1801915168762207, 1.1207845211029053, -0.12597593665122986, -1.167324185371399, -1.176998496055603, 0.9132130146026611, 0.49553218483924866, -0.033277787268161774, -0.5109545588493347, 1.1196292638778687, 0.04747651144862175, 1.2734429836273193, 0.692825973033905, -0.31885185837745667, 0.46628594398498535, -0.3943157196044922, -0.5014594793319702, 1.5897020101547241, 0.10168350487947464, -1.4770588874816895, -2.2572972774505615, -0.15689581632614136, -0.8405698537826538, -0.012649250216782093, -0.6267898678779602, -1.033220887184143, 1.6340358257293701, 0.2765895128250122, -1.1499459743499756, -0.17176812887191772, -0.3313494026660919, -0.5157503485679626, 2.6772429943084717, -1.322412371635437, -0.36612075567245483, -0.9381424784660339, -0.6018803119659424, 1.619401454925537, -1.0754789113998413, -0.1989152878522873, -1.1201403141021729, -0.6072303056716919, -1.2767269611358643, -0.4962765574455261, -0.006937540136277676, -0.8272031545639038, 0.8828151226043701, 0.2628397047519684, -1.219607949256897, -0.34340542554855347, -0.9467557668685913, 0.9763574004173279, -0.12691330909729004, 0.17394909262657166, 1.9029555320739746, 0.35772520303726196, -0.3899230360984802, 0.8722715973854065, 1.1814051866531372, 0.7205076217651367, -0.5766578912734985, 0.17362655699253082, -0.5277738571166992, 0.25632619857788086, -1.4016515016555786, 0.20513083040714264, -2.8751752376556396, 0.6673938632011414, 0.04793345928192139, -0.08012553304433823, -0.013166192919015884, -1.3146424293518066, 1.1271101236343384, 2.5113918781280518, -1.2300159931182861, 0.5129111409187317, 0.35184428095817566, 1.2779953479766846, -1.7423489093780518, 0.20719660818576813, -0.4128052592277527, 2.1428115367889404, 0.14297515153884888, 1.22492516040802, -0.4683666229248047, -2.4151506423950195, 0.4752906262874603, -1.3258010149002075, -1.0502668619155884, 0.6262811422348022, -0.903986394405365, 0.24192996323108673, -1.6063849925994873, -0.2196464240550995, -0.9866766929626465, -1.2132328748703003, 0.7766558527946472, 0.17676958441734314, 0.2851408123970032, -0.5549599528312683, 0.36305180191993713, -2.1415138244628906, -1.461324691772461, -0.12718461453914642, -0.915026068687439, 0.5630321502685547, -0.44495436549186707, 0.761834442615509, -0.09412623196840286, -0.03294837102293968, 0.27514883875846863, 1.4667983055114746, 3.3541548252105713, 0.14246448874473572, 0.3453364670276642, -0.2251991480588913, -0.978765606880188, 1.4823328256607056, 0.925410807132721, -0.13684266805648804, -0.4881000220775604, -1.0869337320327759, 1.3885869979858398, 1.954561471939087, 1.0439890623092651, 0.017967574298381805, -0.7243282794952393, -0.6751087307929993, 0.01917485147714615, 0.3009505867958069, 0.48216328024864197, 0.8092830181121826, -0.12708888947963715, -0.021008439362049103, 1.4010003805160522, 1.0384308099746704, -0.43193063139915466, 0.3665230870246887, -0.8909436464309692, -0.4240325391292572, 0.5272277593612671, 0.1266416311264038, 0.004424472339451313, 0.3976741433143616, -1.0104185342788696, -0.3019692599773407, -0.28979238867759705, -0.8636087775230408, -0.6103709936141968, -0.3804704546928406, -0.3849429786205292, 1.5709351301193237, 0.24435873329639435, -0.6408425569534302, -0.09306877106428146, -0.6930363178253174, -0.12886817753314972, -1.0899648666381836, 0.10310866683721542, -0.15277421474456787, -0.1406848281621933, -0.2621803879737854, 1.7385238409042358, -0.8428264856338501, -2.13122820854187, 0.07995626330375671, 0.4125256836414337, -0.23899437487125397, 0.275574654340744, 1.7313740253448486, 0.4605860412120819, 1.356801152229309, 1.2875752449035645, 0.9765281677246094, -0.5873944163322449, -1.3184829950332642, 0.6951764822006226, 1.1042932271957397, -1.3576258420944214, 0.8729075789451599, -0.0803840309381485, -0.47232094407081604, 0.6272709965705872, 1.3999497890472412, 0.47954124212265015, -2.0517983436584473, 0.822527289390564, -1.0455331802368164, 0.9578500986099243, 0.6881119608879089, 0.6423822045326233, 0.28936296701431274, 0.8568657636642456, -1.2985652685165405, -1.1008466482162476, -0.7968541383743286, -0.7174519300460815, 2.030447244644165, -0.2204020619392395, 0.5945360660552979, -0.13837671279907227, -1.2884267568588257, -0.040912628173828125, 0.6617344617843628, 0.2943333387374878, -0.5121691226959229, 0.8925872445106506, -0.6992696523666382, -1.1295737028121948, -1.2190779447555542, -0.41772666573524475, -0.9837233424186707, -0.9965736865997314, 1.1109180450439453, 0.8305535912513733, 0.24087657034397125, 1.8549479246139526, 0.6430216431617737, 0.14429374039173126, -2.4837265014648438, 0.8651527166366577, 0.3279070258140564, -0.09857552498579025, 0.7626512050628662, 0.3719319701194763, 1.1232190132141113, 0.07536181062459946, 0.6208986639976501, -2.351062297821045, 2.234759569168091, -0.13047155737876892, 0.7428054809570312, -0.04743325337767601, -0.17768487334251404, 1.0636265277862549, 0.5221017599105835, 0.5008748173713684, -0.8904191851615906, 0.5794342160224915, -0.5203816890716553, 1.216431975364685, 1.0168949365615845, -0.8331977725028992, 0.037580642849206924, 1.269789218902588, 0.4012826979160309, -0.6134483218193054, -0.99671870470047, -0.8412383794784546, 0.9850347638130188, 1.653951644897461, -0.051314353942871094, 0.0380387157201767, 0.8189342021942139, 0.592086136341095, -1.2652168273925781, -0.00183111522346735, -0.6623510718345642, -0.6837602257728577, 1.7813453674316406, 2.012766122817993, -0.4015284478664398, -0.0974573940038681, -0.6267959475517273, -1.3687411546707153, 0.7114370465278625, -0.17582526803016663, 0.08264520764350891, 0.6601707935333252, -0.6260825991630554, 0.948150634765625, 0.775040328502655, 0.8438484072685242, 0.13770009577274323, 0.21177351474761963, 0.38831406831741333, -0.49034926295280457, -1.120063304901123, -0.25425294041633606, -1.2075845003128052, -2.5525567531585693, 0.3641434609889984, -0.17054812610149384, -1.3115489482879639, 0.03627464175224304, -0.9936380386352539, 1.1114654541015625, -0.5260727405548096, -1.0991055965423584, -1.3540414571762085, 0.3024170398712158, -0.013993901200592518, 0.8497637510299683, -1.7111579179763794, -0.053740568459033966, 1.2413220405578613, 0.8693339824676514, -0.7194328904151917, 0.9549318552017212, 0.2839503884315491, 1.2131553888320923, 0.737671434879303, -0.3169277608394623, 0.5666862726211548, -0.014179635792970657, -1.340003490447998, 0.5269564986228943, 1.1594882011413574, 0.11626454442739487, 1.4128074645996094, -0.4140368402004242, -0.06124994158744812, 0.3559117615222931, -0.5893585085868835, -0.5142480731010437, -0.3982357680797577, 0.5347075462341309, 0.04420620948076248, -0.9047900438308716, -0.053328484296798706, 0.036384742707014084, -0.3141323924064636, 0.17862409353256226, -1.5308281183242798, -0.21018147468566895, -0.4715426564216614, -0.432949423789978, -1.3244564533233643, -0.14650696516036987, 1.2943345308303833, -0.6110410690307617, -0.3178206980228424, 0.5660497546195984, 0.3330034017562866, 0.4522269666194916, 0.5934585928916931, -0.6998858451843262, -0.33070361614227295, -0.17670199275016785, -0.4378465712070465, 0.23329181969165802, 1.3941752910614014, -0.0981646254658699, -0.9576940536499023, 0.7089930176734924, -0.33778128027915955, 0.07603523880243301, 1.8112508058547974, -0.05010322853922844, -0.8401237726211548, 0.2805231809616089, -0.7311693429946899, 1.9244318008422852, 1.682593584060669, 1.2813339233398438, -0.3099021017551422, -0.7920565009117126, 0.6841638088226318, -0.3909856081008911, -0.4263628423213959, 0.7914919853210449, 0.4278683662414551, -0.2226196974515915, -1.4759480953216553, 0.745966911315918, 1.3308219909667969, -0.7841638326644897, -0.8079212307929993, 0.22012968361377716, -0.7912904620170593, 1.1355936527252197, 0.6046764254570007, 0.3815990686416626, 0.3152312934398651, 1.6541441679000854, 0.78498375415802, -0.5153518319129944, 0.5721373558044434, 0.5477662086486816, -0.20179025828838348, -2.1530425548553467, -1.2562838792800903, 0.1898425966501236, -0.46618419885635376, -1.6773213148117065, 1.3060874938964844, -1.1059825420379639, -0.9682377576828003, 0.6141631603240967, 0.08249000459909439, 1.211682915687561, 0.40429553389549255, 1.4676060676574707, 2.0117945671081543, 0.6681255102157593, 0.47978201508522034, 1.175796627998352, -0.14776338636875153, -0.43627840280532837, 1.8065823316574097, -0.33636319637298584, 0.5566325187683105, 1.0893771648406982, -0.28197479248046875, -1.1913247108459473, -0.7268000841140747, -1.3145887851715088, -0.6668081879615784, 1.215233325958252, 0.08080504089593887, -1.1226085424423218, 0.2944384515285492, 1.592125415802002, 0.026010733097791672, -0.46272990107536316, 0.6742990016937256, 0.3506097197532654, -0.8861882090568542, -0.04052959382534027, -0.937630832195282, 0.5056790709495544, -0.20754574239253998, -0.2230871617794037, 0.41020289063453674, 0.49869754910469055, 1.3785426616668701, 0.0514034666121006, 0.2313147634267807, 0.9816930294036865, -1.3644436597824097, 1.5418781042099, -0.7607496380805969, 0.3829783499240875, -2.407346487045288, 1.3547515869140625, -0.7165221571922302, 2.0576248168945312, -2.6541030406951904, 0.5093125104904175, -0.583540141582489, -0.4951845407485962, 0.2910543978214264, -0.4015183448791504, 0.07021255791187286, -0.04458438977599144, -0.9940705895423889, 0.13804744184017181, -0.6027079820632935, 0.42934343218803406, 1.281565546989441, 1.3425127267837524, -1.0658109188079834, -0.21532273292541504, -1.7317184209823608, -0.20694486796855927, -0.8102756142616272, 0.2910749316215515, -2.036600351333618, -0.24897941946983337, -1.8460813760757446, -2.254828929901123, -1.2244971990585327, -0.9189204573631287, 1.1848337650299072, 0.14822544157505035, -0.9483820199966431, 1.357865571975708, -0.39527878165245056, -1.758811354637146, 1.0279041528701782, -2.0838873386383057 ]
https://github.com/huggingface/datasets/issues/5596
[TypeError: Couldn't cast array of type] Can only load a subset of the dataset
A similar error occurs in the Pile dataset (EleutherAI/the_pile) Loading the dataset produces the following error. ``` TypeError: Couldn't cast array of type struct<file: string, id: string> to {'id': Value(dtype='string', id=None)} ```
### Describe the bug I'm trying to load this [dataset](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues) which consists of jsonl files and I get the following error: ``` casted_values = _c(array.values, feature[0]) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 1839, in wrapper return func(array, *args, **kwargs) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 2132, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type struct<type: string, action: string, datetime: timestamp[s], author: string, title: string, description: string, comment_id: int64, comment: string, labels: list<item: string>> to {'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)} ``` But I can succesfully load a subset of the dataset, for example this works: ```python ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train", data_files=[f"data/data-{x}.jsonl" for x in range(10)]) ``` and `ds.features` returns: ``` {'repo': Value(dtype='string', id=None), 'org': Value(dtype='string', id=None), 'issue_id': Value(dtype='int64', id=None), 'issue_number': Value(dtype='int64', id=None), 'pull_request': {'user_login': Value(dtype='string', id=None), 'repo': Value(dtype='string', id=None), 'number': Value(dtype='int64', id=None)}, 'events': [{'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)}]} ``` So I'm not sure if there's an issue with just some of the files. Grateful if you have any suggestions to fix the issue. Side note: I saw this related [issue](https://github.com/huggingface/datasets/issues/3637) and tried to write a loading script to have `events` as a `Sequence` and not `list` [here](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/blob/main/loading.py) (the script was renamed). It worked with a subset locally but doesn't for the remote dataset it can't find https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/resolve/main/data. ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train") ``` ### Expected behavior Load the entire dataset succesfully. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.12 - PyArrow version: 9.0.0 - Pandas version: 1.3.4
277
32
[TypeError: Couldn't cast array of type] Can only load a subset of the dataset ### Describe the bug I'm trying to load this [dataset](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues) which consists of jsonl files and I get the following error: ``` casted_values = _c(array.values, feature[0]) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 1839, in wrapper return func(array, *args, **kwargs) File "/opt/conda/lib/python3.7/site-packages/datasets/table.py", line 2132, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type struct<type: string, action: string, datetime: timestamp[s], author: string, title: string, description: string, comment_id: int64, comment: string, labels: list<item: string>> to {'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)} ``` But I can succesfully load a subset of the dataset, for example this works: ```python ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train", data_files=[f"data/data-{x}.jsonl" for x in range(10)]) ``` and `ds.features` returns: ``` {'repo': Value(dtype='string', id=None), 'org': Value(dtype='string', id=None), 'issue_id': Value(dtype='int64', id=None), 'issue_number': Value(dtype='int64', id=None), 'pull_request': {'user_login': Value(dtype='string', id=None), 'repo': Value(dtype='string', id=None), 'number': Value(dtype='int64', id=None)}, 'events': [{'type': Value(dtype='string', id=None), 'action': Value(dtype='string', id=None), 'datetime': Value(dtype='timestamp[s]', id=None), 'author': Value(dtype='string', id=None), 'title': Value(dtype='string', id=None), 'description': Value(dtype='string', id=None), 'comment_id': Value(dtype='int64', id=None), 'comment': Value(dtype='string', id=None)}]} ``` So I'm not sure if there's an issue with just some of the files. Grateful if you have any suggestions to fix the issue. Side note: I saw this related [issue](https://github.com/huggingface/datasets/issues/3637) and tried to write a loading script to have `events` as a `Sequence` and not `list` [here](https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/blob/main/loading.py) (the script was renamed). It worked with a subset locally but doesn't for the remote dataset it can't find https://huggingface.co/datasets/bigcode-data/the-stack-gh-issues/resolve/main/data. ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset('bigcode-data/the-stack-gh-issues', split="train") ``` ### Expected behavior Load the entire dataset succesfully. ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-4.19.0-23-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.12 - PyArrow version: 9.0.0 - Pandas version: 1.3.4 A similar error occurs in the Pile dataset (EleutherAI/the_pile) Loading the dataset produces the following error. ``` TypeError: Couldn't cast array of type struct<file: string, id: string> to {'id': Value(dtype='string', id=None)} ```
[ -1.2122060060501099, -1.0282363891601562, -0.7827973365783691, 1.5735336542129517, -0.23098750412464142, -1.0753028392791748, 0.11346933990716934, -1.002651333808899, 1.5741065740585327, -0.636767566204071, 0.25753581523895264, -1.6488094329833984, -0.03603915497660637, -0.7343500256538391, -0.742300271987915, -0.8227526545524597, -0.3101780414581299, -0.8385833501815796, 1.1237374544143677, 2.4967386722564697, 1.2538790702819824, -1.4814244508743286, 2.73787522315979, 0.8072730898857117, -0.12926873564720154, -1.0680471658706665, 0.5579058527946472, -0.04525879770517349, -1.1406198740005493, -0.5026160478591919, -0.9109070897102356, -0.12060979008674622, -0.5945925712585449, -0.39450836181640625, -0.044775038957595825, 0.5352387428283691, -0.2288459837436676, -0.3847539722919464, -0.5850357413291931, -0.7766915559768677, 0.5048232078552246, -0.3390060067176819, 0.8562914729118347, -0.23474453389644623, 1.7582999467849731, -0.4547828137874603, 0.282131165266037, 0.64668208360672, 1.3107843399047852, 0.18507346510887146, 0.06764775514602661, 0.3540361523628235, 0.3500680923461914, -0.05263742431998253, 0.5903177857398987, 1.2156540155410767, 0.7513976693153381, 0.4256071150302887, 0.8574220538139343, -2.284727096557617, 1.2058911323547363, -1.092325210571289, 0.4264126121997833, 1.39757239818573, -0.9031715989112854, 0.4942794144153595, -1.7733021974563599, -0.06377769261598587, 0.6156299114227295, -2.150028705596924, 0.358317106962204, -1.2091070413589478, -0.4642809331417084, 0.8587070107460022, 0.3855578303337097, -1.2251864671707153, 0.19704246520996094, -0.429261177778244, 1.05569326877594, 0.30297914147377014, 1.0677870512008667, -1.7368005514144897, 0.08187317848205566, -0.24146145582199097, 0.16609734296798706, -1.2537976503372192, -1.5236968994140625, 0.4740281403064728, 0.5420891642570496, 0.6488239169120789, -0.16426274180412292, 1.0438101291656494, -1.1279186010360718, 0.6973124146461487, -1.0487172603607178, -1.6391741037368774, -1.42997407913208, -2.363760471343994, -2.2466745376586914, 0.7299225330352783, -0.4098156690597534, -0.49491026997566223, 2.0432240962982178, -0.8594892621040344, -1.7684667110443115, 1.1838963031768799, 0.4714664816856384, 0.01988503336906433, 2.4891209602355957, 0.20531781017780304, -0.7807452082633972, 0.5019235610961914, -0.8240495324134827, 0.7602313756942749, -0.37674906849861145, 1.4629844427108765, 0.4371362626552582, -0.9455709457397461, 1.641108512878418, -0.4346483647823334, 0.561886191368103, -0.6745400428771973, -0.40718701481819153, -0.7633283138275146, 0.33310210704803467, 1.8855457305908203, -0.20290444791316986, 1.3916120529174805, -0.35394927859306335, -1.5095877647399902, -1.495966911315918, 0.9712615013122559, 0.368362694978714, -0.9389597177505493, 0.2016955316066742, -0.421297162771225, 0.17835970222949982, -0.07739638537168503, 1.1769170761108398, 1.200714349746704, 0.619419276714325, -0.27413058280944824, -0.9009518623352051, 0.09009120613336563, -0.1998697817325592, -0.6981191039085388, -1.8137527704238892, -0.30667856335639954, 0.1546577513217926, 0.6650874614715576, -1.2706636190414429, 1.6253283023834229, 0.8944364786148071, 1.9375451803207397, 1.0171796083450317, -0.4933413565158844, 1.5293127298355103, 0.01720920205116272, 1.8366891145706177, -0.6599441170692444, 0.6467564702033997, -0.41646409034729004, -1.2124085426330566, 0.9251036047935486, -0.2897275686264038, -2.010979652404785, -0.7298134565353394, -0.7988556027412415, -0.24229943752288818, -0.8115634918212891, 0.9035559892654419, -0.41729915142059326, -1.4440360069274902, 0.23645299673080444, -0.8238680958747864, 0.2237466722726822, -1.1611733436584473, 0.3372473418712616, 0.718538761138916, -0.6077131032943726, 0.049674082547426224, -0.2980746030807495, -1.270888090133667, -0.5537102222442627, 0.4374123215675354, 1.868579387664795, -0.7268379330635071, 0.7493946552276611, 1.0516020059585571, -0.6386622786521912, 0.10368043929338455, 0.25994694232940674, -0.2929171919822693, 0.8179492354393005, -1.079426884651184, -0.7198783755302429, 1.1366102695465088, -0.17699548602104187, -0.6303921937942505, 1.3380457162857056, 0.8329285979270935, -1.0585713386535645, -0.3083159625530243, -0.19257719814777374, -0.8407480120658875, 0.07381495833396912, -1.5757317543029785, -0.14779895544052124, 0.482382595539093, -1.612621545791626, -0.49139881134033203, -0.19820325076580048, 1.3732435703277588, -0.14986582100391388, 1.3997689485549927, -0.32805630564689636, -0.08128735423088074, -0.22663255035877228, -0.3825688362121582, 0.25222140550613403, -0.22333009541034698, -0.5957381725311279, 0.10827308893203735, -0.8676844835281372, 0.3834254741668701, 1.4831405878067017, 0.366838663816452, 0.04538299888372421, 0.5326984524726868, 1.1736071109771729, 0.45350581407546997, 0.1348850131034851, -0.8832674622535706, -1.4604941606521606, 1.9798914194107056, -1.607507348060608, 1.9851733446121216, 0.7323346734046936, 0.034736230969429016, -1.7151519060134888, -1.8317928314208984, 1.4625180959701538, 1.171035647392273, 2.275785446166992, 0.6611819863319397, 0.3875599801540375, -0.9017025232315063, -0.6641965508460999, 0.19888079166412354, -0.9799522161483765, -0.7711190581321716, 0.2217542827129364, 2.501389741897583, 1.8822962045669556, -0.4974181354045868, -0.26914694905281067, -0.9028036594390869, 1.471985936164856, -0.27230730652809143, 0.22305350005626678, 2.078315496444702, -0.17523473501205444, -1.0261541604995728, 1.2200958728790283, -2.5419530868530273, 0.1810488998889923, 2.0244641304016113, 0.37279900908470154, 0.23128917813301086, -1.4061682224273682, -0.7284428477287292, -0.21478880941867828, -0.5358133316040039, -1.2447669506072998, 0.5006524324417114, -0.31226304173469543, -0.798682689666748, -1.4790256023406982, 0.19710403680801392, -1.1456342935562134, -1.6345436573028564, 0.2454686015844345, 1.9042109251022339, 2.1785857677459717, -0.8037198185920715, 1.6544814109802246, -0.2550070285797119, 0.19168809056282043, 1.2445601224899292, 1.284448504447937, 2.982455015182495, 1.8509756326675415, -1.2225704193115234, 0.5245431661605835, -0.1432974636554718, -0.49548038840293884, 1.0943554639816284, -1.1801915168762207, 1.1207845211029053, -0.12597593665122986, -1.167324185371399, -1.176998496055603, 0.9132130146026611, 0.49553218483924866, -0.033277787268161774, -0.5109545588493347, 1.1196292638778687, 0.04747651144862175, 1.2734429836273193, 0.692825973033905, -0.31885185837745667, 0.46628594398498535, -0.3943157196044922, -0.5014594793319702, 1.5897020101547241, 0.10168350487947464, -1.4770588874816895, -2.2572972774505615, -0.15689581632614136, -0.8405698537826538, -0.012649250216782093, -0.6267898678779602, -1.033220887184143, 1.6340358257293701, 0.2765895128250122, -1.1499459743499756, -0.17176812887191772, -0.3313494026660919, -0.5157503485679626, 2.6772429943084717, -1.322412371635437, -0.36612075567245483, -0.9381424784660339, -0.6018803119659424, 1.619401454925537, -1.0754789113998413, -0.1989152878522873, -1.1201403141021729, -0.6072303056716919, -1.2767269611358643, -0.4962765574455261, -0.006937540136277676, -0.8272031545639038, 0.8828151226043701, 0.2628397047519684, -1.219607949256897, -0.34340542554855347, -0.9467557668685913, 0.9763574004173279, -0.12691330909729004, 0.17394909262657166, 1.9029555320739746, 0.35772520303726196, -0.3899230360984802, 0.8722715973854065, 1.1814051866531372, 0.7205076217651367, -0.5766578912734985, 0.17362655699253082, -0.5277738571166992, 0.25632619857788086, -1.4016515016555786, 0.20513083040714264, -2.8751752376556396, 0.6673938632011414, 0.04793345928192139, -0.08012553304433823, -0.013166192919015884, -1.3146424293518066, 1.1271101236343384, 2.5113918781280518, -1.2300159931182861, 0.5129111409187317, 0.35184428095817566, 1.2779953479766846, -1.7423489093780518, 0.20719660818576813, -0.4128052592277527, 2.1428115367889404, 0.14297515153884888, 1.22492516040802, -0.4683666229248047, -2.4151506423950195, 0.4752906262874603, -1.3258010149002075, -1.0502668619155884, 0.6262811422348022, -0.903986394405365, 0.24192996323108673, -1.6063849925994873, -0.2196464240550995, -0.9866766929626465, -1.2132328748703003, 0.7766558527946472, 0.17676958441734314, 0.2851408123970032, -0.5549599528312683, 0.36305180191993713, -2.1415138244628906, -1.461324691772461, -0.12718461453914642, -0.915026068687439, 0.5630321502685547, -0.44495436549186707, 0.761834442615509, -0.09412623196840286, -0.03294837102293968, 0.27514883875846863, 1.4667983055114746, 3.3541548252105713, 0.14246448874473572, 0.3453364670276642, -0.2251991480588913, -0.978765606880188, 1.4823328256607056, 0.925410807132721, -0.13684266805648804, -0.4881000220775604, -1.0869337320327759, 1.3885869979858398, 1.954561471939087, 1.0439890623092651, 0.017967574298381805, -0.7243282794952393, -0.6751087307929993, 0.01917485147714615, 0.3009505867958069, 0.48216328024864197, 0.8092830181121826, -0.12708888947963715, -0.021008439362049103, 1.4010003805160522, 1.0384308099746704, -0.43193063139915466, 0.3665230870246887, -0.8909436464309692, -0.4240325391292572, 0.5272277593612671, 0.1266416311264038, 0.004424472339451313, 0.3976741433143616, -1.0104185342788696, -0.3019692599773407, -0.28979238867759705, -0.8636087775230408, -0.6103709936141968, -0.3804704546928406, -0.3849429786205292, 1.5709351301193237, 0.24435873329639435, -0.6408425569534302, -0.09306877106428146, -0.6930363178253174, -0.12886817753314972, -1.0899648666381836, 0.10310866683721542, -0.15277421474456787, -0.1406848281621933, -0.2621803879737854, 1.7385238409042358, -0.8428264856338501, -2.13122820854187, 0.07995626330375671, 0.4125256836414337, -0.23899437487125397, 0.275574654340744, 1.7313740253448486, 0.4605860412120819, 1.356801152229309, 1.2875752449035645, 0.9765281677246094, -0.5873944163322449, -1.3184829950332642, 0.6951764822006226, 1.1042932271957397, -1.3576258420944214, 0.8729075789451599, -0.0803840309381485, -0.47232094407081604, 0.6272709965705872, 1.3999497890472412, 0.47954124212265015, -2.0517983436584473, 0.822527289390564, -1.0455331802368164, 0.9578500986099243, 0.6881119608879089, 0.6423822045326233, 0.28936296701431274, 0.8568657636642456, -1.2985652685165405, -1.1008466482162476, -0.7968541383743286, -0.7174519300460815, 2.030447244644165, -0.2204020619392395, 0.5945360660552979, -0.13837671279907227, -1.2884267568588257, -0.040912628173828125, 0.6617344617843628, 0.2943333387374878, -0.5121691226959229, 0.8925872445106506, -0.6992696523666382, -1.1295737028121948, -1.2190779447555542, -0.41772666573524475, -0.9837233424186707, -0.9965736865997314, 1.1109180450439453, 0.8305535912513733, 0.24087657034397125, 1.8549479246139526, 0.6430216431617737, 0.14429374039173126, -2.4837265014648438, 0.8651527166366577, 0.3279070258140564, -0.09857552498579025, 0.7626512050628662, 0.3719319701194763, 1.1232190132141113, 0.07536181062459946, 0.6208986639976501, -2.351062297821045, 2.234759569168091, -0.13047155737876892, 0.7428054809570312, -0.04743325337767601, -0.17768487334251404, 1.0636265277862549, 0.5221017599105835, 0.5008748173713684, -0.8904191851615906, 0.5794342160224915, -0.5203816890716553, 1.216431975364685, 1.0168949365615845, -0.8331977725028992, 0.037580642849206924, 1.269789218902588, 0.4012826979160309, -0.6134483218193054, -0.99671870470047, -0.8412383794784546, 0.9850347638130188, 1.653951644897461, -0.051314353942871094, 0.0380387157201767, 0.8189342021942139, 0.592086136341095, -1.2652168273925781, -0.00183111522346735, -0.6623510718345642, -0.6837602257728577, 1.7813453674316406, 2.012766122817993, -0.4015284478664398, -0.0974573940038681, -0.6267959475517273, -1.3687411546707153, 0.7114370465278625, -0.17582526803016663, 0.08264520764350891, 0.6601707935333252, -0.6260825991630554, 0.948150634765625, 0.775040328502655, 0.8438484072685242, 0.13770009577274323, 0.21177351474761963, 0.38831406831741333, -0.49034926295280457, -1.120063304901123, -0.25425294041633606, -1.2075845003128052, -2.5525567531585693, 0.3641434609889984, -0.17054812610149384, -1.3115489482879639, 0.03627464175224304, -0.9936380386352539, 1.1114654541015625, -0.5260727405548096, -1.0991055965423584, -1.3540414571762085, 0.3024170398712158, -0.013993901200592518, 0.8497637510299683, -1.7111579179763794, -0.053740568459033966, 1.2413220405578613, 0.8693339824676514, -0.7194328904151917, 0.9549318552017212, 0.2839503884315491, 1.2131553888320923, 0.737671434879303, -0.3169277608394623, 0.5666862726211548, -0.014179635792970657, -1.340003490447998, 0.5269564986228943, 1.1594882011413574, 0.11626454442739487, 1.4128074645996094, -0.4140368402004242, -0.06124994158744812, 0.3559117615222931, -0.5893585085868835, -0.5142480731010437, -0.3982357680797577, 0.5347075462341309, 0.04420620948076248, -0.9047900438308716, -0.053328484296798706, 0.036384742707014084, -0.3141323924064636, 0.17862409353256226, -1.5308281183242798, -0.21018147468566895, -0.4715426564216614, -0.432949423789978, -1.3244564533233643, -0.14650696516036987, 1.2943345308303833, -0.6110410690307617, -0.3178206980228424, 0.5660497546195984, 0.3330034017562866, 0.4522269666194916, 0.5934585928916931, -0.6998858451843262, -0.33070361614227295, -0.17670199275016785, -0.4378465712070465, 0.23329181969165802, 1.3941752910614014, -0.0981646254658699, -0.9576940536499023, 0.7089930176734924, -0.33778128027915955, 0.07603523880243301, 1.8112508058547974, -0.05010322853922844, -0.8401237726211548, 0.2805231809616089, -0.7311693429946899, 1.9244318008422852, 1.682593584060669, 1.2813339233398438, -0.3099021017551422, -0.7920565009117126, 0.6841638088226318, -0.3909856081008911, -0.4263628423213959, 0.7914919853210449, 0.4278683662414551, -0.2226196974515915, -1.4759480953216553, 0.745966911315918, 1.3308219909667969, -0.7841638326644897, -0.8079212307929993, 0.22012968361377716, -0.7912904620170593, 1.1355936527252197, 0.6046764254570007, 0.3815990686416626, 0.3152312934398651, 1.6541441679000854, 0.78498375415802, -0.5153518319129944, 0.5721373558044434, 0.5477662086486816, -0.20179025828838348, -2.1530425548553467, -1.2562838792800903, 0.1898425966501236, -0.46618419885635376, -1.6773213148117065, 1.3060874938964844, -1.1059825420379639, -0.9682377576828003, 0.6141631603240967, 0.08249000459909439, 1.211682915687561, 0.40429553389549255, 1.4676060676574707, 2.0117945671081543, 0.6681255102157593, 0.47978201508522034, 1.175796627998352, -0.14776338636875153, -0.43627840280532837, 1.8065823316574097, -0.33636319637298584, 0.5566325187683105, 1.0893771648406982, -0.28197479248046875, -1.1913247108459473, -0.7268000841140747, -1.3145887851715088, -0.6668081879615784, 1.215233325958252, 0.08080504089593887, -1.1226085424423218, 0.2944384515285492, 1.592125415802002, 0.026010733097791672, -0.46272990107536316, 0.6742990016937256, 0.3506097197532654, -0.8861882090568542, -0.04052959382534027, -0.937630832195282, 0.5056790709495544, -0.20754574239253998, -0.2230871617794037, 0.41020289063453674, 0.49869754910469055, 1.3785426616668701, 0.0514034666121006, 0.2313147634267807, 0.9816930294036865, -1.3644436597824097, 1.5418781042099, -0.7607496380805969, 0.3829783499240875, -2.407346487045288, 1.3547515869140625, -0.7165221571922302, 2.0576248168945312, -2.6541030406951904, 0.5093125104904175, -0.583540141582489, -0.4951845407485962, 0.2910543978214264, -0.4015183448791504, 0.07021255791187286, -0.04458438977599144, -0.9940705895423889, 0.13804744184017181, -0.6027079820632935, 0.42934343218803406, 1.281565546989441, 1.3425127267837524, -1.0658109188079834, -0.21532273292541504, -1.7317184209823608, -0.20694486796855927, -0.8102756142616272, 0.2910749316215515, -2.036600351333618, -0.24897941946983337, -1.8460813760757446, -2.254828929901123, -1.2244971990585327, -0.9189204573631287, 1.1848337650299072, 0.14822544157505035, -0.9483820199966431, 1.357865571975708, -0.39527878165245056, -1.758811354637146, 1.0279041528701782, -2.0838873386383057 ]
https://github.com/huggingface/datasets/issues/5594
Error while downloading the xtreme udpos dataset
Hi! I cannot reproduce this error on my machine. The raised error could mean that one of the downloaded files is corrupted. To verify this is not the case, you can run `load_dataset` as follows: ```python train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload", verification_mode="all_checks") ```
### Describe the bug Hi, I am facing an error while downloading the xtreme udpos dataset using load_dataset. I have datasets 2.10.1 installed ```Downloading and preparing dataset xtreme/udpos.Arabic to /compute/tir-1-18/skhanuja/multilingual_ft/cache/data/xtreme/udpos.Arabic/1.0.0/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4... Downloading data: 16%|██████████████▏ | 56.9M/355M [03:11<16:43, 297kB/s] Generating train split: 0%| | 0/6075 [00:00<?, ? examples/s]Traceback (most recent call last): File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1608, in _prepare_split_single for key, record in generator: File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 732, in _generate_examples yield from UdposParser.generate_examples(config=self.config, filepath=filepath, **kwargs) File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 921, in generate_examples for path, file in filepath: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 158, in __iter__ yield from self.generator(*self.args, **self.kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 211, in _iter_from_path yield from cls._iter_tar(f) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 167, in _iter_tar for tarinfo in stream: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2475, in __iter__ tarinfo = self.next() File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2344, in next raise ReadError("unexpected end of data") tarfile.ReadError: unexpected end of data The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 855, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 487, in main train_dataset = load_dataset(dataset_name, source_language, split="train", cache_dir=args.cache_dir, download_mode="force_redownload") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 967, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1488, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1644, 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 ``` ### Steps to reproduce the bug ``` train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload") ``` ### Expected behavior Download the udpos dataset ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
278
45
Error while downloading the xtreme udpos dataset ### Describe the bug Hi, I am facing an error while downloading the xtreme udpos dataset using load_dataset. I have datasets 2.10.1 installed ```Downloading and preparing dataset xtreme/udpos.Arabic to /compute/tir-1-18/skhanuja/multilingual_ft/cache/data/xtreme/udpos.Arabic/1.0.0/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4... Downloading data: 16%|██████████████▏ | 56.9M/355M [03:11<16:43, 297kB/s] Generating train split: 0%| | 0/6075 [00:00<?, ? examples/s]Traceback (most recent call last): File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1608, in _prepare_split_single for key, record in generator: File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 732, in _generate_examples yield from UdposParser.generate_examples(config=self.config, filepath=filepath, **kwargs) File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 921, in generate_examples for path, file in filepath: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 158, in __iter__ yield from self.generator(*self.args, **self.kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 211, in _iter_from_path yield from cls._iter_tar(f) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 167, in _iter_tar for tarinfo in stream: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2475, in __iter__ tarinfo = self.next() File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2344, in next raise ReadError("unexpected end of data") tarfile.ReadError: unexpected end of data The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 855, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 487, in main train_dataset = load_dataset(dataset_name, source_language, split="train", cache_dir=args.cache_dir, download_mode="force_redownload") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 967, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1488, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1644, 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 ``` ### Steps to reproduce the bug ``` train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload") ``` ### Expected behavior Download the udpos dataset ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 Hi! I cannot reproduce this error on my machine. The raised error could mean that one of the downloaded files is corrupted. To verify this is not the case, you can run `load_dataset` as follows: ```python train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload", verification_mode="all_checks") ```
[ -1.144119143486023, -0.8995024561882019, -0.7754905819892883, 1.2917661666870117, -0.10625427961349487, -1.2262579202651978, 0.11179803311824799, -1.0710818767547607, 1.5105105638504028, -0.6548566818237305, 0.1799335777759552, -1.678903341293335, -0.07483324408531189, -0.5819866061210632, -0.6928461790084839, -0.8749968409538269, -0.3183824419975281, -0.9487552642822266, 0.9791311025619507, 2.6038293838500977, 1.2159253358840942, -1.306955337524414, 2.812206268310547, 0.5820719003677368, -0.30198320746421814, -0.9705291986465454, 0.6377695202827454, 0.03601639345288277, -1.271152138710022, -0.45250800251960754, -0.9601422548294067, 0.11014515161514282, -0.5558080077171326, -0.4087940454483032, 0.09637820720672607, 0.3271723687648773, -0.26395994424819946, -0.2409634292125702, -0.5512039065361023, -0.691761314868927, 0.5504863858222961, -0.2960999608039856, 0.9823578000068665, -0.3295400142669678, 1.791632890701294, -0.6280391216278076, 0.32697993516921997, 0.691534698009491, 1.320520281791687, 0.274130254983902, 0.12576693296432495, 0.2982574999332428, 0.2912900447845459, 0.03454822674393654, 0.39483577013015747, 1.2649223804473877, 0.5075935125350952, 0.4903641939163208, 0.6133908033370972, -2.1689698696136475, 1.327466607093811, -0.8863877058029175, 0.2772703766822815, 1.3142883777618408, -0.8409987688064575, 0.40357354283332825, -1.9343128204345703, -0.07760542631149292, 0.5561735033988953, -2.3122589588165283, 0.23954837024211884, -1.336559772491455, -0.607018768787384, 0.9196577072143555, 0.2111908495426178, -1.223560094833374, 0.31704962253570557, -0.5138171315193176, 1.106041669845581, 0.5022847652435303, 1.2130964994430542, -1.6788522005081177, -0.04847254976630211, -0.1935538351535797, 0.06785473227500916, -1.3469120264053345, -1.6350998878479004, 0.5210450887680054, 0.6047400832176208, 0.6458936333656311, -0.04771401733160019, 0.9670051336288452, -1.0217769145965576, 0.8667478561401367, -0.9363159537315369, -1.622187852859497, -1.392780065536499, -2.321068286895752, -2.24991774559021, 0.8419147729873657, -0.47013023495674133, -0.524221658706665, 1.924394130706787, -1.0056108236312866, -1.7588406801223755, 1.0486187934875488, 0.3999325633049011, -0.026710262522101402, 2.415571451187134, 0.23192818462848663, -0.7354158759117126, 0.4157278835773468, -0.795493483543396, 0.785563588142395, -0.2924997806549072, 1.3791929483413696, 0.5531035661697388, -0.9786710143089294, 1.6435439586639404, -0.445178359746933, 0.49576446413993835, -0.7393307685852051, -0.6445108652114868, -0.8511813879013062, 0.3805888593196869, 1.8855887651443481, -0.37109804153442383, 1.5953953266143799, -0.35355129837989807, -1.645531415939331, -1.5320913791656494, 0.850953996181488, 0.5526877045631409, -0.8885350227355957, 0.04961306229233742, -0.4973520040512085, 0.130560040473938, 0.016766684129834175, 1.0001659393310547, 1.2716971635818481, 0.6869902014732361, -0.23235759139060974, -0.8668755888938904, 0.22518326342105865, -0.16255542635917664, -0.6414681077003479, -1.8932040929794312, -0.343574583530426, 0.19961364567279816, 0.6468679904937744, -1.303902506828308, 1.686981439590454, 0.8500367999076843, 2.0513510704040527, 0.9721254110336304, -0.38062262535095215, 1.5174437761306763, 0.06409725546836853, 1.8414397239685059, -0.5156503319740295, 0.6375886797904968, -0.27553436160087585, -1.183465838432312, 0.8887664079666138, -0.3875875473022461, -2.0230915546417236, -0.8934333324432373, -0.7896406054496765, -0.17975763976573944, -0.8386653065681458, 0.8410951495170593, -0.28785333037376404, -1.5119450092315674, 0.23141294717788696, -0.5791981220245361, 0.13557089865207672, -1.319266676902771, 0.18597204983234406, 0.743579626083374, -0.668104350566864, -0.029514184221625328, -0.2283661812543869, -1.3132349252700806, -0.4813259541988373, 0.28658974170684814, 2.0100274085998535, -0.5824443101882935, 0.9867763519287109, 1.0258184671401978, -0.6841289401054382, 0.16404858231544495, 0.26515161991119385, -0.30707159638404846, 0.8206843733787537, -1.1467169523239136, -0.32262304425239563, 1.0764234066009521, -0.12660016119480133, -0.5665808320045471, 1.3643840551376343, 0.9212645292282104, -1.1016769409179688, -0.3290266692638397, -0.2102230042219162, -0.8328539729118347, -0.04257090017199516, -1.5674306154251099, -0.1593637615442276, 0.3497636318206787, -1.38251531124115, -0.3704086244106293, -0.25022727251052856, 1.3697689771652222, -0.22374717891216278, 1.4716527462005615, -0.2901609241962433, -0.1914254128932953, -0.3763866722583771, -0.47793886065483093, 0.13375724852085114, -0.25343331694602966, -0.5740841627120972, 0.2965078055858612, -0.8077321648597717, 0.2866383194923401, 1.4476814270019531, 0.3910103142261505, 0.03519150987267494, 0.47907891869544983, 1.0705022811889648, 0.3422403633594513, -0.019158735871315002, -0.8598405718803406, -1.5627577304840088, 2.015026807785034, -1.4368623495101929, 1.9007824659347534, 0.8608392477035522, -0.0474042072892189, -1.7968113422393799, -1.855870008468628, 1.3128905296325684, 1.109750509262085, 2.455185890197754, 0.5358672738075256, 0.482581228017807, -0.7660040855407715, -0.7064424753189087, 0.386678546667099, -1.028332233428955, -0.6798793077468872, 0.2187139391899109, 2.4113502502441406, 1.7100718021392822, -0.546095609664917, -0.2784351110458374, -0.8822957277297974, 1.1432734727859497, -0.13196159899234772, 0.1607319414615631, 2.124760389328003, -0.34230896830558777, -1.1175628900527954, 1.2597730159759521, -2.3150792121887207, 0.17618556320667267, 2.012871503829956, 0.2998356521129608, 0.06550952792167664, -1.4170926809310913, -0.613174557685852, -0.2875896990299225, -0.5059201717376709, -1.2197022438049316, 0.5751074552536011, -0.2519208490848541, -0.9635030031204224, -1.5587700605392456, 0.0119736697524786, -1.2246668338775635, -1.7251492738723755, 0.3891633450984955, 1.8788731098175049, 2.048750400543213, -0.7975230813026428, 1.3414801359176636, -0.2699243426322937, 0.05268436670303345, 1.1671546697616577, 1.3452328443527222, 3.108029842376709, 1.7604156732559204, -1.2860915660858154, 0.7998377680778503, -0.16052649915218353, -0.5450668931007385, 1.054659366607666, -1.1245814561843872, 1.153521180152893, -0.25981056690216064, -1.195430874824524, -1.2420439720153809, 1.019905686378479, 0.42802751064300537, 0.012401459738612175, -0.4347750246524811, 1.279199481010437, 0.19312874972820282, 1.356661319732666, 0.5286428332328796, -0.3297024071216583, 0.5714133381843567, -0.35125425457954407, -0.6350443363189697, 1.6415109634399414, 0.1726529598236084, -1.5178465843200684, -2.3885598182678223, -0.34663301706314087, -0.8576041460037231, -0.09287583827972412, -0.6141535043716431, -1.080607533454895, 1.641062617301941, 0.4154355525970459, -1.2096184492111206, -0.28044313192367554, -0.2960987389087677, -0.5700616240501404, 2.5267105102539062, -1.3385272026062012, -0.070871502161026, -0.8576555252075195, -0.48965686559677124, 1.5640795230865479, -1.1399106979370117, -0.21661768853664398, -0.974854588508606, -0.6679213643074036, -1.3264096975326538, -0.5527675151824951, 0.008151978254318237, -0.9126396179199219, 0.6923508644104004, 0.19706271588802338, -1.022483468055725, -0.17779837548732758, -0.9007706046104431, 1.0217926502227783, -0.07161591202020645, 0.24049651622772217, 1.838688611984253, 0.44297024607658386, -0.41931766271591187, 0.669858455657959, 1.1668142080307007, 0.5651835203170776, -0.6907798051834106, 0.01983741484582424, -0.7309157848358154, 0.26904335618019104, -1.3914610147476196, 0.2614005208015442, -2.931908130645752, 0.7130976915359497, -0.11927732825279236, -0.07171374559402466, -0.04272184148430824, -1.2909245491027832, 1.152374267578125, 2.641449451446533, -1.1248745918273926, 0.48134228587150574, 0.472883015871048, 1.1603827476501465, -1.599515676498413, 0.3697682321071625, -0.44063469767570496, 2.029130220413208, 0.17073914408683777, 1.2272354364395142, -0.5847705602645874, -2.1575968265533447, 0.6087878942489624, -1.2224100828170776, -1.1085872650146484, 0.779976487159729, -0.9636169672012329, 0.2059568464756012, -1.4571694135665894, -0.2178770750761032, -0.9609872102737427, -1.2788196802139282, 0.751106321811676, 0.06759408116340637, 0.5104501843452454, -0.5193153023719788, 0.456285297870636, -2.1463136672973633, -1.3655451536178589, -0.1791888326406479, -1.0306284427642822, 0.46458280086517334, -0.31192970275878906, 0.6217202544212341, -0.10382257401943207, 0.11899669468402863, 0.40317636728286743, 1.3817778825759888, 3.4095208644866943, 0.2266000509262085, 0.29015061259269714, -0.045813240110874176, -1.0171581506729126, 1.4224541187286377, 0.9117723703384399, -0.06198811158537865, -0.649102509021759, -0.9889934659004211, 1.2771235704421997, 2.1217572689056396, 1.1796438694000244, 0.10348361730575562, -0.8080320358276367, -0.7200443744659424, 0.11376529932022095, 0.2605276107788086, 0.48865872621536255, 0.9509668350219727, -0.10056436061859131, 0.10212060809135437, 1.4037270545959473, 1.2070364952087402, -0.4061706066131592, 0.40885746479034424, -0.9617619514465332, -0.4657774269580841, 0.3880845606327057, 0.2073613405227661, 0.06596393883228302, 0.49513909220695496, -1.0731253623962402, -0.28117987513542175, -0.313308984041214, -0.9560938477516174, -0.752961277961731, -0.3715858459472656, -0.3351035714149475, 1.5997984409332275, 0.05762641504406929, -0.3884750306606293, 0.04531749710440636, -0.7399217486381531, -0.2173997163772583, -1.1198365688323975, 0.12661179900169373, -0.09481658041477203, -0.07825694978237152, -0.10725454986095428, 1.776437759399414, -0.9738186001777649, -2.1011009216308594, 0.1710418164730072, 0.29988616704940796, -0.3657214939594269, 0.1715879887342453, 1.7325055599212646, 0.5501269102096558, 1.431380271911621, 1.2025401592254639, 0.9922041893005371, -0.5930891633033752, -1.246253490447998, 0.678570568561554, 0.9160023927688599, -1.3086774349212646, 0.9349498152732849, -0.14870619773864746, -0.5117769837379456, 0.67339688539505, 1.3326221704483032, 0.38733571767807007, -2.0012853145599365, 0.8610055446624756, -0.8698437809944153, 0.6386097073554993, 0.5915879607200623, 0.8056126832962036, 0.25319966673851013, 0.9036353826522827, -1.2611167430877686, -1.101639986038208, -0.7722354531288147, -0.5321125984191895, 1.9788554906845093, -0.162616565823555, 0.48498955368995667, -0.15893341600894928, -1.234865427017212, -0.07116039097309113, 0.7746253609657288, 0.39224109053611755, -0.45359447598457336, 0.8191636204719543, -0.5807026624679565, -1.0118266344070435, -1.3210430145263672, -0.40442198514938354, -1.0202428102493286, -0.8810095191001892, 0.9861652255058289, 0.7156306505203247, 0.4343870282173157, 1.904019832611084, 0.5964331030845642, 0.3011491000652313, -2.616455554962158, 0.9162369966506958, 0.29207274317741394, -0.07668837904930115, 0.9764692783355713, 0.2455146610736847, 1.1545826196670532, 0.028152097016572952, 0.5578122735023499, -2.362586259841919, 2.1741628646850586, -0.19421891868114471, 0.7176572680473328, 0.0749441385269165, -0.23753492534160614, 1.1228432655334473, 0.554526686668396, 0.5802353024482727, -1.1853935718536377, 0.7239377498626709, -0.6155534386634827, 1.07415771484375, 0.99897301197052, -0.8551898002624512, 0.13551315665245056, 1.3415735960006714, 0.4810006320476532, -0.36432284116744995, -0.8905408978462219, -0.8263391852378845, 0.9866234660148621, 1.6772887706756592, -0.09571138024330139, 0.06639818847179413, 0.8678867816925049, 0.6158115863800049, -1.2917548418045044, 0.07110640406608582, -0.746049702167511, -0.767015278339386, 1.7442452907562256, 2.0899417400360107, -0.09173256158828735, -0.22507885098457336, -0.7670785188674927, -1.2298327684402466, 0.8421289920806885, -0.11419089138507843, 0.27049604058265686, 0.6067931652069092, -0.7258036136627197, 1.2315409183502197, 0.6076601147651672, 1.0232975482940674, 0.08902934193611145, 0.366554856300354, 0.3453347384929657, -0.3125760555267334, -1.1215875148773193, -0.3913174569606781, -1.1033543348312378, -2.5369598865509033, 0.46717554330825806, -0.27913951873779297, -1.4662749767303467, 0.06357692182064056, -0.9905849695205688, 0.8693262338638306, -0.6432632803916931, -1.1042729616165161, -1.4937347173690796, 0.3853834867477417, -0.20713859796524048, 0.9680923223495483, -1.7174100875854492, -0.20596814155578613, 1.2441188097000122, 0.9158520102500916, -0.5630882382392883, 0.9500482082366943, 0.24226951599121094, 1.0001009702682495, 0.7629395723342896, -0.37619152665138245, 0.5342155694961548, 0.1557091474533081, -1.3189224004745483, 0.38513702154159546, 1.2445143461227417, 0.17583921551704407, 1.4555634260177612, -0.4545711278915405, 0.055952977389097214, 0.4544718563556671, -0.5263856649398804, -0.5245711207389832, -0.47648483514785767, 0.7364602088928223, 0.021026257425546646, -1.041719675064087, -0.03624078631401062, -0.2127315104007721, -0.19741526246070862, 0.23463834822177887, -1.4795278310775757, -0.4027010500431061, -0.3607894778251648, -0.4632909297943115, -1.314744472503662, 0.022524338215589523, 1.3421094417572021, -0.7712813019752502, -0.21974335610866547, 0.41466379165649414, 0.47936511039733887, 0.566051721572876, 0.6343907713890076, -0.6912379860877991, -0.42125311493873596, -0.3502395749092102, -0.3616083860397339, 0.25271230936050415, 1.2153204679489136, -0.07619550824165344, -1.0078374147415161, 0.707688570022583, -0.43960076570510864, 0.06621739268302917, 2.0042381286621094, -0.0038400092162191868, -0.7416689395904541, 0.3650226891040802, -0.6210020780563354, 1.8159599304199219, 1.7466106414794922, 1.3235646486282349, -0.11529576778411865, -0.8566219210624695, 0.5636715292930603, -0.1906503140926361, -0.3017522692680359, 1.0295363664627075, 0.515489399433136, -0.15696434676647186, -1.5260132551193237, 0.49062004685401917, 1.294351577758789, -0.9078829288482666, -0.7294378280639648, 0.003181241452693939, -0.9301204085350037, 1.172694206237793, 0.5985708832740784, 0.305317759513855, 0.193424791097641, 1.5694178342819214, 0.6794899106025696, -0.5249043703079224, 0.5146394371986389, 0.4534248411655426, -0.1748937964439392, -2.1697497367858887, -1.0333224534988403, 0.31134137511253357, -0.25634971261024475, -1.4749809503555298, 1.3098812103271484, -1.046797513961792, -1.005683422088623, 0.5667511224746704, 0.09457458555698395, 1.3115202188491821, 0.31018441915512085, 1.7548023462295532, 2.173069953918457, 0.9095572829246521, 0.23573029041290283, 1.2917964458465576, -0.049291424453258514, -0.426554799079895, 1.8228094577789307, -0.4330470860004425, 0.5675735473632812, 1.0014839172363281, -0.3702074885368347, -1.0831968784332275, -0.8182743191719055, -1.181327223777771, -0.6202195286750793, 1.1990694999694824, 0.1369328796863556, -1.190970540046692, 0.21053458750247955, 1.624866247177124, 0.13795530796051025, -0.24796214699745178, 0.6639854311943054, 0.5387296676635742, -0.6794326901435852, -0.08582264184951782, -0.9071000814437866, 0.49880853295326233, -0.19063013792037964, -0.31360524892807007, 0.19682249426841736, 0.5779551863670349, 1.3003785610198975, -0.11024059355258942, 0.08772332966327667, 1.181984305381775, -1.4306716918945312, 1.4934521913528442, -0.6102667450904846, 0.2463727593421936, -2.3746109008789062, 1.306955099105835, -0.7439727187156677, 1.8395582437515259, -2.6151010990142822, 0.4305247664451599, -0.5392214059829712, -0.40349137783050537, 0.3188822269439697, -0.44124433398246765, 0.183688685297966, -0.18100818991661072, -0.9544965028762817, -0.11701986193656921, -0.7501009702682495, 0.6472816467285156, 1.109035611152649, 1.3174887895584106, -1.024074912071228, -0.28496840596199036, -1.6967655420303345, -0.24375033378601074, -0.6531381011009216, 0.17361034452915192, -1.9561741352081299, -0.17613501846790314, -2.0219624042510986, -2.3379437923431396, -1.4633092880249023, -0.8914764523506165, 1.0629931688308716, 0.18488016724586487, -0.9751111268997192, 1.0980010032653809, -0.3795631527900696, -1.7935638427734375, 1.1806923151016235, -2.1629257202148438 ]
https://github.com/huggingface/datasets/issues/5594
Error while downloading the xtreme udpos dataset
Hi! Apologies for the delayed response! I tried the above and it doesn't solve the issue. Actually, the dataset gets downloaded most times, but sometimes this error occurs (at random afaik). Is it possible that there is a server issue for this particular dataset? I am able to download other datasets using the same code on the same machine with no issues :( I get this error now : ``` Downloading data: 16%|███████████████▌ | 55.9M/355M [04:45<25:25, 196kB/s] Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 1107, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 439, in main en_dataset = load_dataset("xtreme", "udpos.English", split="train", download_mode="force_redownload", verification_mode="all_checks") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 949, in _download_and_prepare verify_checksums( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/utils/info_utils.py", line 62, in verify_checksums raise NonMatchingChecksumError( datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-3105/ud-treebanks-v2.5.tgz'] Set `verification_mode='no_checks'` to skip checksums verification and ignore this error ```
### Describe the bug Hi, I am facing an error while downloading the xtreme udpos dataset using load_dataset. I have datasets 2.10.1 installed ```Downloading and preparing dataset xtreme/udpos.Arabic to /compute/tir-1-18/skhanuja/multilingual_ft/cache/data/xtreme/udpos.Arabic/1.0.0/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4... Downloading data: 16%|██████████████▏ | 56.9M/355M [03:11<16:43, 297kB/s] Generating train split: 0%| | 0/6075 [00:00<?, ? examples/s]Traceback (most recent call last): File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1608, in _prepare_split_single for key, record in generator: File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 732, in _generate_examples yield from UdposParser.generate_examples(config=self.config, filepath=filepath, **kwargs) File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 921, in generate_examples for path, file in filepath: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 158, in __iter__ yield from self.generator(*self.args, **self.kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 211, in _iter_from_path yield from cls._iter_tar(f) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 167, in _iter_tar for tarinfo in stream: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2475, in __iter__ tarinfo = self.next() File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2344, in next raise ReadError("unexpected end of data") tarfile.ReadError: unexpected end of data The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 855, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 487, in main train_dataset = load_dataset(dataset_name, source_language, split="train", cache_dir=args.cache_dir, download_mode="force_redownload") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 967, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1488, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1644, 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 ``` ### Steps to reproduce the bug ``` train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload") ``` ### Expected behavior Download the udpos dataset ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
278
158
Error while downloading the xtreme udpos dataset ### Describe the bug Hi, I am facing an error while downloading the xtreme udpos dataset using load_dataset. I have datasets 2.10.1 installed ```Downloading and preparing dataset xtreme/udpos.Arabic to /compute/tir-1-18/skhanuja/multilingual_ft/cache/data/xtreme/udpos.Arabic/1.0.0/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4... Downloading data: 16%|██████████████▏ | 56.9M/355M [03:11<16:43, 297kB/s] Generating train split: 0%| | 0/6075 [00:00<?, ? examples/s]Traceback (most recent call last): File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1608, in _prepare_split_single for key, record in generator: File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 732, in _generate_examples yield from UdposParser.generate_examples(config=self.config, filepath=filepath, **kwargs) File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 921, in generate_examples for path, file in filepath: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 158, in __iter__ yield from self.generator(*self.args, **self.kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 211, in _iter_from_path yield from cls._iter_tar(f) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 167, in _iter_tar for tarinfo in stream: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2475, in __iter__ tarinfo = self.next() File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2344, in next raise ReadError("unexpected end of data") tarfile.ReadError: unexpected end of data The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 855, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 487, in main train_dataset = load_dataset(dataset_name, source_language, split="train", cache_dir=args.cache_dir, download_mode="force_redownload") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 967, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1488, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1644, 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 ``` ### Steps to reproduce the bug ``` train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload") ``` ### Expected behavior Download the udpos dataset ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 Hi! Apologies for the delayed response! I tried the above and it doesn't solve the issue. Actually, the dataset gets downloaded most times, but sometimes this error occurs (at random afaik). Is it possible that there is a server issue for this particular dataset? I am able to download other datasets using the same code on the same machine with no issues :( I get this error now : ``` Downloading data: 16%|███████████████▌ | 55.9M/355M [04:45<25:25, 196kB/s] Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 1107, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 439, in main en_dataset = load_dataset("xtreme", "udpos.English", split="train", download_mode="force_redownload", verification_mode="all_checks") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 949, in _download_and_prepare verify_checksums( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/utils/info_utils.py", line 62, in verify_checksums raise NonMatchingChecksumError( datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-3105/ud-treebanks-v2.5.tgz'] Set `verification_mode='no_checks'` to skip checksums verification and ignore this error ```
[ -1.144119143486023, -0.8995024561882019, -0.7754905819892883, 1.2917661666870117, -0.10625427961349487, -1.2262579202651978, 0.11179803311824799, -1.0710818767547607, 1.5105105638504028, -0.6548566818237305, 0.1799335777759552, -1.678903341293335, -0.07483324408531189, -0.5819866061210632, -0.6928461790084839, -0.8749968409538269, -0.3183824419975281, -0.9487552642822266, 0.9791311025619507, 2.6038293838500977, 1.2159253358840942, -1.306955337524414, 2.812206268310547, 0.5820719003677368, -0.30198320746421814, -0.9705291986465454, 0.6377695202827454, 0.03601639345288277, -1.271152138710022, -0.45250800251960754, -0.9601422548294067, 0.11014515161514282, -0.5558080077171326, -0.4087940454483032, 0.09637820720672607, 0.3271723687648773, -0.26395994424819946, -0.2409634292125702, -0.5512039065361023, -0.691761314868927, 0.5504863858222961, -0.2960999608039856, 0.9823578000068665, -0.3295400142669678, 1.791632890701294, -0.6280391216278076, 0.32697993516921997, 0.691534698009491, 1.320520281791687, 0.274130254983902, 0.12576693296432495, 0.2982574999332428, 0.2912900447845459, 0.03454822674393654, 0.39483577013015747, 1.2649223804473877, 0.5075935125350952, 0.4903641939163208, 0.6133908033370972, -2.1689698696136475, 1.327466607093811, -0.8863877058029175, 0.2772703766822815, 1.3142883777618408, -0.8409987688064575, 0.40357354283332825, -1.9343128204345703, -0.07760542631149292, 0.5561735033988953, -2.3122589588165283, 0.23954837024211884, -1.336559772491455, -0.607018768787384, 0.9196577072143555, 0.2111908495426178, -1.223560094833374, 0.31704962253570557, -0.5138171315193176, 1.106041669845581, 0.5022847652435303, 1.2130964994430542, -1.6788522005081177, -0.04847254976630211, -0.1935538351535797, 0.06785473227500916, -1.3469120264053345, -1.6350998878479004, 0.5210450887680054, 0.6047400832176208, 0.6458936333656311, -0.04771401733160019, 0.9670051336288452, -1.0217769145965576, 0.8667478561401367, -0.9363159537315369, -1.622187852859497, -1.392780065536499, -2.321068286895752, -2.24991774559021, 0.8419147729873657, -0.47013023495674133, -0.524221658706665, 1.924394130706787, -1.0056108236312866, -1.7588406801223755, 1.0486187934875488, 0.3999325633049011, -0.026710262522101402, 2.415571451187134, 0.23192818462848663, -0.7354158759117126, 0.4157278835773468, -0.795493483543396, 0.785563588142395, -0.2924997806549072, 1.3791929483413696, 0.5531035661697388, -0.9786710143089294, 1.6435439586639404, -0.445178359746933, 0.49576446413993835, -0.7393307685852051, -0.6445108652114868, -0.8511813879013062, 0.3805888593196869, 1.8855887651443481, -0.37109804153442383, 1.5953953266143799, -0.35355129837989807, -1.645531415939331, -1.5320913791656494, 0.850953996181488, 0.5526877045631409, -0.8885350227355957, 0.04961306229233742, -0.4973520040512085, 0.130560040473938, 0.016766684129834175, 1.0001659393310547, 1.2716971635818481, 0.6869902014732361, -0.23235759139060974, -0.8668755888938904, 0.22518326342105865, -0.16255542635917664, -0.6414681077003479, -1.8932040929794312, -0.343574583530426, 0.19961364567279816, 0.6468679904937744, -1.303902506828308, 1.686981439590454, 0.8500367999076843, 2.0513510704040527, 0.9721254110336304, -0.38062262535095215, 1.5174437761306763, 0.06409725546836853, 1.8414397239685059, -0.5156503319740295, 0.6375886797904968, -0.27553436160087585, -1.183465838432312, 0.8887664079666138, -0.3875875473022461, -2.0230915546417236, -0.8934333324432373, -0.7896406054496765, -0.17975763976573944, -0.8386653065681458, 0.8410951495170593, -0.28785333037376404, -1.5119450092315674, 0.23141294717788696, -0.5791981220245361, 0.13557089865207672, -1.319266676902771, 0.18597204983234406, 0.743579626083374, -0.668104350566864, -0.029514184221625328, -0.2283661812543869, -1.3132349252700806, -0.4813259541988373, 0.28658974170684814, 2.0100274085998535, -0.5824443101882935, 0.9867763519287109, 1.0258184671401978, -0.6841289401054382, 0.16404858231544495, 0.26515161991119385, -0.30707159638404846, 0.8206843733787537, -1.1467169523239136, -0.32262304425239563, 1.0764234066009521, -0.12660016119480133, -0.5665808320045471, 1.3643840551376343, 0.9212645292282104, -1.1016769409179688, -0.3290266692638397, -0.2102230042219162, -0.8328539729118347, -0.04257090017199516, -1.5674306154251099, -0.1593637615442276, 0.3497636318206787, -1.38251531124115, -0.3704086244106293, -0.25022727251052856, 1.3697689771652222, -0.22374717891216278, 1.4716527462005615, -0.2901609241962433, -0.1914254128932953, -0.3763866722583771, -0.47793886065483093, 0.13375724852085114, -0.25343331694602966, -0.5740841627120972, 0.2965078055858612, -0.8077321648597717, 0.2866383194923401, 1.4476814270019531, 0.3910103142261505, 0.03519150987267494, 0.47907891869544983, 1.0705022811889648, 0.3422403633594513, -0.019158735871315002, -0.8598405718803406, -1.5627577304840088, 2.015026807785034, -1.4368623495101929, 1.9007824659347534, 0.8608392477035522, -0.0474042072892189, -1.7968113422393799, -1.855870008468628, 1.3128905296325684, 1.109750509262085, 2.455185890197754, 0.5358672738075256, 0.482581228017807, -0.7660040855407715, -0.7064424753189087, 0.386678546667099, -1.028332233428955, -0.6798793077468872, 0.2187139391899109, 2.4113502502441406, 1.7100718021392822, -0.546095609664917, -0.2784351110458374, -0.8822957277297974, 1.1432734727859497, -0.13196159899234772, 0.1607319414615631, 2.124760389328003, -0.34230896830558777, -1.1175628900527954, 1.2597730159759521, -2.3150792121887207, 0.17618556320667267, 2.012871503829956, 0.2998356521129608, 0.06550952792167664, -1.4170926809310913, -0.613174557685852, -0.2875896990299225, -0.5059201717376709, -1.2197022438049316, 0.5751074552536011, -0.2519208490848541, -0.9635030031204224, -1.5587700605392456, 0.0119736697524786, -1.2246668338775635, -1.7251492738723755, 0.3891633450984955, 1.8788731098175049, 2.048750400543213, -0.7975230813026428, 1.3414801359176636, -0.2699243426322937, 0.05268436670303345, 1.1671546697616577, 1.3452328443527222, 3.108029842376709, 1.7604156732559204, -1.2860915660858154, 0.7998377680778503, -0.16052649915218353, -0.5450668931007385, 1.054659366607666, -1.1245814561843872, 1.153521180152893, -0.25981056690216064, -1.195430874824524, -1.2420439720153809, 1.019905686378479, 0.42802751064300537, 0.012401459738612175, -0.4347750246524811, 1.279199481010437, 0.19312874972820282, 1.356661319732666, 0.5286428332328796, -0.3297024071216583, 0.5714133381843567, -0.35125425457954407, -0.6350443363189697, 1.6415109634399414, 0.1726529598236084, -1.5178465843200684, -2.3885598182678223, -0.34663301706314087, -0.8576041460037231, -0.09287583827972412, -0.6141535043716431, -1.080607533454895, 1.641062617301941, 0.4154355525970459, -1.2096184492111206, -0.28044313192367554, -0.2960987389087677, -0.5700616240501404, 2.5267105102539062, -1.3385272026062012, -0.070871502161026, -0.8576555252075195, -0.48965686559677124, 1.5640795230865479, -1.1399106979370117, -0.21661768853664398, -0.974854588508606, -0.6679213643074036, -1.3264096975326538, -0.5527675151824951, 0.008151978254318237, -0.9126396179199219, 0.6923508644104004, 0.19706271588802338, -1.022483468055725, -0.17779837548732758, -0.9007706046104431, 1.0217926502227783, -0.07161591202020645, 0.24049651622772217, 1.838688611984253, 0.44297024607658386, -0.41931766271591187, 0.669858455657959, 1.1668142080307007, 0.5651835203170776, -0.6907798051834106, 0.01983741484582424, -0.7309157848358154, 0.26904335618019104, -1.3914610147476196, 0.2614005208015442, -2.931908130645752, 0.7130976915359497, -0.11927732825279236, -0.07171374559402466, -0.04272184148430824, -1.2909245491027832, 1.152374267578125, 2.641449451446533, -1.1248745918273926, 0.48134228587150574, 0.472883015871048, 1.1603827476501465, -1.599515676498413, 0.3697682321071625, -0.44063469767570496, 2.029130220413208, 0.17073914408683777, 1.2272354364395142, -0.5847705602645874, -2.1575968265533447, 0.6087878942489624, -1.2224100828170776, -1.1085872650146484, 0.779976487159729, -0.9636169672012329, 0.2059568464756012, -1.4571694135665894, -0.2178770750761032, -0.9609872102737427, -1.2788196802139282, 0.751106321811676, 0.06759408116340637, 0.5104501843452454, -0.5193153023719788, 0.456285297870636, -2.1463136672973633, -1.3655451536178589, -0.1791888326406479, -1.0306284427642822, 0.46458280086517334, -0.31192970275878906, 0.6217202544212341, -0.10382257401943207, 0.11899669468402863, 0.40317636728286743, 1.3817778825759888, 3.4095208644866943, 0.2266000509262085, 0.29015061259269714, -0.045813240110874176, -1.0171581506729126, 1.4224541187286377, 0.9117723703384399, -0.06198811158537865, -0.649102509021759, -0.9889934659004211, 1.2771235704421997, 2.1217572689056396, 1.1796438694000244, 0.10348361730575562, -0.8080320358276367, -0.7200443744659424, 0.11376529932022095, 0.2605276107788086, 0.48865872621536255, 0.9509668350219727, -0.10056436061859131, 0.10212060809135437, 1.4037270545959473, 1.2070364952087402, -0.4061706066131592, 0.40885746479034424, -0.9617619514465332, -0.4657774269580841, 0.3880845606327057, 0.2073613405227661, 0.06596393883228302, 0.49513909220695496, -1.0731253623962402, -0.28117987513542175, -0.313308984041214, -0.9560938477516174, -0.752961277961731, -0.3715858459472656, -0.3351035714149475, 1.5997984409332275, 0.05762641504406929, -0.3884750306606293, 0.04531749710440636, -0.7399217486381531, -0.2173997163772583, -1.1198365688323975, 0.12661179900169373, -0.09481658041477203, -0.07825694978237152, -0.10725454986095428, 1.776437759399414, -0.9738186001777649, -2.1011009216308594, 0.1710418164730072, 0.29988616704940796, -0.3657214939594269, 0.1715879887342453, 1.7325055599212646, 0.5501269102096558, 1.431380271911621, 1.2025401592254639, 0.9922041893005371, -0.5930891633033752, -1.246253490447998, 0.678570568561554, 0.9160023927688599, -1.3086774349212646, 0.9349498152732849, -0.14870619773864746, -0.5117769837379456, 0.67339688539505, 1.3326221704483032, 0.38733571767807007, -2.0012853145599365, 0.8610055446624756, -0.8698437809944153, 0.6386097073554993, 0.5915879607200623, 0.8056126832962036, 0.25319966673851013, 0.9036353826522827, -1.2611167430877686, -1.101639986038208, -0.7722354531288147, -0.5321125984191895, 1.9788554906845093, -0.162616565823555, 0.48498955368995667, -0.15893341600894928, -1.234865427017212, -0.07116039097309113, 0.7746253609657288, 0.39224109053611755, -0.45359447598457336, 0.8191636204719543, -0.5807026624679565, -1.0118266344070435, -1.3210430145263672, -0.40442198514938354, -1.0202428102493286, -0.8810095191001892, 0.9861652255058289, 0.7156306505203247, 0.4343870282173157, 1.904019832611084, 0.5964331030845642, 0.3011491000652313, -2.616455554962158, 0.9162369966506958, 0.29207274317741394, -0.07668837904930115, 0.9764692783355713, 0.2455146610736847, 1.1545826196670532, 0.028152097016572952, 0.5578122735023499, -2.362586259841919, 2.1741628646850586, -0.19421891868114471, 0.7176572680473328, 0.0749441385269165, -0.23753492534160614, 1.1228432655334473, 0.554526686668396, 0.5802353024482727, -1.1853935718536377, 0.7239377498626709, -0.6155534386634827, 1.07415771484375, 0.99897301197052, -0.8551898002624512, 0.13551315665245056, 1.3415735960006714, 0.4810006320476532, -0.36432284116744995, -0.8905408978462219, -0.8263391852378845, 0.9866234660148621, 1.6772887706756592, -0.09571138024330139, 0.06639818847179413, 0.8678867816925049, 0.6158115863800049, -1.2917548418045044, 0.07110640406608582, -0.746049702167511, -0.767015278339386, 1.7442452907562256, 2.0899417400360107, -0.09173256158828735, -0.22507885098457336, -0.7670785188674927, -1.2298327684402466, 0.8421289920806885, -0.11419089138507843, 0.27049604058265686, 0.6067931652069092, -0.7258036136627197, 1.2315409183502197, 0.6076601147651672, 1.0232975482940674, 0.08902934193611145, 0.366554856300354, 0.3453347384929657, -0.3125760555267334, -1.1215875148773193, -0.3913174569606781, -1.1033543348312378, -2.5369598865509033, 0.46717554330825806, -0.27913951873779297, -1.4662749767303467, 0.06357692182064056, -0.9905849695205688, 0.8693262338638306, -0.6432632803916931, -1.1042729616165161, -1.4937347173690796, 0.3853834867477417, -0.20713859796524048, 0.9680923223495483, -1.7174100875854492, -0.20596814155578613, 1.2441188097000122, 0.9158520102500916, -0.5630882382392883, 0.9500482082366943, 0.24226951599121094, 1.0001009702682495, 0.7629395723342896, -0.37619152665138245, 0.5342155694961548, 0.1557091474533081, -1.3189224004745483, 0.38513702154159546, 1.2445143461227417, 0.17583921551704407, 1.4555634260177612, -0.4545711278915405, 0.055952977389097214, 0.4544718563556671, -0.5263856649398804, -0.5245711207389832, -0.47648483514785767, 0.7364602088928223, 0.021026257425546646, -1.041719675064087, -0.03624078631401062, -0.2127315104007721, -0.19741526246070862, 0.23463834822177887, -1.4795278310775757, -0.4027010500431061, -0.3607894778251648, -0.4632909297943115, -1.314744472503662, 0.022524338215589523, 1.3421094417572021, -0.7712813019752502, -0.21974335610866547, 0.41466379165649414, 0.47936511039733887, 0.566051721572876, 0.6343907713890076, -0.6912379860877991, -0.42125311493873596, -0.3502395749092102, -0.3616083860397339, 0.25271230936050415, 1.2153204679489136, -0.07619550824165344, -1.0078374147415161, 0.707688570022583, -0.43960076570510864, 0.06621739268302917, 2.0042381286621094, -0.0038400092162191868, -0.7416689395904541, 0.3650226891040802, -0.6210020780563354, 1.8159599304199219, 1.7466106414794922, 1.3235646486282349, -0.11529576778411865, -0.8566219210624695, 0.5636715292930603, -0.1906503140926361, -0.3017522692680359, 1.0295363664627075, 0.515489399433136, -0.15696434676647186, -1.5260132551193237, 0.49062004685401917, 1.294351577758789, -0.9078829288482666, -0.7294378280639648, 0.003181241452693939, -0.9301204085350037, 1.172694206237793, 0.5985708832740784, 0.305317759513855, 0.193424791097641, 1.5694178342819214, 0.6794899106025696, -0.5249043703079224, 0.5146394371986389, 0.4534248411655426, -0.1748937964439392, -2.1697497367858887, -1.0333224534988403, 0.31134137511253357, -0.25634971261024475, -1.4749809503555298, 1.3098812103271484, -1.046797513961792, -1.005683422088623, 0.5667511224746704, 0.09457458555698395, 1.3115202188491821, 0.31018441915512085, 1.7548023462295532, 2.173069953918457, 0.9095572829246521, 0.23573029041290283, 1.2917964458465576, -0.049291424453258514, -0.426554799079895, 1.8228094577789307, -0.4330470860004425, 0.5675735473632812, 1.0014839172363281, -0.3702074885368347, -1.0831968784332275, -0.8182743191719055, -1.181327223777771, -0.6202195286750793, 1.1990694999694824, 0.1369328796863556, -1.190970540046692, 0.21053458750247955, 1.624866247177124, 0.13795530796051025, -0.24796214699745178, 0.6639854311943054, 0.5387296676635742, -0.6794326901435852, -0.08582264184951782, -0.9071000814437866, 0.49880853295326233, -0.19063013792037964, -0.31360524892807007, 0.19682249426841736, 0.5779551863670349, 1.3003785610198975, -0.11024059355258942, 0.08772332966327667, 1.181984305381775, -1.4306716918945312, 1.4934521913528442, -0.6102667450904846, 0.2463727593421936, -2.3746109008789062, 1.306955099105835, -0.7439727187156677, 1.8395582437515259, -2.6151010990142822, 0.4305247664451599, -0.5392214059829712, -0.40349137783050537, 0.3188822269439697, -0.44124433398246765, 0.183688685297966, -0.18100818991661072, -0.9544965028762817, -0.11701986193656921, -0.7501009702682495, 0.6472816467285156, 1.109035611152649, 1.3174887895584106, -1.024074912071228, -0.28496840596199036, -1.6967655420303345, -0.24375033378601074, -0.6531381011009216, 0.17361034452915192, -1.9561741352081299, -0.17613501846790314, -2.0219624042510986, -2.3379437923431396, -1.4633092880249023, -0.8914764523506165, 1.0629931688308716, 0.18488016724586487, -0.9751111268997192, 1.0980010032653809, -0.3795631527900696, -1.7935638427734375, 1.1806923151016235, -2.1629257202148438 ]
https://github.com/huggingface/datasets/issues/5594
Error while downloading the xtreme udpos dataset
If this happens randomly, then this means the data file from the error message is not always downloaded correctly. The only solution in this scenario is to download the dataset again by passing `download_mode="force_redownload"` to the `load_dataset` call.
### Describe the bug Hi, I am facing an error while downloading the xtreme udpos dataset using load_dataset. I have datasets 2.10.1 installed ```Downloading and preparing dataset xtreme/udpos.Arabic to /compute/tir-1-18/skhanuja/multilingual_ft/cache/data/xtreme/udpos.Arabic/1.0.0/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4... Downloading data: 16%|██████████████▏ | 56.9M/355M [03:11<16:43, 297kB/s] Generating train split: 0%| | 0/6075 [00:00<?, ? examples/s]Traceback (most recent call last): File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1608, in _prepare_split_single for key, record in generator: File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 732, in _generate_examples yield from UdposParser.generate_examples(config=self.config, filepath=filepath, **kwargs) File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 921, in generate_examples for path, file in filepath: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 158, in __iter__ yield from self.generator(*self.args, **self.kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 211, in _iter_from_path yield from cls._iter_tar(f) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 167, in _iter_tar for tarinfo in stream: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2475, in __iter__ tarinfo = self.next() File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2344, in next raise ReadError("unexpected end of data") tarfile.ReadError: unexpected end of data The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 855, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 487, in main train_dataset = load_dataset(dataset_name, source_language, split="train", cache_dir=args.cache_dir, download_mode="force_redownload") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 967, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1488, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1644, 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 ``` ### Steps to reproduce the bug ``` train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload") ``` ### Expected behavior Download the udpos dataset ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
278
38
Error while downloading the xtreme udpos dataset ### Describe the bug Hi, I am facing an error while downloading the xtreme udpos dataset using load_dataset. I have datasets 2.10.1 installed ```Downloading and preparing dataset xtreme/udpos.Arabic to /compute/tir-1-18/skhanuja/multilingual_ft/cache/data/xtreme/udpos.Arabic/1.0.0/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4... Downloading data: 16%|██████████████▏ | 56.9M/355M [03:11<16:43, 297kB/s] Generating train split: 0%| | 0/6075 [00:00<?, ? examples/s]Traceback (most recent call last): File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1608, in _prepare_split_single for key, record in generator: File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 732, in _generate_examples yield from UdposParser.generate_examples(config=self.config, filepath=filepath, **kwargs) File "/home/skhanuja/.cache/huggingface/modules/datasets_modules/datasets/xtreme/29f5d57a48779f37ccb75cb8708d1095448aad0713b425bdc1ff9a4a128a56e4/xtreme.py", line 921, in generate_examples for path, file in filepath: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 158, in __iter__ yield from self.generator(*self.args, **self.kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 211, in _iter_from_path yield from cls._iter_tar(f) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/download/download_manager.py", line 167, in _iter_tar for tarinfo in stream: File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2475, in __iter__ tarinfo = self.next() File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/tarfile.py", line 2344, in next raise ReadError("unexpected end of data") tarfile.ReadError: unexpected end of data The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 855, in <module> main() File "/home/skhanuja/Optimal-Resource-Allocation-for-Multilingual-Finetuning/src/train_al.py", line 487, in main train_dataset = load_dataset(dataset_name, source_language, split="train", cache_dir=args.cache_dir, download_mode="force_redownload") File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset builder_instance.download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare self._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare super()._download_and_prepare( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 967, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1488, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/skhanuja/miniconda3/envs/multilingual_ft/lib/python3.10/site-packages/datasets/builder.py", line 1644, 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 ``` ### Steps to reproduce the bug ``` train_dataset = load_dataset('xtreme', 'udpos.English', split="train", cache_dir=args.cache_dir, download_mode="force_redownload") ``` ### Expected behavior Download the udpos dataset ### Environment info - `datasets` version: 2.10.1 - Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.17 - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 If this happens randomly, then this means the data file from the error message is not always downloaded correctly. The only solution in this scenario is to download the dataset again by passing `download_mode="force_redownload"` to the `load_dataset` call.
[ -1.144119143486023, -0.8995024561882019, -0.7754905819892883, 1.2917661666870117, -0.10625427961349487, -1.2262579202651978, 0.11179803311824799, -1.0710818767547607, 1.5105105638504028, -0.6548566818237305, 0.1799335777759552, -1.678903341293335, -0.07483324408531189, -0.5819866061210632, -0.6928461790084839, -0.8749968409538269, -0.3183824419975281, -0.9487552642822266, 0.9791311025619507, 2.6038293838500977, 1.2159253358840942, -1.306955337524414, 2.812206268310547, 0.5820719003677368, -0.30198320746421814, -0.9705291986465454, 0.6377695202827454, 0.03601639345288277, -1.271152138710022, -0.45250800251960754, -0.9601422548294067, 0.11014515161514282, -0.5558080077171326, -0.4087940454483032, 0.09637820720672607, 0.3271723687648773, -0.26395994424819946, -0.2409634292125702, -0.5512039065361023, -0.691761314868927, 0.5504863858222961, -0.2960999608039856, 0.9823578000068665, -0.3295400142669678, 1.791632890701294, -0.6280391216278076, 0.32697993516921997, 0.691534698009491, 1.320520281791687, 0.274130254983902, 0.12576693296432495, 0.2982574999332428, 0.2912900447845459, 0.03454822674393654, 0.39483577013015747, 1.2649223804473877, 0.5075935125350952, 0.4903641939163208, 0.6133908033370972, -2.1689698696136475, 1.327466607093811, -0.8863877058029175, 0.2772703766822815, 1.3142883777618408, -0.8409987688064575, 0.40357354283332825, -1.9343128204345703, -0.07760542631149292, 0.5561735033988953, -2.3122589588165283, 0.23954837024211884, -1.336559772491455, -0.607018768787384, 0.9196577072143555, 0.2111908495426178, -1.223560094833374, 0.31704962253570557, -0.5138171315193176, 1.106041669845581, 0.5022847652435303, 1.2130964994430542, -1.6788522005081177, -0.04847254976630211, -0.1935538351535797, 0.06785473227500916, -1.3469120264053345, -1.6350998878479004, 0.5210450887680054, 0.6047400832176208, 0.6458936333656311, -0.04771401733160019, 0.9670051336288452, -1.0217769145965576, 0.8667478561401367, -0.9363159537315369, -1.622187852859497, -1.392780065536499, -2.321068286895752, -2.24991774559021, 0.8419147729873657, -0.47013023495674133, -0.524221658706665, 1.924394130706787, -1.0056108236312866, -1.7588406801223755, 1.0486187934875488, 0.3999325633049011, -0.026710262522101402, 2.415571451187134, 0.23192818462848663, -0.7354158759117126, 0.4157278835773468, -0.795493483543396, 0.785563588142395, -0.2924997806549072, 1.3791929483413696, 0.5531035661697388, -0.9786710143089294, 1.6435439586639404, -0.445178359746933, 0.49576446413993835, -0.7393307685852051, -0.6445108652114868, -0.8511813879013062, 0.3805888593196869, 1.8855887651443481, -0.37109804153442383, 1.5953953266143799, -0.35355129837989807, -1.645531415939331, -1.5320913791656494, 0.850953996181488, 0.5526877045631409, -0.8885350227355957, 0.04961306229233742, -0.4973520040512085, 0.130560040473938, 0.016766684129834175, 1.0001659393310547, 1.2716971635818481, 0.6869902014732361, -0.23235759139060974, -0.8668755888938904, 0.22518326342105865, -0.16255542635917664, -0.6414681077003479, -1.8932040929794312, -0.343574583530426, 0.19961364567279816, 0.6468679904937744, -1.303902506828308, 1.686981439590454, 0.8500367999076843, 2.0513510704040527, 0.9721254110336304, -0.38062262535095215, 1.5174437761306763, 0.06409725546836853, 1.8414397239685059, -0.5156503319740295, 0.6375886797904968, -0.27553436160087585, -1.183465838432312, 0.8887664079666138, -0.3875875473022461, -2.0230915546417236, -0.8934333324432373, -0.7896406054496765, -0.17975763976573944, -0.8386653065681458, 0.8410951495170593, -0.28785333037376404, -1.5119450092315674, 0.23141294717788696, -0.5791981220245361, 0.13557089865207672, -1.319266676902771, 0.18597204983234406, 0.743579626083374, -0.668104350566864, -0.029514184221625328, -0.2283661812543869, -1.3132349252700806, -0.4813259541988373, 0.28658974170684814, 2.0100274085998535, -0.5824443101882935, 0.9867763519287109, 1.0258184671401978, -0.6841289401054382, 0.16404858231544495, 0.26515161991119385, -0.30707159638404846, 0.8206843733787537, -1.1467169523239136, -0.32262304425239563, 1.0764234066009521, -0.12660016119480133, -0.5665808320045471, 1.3643840551376343, 0.9212645292282104, -1.1016769409179688, -0.3290266692638397, -0.2102230042219162, -0.8328539729118347, -0.04257090017199516, -1.5674306154251099, -0.1593637615442276, 0.3497636318206787, -1.38251531124115, -0.3704086244106293, -0.25022727251052856, 1.3697689771652222, -0.22374717891216278, 1.4716527462005615, -0.2901609241962433, -0.1914254128932953, -0.3763866722583771, -0.47793886065483093, 0.13375724852085114, -0.25343331694602966, -0.5740841627120972, 0.2965078055858612, -0.8077321648597717, 0.2866383194923401, 1.4476814270019531, 0.3910103142261505, 0.03519150987267494, 0.47907891869544983, 1.0705022811889648, 0.3422403633594513, -0.019158735871315002, -0.8598405718803406, -1.5627577304840088, 2.015026807785034, -1.4368623495101929, 1.9007824659347534, 0.8608392477035522, -0.0474042072892189, -1.7968113422393799, -1.855870008468628, 1.3128905296325684, 1.109750509262085, 2.455185890197754, 0.5358672738075256, 0.482581228017807, -0.7660040855407715, -0.7064424753189087, 0.386678546667099, -1.028332233428955, -0.6798793077468872, 0.2187139391899109, 2.4113502502441406, 1.7100718021392822, -0.546095609664917, -0.2784351110458374, -0.8822957277297974, 1.1432734727859497, -0.13196159899234772, 0.1607319414615631, 2.124760389328003, -0.34230896830558777, -1.1175628900527954, 1.2597730159759521, -2.3150792121887207, 0.17618556320667267, 2.012871503829956, 0.2998356521129608, 0.06550952792167664, -1.4170926809310913, -0.613174557685852, -0.2875896990299225, -0.5059201717376709, -1.2197022438049316, 0.5751074552536011, -0.2519208490848541, -0.9635030031204224, -1.5587700605392456, 0.0119736697524786, -1.2246668338775635, -1.7251492738723755, 0.3891633450984955, 1.8788731098175049, 2.048750400543213, -0.7975230813026428, 1.3414801359176636, -0.2699243426322937, 0.05268436670303345, 1.1671546697616577, 1.3452328443527222, 3.108029842376709, 1.7604156732559204, -1.2860915660858154, 0.7998377680778503, -0.16052649915218353, -0.5450668931007385, 1.054659366607666, -1.1245814561843872, 1.153521180152893, -0.25981056690216064, -1.195430874824524, -1.2420439720153809, 1.019905686378479, 0.42802751064300537, 0.012401459738612175, -0.4347750246524811, 1.279199481010437, 0.19312874972820282, 1.356661319732666, 0.5286428332328796, -0.3297024071216583, 0.5714133381843567, -0.35125425457954407, -0.6350443363189697, 1.6415109634399414, 0.1726529598236084, -1.5178465843200684, -2.3885598182678223, -0.34663301706314087, -0.8576041460037231, -0.09287583827972412, -0.6141535043716431, -1.080607533454895, 1.641062617301941, 0.4154355525970459, -1.2096184492111206, -0.28044313192367554, -0.2960987389087677, -0.5700616240501404, 2.5267105102539062, -1.3385272026062012, -0.070871502161026, -0.8576555252075195, -0.48965686559677124, 1.5640795230865479, -1.1399106979370117, -0.21661768853664398, -0.974854588508606, -0.6679213643074036, -1.3264096975326538, -0.5527675151824951, 0.008151978254318237, -0.9126396179199219, 0.6923508644104004, 0.19706271588802338, -1.022483468055725, -0.17779837548732758, -0.9007706046104431, 1.0217926502227783, -0.07161591202020645, 0.24049651622772217, 1.838688611984253, 0.44297024607658386, -0.41931766271591187, 0.669858455657959, 1.1668142080307007, 0.5651835203170776, -0.6907798051834106, 0.01983741484582424, -0.7309157848358154, 0.26904335618019104, -1.3914610147476196, 0.2614005208015442, -2.931908130645752, 0.7130976915359497, -0.11927732825279236, -0.07171374559402466, -0.04272184148430824, -1.2909245491027832, 1.152374267578125, 2.641449451446533, -1.1248745918273926, 0.48134228587150574, 0.472883015871048, 1.1603827476501465, -1.599515676498413, 0.3697682321071625, -0.44063469767570496, 2.029130220413208, 0.17073914408683777, 1.2272354364395142, -0.5847705602645874, -2.1575968265533447, 0.6087878942489624, -1.2224100828170776, -1.1085872650146484, 0.779976487159729, -0.9636169672012329, 0.2059568464756012, -1.4571694135665894, -0.2178770750761032, -0.9609872102737427, -1.2788196802139282, 0.751106321811676, 0.06759408116340637, 0.5104501843452454, -0.5193153023719788, 0.456285297870636, -2.1463136672973633, -1.3655451536178589, -0.1791888326406479, -1.0306284427642822, 0.46458280086517334, -0.31192970275878906, 0.6217202544212341, -0.10382257401943207, 0.11899669468402863, 0.40317636728286743, 1.3817778825759888, 3.4095208644866943, 0.2266000509262085, 0.29015061259269714, -0.045813240110874176, -1.0171581506729126, 1.4224541187286377, 0.9117723703384399, -0.06198811158537865, -0.649102509021759, -0.9889934659004211, 1.2771235704421997, 2.1217572689056396, 1.1796438694000244, 0.10348361730575562, -0.8080320358276367, -0.7200443744659424, 0.11376529932022095, 0.2605276107788086, 0.48865872621536255, 0.9509668350219727, -0.10056436061859131, 0.10212060809135437, 1.4037270545959473, 1.2070364952087402, -0.4061706066131592, 0.40885746479034424, -0.9617619514465332, -0.4657774269580841, 0.3880845606327057, 0.2073613405227661, 0.06596393883228302, 0.49513909220695496, -1.0731253623962402, -0.28117987513542175, -0.313308984041214, -0.9560938477516174, -0.752961277961731, -0.3715858459472656, -0.3351035714149475, 1.5997984409332275, 0.05762641504406929, -0.3884750306606293, 0.04531749710440636, -0.7399217486381531, -0.2173997163772583, -1.1198365688323975, 0.12661179900169373, -0.09481658041477203, -0.07825694978237152, -0.10725454986095428, 1.776437759399414, -0.9738186001777649, -2.1011009216308594, 0.1710418164730072, 0.29988616704940796, -0.3657214939594269, 0.1715879887342453, 1.7325055599212646, 0.5501269102096558, 1.431380271911621, 1.2025401592254639, 0.9922041893005371, -0.5930891633033752, -1.246253490447998, 0.678570568561554, 0.9160023927688599, -1.3086774349212646, 0.9349498152732849, -0.14870619773864746, -0.5117769837379456, 0.67339688539505, 1.3326221704483032, 0.38733571767807007, -2.0012853145599365, 0.8610055446624756, -0.8698437809944153, 0.6386097073554993, 0.5915879607200623, 0.8056126832962036, 0.25319966673851013, 0.9036353826522827, -1.2611167430877686, -1.101639986038208, -0.7722354531288147, -0.5321125984191895, 1.9788554906845093, -0.162616565823555, 0.48498955368995667, -0.15893341600894928, -1.234865427017212, -0.07116039097309113, 0.7746253609657288, 0.39224109053611755, -0.45359447598457336, 0.8191636204719543, -0.5807026624679565, -1.0118266344070435, -1.3210430145263672, -0.40442198514938354, -1.0202428102493286, -0.8810095191001892, 0.9861652255058289, 0.7156306505203247, 0.4343870282173157, 1.904019832611084, 0.5964331030845642, 0.3011491000652313, -2.616455554962158, 0.9162369966506958, 0.29207274317741394, -0.07668837904930115, 0.9764692783355713, 0.2455146610736847, 1.1545826196670532, 0.028152097016572952, 0.5578122735023499, -2.362586259841919, 2.1741628646850586, -0.19421891868114471, 0.7176572680473328, 0.0749441385269165, -0.23753492534160614, 1.1228432655334473, 0.554526686668396, 0.5802353024482727, -1.1853935718536377, 0.7239377498626709, -0.6155534386634827, 1.07415771484375, 0.99897301197052, -0.8551898002624512, 0.13551315665245056, 1.3415735960006714, 0.4810006320476532, -0.36432284116744995, -0.8905408978462219, -0.8263391852378845, 0.9866234660148621, 1.6772887706756592, -0.09571138024330139, 0.06639818847179413, 0.8678867816925049, 0.6158115863800049, -1.2917548418045044, 0.07110640406608582, -0.746049702167511, -0.767015278339386, 1.7442452907562256, 2.0899417400360107, -0.09173256158828735, -0.22507885098457336, -0.7670785188674927, -1.2298327684402466, 0.8421289920806885, -0.11419089138507843, 0.27049604058265686, 0.6067931652069092, -0.7258036136627197, 1.2315409183502197, 0.6076601147651672, 1.0232975482940674, 0.08902934193611145, 0.366554856300354, 0.3453347384929657, -0.3125760555267334, -1.1215875148773193, -0.3913174569606781, -1.1033543348312378, -2.5369598865509033, 0.46717554330825806, -0.27913951873779297, -1.4662749767303467, 0.06357692182064056, -0.9905849695205688, 0.8693262338638306, -0.6432632803916931, -1.1042729616165161, -1.4937347173690796, 0.3853834867477417, -0.20713859796524048, 0.9680923223495483, -1.7174100875854492, -0.20596814155578613, 1.2441188097000122, 0.9158520102500916, -0.5630882382392883, 0.9500482082366943, 0.24226951599121094, 1.0001009702682495, 0.7629395723342896, -0.37619152665138245, 0.5342155694961548, 0.1557091474533081, -1.3189224004745483, 0.38513702154159546, 1.2445143461227417, 0.17583921551704407, 1.4555634260177612, -0.4545711278915405, 0.055952977389097214, 0.4544718563556671, -0.5263856649398804, -0.5245711207389832, -0.47648483514785767, 0.7364602088928223, 0.021026257425546646, -1.041719675064087, -0.03624078631401062, -0.2127315104007721, -0.19741526246070862, 0.23463834822177887, -1.4795278310775757, -0.4027010500431061, -0.3607894778251648, -0.4632909297943115, -1.314744472503662, 0.022524338215589523, 1.3421094417572021, -0.7712813019752502, -0.21974335610866547, 0.41466379165649414, 0.47936511039733887, 0.566051721572876, 0.6343907713890076, -0.6912379860877991, -0.42125311493873596, -0.3502395749092102, -0.3616083860397339, 0.25271230936050415, 1.2153204679489136, -0.07619550824165344, -1.0078374147415161, 0.707688570022583, -0.43960076570510864, 0.06621739268302917, 2.0042381286621094, -0.0038400092162191868, -0.7416689395904541, 0.3650226891040802, -0.6210020780563354, 1.8159599304199219, 1.7466106414794922, 1.3235646486282349, -0.11529576778411865, -0.8566219210624695, 0.5636715292930603, -0.1906503140926361, -0.3017522692680359, 1.0295363664627075, 0.515489399433136, -0.15696434676647186, -1.5260132551193237, 0.49062004685401917, 1.294351577758789, -0.9078829288482666, -0.7294378280639648, 0.003181241452693939, -0.9301204085350037, 1.172694206237793, 0.5985708832740784, 0.305317759513855, 0.193424791097641, 1.5694178342819214, 0.6794899106025696, -0.5249043703079224, 0.5146394371986389, 0.4534248411655426, -0.1748937964439392, -2.1697497367858887, -1.0333224534988403, 0.31134137511253357, -0.25634971261024475, -1.4749809503555298, 1.3098812103271484, -1.046797513961792, -1.005683422088623, 0.5667511224746704, 0.09457458555698395, 1.3115202188491821, 0.31018441915512085, 1.7548023462295532, 2.173069953918457, 0.9095572829246521, 0.23573029041290283, 1.2917964458465576, -0.049291424453258514, -0.426554799079895, 1.8228094577789307, -0.4330470860004425, 0.5675735473632812, 1.0014839172363281, -0.3702074885368347, -1.0831968784332275, -0.8182743191719055, -1.181327223777771, -0.6202195286750793, 1.1990694999694824, 0.1369328796863556, -1.190970540046692, 0.21053458750247955, 1.624866247177124, 0.13795530796051025, -0.24796214699745178, 0.6639854311943054, 0.5387296676635742, -0.6794326901435852, -0.08582264184951782, -0.9071000814437866, 0.49880853295326233, -0.19063013792037964, -0.31360524892807007, 0.19682249426841736, 0.5779551863670349, 1.3003785610198975, -0.11024059355258942, 0.08772332966327667, 1.181984305381775, -1.4306716918945312, 1.4934521913528442, -0.6102667450904846, 0.2463727593421936, -2.3746109008789062, 1.306955099105835, -0.7439727187156677, 1.8395582437515259, -2.6151010990142822, 0.4305247664451599, -0.5392214059829712, -0.40349137783050537, 0.3188822269439697, -0.44124433398246765, 0.183688685297966, -0.18100818991661072, -0.9544965028762817, -0.11701986193656921, -0.7501009702682495, 0.6472816467285156, 1.109035611152649, 1.3174887895584106, -1.024074912071228, -0.28496840596199036, -1.6967655420303345, -0.24375033378601074, -0.6531381011009216, 0.17361034452915192, -1.9561741352081299, -0.17613501846790314, -2.0219624042510986, -2.3379437923431396, -1.4633092880249023, -0.8914764523506165, 1.0629931688308716, 0.18488016724586487, -0.9751111268997192, 1.0980010032653809, -0.3795631527900696, -1.7935638427734375, 1.1806923151016235, -2.1629257202148438 ]
https://github.com/huggingface/datasets/issues/5586
.sort() is broken when used after .filter(), only in 2.10.0
Thanks for reporting and thanks @mariosasko for fixing ! We just did a patch release `2.10.1` with the fix
### Describe the bug Hi, thank you for your support! It seems like the addition of multiple key sort (#5502) in 2.10.0 broke the `.sort()` method. After filtering a dataset with `.filter()`, the `.sort()` seems to refer to the query_table index of the previous unfiltered dataset, resulting in an IndexError. This only happens with the 2.10.0 release. ### Steps to reproduce the bug ```Python from datasets import load_dataset # dataset with length of 1104 ds = load_dataset('glue', 'ax')['test'] ds = ds.filter(lambda x: x['idx'] > 1100) ds.sort('premise') print('Done') ``` File "/home/dongkeun/datasets_test/test.py", line 5, in <module> ds.sort('premise') File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 528, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/fingerprint.py", line 511, in wrapper out = func(dataset, *args, **kwargs) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3959, in sort sort_table = query_table( File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/formatting/formatting.py", line 588, in query_table _check_valid_index_key(key, size) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/formatting/formatting.py", line 537, in _check_valid_index_key _check_valid_index_key(max(key), size=size) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/formatting/formatting.py", line 531, in _check_valid_index_key raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") IndexError: Invalid key: 1103 is out of bounds for size 3 ### Expected behavior It should sort the dataset and print "Done". Which it does on 2.9.0. ### Environment info - `datasets` version: 2.10.0 - Platform: Linux-5.15.0-41-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
279
19
.sort() is broken when used after .filter(), only in 2.10.0 ### Describe the bug Hi, thank you for your support! It seems like the addition of multiple key sort (#5502) in 2.10.0 broke the `.sort()` method. After filtering a dataset with `.filter()`, the `.sort()` seems to refer to the query_table index of the previous unfiltered dataset, resulting in an IndexError. This only happens with the 2.10.0 release. ### Steps to reproduce the bug ```Python from datasets import load_dataset # dataset with length of 1104 ds = load_dataset('glue', 'ax')['test'] ds = ds.filter(lambda x: x['idx'] > 1100) ds.sort('premise') print('Done') ``` File "/home/dongkeun/datasets_test/test.py", line 5, in <module> ds.sort('premise') File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 528, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/fingerprint.py", line 511, in wrapper out = func(dataset, *args, **kwargs) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3959, in sort sort_table = query_table( File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/formatting/formatting.py", line 588, in query_table _check_valid_index_key(key, size) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/formatting/formatting.py", line 537, in _check_valid_index_key _check_valid_index_key(max(key), size=size) File "/home/dongkeun/miniconda3/envs/datasets_test/lib/python3.9/site-packages/datasets/formatting/formatting.py", line 531, in _check_valid_index_key raise IndexError(f"Invalid key: {key} is out of bounds for size {size}") IndexError: Invalid key: 1103 is out of bounds for size 3 ### Expected behavior It should sort the dataset and print "Done". Which it does on 2.9.0. ### Environment info - `datasets` version: 2.10.0 - Platform: Linux-5.15.0-41-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Thanks for reporting and thanks @mariosasko for fixing ! We just did a patch release `2.10.1` with the fix
[ -1.2049190998077393, -0.9679717421531677, -0.6971979737281799, 1.3593785762786865, -0.16691051423549652, -1.2836297750473022, 0.1095959022641182, -1.0390392541885376, 1.6087050437927246, -0.7305065989494324, 0.16934888064861298, -1.7022000551223755, -0.15895113348960876, -0.510460615158081, -0.7316239476203918, -0.8865218162536621, -0.410085529088974, -0.8324446678161621, 1.0386006832122803, 2.5477185249328613, 1.2393583059310913, -1.2267502546310425, 2.7943437099456787, 0.7145057320594788, -0.22803686559200287, -0.9959823489189148, 0.5820724368095398, -0.022569335997104645, -1.1920472383499146, -0.48842886090278625, -0.9694617986679077, -0.013581088744103909, -0.5675414204597473, -0.4293397068977356, 0.10466240346431732, 0.46292805671691895, -0.33792173862457275, -0.32216501235961914, -0.6058155298233032, -0.7273949384689331, 0.4549574851989746, -0.369581937789917, 0.9456996917724609, -0.33609911799430847, 1.7243577241897583, -0.5500696301460266, 0.3655768036842346, 0.6661133766174316, 1.3330447673797607, 0.1813811957836151, 0.060541458427906036, 0.3274933993816376, 0.33547720313072205, 0.08399628847837448, 0.6039404273033142, 1.2521252632141113, 0.6312989592552185, 0.48918551206588745, 0.715290367603302, -2.263662338256836, 1.2345058917999268, -0.9093924164772034, 0.3274820148944855, 1.3205955028533936, -0.7822326421737671, 0.39303895831108093, -1.7898168563842773, -0.059224702417850494, 0.6385400891304016, -2.3365581035614014, 0.21269989013671875, -1.311097502708435, -0.5003820061683655, 0.9110772609710693, 0.3796433210372925, -1.2137378454208374, 0.1994546502828598, -0.49389517307281494, 1.0836818218231201, 0.4639722406864166, 1.1184418201446533, -1.6445517539978027, -0.08029206097126007, -0.2179267704486847, 0.05339379608631134, -1.222380518913269, -1.5970669984817505, 0.6127470135688782, 0.5638540387153625, 0.7633633613586426, -0.15144935250282288, 1.0077588558197021, -1.0411309003829956, 0.7364363074302673, -0.9406929612159729, -1.7202686071395874, -1.4548640251159668, -2.351104974746704, -2.279628038406372, 0.8255462646484375, -0.5202560424804688, -0.5223833918571472, 1.9737757444381714, -0.9923313856124878, -1.842726707458496, 1.0601204633712769, 0.36035916209220886, 0.04060360789299011, 2.4166224002838135, 0.2195923924446106, -0.7603315114974976, 0.49332770705223083, -0.6911178827285767, 0.8436757922172546, -0.32329845428466797, 1.338857889175415, 0.48231905698776245, -0.9369618892669678, 1.6352871656417847, -0.46672600507736206, 0.5724731087684631, -0.6395556330680847, -0.4923248887062073, -0.8737271428108215, 0.26400041580200195, 1.8336577415466309, -0.3139648139476776, 1.6116423606872559, -0.38572046160697937, -1.5962715148925781, -1.5812008380889893, 0.7952890992164612, 0.463931143283844, -0.8389163613319397, 0.052763067185878754, -0.5028467178344727, 0.1620059758424759, 0.032104361802339554, 1.192403793334961, 1.2147952318191528, 0.6718101501464844, -0.2679262161254883, -0.8757535219192505, 0.27459996938705444, -0.14685457944869995, -0.6914830207824707, -1.8143326044082642, -0.34508588910102844, 0.28921812772750854, 0.5956907868385315, -1.252042293548584, 1.7072142362594604, 0.8520426750183105, 2.018620729446411, 1.0169575214385986, -0.43229174613952637, 1.4629192352294922, 0.056982994079589844, 1.8077600002288818, -0.5588011145591736, 0.659654974937439, -0.3080490529537201, -1.1188695430755615, 0.885189950466156, -0.3998606503009796, -2.0248775482177734, -0.8371630907058716, -0.8145995140075684, -0.2027614414691925, -0.7194350957870483, 0.8280626535415649, -0.3734566867351532, -1.4541916847229004, 0.1154516264796257, -0.7087079286575317, 0.14317192137241364, -1.2631970643997192, 0.2098701447248459, 0.7332120537757874, -0.6559693813323975, -0.03332480415701866, -0.28544312715530396, -1.3590091466903687, -0.47746482491493225, 0.2667088806629181, 1.9291231632232666, -0.657395601272583, 0.9043914079666138, 0.9792773127555847, -0.8344022035598755, 0.09749050438404083, 0.24368597567081451, -0.2905438244342804, 0.82745760679245, -1.0689784288406372, -0.4211589992046356, 1.194542646408081, -0.21955008804798126, -0.7197635769844055, 1.378188133239746, 0.7684321403503418, -1.1326667070388794, -0.23336268961429596, -0.18048393726348877, -0.9071729779243469, 0.026844847947359085, -1.5503664016723633, -0.22492781281471252, 0.3993375897407532, -1.5036544799804688, -0.4071268141269684, -0.2572872042655945, 1.3102600574493408, -0.19144843518733978, 1.3710551261901855, -0.33990925550460815, -0.1969095915555954, -0.3235425651073456, -0.4973672926425934, 0.17422696948051453, -0.18209907412528992, -0.6594182848930359, 0.2052568644285202, -0.8628562688827515, 0.3270878195762634, 1.531598687171936, 0.42166751623153687, 0.09110517799854279, 0.5770467519760132, 1.0925339460372925, 0.4031166732311249, -0.09916327893733978, -0.8325439095497131, -1.62332284450531, 2.0101351737976074, -1.434972882270813, 1.7839758396148682, 0.6635922193527222, -0.06378274410963058, -1.8017332553863525, -1.8703123331069946, 1.264483094215393, 1.1419267654418945, 2.337049961090088, 0.5490334033966064, 0.44432517886161804, -0.6925974488258362, -0.7996591925621033, 0.19740359485149384, -0.982648491859436, -0.7398597598075867, 0.13092267513275146, 2.3967881202697754, 1.834376573562622, -0.5955109596252441, -0.2514151632785797, -0.9330297112464905, 1.3406239748001099, -0.2824298143386841, 0.2711937427520752, 2.0002918243408203, -0.3121710419654846, -0.9750266075134277, 1.3336163759231567, -2.3584377765655518, 0.18452592194080353, 2.009927272796631, 0.23264095187187195, 0.16174498200416565, -1.3752174377441406, -0.7018144130706787, -0.2615811824798584, -0.4276334047317505, -1.2780102491378784, 0.5584677457809448, -0.29239773750305176, -0.8762866258621216, -1.4411247968673706, 0.029300905764102936, -1.1502394676208496, -1.6659266948699951, 0.2702377140522003, 1.9998067617416382, 2.089334011077881, -0.7834176421165466, 1.4186022281646729, -0.2295047789812088, 0.0882856473326683, 1.23637855052948, 1.2740148305892944, 3.1031241416931152, 1.9319781064987183, -1.209362506866455, 0.739383339881897, -0.17132748663425446, -0.4822818338871002, 1.2022958993911743, -1.1931345462799072, 1.0981364250183105, -0.17810063064098358, -1.211167335510254, -1.1919984817504883, 1.022585153579712, 0.44497382640838623, -0.0057119219563901424, -0.47867846488952637, 1.2393864393234253, 0.02961917221546173, 1.334049105644226, 0.6242715120315552, -0.46929481625556946, 0.5233669281005859, -0.34474924206733704, -0.5490317940711975, 1.6218851804733276, 0.1920851469039917, -1.537404179573059, -2.308958053588867, -0.2177545130252838, -0.9131638407707214, 0.030198492109775543, -0.5665028691291809, -0.9866801500320435, 1.5799044370651245, 0.4179523289203644, -1.1023542881011963, -0.28317007422447205, -0.2732328474521637, -0.5153735876083374, 2.675856351852417, -1.2938570976257324, -0.22281138598918915, -0.9682424664497375, -0.5267835855484009, 1.6721630096435547, -1.1449356079101562, -0.18187347054481506, -1.011771559715271, -0.6315045356750488, -1.365951657295227, -0.4820881485939026, 0.008696858771145344, -0.9439854025840759, 0.8259086608886719, 0.17921552062034607, -1.0754574537277222, -0.20940625667572021, -0.943474531173706, 1.018568515777588, -0.1167917475104332, 0.2038697749376297, 1.9787302017211914, 0.3990698456764221, -0.35626381635665894, 0.7532824277877808, 1.2240252494812012, 0.629016637802124, -0.6499049067497253, 0.07608802616596222, -0.7045553922653198, 0.3239773213863373, -1.4208892583847046, 0.1920529156923294, -2.911949396133423, 0.7457615733146667, -0.17215825617313385, -0.1454610526561737, -0.041158854961395264, -1.3258516788482666, 1.0301368236541748, 2.521937370300293, -1.2384825944900513, 0.49577823281288147, 0.40877705812454224, 1.2470697164535522, -1.64707350730896, 0.26098528504371643, -0.5664981007575989, 2.092122793197632, 0.1707303524017334, 1.2110041379928589, -0.46569135785102844, -2.1873929500579834, 0.6740532517433167, -1.2253100872039795, -1.0692875385284424, 0.7494760751724243, -0.936018168926239, 0.2616925835609436, -1.5038812160491943, -0.1449490189552307, -0.9127530455589294, -1.2252801656723022, 0.7308213710784912, 0.12624968588352203, 0.3724755346775055, -0.5386249423027039, 0.3952358663082123, -2.192054033279419, -1.4279489517211914, -0.22188624739646912, -0.9853502511978149, 0.5948713421821594, -0.34329360723495483, 0.5957890748977661, -0.08581012487411499, 0.050954390317201614, 0.2579841911792755, 1.4678083658218384, 3.362727642059326, 0.13038316369056702, 0.1489500105381012, -0.07546801120042801, -1.0529370307922363, 1.4247573614120483, 0.8519912362098694, -0.15884239971637726, -0.5520032048225403, -1.0322504043579102, 1.358292818069458, 1.9917556047439575, 1.1312599182128906, 0.14334061741828918, -0.8101327419281006, -0.7042760252952576, 0.035799697041511536, 0.2781805098056793, 0.4841976463794708, 0.9242430329322815, 0.015272821299731731, 0.1520976573228836, 1.4655307531356812, 1.1951642036437988, -0.27320581674575806, 0.4529813528060913, -0.9358392357826233, -0.47425347566604614, 0.4228675067424774, 0.1733643263578415, 0.012604913674294949, 0.46771296858787537, -1.1061285734176636, -0.29793310165405273, -0.30092453956604004, -0.8963358402252197, -0.7806459665298462, -0.3276479244232178, -0.36862149834632874, 1.5362135171890259, 0.09442824125289917, -0.5769174098968506, -0.027648914605379105, -0.6570006608963013, -0.10631387680768967, -1.0491548776626587, 0.22428420186042786, -0.13286352157592773, -0.15054234862327576, -0.1860431581735611, 1.6181443929672241, -0.8988888263702393, -2.112459182739258, 0.1436748504638672, 0.3737611472606659, -0.2894170582294464, 0.14797765016555786, 1.6374953985214233, 0.491157203912735, 1.4520920515060425, 1.3426414728164673, 0.9486519694328308, -0.5175560712814331, -1.2043254375457764, 0.6937234997749329, 0.965130627155304, -1.2337902784347534, 0.8624381422996521, -0.12769782543182373, -0.5809641480445862, 0.6547165513038635, 1.3387048244476318, 0.4123002588748932, -1.9963572025299072, 0.9594703316688538, -0.9260122776031494, 0.7506341338157654, 0.7091596126556396, 0.8384364247322083, 0.2779120206832886, 0.9019056558609009, -1.2722289562225342, -1.2043267488479614, -0.7674803137779236, -0.642031729221344, 1.8882166147232056, -0.1594109684228897, 0.6309739351272583, -0.15376795828342438, -1.200635313987732, -0.13828152418136597, 0.7196053862571716, 0.33918264508247375, -0.4917968809604645, 0.9427666068077087, -0.5996633172035217, -1.0318212509155273, -1.3723002672195435, -0.39653629064559937, -1.0573813915252686, -0.8965728282928467, 1.0076113939285278, 0.8299358487129211, 0.4183565676212311, 1.901103138923645, 0.5681973099708557, 0.3105199933052063, -2.6588759422302246, 0.8604360818862915, 0.269988089799881, -0.011965300887823105, 0.8260329961776733, 0.29291418194770813, 1.1317439079284668, -0.08925378322601318, 0.5795724987983704, -2.185441017150879, 2.1707961559295654, -0.22161851823329926, 0.6854344010353088, -0.0010390067473053932, -0.10555703192949295, 1.0742477178573608, 0.596665620803833, 0.6005315780639648, -1.0364872217178345, 0.7034426927566528, -0.5794743895530701, 1.1680583953857422, 1.0176208019256592, -0.875812828540802, 0.07278937846422195, 1.463829755783081, 0.4652334451675415, -0.46060672402381897, -1.0323946475982666, -0.8417636752128601, 0.9663461446762085, 1.738888144493103, -0.06952230632305145, 0.023036807775497437, 0.8814440369606018, 0.6483548283576965, -1.2520511150360107, 0.018315911293029785, -0.702592670917511, -0.5479894280433655, 1.76656973361969, 2.0529098510742188, -0.15988098084926605, -0.2298288196325302, -0.7179440855979919, -1.2329028844833374, 0.7199448347091675, -0.07689592242240906, 0.03003605455160141, 0.8218138813972473, -0.7091019153594971, 1.06461763381958, 0.6862072348594666, 0.9910412430763245, 0.10852854698896408, 0.30666670203208923, 0.3380967378616333, -0.3414148688316345, -1.1595852375030518, -0.28471922874450684, -1.0490840673446655, -2.551180601119995, 0.3720967173576355, -0.28709205985069275, -1.4880706071853638, 0.08166290819644928, -1.0289174318313599, 0.9616748690605164, -0.6493935585021973, -1.1043827533721924, -1.4568012952804565, 0.34016337990760803, -0.05322358384728432, 0.915476381778717, -1.6731481552124023, -0.12710553407669067, 1.2343134880065918, 0.9065085649490356, -0.6351636648178101, 0.9636270403862, 0.3631073534488678, 1.0202699899673462, 0.7520133852958679, -0.3535042107105255, 0.5435315370559692, -0.10520553588867188, -1.3255499601364136, 0.4298798143863678, 1.1815524101257324, 0.18117448687553406, 1.3409087657928467, -0.5691767334938049, 0.028261244297027588, 0.44042420387268066, -0.5944516658782959, -0.42647334933280945, -0.41532981395721436, 0.647472620010376, 0.03645717725157738, -0.9743285775184631, -0.15758977830410004, -0.06156979501247406, -0.27718475461006165, 0.21428778767585754, -1.481880784034729, -0.24967506527900696, -0.42300769686698914, -0.4933917820453644, -1.2818138599395752, -0.00304057402536273, 1.3279554843902588, -0.8865793347358704, -0.25502073764801025, 0.5066222548484802, 0.32036110758781433, 0.5376013517379761, 0.5634823441505432, -0.7008336782455444, -0.205152228474617, -0.3292328715324402, -0.30035555362701416, 0.1835707426071167, 1.294895052909851, -0.09642622619867325, -1.0269520282745361, 0.72258061170578, -0.33223238587379456, 0.12359108775854111, 1.9220682382583618, 0.04218798503279686, -0.7734240293502808, 0.2704315185546875, -0.7410225868225098, 1.7450073957443237, 1.6964589357376099, 1.329386830329895, -0.09287253022193909, -0.7740375399589539, 0.5162683725357056, -0.22017189860343933, -0.3937171697616577, 0.8607001304626465, 0.4389047920703888, -0.1635470986366272, -1.4325271844863892, 0.7365410923957825, 1.2694525718688965, -0.8290882706642151, -0.7535956501960754, 0.08368244022130966, -0.9490072131156921, 1.2398751974105835, 0.6828213334083557, 0.3392140567302704, 0.19465191662311554, 1.5759341716766357, 0.7648980617523193, -0.46910154819488525, 0.40752825140953064, 0.5691834092140198, -0.16769003868103027, -2.155400276184082, -1.0242050886154175, 0.21816261112689972, -0.35363608598709106, -1.657631754875183, 1.345120906829834, -1.1319879293441772, -0.9009504318237305, 0.5238977670669556, 0.15544913709163666, 1.3679736852645874, 0.38357916474342346, 1.6338303089141846, 2.1351351737976074, 0.8976552486419678, 0.4051082730293274, 1.284814476966858, -0.07904638350009918, -0.40203529596328735, 1.7551344633102417, -0.3521990180015564, 0.5840243101119995, 0.9884339570999146, -0.3831460177898407, -1.0724419355392456, -0.7521771192550659, -1.1695451736450195, -0.6159025430679321, 1.219466209411621, 0.1463140845298767, -1.0686010122299194, 0.21289388835430145, 1.5013271570205688, 0.1419113576412201, -0.24773725867271423, 0.6867316365242004, 0.4465193450450897, -0.7551578879356384, -0.08307380974292755, -0.8917619585990906, 0.5204852819442749, -0.14537398517131805, -0.2769736349582672, 0.26911425590515137, 0.48152750730514526, 1.3768309354782104, -0.003725140355527401, 0.11972927302122116, 1.1198948621749878, -1.3404732942581177, 1.5309070348739624, -0.701673686504364, 0.2987801134586334, -2.456573247909546, 1.4417972564697266, -0.7873439192771912, 1.904263973236084, -2.5577335357666016, 0.478607177734375, -0.5597390532493591, -0.4514489471912384, 0.2491881102323532, -0.4686238765716553, 0.05970966815948486, -0.04521072655916214, -1.0371487140655518, 0.03886127471923828, -0.6555124521255493, 0.5708422660827637, 1.2370492219924927, 1.4332473278045654, -1.1685982942581177, -0.32952165603637695, -1.798704743385315, -0.23205001652240753, -0.7577348351478577, 0.42804154753685, -2.0051023960113525, -0.2011052966117859, -1.9018778800964355, -2.421450614929199, -1.332543134689331, -0.8496158719062805, 1.1106839179992676, 0.10591666400432587, -0.9657873511314392, 1.3013395071029663, -0.4245690703392029, -1.8403315544128418, 1.1496857404708862, -2.2353100776672363 ]
https://github.com/huggingface/datasets/issues/5585
Cache is not transportable
Hi ! No the cache is not transportable in general. It will work on a shared filesystem if you use the same python environment, but not across machines/os/environments. In particular, reloading cached datasets does work, but reloading cached processed datasets (e.g. from `map`) may not work. This is because some hashes used by caching are based on pickle dumps of the function you pass to `map`. Finally you may copy the cache to another machine, but all the `cached-*.arrow` files are unlikely to be reloaded.
### Describe the bug I would like to share cache between two machines (a Windows host machine and a WSL instance). I run most my code in WSL. I have just run out of space in the virtual drive. Rather than expand the drive size, I plan to move to cache to the host Windows machine, thereby sharing the downloads. I'm hoping that I can just copy/paste the cache files, but I notice that a lot of the file names start with the path name, e.g. `_home_davidg_.cache_huggingface_datasets_conll2003_default-451...98.lock` where `home/davidg` is where the cache is in WSL. This seems to suggest that the cache is not portable/cannot be centralised or shared. Is this the case, or are the files that start with path names not integral to the caching mechanism? Because copying the cache files _seems_ to work, but I'm not filled with confidence that something isn't going to break. A related issue, when trying to load a dataset that should come from cache (running in WSL, pointing to cache on the Windows host) it seemed to work fine, but it still uses a WSL directory for `.cache\huggingface\modules\datasets_modules`. I see nothing in the docs about this, or how to point it to a different place. I have asked a related question on the forum: https://discuss.huggingface.co/t/is-datasets-cache-operating-system-agnostic/32656 ### Steps to reproduce the bug View the cache directory in WSL/Windows. ### Expected behavior Cache can be shared between (virtual) machines and be transportable. It would be nice to have a simple way to say "Dear Hugging Face packages, please put ALL your cache in `blah/de/blah`" and have all the Hugging Face packages respect that single location. ### Environment info ``` - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - ```
280
85
Cache is not transportable ### Describe the bug I would like to share cache between two machines (a Windows host machine and a WSL instance). I run most my code in WSL. I have just run out of space in the virtual drive. Rather than expand the drive size, I plan to move to cache to the host Windows machine, thereby sharing the downloads. I'm hoping that I can just copy/paste the cache files, but I notice that a lot of the file names start with the path name, e.g. `_home_davidg_.cache_huggingface_datasets_conll2003_default-451...98.lock` where `home/davidg` is where the cache is in WSL. This seems to suggest that the cache is not portable/cannot be centralised or shared. Is this the case, or are the files that start with path names not integral to the caching mechanism? Because copying the cache files _seems_ to work, but I'm not filled with confidence that something isn't going to break. A related issue, when trying to load a dataset that should come from cache (running in WSL, pointing to cache on the Windows host) it seemed to work fine, but it still uses a WSL directory for `.cache\huggingface\modules\datasets_modules`. I see nothing in the docs about this, or how to point it to a different place. I have asked a related question on the forum: https://discuss.huggingface.co/t/is-datasets-cache-operating-system-agnostic/32656 ### Steps to reproduce the bug View the cache directory in WSL/Windows. ### Expected behavior Cache can be shared between (virtual) machines and be transportable. It would be nice to have a simple way to say "Dear Hugging Face packages, please put ALL your cache in `blah/de/blah`" and have all the Hugging Face packages respect that single location. ### Environment info ``` - `datasets` version: 2.9.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - ``` Hi ! No the cache is not transportable in general. It will work on a shared filesystem if you use the same python environment, but not across machines/os/environments. In particular, reloading cached datasets does work, but reloading cached processed datasets (e.g. from `map`) may not work. This is because some hashes used by caching are based on pickle dumps of the function you pass to `map`. Finally you may copy the cache to another machine, but all the `cached-*.arrow` files are unlikely to be reloaded.
[ -1.1485437154769897, -0.8953870534896851, -0.7388613820075989, 1.4046502113342285, -0.17850692570209503, -1.3018282651901245, 0.14802056550979614, -1.050010323524475, 1.6973915100097656, -0.7715612649917603, 0.29215511679649353, -1.6193428039550781, 0.05268409848213196, -0.5444180965423584, -0.7662556767463684, -0.7965490818023682, -0.45550814270973206, -0.8240035772323608, 0.95368492603302, 2.561680316925049, 1.2022813558578491, -1.352561354637146, 2.7245419025421143, 0.6509329080581665, -0.13389134407043457, -1.039536952972412, 0.5403594374656677, -0.05934279412031174, -1.3748242855072021, -0.4216395318508148, -0.9474015831947327, -0.05219653248786926, -0.6137508153915405, -0.5446209907531738, 0.027173779904842377, 0.34725221991539, -0.2007380574941635, -0.37636443972587585, -0.551137387752533, -0.7273808717727661, 0.5072780251502991, -0.4134391248226166, 1.02808678150177, -0.34839680790901184, 1.7926335334777832, -0.5948494672775269, 0.40912869572639465, 0.7280054092407227, 1.3459140062332153, 0.15977707505226135, 0.02862251177430153, 0.2848757803440094, 0.45763152837753296, -0.007488666567951441, 0.4773964285850525, 1.0412793159484863, 0.6610590815544128, 0.4817701578140259, 0.7039437890052795, -2.198620557785034, 1.373418927192688, -0.935840368270874, 0.32983070611953735, 1.294554591178894, -0.9578415751457214, 0.36745190620422363, -1.774987816810608, -0.026363197714090347, 0.5237237215042114, -2.2577829360961914, 0.2288188636302948, -1.246577262878418, -0.5105032324790955, 1.036363959312439, 0.2696583569049835, -1.2709364891052246, 0.13619491457939148, -0.45842379331588745, 0.9167982339859009, 0.4931393563747406, 1.1104905605316162, -1.708864688873291, -0.007077351212501526, -0.31904536485671997, 0.1736041158437729, -1.247260332107544, -1.53514564037323, 0.5099469423294067, 0.7049855589866638, 0.5451562404632568, -0.11120455712080002, 1.015142560005188, -1.0449050664901733, 0.7811540961265564, -0.8644242286682129, -1.762891173362732, -1.4155879020690918, -2.301551103591919, -2.2464709281921387, 0.724534273147583, -0.46757447719573975, -0.4598683714866638, 2.0471460819244385, -1.0729988813400269, -1.7591936588287354, 1.0982251167297363, 0.21286021173000336, -0.03934166580438614, 2.3779239654541016, 0.15399453043937683, -0.6915512681007385, 0.49724963307380676, -0.7290840148925781, 0.7677732706069946, -0.49664583802223206, 1.2719484567642212, 0.3623780608177185, -1.0568569898605347, 1.6090359687805176, -0.41198182106018066, 0.5647981762886047, -0.7052077651023865, -0.41393858194351196, -0.8135778307914734, 0.3376544117927551, 1.8503084182739258, -0.31847575306892395, 1.5504854917526245, -0.2901298403739929, -1.5674245357513428, -1.5976454019546509, 0.8219478726387024, 0.4671238958835602, -0.7696259617805481, 0.0895209014415741, -0.35135185718536377, 0.06728416681289673, -0.08634191006422043, 1.0535491704940796, 1.2693051099777222, 0.7636275291442871, -0.2660594880580902, -0.9437001347541809, 0.21982483565807343, -0.1482688933610916, -0.7175132632255554, -1.8234331607818604, -0.37931761145591736, 0.12377892434597015, 0.6364535689353943, -1.1045855283737183, 1.7970799207687378, 0.9433435797691345, 1.9129947423934937, 1.110228180885315, -0.40655210614204407, 1.4872629642486572, 0.07999909669160843, 1.8601405620574951, -0.4562451243400574, 0.6715364456176758, -0.3827635645866394, -1.158767819404602, 0.816242516040802, -0.3905624747276306, -2.0314323902130127, -0.6897873282432556, -0.7575211524963379, -0.19711805880069733, -0.7504576444625854, 0.9333941340446472, -0.21631377935409546, -1.3419055938720703, 0.2125634104013443, -0.64423668384552, 0.07732594013214111, -1.210798740386963, 0.2988007366657257, 0.7573063373565674, -0.6414408683776855, 0.09945380687713623, -0.31074628233909607, -1.3813692331314087, -0.44319579005241394, 0.3443477749824524, 1.8200945854187012, -0.7708272337913513, 0.9242565631866455, 1.0440342426300049, -0.6509207487106323, -0.009763466194272041, 0.45089396834373474, -0.34147024154663086, 0.8914946913719177, -1.0488368272781372, -0.3314324915409088, 1.1716972589492798, -0.26234880089759827, -0.5839459896087646, 1.434805989265442, 0.7077381014823914, -1.0188868045806885, -0.1453140825033188, -0.11656628549098969, -0.8940380811691284, 0.02527732402086258, -1.617337703704834, -0.06754259020090103, 0.2688005566596985, -1.5110132694244385, -0.474189817905426, -0.16703397035598755, 1.3242831230163574, -0.03397369384765625, 1.4482672214508057, -0.3209342062473297, -0.20728397369384766, -0.4472707509994507, -0.40544241666793823, 0.1630590409040451, -0.1703232377767563, -0.6080152988433838, 0.3160807490348816, -0.8017720580101013, 0.3497975468635559, 1.3898690938949585, 0.22577230632305145, 0.11895023286342621, 0.5616621375083923, 0.9897557497024536, 0.3454488515853882, -0.05517810583114624, -0.866485059261322, -1.5957304239273071, 2.077413558959961, -1.4363564252853394, 1.993584394454956, 0.8448836803436279, -0.06496912240982056, -1.8318642377853394, -1.8377048969268799, 1.4140300750732422, 1.0782701969146729, 2.3754422664642334, 0.5437256097793579, 0.338388592004776, -0.8330800533294678, -0.646541178226471, 0.42172926664352417, -1.0249558687210083, -0.8148583173751831, 0.020624149590730667, 2.3672380447387695, 1.7286546230316162, -0.43540164828300476, -0.17658677697181702, -1.0291348695755005, 1.362907886505127, -0.14356566965579987, 0.18798814713954926, 1.984673023223877, -0.2784799635410309, -1.0449726581573486, 1.3288205862045288, -2.363752841949463, 0.2548735737800598, 1.984785556793213, 0.2794722020626068, 0.08590279519557953, -1.3884927034378052, -0.6316471099853516, -0.1916673481464386, -0.38261574506759644, -1.2532334327697754, 0.5454751253128052, -0.3064364492893219, -0.8421868681907654, -1.4903231859207153, 0.15986375510692596, -1.1862581968307495, -1.6839513778686523, 0.31851837038993835, 1.8564397096633911, 2.0380098819732666, -0.6646835207939148, 1.4911353588104248, -0.18032094836235046, 0.1512741893529892, 1.2201069593429565, 1.2197778224945068, 3.168856382369995, 2.015881299972534, -1.3127429485321045, 0.6841889023780823, -0.1401372253894806, -0.43317297101020813, 1.1191822290420532, -1.1120965480804443, 1.2792811393737793, -0.23671263456344604, -1.2174333333969116, -1.1663674116134644, 0.965745747089386, 0.4618547558784485, 0.03324570134282112, -0.43924203515052795, 1.2375869750976562, 0.09656231105327606, 1.259462833404541, 0.5595840215682983, -0.30532875657081604, 0.6418023705482483, -0.42001277208328247, -0.5740140080451965, 1.4977575540542603, 0.245908722281456, -1.3865771293640137, -2.299250364303589, -0.21435603499412537, -0.886995792388916, 0.0008933423087000847, -0.6055059432983398, -0.939842164516449, 1.5805184841156006, 0.3922700583934784, -1.207427740097046, -0.2860970199108124, -0.34697818756103516, -0.591314971446991, 2.709731101989746, -1.434988260269165, -0.276797354221344, -1.0073931217193604, -0.5674992799758911, 1.5649701356887817, -1.2863737344741821, -0.17929723858833313, -1.0857144594192505, -0.5854915976524353, -1.2554783821105957, -0.5380905270576477, -0.0015366431325674057, -0.9190163016319275, 0.823287308216095, 0.22095532715320587, -1.1607341766357422, -0.3010462820529938, -0.9339491128921509, 0.8012463450431824, -0.04793594032526016, 0.2055901288986206, 1.8606219291687012, 0.37156304717063904, -0.41682928800582886, 0.693656861782074, 1.0735846757888794, 0.5702129006385803, -0.6191198229789734, 0.19457297027111053, -0.6242414116859436, 0.3657761514186859, -1.2908920049667358, 0.3280913829803467, -2.8251800537109375, 0.6902250051498413, -0.04669361561536789, -0.019402410835027695, -0.1081688404083252, -1.2942043542861938, 0.9936664700508118, 2.5739471912384033, -1.1261805295944214, 0.5494929552078247, 0.3082173764705658, 1.1902483701705933, -1.5743155479431152, 0.29777663946151733, -0.4800926446914673, 2.1556215286254883, 0.16394858062267303, 1.1468547582626343, -0.5105821490287781, -2.3498117923736572, 0.6024625301361084, -1.235509991645813, -1.0862499475479126, 0.7306210994720459, -0.7635415196418762, 0.024849772453308105, -1.3131544589996338, -0.1613653004169464, -0.8758395910263062, -1.2367687225341797, 0.6896446943283081, 0.06943285465240479, 0.5440497994422913, -0.646549642086029, 0.3303070068359375, -2.111637830734253, -1.3056797981262207, -0.23313885927200317, -0.9108389019966125, 0.4262293577194214, -0.3344561457633972, 0.7100407481193542, -0.18266524374485016, 0.047904446721076965, 0.3329371213912964, 1.3394815921783447, 3.4282405376434326, 0.07338650524616241, 0.3958972096443176, -0.21268226206302643, -0.9808349013328552, 1.3545820713043213, 0.9132685661315918, -0.1475997269153595, -0.6663535833358765, -1.0708938837051392, 1.2141644954681396, 2.03071665763855, 0.9806388020515442, 0.10789258033037186, -0.8485126495361328, -0.7563507556915283, 0.005141828209161758, 0.19604313373565674, 0.4864019453525543, 0.9482471942901611, 0.04561159387230873, 0.061707112938165665, 1.4700146913528442, 1.2523491382598877, -0.31844788789749146, 0.3862861394882202, -0.7977162003517151, -0.38696178793907166, 0.4923965036869049, 0.43790844082832336, 0.028518706560134888, 0.33945101499557495, -1.000419020652771, -0.1714049130678177, -0.41861796379089355, -0.9362114667892456, -0.7846119999885559, -0.41154974699020386, -0.30332472920417786, 1.729938268661499, 0.12674380838871002, -0.464761346578598, -0.024427879601716995, -0.7731785774230957, -0.03747322037816048, -0.9611581563949585, 0.28801944851875305, -0.12801307439804077, -0.058026839047670364, -0.03155814856290817, 1.7321078777313232, -0.9344820380210876, -2.1336379051208496, 0.26050588488578796, 0.15281134843826294, -0.30401650071144104, 0.21603462100028992, 1.6092861890792847, 0.591343343257904, 1.4426259994506836, 1.4250820875167847, 1.0213344097137451, -0.6556593179702759, -1.371767520904541, 0.6381506323814392, 0.9417115449905396, -1.5201460123062134, 0.8531575202941895, 0.0169026218354702, -0.5848065614700317, 0.734002411365509, 1.2545289993286133, 0.3895370364189148, -2.109370231628418, 0.785024106502533, -0.9343551397323608, 0.8285452723503113, 0.6849257946014404, 0.7227532267570496, 0.21105057001113892, 0.7934009432792664, -1.2679144144058228, -1.1416544914245605, -0.687565803527832, -0.6991081833839417, 1.993605136871338, -0.30891817808151245, 0.6100441813468933, -0.17942430078983307, -1.4727699756622314, -0.14523454010486603, 0.7254993319511414, 0.32564878463745117, -0.44831517338752747, 0.7831122875213623, -0.7003170251846313, -1.1673953533172607, -1.393401861190796, -0.4622589647769928, -1.03383469581604, -0.8868294954299927, 1.0587626695632935, 0.7783913016319275, 0.3486400246620178, 1.9142881631851196, 0.6041706800460815, 0.22722454369068146, -2.689265727996826, 0.8301191329956055, 0.36249077320098877, -0.014050975441932678, 0.8939036130905151, 0.2431606501340866, 0.963686466217041, 0.00913273636251688, 0.6632109880447388, -2.447831153869629, 2.323657751083374, -0.22545716166496277, 0.7251410484313965, 0.020591679960489273, -0.2098313719034195, 1.060882568359375, 0.6287129521369934, 0.6017920970916748, -1.1264545917510986, 0.7152637243270874, -0.6716597080230713, 1.2741597890853882, 0.9339619278907776, -0.8205355405807495, 0.005771364085376263, 1.2773776054382324, 0.4570367932319641, -0.5095605850219727, -0.9374615550041199, -1.045812964439392, 0.9098138213157654, 1.8872590065002441, -0.04645082727074623, 0.01170280296355486, 0.8351970911026001, 0.6924062967300415, -1.2946569919586182, 0.17152708768844604, -0.8385283350944519, -0.8116628527641296, 1.6706440448760986, 2.066598653793335, -0.07809852063655853, -0.18070124089717865, -0.7610813975334167, -1.3082627058029175, 0.7750002145767212, 0.11565075814723969, 0.06595044583082199, 0.6646818518638611, -0.5991045832633972, 1.1240196228027344, 0.8094163537025452, 0.9465655088424683, 0.14559221267700195, 0.235045924782753, 0.3669087588787079, -0.36610013246536255, -1.1891579627990723, -0.30380839109420776, -1.0925273895263672, -2.52091383934021, 0.45360067486763, -0.1650266796350479, -1.5725351572036743, 0.03154611587524414, -1.0271564722061157, 0.8193480968475342, -0.4716266393661499, -1.1342878341674805, -1.469900369644165, 0.2082410454750061, -0.10886824876070023, 0.9066851139068604, -1.6138767004013062, -0.08598421514034271, 1.2252999544143677, 0.9206601977348328, -0.6559931039810181, 1.0040053129196167, 0.20593641698360443, 0.9797030687332153, 0.9023780822753906, -0.37267225980758667, 0.45131465792655945, 0.1585346907377243, -1.3157992362976074, 0.3697609305381775, 1.1832166910171509, 0.17120277881622314, 1.4028728008270264, -0.6095409989356995, 0.0996544286608696, 0.41253504157066345, -0.5386534333229065, -0.4395534098148346, -0.6330329179763794, 0.732276201248169, -0.023649372160434723, -0.8726842999458313, 0.0348774679005146, -0.09281878173351288, -0.20748986303806305, 0.14140349626541138, -1.4729074239730835, -0.16243620216846466, -0.34546327590942383, -0.5717880725860596, -1.2544739246368408, -0.04211349040269852, 1.3645539283752441, -0.6926906108856201, -0.21042592823505402, 0.5218734741210938, 0.398313969373703, 0.5479793548583984, 0.613660991191864, -0.6491670608520508, -0.4082220792770386, -0.17566680908203125, -0.38309624791145325, 0.34834548830986023, 1.3409205675125122, -0.10394486039876938, -0.9255606532096863, 0.7179539203643799, -0.4028412401676178, 0.10582029074430466, 1.9642572402954102, 0.11094975471496582, -0.7887505292892456, 0.38239988684654236, -0.7069058418273926, 1.8898941278457642, 1.6935728788375854, 1.2385820150375366, -0.0953901931643486, -0.9819105267524719, 0.7006376385688782, -0.2926565110683441, -0.3491138517856598, 0.9527888894081116, 0.3771631419658661, -0.20196601748466492, -1.3723704814910889, 0.6175937652587891, 1.2155674695968628, -0.8178746104240417, -0.7831206321716309, -0.010604084469377995, -0.8715230822563171, 1.1211034059524536, 0.7201607823371887, 0.4690086841583252, 0.21942204236984253, 1.6633405685424805, 0.7450129985809326, -0.5224005579948425, 0.5705836415290833, 0.4289584457874298, -0.20051594078540802, -2.044886350631714, -1.0365029573440552, 0.3171803951263428, -0.5097886323928833, -1.628594160079956, 1.3677972555160522, -1.2687368392944336, -0.9304880499839783, 0.47229352593421936, 0.09745163470506668, 1.4093966484069824, 0.3436838984489441, 1.6239447593688965, 2.0699660778045654, 0.9150140285491943, 0.3699568510055542, 1.2847484350204468, -0.07694045454263687, -0.4001660943031311, 1.7989966869354248, -0.42148610949516296, 0.5203176140785217, 1.1328582763671875, -0.38815125823020935, -1.0676685571670532, -0.8038616180419922, -1.0868680477142334, -0.6727035045623779, 1.1837875843048096, 0.07540915161371231, -1.0868624448776245, 0.2871323823928833, 1.6077786684036255, 0.13101764023303986, -0.27651432156562805, 0.572801411151886, 0.4650200307369232, -0.6701937317848206, -0.09355831891298294, -0.8800240159034729, 0.5294879078865051, -0.2904040515422821, -0.3669118285179138, 0.3824917674064636, 0.454731822013855, 1.3007838726043701, -0.04944126307964325, 0.09558023512363434, 1.2392600774765015, -1.442476749420166, 1.4472018480300903, -0.6357084512710571, 0.2601087689399719, -2.4015228748321533, 1.41366446018219, -0.7699718475341797, 1.9437239170074463, -2.6018824577331543, 0.3604734241962433, -0.6288855075836182, -0.5352666974067688, 0.33209002017974854, -0.2635761797428131, 0.10292918235063553, -0.16979603469371796, -1.1149747371673584, -0.08506359905004501, -0.7335644364356995, 0.5084812641143799, 1.1363707780838013, 1.294621229171753, -1.041543960571289, -0.2214377373456955, -1.7194433212280273, -0.19789832830429077, -0.673297107219696, 0.38223809003829956, -1.9207600355148315, -0.1675209105014801, -2.02992844581604, -2.361724853515625, -1.404197335243225, -0.8972134590148926, 1.1190338134765625, 0.17279449105262756, -0.8688393831253052, 1.0912108421325684, -0.39286455512046814, -1.870847463607788, 1.0753923654556274, -2.19557523727417 ]
https://github.com/huggingface/datasets/issues/5584
Unable to load coyo700M dataset
Hi @manuaero Thank you for your interest in the COYO dataset. Our dataset provides the img-url and alt-text in the form of a parquet, so to utilize the coyo dataset you will need to download it directly. We provide a [guide](https://github.com/kakaobrain/coyo-dataset/blob/main/download/README.md) to download, so check it out. Thank you.
### Describe the bug Seeing this error when downloading https://huggingface.co/datasets/kakaobrain/coyo-700m: ```ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.``` Full stack trace ```Downloading and preparing dataset parquet/kakaobrain--coyo-700m to /root/.cache/huggingface/datasets/kakaobrain___parquet/kakaobrain--coyo-700m-ae729692ae3e0073/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec... Downloading data files: 100% 1/1 [00:00<00:00, 63.35it/s] Extracting data files: 100% 1/1 [00:00<00:00, 5.00it/s] --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) [/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1859 _time = time.time() -> 1860 for _, table in generator: 1861 if max_shard_size is not None and writer._num_bytes > max_shard_size: 9 frames ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file. The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) [/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1890 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1891 e = e.__context__ -> 1892 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1893 1894 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset``` ### Steps to reproduce the bug ``` from datasets import load_dataset hf_dataset = load_dataset("kakaobrain/coyo-700m") ``` ### Expected behavior The above commands load the dataset successfully. Or handles exception and continue loading the remainder. ### Environment info colab. any
281
49
Unable to load coyo700M dataset ### Describe the bug Seeing this error when downloading https://huggingface.co/datasets/kakaobrain/coyo-700m: ```ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.``` Full stack trace ```Downloading and preparing dataset parquet/kakaobrain--coyo-700m to /root/.cache/huggingface/datasets/kakaobrain___parquet/kakaobrain--coyo-700m-ae729692ae3e0073/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec... Downloading data files: 100% 1/1 [00:00<00:00, 63.35it/s] Extracting data files: 100% 1/1 [00:00<00:00, 5.00it/s] --------------------------------------------------------------------------- ArrowInvalid Traceback (most recent call last) [/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1859 _time = time.time() -> 1860 for _, table in generator: 1861 if max_shard_size is not None and writer._num_bytes > max_shard_size: 9 frames ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file. The above exception was the direct cause of the following exception: DatasetGenerationError Traceback (most recent call last) [/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id) 1890 if isinstance(e, SchemaInferenceError) and e.__context__ is not None: 1891 e = e.__context__ -> 1892 raise DatasetGenerationError("An error occurred while generating the dataset") from e 1893 1894 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths) DatasetGenerationError: An error occurred while generating the dataset``` ### Steps to reproduce the bug ``` from datasets import load_dataset hf_dataset = load_dataset("kakaobrain/coyo-700m") ``` ### Expected behavior The above commands load the dataset successfully. Or handles exception and continue loading the remainder. ### Environment info colab. any Hi @manuaero Thank you for your interest in the COYO dataset. Our dataset provides the img-url and alt-text in the form of a parquet, so to utilize the coyo dataset you will need to download it directly. We provide a [guide](https://github.com/kakaobrain/coyo-dataset/blob/main/download/README.md) to download, so check it out. Thank you.
[ -1.137178897857666, -0.7717975378036499, -0.6077971458435059, 1.4108400344848633, 0.042310185730457306, -1.4374611377716064, 0.10425188392400742, -0.9388829469680786, 1.5090742111206055, -0.7684450149536133, 0.43047839403152466, -1.666019320487976, 0.055913787335157394, -0.5954462289810181, -0.6916133761405945, -0.6430385112762451, -0.31823545694351196, -0.7967141270637512, 1.1178325414657593, 2.461780309677124, 1.2421469688415527, -1.3722583055496216, 2.8220012187957764, 0.595379114151001, -0.34673768281936646, -0.8125695586204529, 0.41982176899909973, -0.0362914614379406, -1.5358552932739258, -0.3162166476249695, -0.995884120464325, -0.03004242107272148, -0.6626048684120178, -0.5148020386695862, 0.1047046035528183, 0.5344589948654175, -0.12942494451999664, -0.3625629246234894, -0.43950414657592773, -0.74974524974823, 0.6373162269592285, -0.20958372950553894, 0.8383582830429077, -0.2964714765548706, 1.754326581954956, -0.6682347655296326, 0.45189404487609863, 0.5366760492324829, 1.2248209714889526, 0.18620944023132324, -0.05919449403882027, 0.37249836325645447, 0.25966957211494446, 0.006565357558429241, 0.5436633825302124, 1.24927818775177, 0.6138074994087219, 0.4416205585002899, 0.7306903004646301, -2.1541261672973633, 1.3766071796417236, -0.7613575458526611, 0.20076999068260193, 1.335830569267273, -1.0340410470962524, 0.39805659651756287, -1.8359991312026978, -0.14450345933437347, 0.41480353474617004, -2.21722674369812, 0.12796877324581146, -1.2775118350982666, -0.5239822268486023, 0.9959456324577332, 0.3448314666748047, -1.2539966106414795, 0.027131661772727966, -0.5352771878242493, 0.8958969712257385, 0.35583561658859253, 1.1818599700927734, -1.6952999830245972, 0.03742757439613342, -0.2628767788410187, 0.3325289189815521, -1.2370895147323608, -1.621854305267334, 0.5956487655639648, 0.7416600584983826, 0.6080700755119324, -0.13277527689933777, 0.9371889233589172, -1.1080975532531738, 0.8265313506126404, -0.9710990190505981, -1.8200377225875854, -1.3187446594238281, -2.398592948913574, -2.3618524074554443, 0.7393870949745178, -0.47236543893814087, -0.34332534670829773, 2.128704309463501, -1.135698676109314, -1.6604926586151123, 1.015773892402649, 0.27431273460388184, -0.0565631203353405, 2.347407102584839, 0.2496437281370163, -0.9273175001144409, 0.6705246567726135, -0.8332332372665405, 0.6570766568183899, -0.33903414011001587, 1.2665444612503052, 0.39426448941230774, -1.0974316596984863, 1.542808175086975, -0.432063490152359, 0.4481816589832306, -0.7299603819847107, -0.41379472613334656, -0.5673982501029968, 0.20788580179214478, 1.9346197843551636, -0.21365882456302643, 1.5188137292861938, -0.15193407237529755, -1.4951145648956299, -1.3469288349151611, 0.7451664805412292, 0.5228232741355896, -0.9033862948417664, 0.18732130527496338, -0.44126027822494507, 0.1457902491092682, 0.16103391349315643, 1.0325100421905518, 1.2763861417770386, 0.810491144657135, -0.22857175767421722, -0.9175723195075989, 0.08329901099205017, -0.09181355684995651, -0.6055485010147095, -1.7776501178741455, -0.21910794079303741, 0.1983233243227005, 0.675708532333374, -1.2633190155029297, 1.9870580434799194, 0.9247944951057434, 2.131361484527588, 0.9289703965187073, -0.38211584091186523, 1.5681294202804565, 0.04334485903382301, 1.9172782897949219, -0.2913843095302582, 0.687605619430542, -0.5557761192321777, -1.2185592651367188, 0.7264422178268433, -0.3492521047592163, -1.9615106582641602, -0.4260697066783905, -0.8281277418136597, -0.14673924446105957, -0.8982455134391785, 1.0111271142959595, -0.16325968503952026, -1.4176228046417236, 0.22906573116779327, -0.6774503588676453, 0.09642915427684784, -1.3715238571166992, 0.23450405895709991, 0.7238930463790894, -0.7489833831787109, 0.09572393447160721, -0.4200263023376465, -1.4014010429382324, -0.6120211482048035, 0.4486541450023651, 1.7607940435409546, -0.6431785225868225, 1.0534554719924927, 1.0641486644744873, -0.5528662204742432, -0.006301726680248976, 0.5166504979133606, -0.4142872989177704, 0.861633837223053, -1.0535379648208618, -0.395510733127594, 1.0872677564620972, -0.23750878870487213, -0.4987766146659851, 1.3422653675079346, 0.7250472903251648, -1.0588438510894775, -0.30935680866241455, -0.13018645346164703, -0.8535072207450867, 0.12344612181186676, -1.668142557144165, -0.056598011404275894, 0.24668706953525543, -1.5047200918197632, -0.36059436202049255, -0.027981482446193695, 1.3251094818115234, -0.02209194004535675, 1.3976058959960938, -0.25661996006965637, -0.10962911695241928, -0.4990554451942444, -0.5307393670082092, 0.13178658485412598, -0.0768599808216095, -0.6270318031311035, 0.3284648358821869, -0.8216813802719116, 0.15733349323272705, 1.4825083017349243, 0.18159617483615875, 0.1372700035572052, 0.49759531021118164, 1.137102723121643, 0.3128378391265869, -0.1069708839058876, -0.8839923143386841, -1.6869592666625977, 2.0991439819335938, -1.619883418083191, 1.9765864610671997, 0.9467562437057495, -0.0036505809985101223, -1.8497310876846313, -1.8055014610290527, 1.4562464952468872, 1.0732550621032715, 2.475708246231079, 0.5212579369544983, 0.41698554158210754, -0.8286951184272766, -0.6449644565582275, 0.5647000670433044, -0.7377286553382874, -0.8874499201774597, 0.14505651593208313, 2.3790347576141357, 1.6962436437606812, -0.31352829933166504, -0.24925875663757324, -0.8608061671257019, 1.2706518173217773, -0.24418675899505615, 0.21760159730911255, 1.9118071794509888, -0.4011439085006714, -1.03242826461792, 1.2700344324111938, -2.436753034591675, 0.3159027099609375, 2.0302839279174805, 0.2872944474220276, 0.09598842263221741, -1.2313566207885742, -0.714504063129425, -0.15822134912014008, -0.4168242812156677, -1.2004420757293701, 0.484620600938797, -0.28323501348495483, -0.9255590438842773, -1.4169809818267822, 0.02043849229812622, -1.2672204971313477, -1.7878170013427734, 0.43509066104888916, 1.7618176937103271, 2.2300610542297363, -0.7956106066703796, 1.328693151473999, -0.33848732709884644, 0.2045546919107437, 1.1128768920898438, 1.2745006084442139, 3.189812183380127, 1.851813554763794, -1.3099596500396729, 0.7008025050163269, -0.1680065244436264, -0.5110005140304565, 1.1461819410324097, -1.0022884607315063, 1.1515032052993774, -0.3210340738296509, -1.401410698890686, -1.1930524110794067, 1.0161348581314087, 0.43825992941856384, -0.025279758498072624, -0.5022597908973694, 1.138740062713623, 0.2374149113893509, 1.2700237035751343, 0.6095179915428162, -0.27181318402290344, 0.5190566778182983, -0.3610706329345703, -0.5368374586105347, 1.5920871496200562, 0.11191727966070175, -1.4748520851135254, -2.4262166023254395, -0.16195917129516602, -0.9935856461524963, 0.053027089685201645, -0.8856067061424255, -1.0455305576324463, 1.5131115913391113, 0.4654235541820526, -1.0553913116455078, -0.11997143924236298, -0.3691762685775757, -0.5325103998184204, 2.565355062484741, -1.3769397735595703, -0.1855548918247223, -0.9413626194000244, -0.5472709536552429, 1.5022954940795898, -1.215483546257019, -0.3231312036514282, -1.0666563510894775, -0.4815083146095276, -1.1949963569641113, -0.4374139606952667, -0.06564812362194061, -0.8014302849769592, 0.7486894726753235, -0.026722241193056107, -1.2371817827224731, -0.28734472393989563, -1.1074012517929077, 0.8987254500389099, -0.19009797275066376, 0.07250075042247772, 1.6614594459533691, 0.2830801010131836, -0.45521068572998047, 0.7775582671165466, 1.2405164241790771, 0.6593641638755798, -0.5244443416595459, 0.146272212266922, -0.6170321106910706, 0.48698538541793823, -1.231987714767456, 0.40538114309310913, -2.9385292530059814, 0.650896430015564, 0.03299317508935928, 0.03852285072207451, -0.17545185983181, -1.472419261932373, 0.9642499685287476, 2.4274165630340576, -1.0881043672561646, 0.630362331867218, 0.30909857153892517, 1.1594343185424805, -1.5919536352157593, 0.08492974191904068, -0.6577540040016174, 2.0862088203430176, -0.015096391551196575, 1.0955486297607422, -0.5433658361434937, -2.299373149871826, 0.5301256775856018, -1.2386608123779297, -0.9257800579071045, 0.8187480568885803, -0.8524547219276428, 0.2187076210975647, -1.162426233291626, -0.141953244805336, -0.9487318396568298, -1.1826976537704468, 0.4983423352241516, 0.062892384827137, 0.6618402600288391, -0.6082831025123596, 0.24574880301952362, -2.238361358642578, -1.4478554725646973, -0.11034787446260452, -0.9613571763038635, 0.4828093349933624, -0.347301721572876, 0.7166741490364075, -0.10853885114192963, 0.09930863976478577, 0.2713406980037689, 1.3554012775421143, 3.2533726692199707, 0.010807507671415806, 0.3151208460330963, -0.358069509267807, -1.0701961517333984, 1.5145864486694336, 0.9242814183235168, -0.25604012608528137, -0.6580252051353455, -0.9261791706085205, 1.3214203119277954, 1.9922714233398438, 1.0554496049880981, 0.025455310940742493, -0.9264531135559082, -0.8418769240379333, 0.12161387503147125, 0.1663551926612854, 0.6146745085716248, 0.9943763613700867, 0.11303182691335678, 0.15912094712257385, 1.3388205766677856, 1.0155348777770996, -0.3276956081390381, 0.4935212731361389, -0.8634375929832458, -0.3887211084365845, 0.4948117733001709, 0.39007923007011414, 0.061923470348119736, 0.3114805817604065, -1.0373250246047974, -0.23280982673168182, -0.228181853890419, -0.8966696858406067, -0.7680369019508362, -0.445543110370636, -0.43796849250793457, 1.7257145643234253, -0.09288313239812851, -0.4614112079143524, 0.06906309723854065, -0.7839860320091248, -0.1039043590426445, -1.0487630367279053, 0.3001222610473633, -0.14039655029773712, 0.12192285060882568, -0.1314140260219574, 1.7552390098571777, -1.0011688470840454, -2.2036426067352295, 0.13288435339927673, 0.21010179817676544, -0.3913174867630005, -0.043071988970041275, 1.875948190689087, 0.5325755476951599, 1.3640104532241821, 1.54867684841156, 1.0723541975021362, -0.6667884588241577, -1.2889996767044067, 0.7028383016586304, 0.9565691351890564, -1.374739646911621, 0.9629952907562256, -0.23222102224826813, -0.5315971970558167, 0.5849789977073669, 1.3420313596725464, 0.49643921852111816, -1.985381007194519, 0.8906475901603699, -1.0571503639221191, 0.9504348635673523, 0.821738064289093, 0.8557938933372498, 0.1370282769203186, 0.8130514025688171, -1.272526741027832, -1.0460268259048462, -0.5389325618743896, -0.6969089508056641, 1.8626340627670288, -0.253910094499588, 0.2773907482624054, -0.23860137164592743, -1.2592238187789917, 0.1294979751110077, 0.7563668489456177, 0.29823964834213257, -0.3107418715953827, 0.7219346761703491, -0.7064857482910156, -1.1019450426101685, -1.303838849067688, -0.5143687129020691, -0.9492718577384949, -0.8342142701148987, 1.0287220478057861, 0.7092438340187073, 0.5576555132865906, 2.0097203254699707, 0.6946566104888916, 0.20582051575183868, -2.578321695327759, 0.844062864780426, 0.37421858310699463, -0.0661962553858757, 0.932056188583374, 0.2672909200191498, 1.2198175191879272, -0.1386374980211258, 0.5875695943832397, -2.316006660461426, 2.2160074710845947, -0.23423922061920166, 0.735217273235321, 0.04637022688984871, -0.04792053997516632, 1.0357247591018677, 0.5571810603141785, 0.5541151762008667, -1.1352484226226807, 0.9328995943069458, -0.6897090673446655, 1.1109462976455688, 0.8485376834869385, -0.9506396055221558, 0.20600643754005432, 1.1610183715820312, 0.3741486668586731, -0.5608755946159363, -0.9807889461517334, -0.9159324169158936, 0.9207009673118591, 1.7939839363098145, 0.016294684261083603, 0.127833291888237, 0.8248855471611023, 0.736510157585144, -1.3120893239974976, -0.004300284199416637, -0.5825675129890442, -0.7028889656066895, 1.8358837366104126, 2.052008867263794, -0.0453910306096077, 0.014785931445658207, -0.7614120244979858, -1.4497618675231934, 0.8455562591552734, 0.036143958568573, -0.03994284197688103, 0.703538179397583, -0.6821136474609375, 1.2136807441711426, 0.753352701663971, 0.8553743362426758, 0.19819459319114685, 0.0673803985118866, 0.24474219977855682, -0.2676023840904236, -1.1767423152923584, -0.4483569264411926, -1.0031801462173462, -2.5721428394317627, 0.49774932861328125, -0.2694186866283417, -1.5007277727127075, 0.11886148154735565, -0.9387650489807129, 0.6796442866325378, -0.4910418391227722, -1.1019302606582642, -1.3173905611038208, 0.2759276330471039, -0.18845893442630768, 0.814227819442749, -1.6207345724105835, -0.12711916863918304, 1.109497308731079, 0.9742917418479919, -0.63386470079422, 0.8755819201469421, 0.26823386549949646, 0.9072759747505188, 0.926134467124939, -0.33873018622398376, 0.4814656972885132, 0.3840578496456146, -1.3183621168136597, 0.3320101499557495, 1.3974168300628662, 0.13356199860572815, 1.3686180114746094, -0.37860628962516785, 0.004718305543065071, 0.41302165389060974, -0.28191033005714417, -0.5145450830459595, -0.6990843415260315, 0.6704686880111694, -0.017214616760611534, -0.9615277051925659, -0.09132120013237, -0.006827986799180508, -0.1861811727285385, 0.33024361729621887, -1.5342472791671753, -0.1637478917837143, -0.3904375433921814, -0.532122790813446, -1.4678994417190552, -0.042168762534856796, 1.3555406332015991, -0.7916349172592163, -0.11125433444976807, 0.5205565690994263, 0.2290160208940506, 0.5585340261459351, 0.7388522028923035, -0.7205618023872375, -0.30410435795783997, -0.1340193897485733, -0.41795122623443604, 0.34518128633499146, 1.2713595628738403, -0.049600999802351, -0.9347567558288574, 0.5529206991195679, -0.2724868655204773, 0.17597679793834686, 1.953034520149231, 0.04603991284966469, -0.8031371235847473, 0.4143555164337158, -0.7698080539703369, 1.8196547031402588, 1.580528974533081, 1.229813575744629, -0.1190318763256073, -0.9719414710998535, 0.6815122365951538, -0.2716289758682251, -0.31887614727020264, 0.9556039571762085, 0.34072965383529663, -0.28663331270217896, -1.414996862411499, 0.6585908532142639, 1.2356517314910889, -0.8033727407455444, -0.7738608121871948, 0.04000967741012573, -0.8733553886413574, 1.2422235012054443, 0.6488982439041138, 0.3448345959186554, 0.2508945167064667, 1.61729097366333, 0.6784542798995972, -0.5607159733772278, 0.5215505957603455, 0.3291946351528168, -0.17071326076984406, -1.9883434772491455, -1.0994595289230347, 0.2743421792984009, -0.3695841133594513, -1.521170735359192, 1.4187284708023071, -1.280785322189331, -1.0297032594680786, 0.515234649181366, 0.06011999025940895, 1.2746350765228271, 0.2608473598957062, 1.8088765144348145, 2.0155582427978516, 0.9744207262992859, 0.41196420788764954, 1.1660984754562378, -0.21929426491260529, -0.2798519730567932, 1.6970230340957642, -0.5065361857414246, 0.6604360938072205, 1.0528372526168823, -0.4292489290237427, -1.1830685138702393, -0.8257221579551697, -1.144625186920166, -0.8068265318870544, 1.0375211238861084, 0.1223093718290329, -1.1584056615829468, 0.3653508424758911, 1.657142162322998, 0.0967056006193161, -0.059603966772556305, 0.687505304813385, 0.440012127161026, -0.6773800253868103, -0.12003152817487717, -1.0281882286071777, 0.6093059182167053, -0.39814791083335876, -0.38706836104393005, 0.18793927133083344, 0.5860721468925476, 1.1966217756271362, 0.10215981304645538, 0.08294038474559784, 1.3360344171524048, -1.437026858329773, 1.2001086473464966, -0.8918717503547668, 0.36754971742630005, -2.310131311416626, 1.4610601663589478, -0.9335218071937561, 1.9121421575546265, -2.715291976928711, 0.508720874786377, -0.47011715173721313, -0.6426911354064941, 0.2165452390909195, -0.1020529493689537, 0.12468914687633514, -0.10957923531532288, -1.0193575620651245, -0.1836763322353363, -0.8593708872795105, 0.4701506793498993, 1.239394187927246, 1.3516603708267212, -0.8723891973495483, -0.27797576785087585, -1.6375654935836792, -0.16627097129821777, -0.48277637362480164, 0.1481662392616272, -1.748082160949707, -0.108493372797966, -2.135700225830078, -2.424612522125244, -1.4289071559906006, -1.0326852798461914, 1.31178879737854, 0.22976142168045044, -0.9444258809089661, 0.9848325252532959, -0.4576701819896698, -1.7206618785858154, 1.12269926071167, -2.1412410736083984 ]
https://github.com/huggingface/datasets/issues/5577
Cannot load `the_pile_openwebtext2`
Hi! I've merged a PR to use `int32` instead of `int8` for `reddit_scores`, so it should work now.
### Describe the bug I met the same bug mentioned in #3053 which is never fixed. Because several `reddit_scores` are larger than `int8` even `int16`. https://huggingface.co/datasets/the_pile_openwebtext2/blob/main/the_pile_openwebtext2.py#L62 ### Steps to reproduce the bug ```python3 from datasets import load_dataset dataset = load_dataset("the_pile_openwebtext2") ``` ### Expected behavior load as normal. ### Environment info - `datasets` version: 2.10.0 - Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31 - Python version: 3.9.2 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
283
18
Cannot load `the_pile_openwebtext2` ### Describe the bug I met the same bug mentioned in #3053 which is never fixed. Because several `reddit_scores` are larger than `int8` even `int16`. https://huggingface.co/datasets/the_pile_openwebtext2/blob/main/the_pile_openwebtext2.py#L62 ### Steps to reproduce the bug ```python3 from datasets import load_dataset dataset = load_dataset("the_pile_openwebtext2") ``` ### Expected behavior load as normal. ### Environment info - `datasets` version: 2.10.0 - Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31 - Python version: 3.9.2 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Hi! I've merged a PR to use `int32` instead of `int8` for `reddit_scores`, so it should work now.
[ -1.129634976387024, -0.756882905960083, -0.7154749631881714, 1.4816962480545044, -0.15962091088294983, -1.3900498151779175, 0.138652965426445, -1.0247220993041992, 1.6827644109725952, -0.851656973361969, 0.3420817255973816, -1.620510458946228, 0.028910677880048752, -0.6427130699157715, -0.7519349455833435, -0.9320000410079956, -0.42522257566452026, -0.651722252368927, 0.9890710711479187, 2.510756254196167, 1.1893178224563599, -1.28496253490448, 2.641023874282837, 0.6440554261207581, -0.1873912215232849, -0.9237436056137085, 0.507211446762085, -0.021860282868146896, -1.3372129201889038, -0.3986836075782776, -0.817489743232727, -0.11179207265377045, -0.582411527633667, -0.6306737065315247, 0.10313113033771515, 0.453925758600235, -0.3030713200569153, -0.5227693915367126, -0.4776034653186798, -0.8236945867538452, 0.43368250131607056, -0.3404422104358673, 0.9480571746826172, -0.4280192255973816, 1.8476446866989136, -0.5275176763534546, 0.47118937969207764, 0.7577776312828064, 1.3384698629379272, 0.11732307076454163, -0.039243049919605255, 0.3004765510559082, 0.45013096928596497, 0.1084522008895874, 0.5183069705963135, 1.0205984115600586, 0.6145175695419312, 0.5545648336410522, 0.7321678996086121, -2.1958253383636475, 1.3253461122512817, -0.9744477272033691, 0.2198316901922226, 1.3800474405288696, -1.0157101154327393, 0.30261069536209106, -1.767072319984436, -0.041150759905576706, 0.4650926887989044, -2.255026340484619, 0.2826506197452545, -1.3542217016220093, -0.5200189352035522, 1.0902597904205322, 0.3714832365512848, -1.294511318206787, -0.0030600531026721, -0.4127330183982849, 0.9806022047996521, 0.5319163203239441, 1.0966867208480835, -1.6907471418380737, -0.032917916774749756, -0.3262409567832947, 0.03724347800016403, -1.3147886991500854, -1.4949661493301392, 0.504715621471405, 0.7342162728309631, 0.5695468783378601, -0.09138105809688568, 0.9130513072013855, -0.8300656676292419, 0.7160332202911377, -0.8855413794517517, -1.7765378952026367, -1.4374701976776123, -2.286147356033325, -2.289921998977661, 0.7058855891227722, -0.47921621799468994, -0.45378655195236206, 2.1006839275360107, -1.1024831533432007, -1.764791488647461, 1.0916759967803955, 0.18647173047065735, 0.005673828534781933, 2.257443904876709, 0.30332016944885254, -0.6929044127464294, 0.35968321561813354, -0.7216262817382812, 0.6663305759429932, -0.49106791615486145, 1.2669965028762817, 0.43132689595222473, -1.1171116828918457, 1.570267915725708, -0.38310500979423523, 0.6186180710792542, -0.7264023423194885, -0.4354201853275299, -0.7553555965423584, 0.3266189694404602, 1.9834110736846924, -0.33998537063598633, 1.5205714702606201, -0.24255512654781342, -1.5662713050842285, -1.5215214490890503, 0.8299750089645386, 0.46342241764068604, -0.6456355452537537, 0.2518042027950287, -0.26469695568084717, 0.07971829175949097, -0.09828537702560425, 1.153555989265442, 1.2598942518234253, 0.8180649876594543, -0.3159680962562561, -0.8449324369430542, 0.3269692659378052, 0.0749535858631134, -0.7496778964996338, -1.8002136945724487, -0.35935866832733154, 0.10571260750293732, 0.6622434854507446, -1.1543256044387817, 1.7569323778152466, 0.7855837345123291, 1.9278250932693481, 1.0452073812484741, -0.3155920207500458, 1.4845995903015137, 0.09482976794242859, 1.9474356174468994, -0.44408151507377625, 0.6911724209785461, -0.327269971370697, -1.1767107248306274, 0.7564305663108826, -0.28940922021865845, -2.0538084506988525, -0.6853765845298767, -0.9289644956588745, -0.15437743067741394, -0.7625448107719421, 1.0002038478851318, -0.3082140386104584, -1.3395531177520752, 0.1962103545665741, -0.8069146275520325, 0.1240769773721695, -1.3207472562789917, 0.2911975681781769, 0.794538676738739, -0.6013119220733643, 0.08826030790805817, -0.30749979615211487, -1.2994657754898071, -0.424407958984375, 0.378634512424469, 1.7993320226669312, -0.7872799038887024, 0.9970273971557617, 0.9417566061019897, -0.682941734790802, -0.06396576762199402, 0.3676327168941498, -0.368724524974823, 0.8459164500236511, -1.1171132326126099, -0.37024548649787903, 1.2505871057510376, -0.27254346013069153, -0.6806783676147461, 1.459970474243164, 0.8074999451637268, -1.0336272716522217, -0.14255283772945404, -0.22173166275024414, -0.7578763961791992, 0.06460896134376526, -1.6345542669296265, -0.056959375739097595, 0.48878011107444763, -1.5376631021499634, -0.4705273509025574, -0.10241319239139557, 1.3704005479812622, -0.1676090955734253, 1.431045413017273, -0.266859233379364, -0.1828562468290329, -0.4583442807197571, -0.4249720275402069, 0.12757684290409088, -0.1169082522392273, -0.5898540616035461, 0.17503292858600616, -0.7640913724899292, 0.3684767484664917, 1.3624491691589355, 0.20523914694786072, 0.11882014572620392, 0.6384122967720032, 1.0645602941513062, 0.34522905945777893, -0.0814482569694519, -0.9094110131263733, -1.614925742149353, 2.0239217281341553, -1.3737438917160034, 1.9491139650344849, 0.6684035062789917, 0.002168085426092148, -1.7420837879180908, -1.9275527000427246, 1.3844114542007446, 1.0900214910507202, 2.2862515449523926, 0.6037421822547913, 0.4360138475894928, -0.7586359977722168, -0.6930071115493774, 0.38824886083602905, -1.054105281829834, -0.7347641587257385, 0.16059967875480652, 2.4030914306640625, 1.7301474809646606, -0.35882043838500977, -0.2381477802991867, -1.0325974225997925, 1.3922306299209595, -0.1609964370727539, 0.13680753111839294, 2.009944200515747, -0.19730040431022644, -0.9900174736976624, 1.2379311323165894, -2.2744076251983643, 0.2569695711135864, 1.9861496686935425, 0.1927214413881302, 0.0923805683851242, -1.4390805959701538, -0.6816563010215759, -0.17330577969551086, -0.362395316362381, -1.1952333450317383, 0.5558509230613708, -0.23475363850593567, -0.8419399857521057, -1.3574515581130981, 0.26366525888442993, -1.0397930145263672, -1.7766952514648438, 0.2024080455303192, 1.8590574264526367, 1.9638959169387817, -0.7663325071334839, 1.5774599313735962, -0.2057974636554718, 0.25920233130455017, 1.3209742307662964, 1.1828047037124634, 3.1799819469451904, 1.9468772411346436, -1.2645059823989868, 0.7656159400939941, -0.0845353752374649, -0.47066164016723633, 1.2141302824020386, -1.1465116739273071, 1.2066373825073242, -0.24225419759750366, -1.2159674167633057, -1.2400531768798828, 0.9205836653709412, 0.573087751865387, 0.06504935026168823, -0.43484148383140564, 1.339384913444519, 0.039255306124687195, 1.3704534769058228, 0.5665380358695984, -0.3474380373954773, 0.7068133354187012, -0.3743104636669159, -0.41787222027778625, 1.5495879650115967, 0.3405868709087372, -1.3485981225967407, -2.2672154903411865, -0.2894109785556793, -0.8580282330513, -0.07904241979122162, -0.5851770639419556, -0.9686353206634521, 1.6327526569366455, 0.5331392884254456, -1.1981616020202637, -0.30672895908355713, -0.3495618999004364, -0.6156986951828003, 2.7599895000457764, -1.5360223054885864, -0.1419469118118286, -1.123228907585144, -0.584825873374939, 1.6799650192260742, -1.3648890256881714, -0.20449507236480713, -1.134703278541565, -0.54719477891922, -1.2980090379714966, -0.5964645147323608, -0.07450799643993378, -0.908894956111908, 0.8040749430656433, 0.09407438337802887, -1.2139085531234741, -0.32408347725868225, -0.9438394904136658, 0.890957236289978, -0.04533682018518448, 0.24249081313610077, 1.7755038738250732, 0.43542230129241943, -0.34176623821258545, 0.654553234577179, 1.1133596897125244, 0.6677637696266174, -0.720223605632782, 0.27760031819343567, -0.6829023957252502, 0.2360488325357437, -1.381553053855896, 0.32757386565208435, -2.806119918823242, 0.5873880982398987, -0.14710038900375366, -0.13834120333194733, -0.13831882178783417, -1.3472687005996704, 1.1108664274215698, 2.6016178131103516, -1.2755979299545288, 0.4745144248008728, 0.29346248507499695, 1.1783404350280762, -1.584541916847229, 0.3516937494277954, -0.463322252035141, 2.1831436157226562, 0.18303753435611725, 1.2831435203552246, -0.3633574843406677, -2.2824478149414062, 0.6425364017486572, -1.1918636560440063, -1.1636180877685547, 0.843529999256134, -0.7026597857475281, 0.024180274456739426, -1.3043626546859741, -0.19362811744213104, -0.8038632869720459, -1.2930105924606323, 0.7626705169677734, 0.03133618086576462, 0.5905516743659973, -0.5938270092010498, 0.3902416527271271, -2.119694709777832, -1.3115239143371582, -0.2258916050195694, -0.9431294798851013, 0.3662335276603699, -0.29112690687179565, 0.7156248688697815, -0.20247992873191833, 0.044513434171676636, 0.3863404095172882, 1.4307222366333008, 3.486191511154175, 0.14638660848140717, 0.24614818394184113, -0.20073248445987701, -0.9206935167312622, 1.3690482378005981, 0.9475100040435791, -0.13463462889194489, -0.49953415989875793, -0.9477635025978088, 1.1956228017807007, 2.016601324081421, 1.0361751317977905, 0.053141750395298004, -0.839992344379425, -0.8191285729408264, 0.013659210875630379, 0.11656701564788818, 0.4981279969215393, 0.8095395565032959, 0.18374808132648468, 0.05013620853424072, 1.3547505140304565, 1.1636360883712769, -0.3560931980609894, 0.339272141456604, -0.8224237561225891, -0.4111921787261963, 0.5831811428070068, 0.39313095808029175, 0.0862811803817749, 0.2332421988248825, -1.052324891090393, -0.19049537181854248, -0.4095708131790161, -0.8700515627861023, -0.7530771493911743, -0.42691418528556824, -0.38352665305137634, 1.620605230331421, 0.003086077980697155, -0.5662670135498047, -0.07559958100318909, -0.771894633769989, 0.012849470600485802, -0.9770289063453674, 0.2855859398841858, -0.20481565594673157, -0.09788618981838226, -0.09427510201931, 1.7637792825698853, -1.0445314645767212, -2.1002488136291504, 0.30576369166374207, 0.1611790508031845, -0.4458855092525482, 0.18229073286056519, 1.6330307722091675, 0.5863676071166992, 1.3358943462371826, 1.3017219305038452, 1.005772590637207, -0.7109882831573486, -1.2812482118606567, 0.6378452181816101, 0.9189344048500061, -1.5076192617416382, 0.6932024359703064, 0.10680875182151794, -0.5253043174743652, 0.6359196305274963, 1.2396979331970215, 0.45605283975601196, -1.990004062652588, 0.6490121483802795, -0.8839994072914124, 0.7050866484642029, 0.7856335639953613, 0.763514518737793, 0.17524157464504242, 0.7996522188186646, -1.2416715621948242, -1.117173433303833, -0.6557056307792664, -0.662960410118103, 1.865801215171814, -0.3105659782886505, 0.5728103518486023, -0.10706160962581635, -1.3715834617614746, -0.09056538343429565, 0.7129517793655396, 0.31201204657554626, -0.4597570300102234, 0.7964807748794556, -0.6230945587158203, -1.0916391611099243, -1.3983521461486816, -0.5321150422096252, -0.9869457483291626, -1.0254850387573242, 0.9919739961624146, 0.8726187944412231, 0.41744568943977356, 1.8971372842788696, 0.6234539747238159, 0.1773214340209961, -2.645505666732788, 0.8220378756523132, 0.2674132287502289, 0.06926283240318298, 0.8522301316261292, 0.28104692697525024, 1.0667877197265625, -0.09973028302192688, 0.5819748044013977, -2.3925538063049316, 2.3577401638031006, -0.24735775589942932, 0.48214325308799744, -0.0011625997722148895, -0.2243047058582306, 1.0405117273330688, 0.5432228446006775, 0.6086209416389465, -1.1281174421310425, 0.7582234740257263, -0.7172534465789795, 1.2672576904296875, 0.8185544013977051, -0.8951822519302368, -0.10409016907215118, 1.3928622007369995, 0.5420082807540894, -0.5323697328567505, -0.9307290315628052, -1.1129308938980103, 0.8952090740203857, 1.6366803646087646, -0.04762179031968117, -0.10832752287387848, 0.8584052920341492, 0.6929244995117188, -1.296596646308899, 0.09029002487659454, -0.7022290229797363, -0.6664226651191711, 1.6714658737182617, 2.0074973106384277, -0.12598073482513428, -0.19426505267620087, -0.9050889611244202, -1.1087145805358887, 0.713314414024353, 0.028362546116113663, -0.02994275465607643, 0.6792445778846741, -0.5920923352241516, 1.1804602146148682, 0.8209951519966125, 1.0047450065612793, 0.13066624104976654, 0.3206827938556671, 0.27238932251930237, -0.33865660429000854, -1.3160048723220825, -0.29106998443603516, -1.0561069250106812, -2.592607259750366, 0.5204930305480957, -0.27022290229797363, -1.477656364440918, 0.03541205823421478, -1.1313326358795166, 0.8345765471458435, -0.5881074666976929, -1.1686533689498901, -1.4311376810073853, 0.17565399408340454, -0.0745791345834732, 0.9483775496482849, -1.5557347536087036, -0.03569870442152023, 1.3264552354812622, 0.9442135691642761, -0.7089701294898987, 1.0117636919021606, 0.19294317066669464, 1.099683403968811, 0.8807060122489929, -0.34665998816490173, 0.4780522286891937, 0.14952218532562256, -1.3444031476974487, 0.5520413517951965, 1.1579601764678955, 0.19546760618686676, 1.5525579452514648, -0.6265463829040527, 0.10675500333309174, 0.3903316259384155, -0.518369197845459, -0.45271947979927063, -0.7110468149185181, 0.7852777242660522, 0.08128179609775543, -0.8839528560638428, 0.08728992938995361, -0.16940483450889587, -0.12885558605194092, 0.20224012434482574, -1.5702006816864014, -0.16470490396022797, -0.24434013664722443, -0.668998658657074, -1.1637614965438843, -0.07834400236606598, 1.3067902326583862, -0.7223697900772095, -0.10955508053302765, 0.54510498046875, 0.24661950767040253, 0.5111909508705139, 0.5877772569656372, -0.6497725248336792, -0.2913493514060974, -0.29706302285194397, -0.38971298933029175, 0.3745337426662445, 1.26304292678833, -0.06674902141094208, -0.9694622755050659, 0.7682706117630005, -0.42096954584121704, 0.03974847495555878, 1.959835171699524, 0.14831507205963135, -0.9429165720939636, 0.32284191250801086, -0.7259249091148376, 1.9880545139312744, 1.678066611289978, 1.2462259531021118, 0.012424349784851074, -1.0293434858322144, 0.5539966225624084, -0.3090735971927643, -0.38820192217826843, 0.9297376275062561, 0.43734729290008545, -0.23759989440441132, -1.2528178691864014, 0.6720637083053589, 1.2640527486801147, -0.8729788661003113, -0.9583685398101807, 0.16148869693279266, -0.851311206817627, 1.053294062614441, 0.7033920288085938, 0.4475395381450653, 0.223099023103714, 1.5956612825393677, 0.7352160811424255, -0.5229570865631104, 0.6042404174804688, 0.4537579417228699, -0.21764637529850006, -2.0140955448150635, -1.0435535907745361, 0.4150339961051941, -0.5235432386398315, -1.693809151649475, 1.3647829294204712, -1.2344778776168823, -0.9527426958084106, 0.5335237383842468, 0.22410841286182404, 1.5048850774765015, 0.3277398347854614, 1.5927119255065918, 1.9359527826309204, 0.8803587555885315, 0.35452887415885925, 1.3146038055419922, -0.14008033275604248, -0.4594821035861969, 1.701816201210022, -0.5791986584663391, 0.536824107170105, 1.1136630773544312, -0.40635213255882263, -1.0830169916152954, -0.8185039758682251, -1.1736096143722534, -0.7054024338722229, 1.1503905057907104, 0.11214800179004669, -1.1492230892181396, 0.30644944310188293, 1.612790584564209, 0.07072053849697113, -0.22536998987197876, 0.6655977368354797, 0.27205684781074524, -0.8424468040466309, -0.049965936690568924, -0.979662299156189, 0.5543514490127563, -0.11582827568054199, -0.3262529969215393, 0.37478330731391907, 0.5104527473449707, 1.2416270971298218, -0.021878119558095932, 0.15736889839172363, 1.242324709892273, -1.3649743795394897, 1.523557424545288, -0.6445943117141724, 0.201221764087677, -2.3707592487335205, 1.3534404039382935, -0.8249337077140808, 1.8881747722625732, -2.6543943881988525, 0.3295491933822632, -0.5456944108009338, -0.466861754655838, 0.2638542354106903, -0.3212372362613678, 0.08825182914733887, -0.20051246881484985, -1.1175227165222168, -0.1133880466222763, -0.8658433556556702, 0.6158851385116577, 1.1825321912765503, 1.4706350564956665, -1.0947513580322266, -0.19292086362838745, -1.7263333797454834, -0.1433984637260437, -0.6707154512405396, 0.48982250690460205, -1.9600796699523926, -0.1332886666059494, -1.9324910640716553, -2.4390594959259033, -1.3237125873565674, -0.726323664188385, 1.0209014415740967, 0.13188958168029785, -0.7387122511863708, 1.0833995342254639, -0.31382960081100464, -1.8613979816436768, 1.0652573108673096, -2.124049186706543 ]
https://github.com/huggingface/datasets/issues/5575
Metadata for each column
Hi! Indeed it would be useful to support this. PyArrow natively supports schema-level and column-level metadata, so implementing this should be straightforward. The API I have in mind would work as follows: ```python col_feature = Value("string", metadata="Some column-level metadata") features = Features({"col": col_feature}, metadata="Some schema-level metadata") ``` WDYT?
### Feature request Being able to put some metadata for each column as a string or any other type. ### Motivation I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which one works better in our downstream task, here as workaround right now what I do is the compute the hash of the preprocessing that the images went through as part of the new columns name, it would be nice to attach some kinda meta data in these scenarios to the each columns. metadata ### Your contribution Maybe we could map another relational like database as the metadata?
285
48
Metadata for each column ### Feature request Being able to put some metadata for each column as a string or any other type. ### Motivation I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which one works better in our downstream task, here as workaround right now what I do is the compute the hash of the preprocessing that the images went through as part of the new columns name, it would be nice to attach some kinda meta data in these scenarios to the each columns. metadata ### Your contribution Maybe we could map another relational like database as the metadata? Hi! Indeed it would be useful to support this. PyArrow natively supports schema-level and column-level metadata, so implementing this should be straightforward. The API I have in mind would work as follows: ```python col_feature = Value("string", metadata="Some column-level metadata") features = Features({"col": col_feature}, metadata="Some schema-level metadata") ``` WDYT?
[ -1.185550332069397, -0.8893149495124817, -0.9054270386695862, 1.6193114519119263, -0.257426381111145, -1.277082920074463, 0.1428319215774536, -1.076081395149231, 1.5800749063491821, -0.9815604090690613, 0.3370456099510193, -1.6183128356933594, 0.16459067165851593, -0.6849847435951233, -0.7325498461723328, -0.8977983593940735, -0.3747902512550354, -0.7049326300621033, 0.9810048937797546, 2.6003026962280273, 1.1911089420318604, -1.2623459100723267, 2.6072278022766113, 0.6773797869682312, -0.3223591148853302, -0.959659993648529, 0.5401928424835205, 0.030700774863362312, -1.1088156700134277, -0.49651214480400085, -0.8900281190872192, -0.07551193982362747, -0.5343211889266968, -0.518632709980011, -0.015874840319156647, 0.40814247727394104, -0.35506516695022583, -0.318652480840683, -0.4730031490325928, -0.8272572159767151, 0.44171708822250366, -0.41224297881126404, 1.0270873308181763, -0.3373451232910156, 1.8617267608642578, -0.49864813685417175, 0.4033665060997009, 0.6779662370681763, 1.3793772459030151, 0.24898390471935272, -0.10863334685564041, 0.198628768324852, 0.39636558294296265, -0.10586349666118622, 0.45769640803337097, 1.119307041168213, 0.6342340111732483, 0.6250072121620178, 0.7617413401603699, -2.177551507949829, 1.3337422609329224, -1.0566149950027466, 0.29556283354759216, 1.4197266101837158, -0.9440351128578186, 0.39971795678138733, -1.7500447034835815, -0.07740969210863113, 0.44366690516471863, -2.2762935161590576, 0.2917126715183258, -1.1566802263259888, -0.5163344144821167, 0.9872479438781738, 0.3040711581707001, -1.2636715173721313, 0.12056993693113327, -0.30036941170692444, 1.0221235752105713, 0.5476350784301758, 1.0360342264175415, -1.6662743091583252, -0.031853087246418, -0.33552101254463196, 0.09364667534828186, -1.3111974000930786, -1.4103449583053589, 0.41431304812431335, 0.6463249325752258, 0.5245289206504822, 0.025347406044602394, 0.9754928946495056, -0.9928464889526367, 0.8584701418876648, -0.8773009181022644, -1.5735050439834595, -1.356217384338379, -2.3517308235168457, -2.238842010498047, 0.7911443710327148, -0.4858512282371521, -0.6171829104423523, 1.9930989742279053, -1.0900827646255493, -1.7126331329345703, 1.3448082208633423, 0.27881741523742676, -0.06700829416513443, 2.458939790725708, 0.20673872530460358, -0.7222450375556946, 0.4587627649307251, -0.7646867036819458, 0.9671130776405334, -0.5602803230285645, 1.381943941116333, 0.4682426452636719, -1.0774321556091309, 1.577567219734192, -0.5436980128288269, 0.5268347859382629, -0.5324373841285706, -0.47687098383903503, -0.8384238481521606, 0.479284405708313, 1.8386304378509521, -0.2272179275751114, 1.5768530368804932, -0.33312517404556274, -1.4998526573181152, -1.6582084894180298, 1.0021023750305176, 0.4762782156467438, -0.8275235295295715, 0.1483209729194641, -0.3403327465057373, 0.1470804065465927, -0.020924855023622513, 1.1112180948257446, 1.3329005241394043, 0.7545620203018188, -0.3064001500606537, -0.8531209230422974, 0.2682475745677948, -0.07389622926712036, -0.6693258285522461, -1.737487554550171, -0.39692553877830505, 0.1744696944952011, 0.6654244661331177, -1.1820321083068848, 1.720168948173523, 0.923772394657135, 1.8910588026046753, 0.9483112096786499, -0.2623271644115448, 1.5393925905227661, -0.024621255695819855, 1.8014588356018066, -0.4048531651496887, 0.7572934031486511, -0.44963595271110535, -1.2294827699661255, 0.8360995650291443, -0.35558411478996277, -2.016526222229004, -0.8300692439079285, -0.9238088130950928, -0.19051426649093628, -0.8094866871833801, 0.9590464234352112, -0.3121647834777832, -1.2993789911270142, 0.2513241767883301, -0.7197544574737549, 0.08821496367454529, -1.299704670906067, 0.43649137020111084, 0.7278119325637817, -0.6604368686676025, 0.002443968318402767, -0.2517072260379791, -1.205907940864563, -0.39040860533714294, 0.23100091516971588, 1.891931414604187, -0.7687655091285706, 0.8872416019439697, 0.9570597410202026, -0.6628466248512268, -0.07566490769386292, 0.39606866240501404, -0.3542228043079376, 0.8846012353897095, -0.9925443530082703, -0.42043012380599976, 1.1500892639160156, -0.17711912095546722, -0.5924444198608398, 1.40292489528656, 0.7928508520126343, -0.9181169867515564, -0.14348697662353516, -0.18672557175159454, -0.7854329943656921, 0.05396735668182373, -1.5726125240325928, -0.17023037374019623, 0.37553870677948, -1.4258275032043457, -0.5203093886375427, -0.1631241887807846, 1.3061951398849487, -0.16934551298618317, 1.4151018857955933, -0.5051872134208679, -0.2872159779071808, -0.3346407413482666, -0.4641113877296448, 0.13930003345012665, -0.11213703453540802, -0.6374110579490662, 0.15302664041519165, -0.7258877754211426, 0.20551490783691406, 1.369892954826355, 0.3503514230251312, 0.1869504451751709, 0.550667405128479, 1.0657639503479004, 0.4458322823047638, -0.04256102442741394, -0.9671685695648193, -1.4561500549316406, 2.01236891746521, -1.4696170091629028, 2.0749411582946777, 0.83281010389328, 0.008539190515875816, -1.7319728136062622, -1.8890730142593384, 1.3304550647735596, 1.227049708366394, 2.297978639602661, 0.5980090498924255, 0.39939239621162415, -0.8096481561660767, -0.6477386951446533, 0.32592231035232544, -1.1071964502334595, -0.7821487784385681, 0.05359578877687454, 2.3148539066314697, 1.762668490409851, -0.4769246578216553, -0.20237985253334045, -1.0256589651107788, 1.4373356103897095, -0.10982165485620499, 0.18489551544189453, 1.9264981746673584, -0.2727241516113281, -1.085168480873108, 1.2496123313903809, -2.291161060333252, 0.04788561910390854, 1.9721341133117676, 0.2989967465400696, 0.03312680125236511, -1.4242351055145264, -0.6707717180252075, -0.19395378232002258, -0.3710421919822693, -1.2317777872085571, 0.5427737832069397, -0.28059738874435425, -0.6988829374313354, -1.4440126419067383, 0.22513365745544434, -1.1462584733963013, -1.605897307395935, 0.31929776072502136, 1.8680665493011475, 2.108989953994751, -0.9063931703567505, 1.5792009830474854, -0.21729090809822083, 0.15832869708538055, 1.2942301034927368, 1.1153265237808228, 3.1944925785064697, 1.9155656099319458, -1.2337366342544556, 0.5526384711265564, -0.14923080801963806, -0.45634984970092773, 1.1386243104934692, -1.1997742652893066, 1.318681001663208, -0.08488086611032486, -1.1032596826553345, -1.2149125337600708, 0.8359847664833069, 0.47750458121299744, 0.03094167821109295, -0.4790651798248291, 1.2402637004852295, 0.004734844900667667, 1.3706191778182983, 0.5787712335586548, -0.3164318799972534, 0.5719085335731506, -0.4409884810447693, -0.472136914730072, 1.6198444366455078, 0.14906719326972961, -1.475292444229126, -2.2549784183502197, -0.22057366371154785, -0.7599932551383972, 0.016024429351091385, -0.4964558482170105, -1.0063890218734741, 1.6524579524993896, 0.3470620810985565, -1.1792019605636597, -0.35227498412132263, -0.4737037420272827, -0.6031519770622253, 2.7434260845184326, -1.5381358861923218, -0.26084649562835693, -0.9838510155677795, -0.5745174288749695, 1.583687424659729, -1.2645584344863892, -0.15755924582481384, -1.0328662395477295, -0.519540011882782, -1.3511306047439575, -0.5203060507774353, -0.04038916528224945, -0.9718900918960571, 0.6820551753044128, 0.1312384009361267, -1.1873024702072144, -0.3638094365596771, -0.8132445812225342, 0.7945758104324341, -0.15999701619148254, 0.37599992752075195, 1.861767053604126, 0.5087047219276428, -0.40165629982948303, 0.7698099613189697, 1.1863362789154053, 0.5393661856651306, -0.629006028175354, 0.2647128999233246, -0.695195734500885, 0.24259205162525177, -1.2428460121154785, 0.3038651645183563, -2.8297252655029297, 0.6080077290534973, -0.13153043389320374, -0.1543075293302536, -0.03704985976219177, -1.2773644924163818, 1.1708123683929443, 2.548053503036499, -1.084766149520874, 0.4917208254337311, 0.30420762300491333, 1.299660086631775, -1.6277668476104736, 0.3456040024757385, -0.31839627027511597, 2.152438163757324, 0.16829770803451538, 1.2526963949203491, -0.546013593673706, -2.3155972957611084, 0.6379388570785522, -1.3090131282806396, -1.1319711208343506, 0.8100274205207825, -0.8593624234199524, -0.041027918457984924, -1.4767041206359863, -0.23723869025707245, -0.7538373470306396, -1.3130366802215576, 0.7879626750946045, 0.16991478204727173, 0.4846627712249756, -0.5204846262931824, 0.27607351541519165, -2.2344987392425537, -1.4933079481124878, -0.24608264863491058, -0.9801457524299622, 0.33356863260269165, -0.44977807998657227, 0.7174209356307983, -0.32485729455947876, 0.0012370822951197624, 0.3670576512813568, 1.5332653522491455, 3.38846492767334, 0.3366827964782715, 0.5073479413986206, -0.19266360998153687, -0.9317046403884888, 1.475644826889038, 0.9139691591262817, -0.07698278874158859, -0.5059059262275696, -0.9701274037361145, 1.2206923961639404, 1.9287410974502563, 1.003291368484497, -0.025204651057720184, -0.8614142537117004, -0.6753085255622864, -0.07153760641813278, 0.17582079768180847, 0.42176827788352966, 0.9288855791091919, 0.02100839838385582, 0.11060690879821777, 1.3892524242401123, 1.2568345069885254, -0.5293487310409546, 0.4392695724964142, -0.7125269770622253, -0.5009173154830933, 0.42062532901763916, 0.37139663100242615, -0.06548340618610382, 0.265371173620224, -0.9698179364204407, -0.3182693421840668, -0.41273167729377747, -0.9515683054924011, -0.7104503512382507, -0.4414067566394806, -0.31774887442588806, 1.661847710609436, 0.15665708482265472, -0.44830694794654846, -0.04579134285449982, -0.897706925868988, -0.16665440797805786, -1.066463828086853, 0.12196344882249832, -0.14071136713027954, -0.2246246635913849, -0.09400728344917297, 1.8735946416854858, -1.004366397857666, -2.2222743034362793, 0.33368048071861267, 0.27178654074668884, -0.23344340920448303, 0.1787429004907608, 1.682746171951294, 0.44227227568626404, 1.398807168006897, 1.2906590700149536, 0.9182281494140625, -0.7721541523933411, -1.3417153358459473, 0.8178894519805908, 0.994983434677124, -1.4358054399490356, 0.8037621974945068, 0.006489611230790615, -0.4577454924583435, 0.6332325339317322, 1.1630439758300781, 0.45057037472724915, -1.8786983489990234, 0.8198440074920654, -0.8954919576644897, 0.7700298428535461, 0.7253009676933289, 0.6798735857009888, 0.27782511711120605, 0.672232449054718, -1.2281123399734497, -1.153627872467041, -0.7792415022850037, -0.6516805291175842, 1.9608787298202515, -0.2970556914806366, 0.6172448992729187, -0.10210733115673065, -1.2624598741531372, -0.11941669136285782, 0.7657485604286194, 0.3338916599750519, -0.4166199564933777, 0.8236827850341797, -0.6921255588531494, -0.9890273213386536, -1.5389323234558105, -0.4764338433742523, -1.030774712562561, -0.9769115447998047, 0.9854112863540649, 0.8451931476593018, 0.09618961066007614, 1.8942879438400269, 0.7102792263031006, 0.2415296882390976, -2.575237989425659, 0.9117514491081238, 0.30835992097854614, -0.1067914143204689, 0.878169596195221, 0.36531251668930054, 1.0429760217666626, 0.012762317433953285, 0.4828362762928009, -2.4717113971710205, 2.2966978549957275, -0.28461307287216187, 0.7496142983436584, -0.05729333311319351, -0.13821548223495483, 1.234208583831787, 0.5708993673324585, 0.43848517537117004, -1.0695277452468872, 0.6262491345405579, -0.6044507026672363, 1.2384593486785889, 0.933493435382843, -0.7843704223632812, -0.008853454142808914, 1.4017295837402344, 0.4567117691040039, -0.5551467537879944, -0.9185285568237305, -0.8997690677642822, 0.8783054351806641, 1.7891184091567993, -0.04506935179233551, 0.05828054994344711, 0.8141900897026062, 0.581028938293457, -1.2314186096191406, 0.08005721867084503, -0.7268586158752441, -0.8056885004043579, 1.6128178834915161, 2.066612958908081, -0.1508488953113556, -0.3275042474269867, -0.789772629737854, -1.2094413042068481, 0.8517338037490845, -0.08191905915737152, 0.2900344133377075, 0.6276717185974121, -0.6589347720146179, 1.0922201871871948, 0.9870455265045166, 0.9087381958961487, 0.26585352420806885, 0.2282874435186386, 0.46325990557670593, -0.2970265746116638, -1.0845805406570435, -0.2674546539783478, -1.254215955734253, -2.5871951580047607, 0.4827994406223297, -0.3221275210380554, -1.319628119468689, -0.04647493362426758, -0.982738196849823, 0.8988011479377747, -0.5906458497047424, -0.9795495271682739, -1.5747259855270386, 0.07102188467979431, -0.12589995563030243, 0.92486971616745, -1.541070580482483, -0.23910245299339294, 1.2585455179214478, 0.8992089033126831, -0.6848812103271484, 1.094574213027954, 0.17691011726856232, 1.0843197107315063, 0.8223411440849304, -0.5449856519699097, 0.49946972727775574, 0.019715430215001106, -1.343605399131775, 0.4334104657173157, 1.075318694114685, 0.20151084661483765, 1.5369137525558472, -0.5620501041412354, -0.01877269521355629, 0.4161009192466736, -0.4441998600959778, -0.5465154647827148, -0.580525279045105, 0.7483192086219788, 0.11298292875289917, -0.853524923324585, 0.15483561158180237, -0.09344042837619781, -0.27843353152275085, 0.1824800819158554, -1.5694580078125, -0.17493264377117157, -0.37656956911087036, -0.6392913460731506, -1.2939581871032715, -0.07178286463022232, 1.351037621498108, -0.7862281799316406, -0.16714613139629364, 0.505491316318512, 0.37434113025665283, 0.49526581168174744, 0.5868406295776367, -0.668029248714447, -0.40546873211860657, -0.3369958996772766, -0.2642659842967987, 0.36869683861732483, 1.3398092985153198, -0.24212884902954102, -1.0061924457550049, 0.6596622467041016, -0.20730705559253693, 0.03921833634376526, 1.9461896419525146, 0.08726120740175247, -0.8557213544845581, 0.27085670828819275, -0.6170033812522888, 1.903721809387207, 1.6091305017471313, 1.3052363395690918, -0.19471803307533264, -0.8815854787826538, 0.7450926303863525, -0.32474246621131897, -0.21095608174800873, 0.8888542652130127, 0.4234318435192108, -0.15633249282836914, -1.6044983863830566, 0.6066150665283203, 1.2123950719833374, -0.8728851079940796, -0.931183934211731, 0.07586817443370819, -0.7416259050369263, 1.0579420328140259, 0.6959101557731628, 0.401088684797287, 0.3072017431259155, 1.6850152015686035, 0.7733445763587952, -0.5185190439224243, 0.3932848572731018, 0.5657424926757812, -0.12002017349004745, -2.120364189147949, -1.0688352584838867, 0.293323278427124, -0.45232000946998596, -1.53502357006073, 1.4540940523147583, -1.1908395290374756, -0.9359928369522095, 0.6379385590553284, 0.07919396460056305, 1.5115562677383423, 0.2682691812515259, 1.607703447341919, 2.0751891136169434, 0.8701658844947815, 0.3311997056007385, 1.2377852201461792, -0.2516600787639618, -0.4213099181652069, 1.8451266288757324, -0.5101433992385864, 0.4220680594444275, 1.140244960784912, -0.38475310802459717, -0.9564294815063477, -0.7577927112579346, -1.2320526838302612, -0.7152854800224304, 1.2991256713867188, 0.19400273263454437, -1.0098276138305664, 0.21503473818302155, 1.5401597023010254, 0.05528515577316284, -0.4364829659461975, 0.44324520230293274, 0.5721644163131714, -0.8102400898933411, -0.05583873391151428, -0.8074221611022949, 0.5223034024238586, -0.15594379603862762, -0.39203599095344543, 0.4708406925201416, 0.4791977107524872, 1.2603057622909546, -0.14161835610866547, 0.13450470566749573, 1.1118587255477905, -1.4650052785873413, 1.3969618082046509, -0.6200520396232605, 0.13669930398464203, -2.2471492290496826, 1.4321510791778564, -0.8246569037437439, 1.927492618560791, -2.6178693771362305, 0.4619629979133606, -0.5806988477706909, -0.4723561108112335, 0.46072492003440857, -0.41468414664268494, 0.09529194980859756, -0.18952679634094238, -1.0688362121582031, -0.11791945993900299, -0.6841198801994324, 0.5197598338127136, 1.1898930072784424, 1.3045222759246826, -1.1483173370361328, -0.22201460599899292, -1.691245198249817, -0.06729991734027863, -0.6712402105331421, 0.23026123642921448, -2.0659337043762207, -0.35552719235420227, -1.9377199411392212, -2.198141574859619, -1.368111491203308, -0.8021973371505737, 1.2051533460617065, 0.19779634475708008, -0.878251314163208, 1.1555533409118652, -0.3527259826660156, -1.7902246713638306, 1.12875235080719, -2.0627739429473877 ]
https://github.com/huggingface/datasets/issues/5575
Metadata for each column
Sorry for the late reply, Yes, I think this is the most straight-forward approach with the things that we already have.
### Feature request Being able to put some metadata for each column as a string or any other type. ### Motivation I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which one works better in our downstream task, here as workaround right now what I do is the compute the hash of the preprocessing that the images went through as part of the new columns name, it would be nice to attach some kinda meta data in these scenarios to the each columns. metadata ### Your contribution Maybe we could map another relational like database as the metadata?
285
21
Metadata for each column ### Feature request Being able to put some metadata for each column as a string or any other type. ### Motivation I will bring the motivation by an example, lets say we are experimenting with embedding produced by some image encoder network, and we want to iterate through a couple of preprocessing and see which one works better in our downstream task, here as workaround right now what I do is the compute the hash of the preprocessing that the images went through as part of the new columns name, it would be nice to attach some kinda meta data in these scenarios to the each columns. metadata ### Your contribution Maybe we could map another relational like database as the metadata? Sorry for the late reply, Yes, I think this is the most straight-forward approach with the things that we already have.
[ -1.2464033365249634, -0.9257323145866394, -0.9485728740692139, 1.5743310451507568, -0.27065420150756836, -1.2942638397216797, 0.12672464549541473, -1.0613806247711182, 1.598240613937378, -1.0056735277175903, 0.3065873086452484, -1.6189723014831543, 0.1597696840763092, -0.6239144206047058, -0.6773861646652222, -0.9243001341819763, -0.37926262617111206, -0.7728456258773804, 1.0190324783325195, 2.5895237922668457, 1.1257381439208984, -1.2939807176589966, 2.6686758995056152, 0.6519009470939636, -0.32808154821395874, -0.9906767010688782, 0.6388999819755554, -0.018624436110258102, -1.1441495418548584, -0.5601192712783813, -0.9664954543113708, 0.01248133648186922, -0.5090298652648926, -0.3904951810836792, 0.07189613580703735, 0.29729533195495605, -0.21083015203475952, -0.30561521649360657, -0.47864067554473877, -0.8291229009628296, 0.42112478613853455, -0.4140380620956421, 0.9811674356460571, -0.3277076482772827, 1.8851816654205322, -0.4302162230014801, 0.31522706151008606, 0.7207395434379578, 1.4417510032653809, 0.11243962496519089, -0.15536996722221375, 0.23489294946193695, 0.4098241627216339, -0.15770715475082397, 0.36052313446998596, 1.0673754215240479, 0.5641531348228455, 0.6258751749992371, 0.6398342251777649, -2.1839022636413574, 1.4359312057495117, -1.0782239437103271, 0.37039196491241455, 1.401573657989502, -0.9701772332191467, 0.47091159224510193, -1.6999975442886353, -0.08029412478208542, 0.4052152633666992, -2.3558359146118164, 0.21562325954437256, -1.1099112033843994, -0.5382509827613831, 0.9614266753196716, 0.23436973989009857, -1.2963236570358276, 0.09813479334115982, -0.46362778544425964, 1.057831048965454, 0.5913857817649841, 1.1138490438461304, -1.6117286682128906, -0.0055524250492453575, -0.3440863788127899, -0.016744915395975113, -1.4280365705490112, -1.3857989311218262, 0.4368221163749695, 0.7154787182807922, 0.5404384732246399, 0.07659267634153366, 1.0055058002471924, -0.9118187427520752, 0.8996435403823853, -0.8243093490600586, -1.5232983827590942, -1.2943516969680786, -2.3696541786193848, -2.2162036895751953, 0.8227986693382263, -0.5294868350028992, -0.6300278902053833, 2.1273720264434814, -1.1402307748794556, -1.8020187616348267, 1.3476982116699219, 0.23100021481513977, -0.04923824593424797, 2.5332114696502686, 0.2351568192243576, -0.6089178919792175, 0.36246877908706665, -0.7162384390830994, 1.061504602432251, -0.6520724892616272, 1.3442546129226685, 0.35551390051841736, -1.0704264640808105, 1.5766422748565674, -0.4894481897354126, 0.4793393611907959, -0.5562847852706909, -0.45434197783470154, -0.9404581189155579, 0.5289220213890076, 1.8288424015045166, -0.28998157382011414, 1.649849772453308, -0.4549535810947418, -1.4256454706192017, -1.693396806716919, 1.0137760639190674, 0.5232595205307007, -0.8990784883499146, 0.12452234327793121, -0.2554142475128174, 0.1010352149605751, 0.00482461042702198, 1.0207051038742065, 1.273457646369934, 0.690467357635498, -0.30508702993392944, -0.8804041743278503, 0.2809659540653229, -0.09866213798522949, -0.6974249482154846, -1.792490839958191, -0.4036419689655304, 0.12172864377498627, 0.711444616317749, -1.1950880289077759, 1.6900572776794434, 0.9747057557106018, 1.9401633739471436, 0.9166116118431091, -0.325853168964386, 1.4820005893707275, -0.00934963021427393, 1.7449579238891602, -0.38398781418800354, 0.7922026515007019, -0.4680797755718231, -1.2499171495437622, 0.8979368805885315, -0.3314429223537445, -1.9446343183517456, -0.8545929789543152, -0.9650594592094421, -0.2064826488494873, -0.7773090600967407, 1.010532021522522, -0.3689035475254059, -1.2401204109191895, 0.22345945239067078, -0.6592225432395935, 0.15192313492298126, -1.2886563539505005, 0.38218432664871216, 0.7345319390296936, -0.64914870262146, 0.07033630460500717, -0.31730207800865173, -1.22822904586792, -0.42813584208488464, 0.2572855055332184, 1.839086651802063, -0.7434684038162231, 0.912430465221405, 0.8852389454841614, -0.7223109602928162, -0.14084413647651672, 0.34867769479751587, -0.3156620264053345, 0.8977878093719482, -1.0020930767059326, -0.47084900736808777, 1.1555291414260864, -0.27499639987945557, -0.5995404720306396, 1.4458085298538208, 0.7436996102333069, -0.9781907796859741, -0.17669804394245148, -0.19266334176063538, -0.8130530118942261, 0.0382157638669014, -1.60501229763031, -0.1427360475063324, 0.32953089475631714, -1.460508942604065, -0.52540123462677, -0.17586977779865265, 1.3068602085113525, -0.05303410068154335, 1.4463733434677124, -0.5065727829933167, -0.3160875737667084, -0.37781786918640137, -0.4731106162071228, 0.23758669197559357, -0.08688774704933167, -0.5422842502593994, 0.1775761842727661, -0.7551413774490356, 0.23682449758052826, 1.4281847476959229, 0.35659554600715637, 0.19422870874404907, 0.5773098468780518, 0.9941238164901733, 0.4631265103816986, -0.05433306097984314, -0.9898812174797058, -1.3902196884155273, 2.087920665740967, -1.480284571647644, 2.0388693809509277, 0.9068050980567932, 0.003708040341734886, -1.7805233001708984, -1.8521614074707031, 1.3628623485565186, 1.2714022397994995, 2.1503329277038574, 0.5566415190696716, 0.44468972086906433, -0.8694988489151001, -0.62751305103302, 0.32736021280288696, -1.0977123975753784, -0.8480827808380127, 0.007826092652976513, 2.351712226867676, 1.8184924125671387, -0.48210278153419495, -0.17878976464271545, -1.0537177324295044, 1.334891676902771, -0.07679630070924759, 0.20631714165210724, 1.878113865852356, -0.33284109830856323, -1.0610570907592773, 1.150699257850647, -2.301445722579956, 0.035533756017684937, 1.941265344619751, 0.24958182871341705, 0.04494907334446907, -1.4485292434692383, -0.6196319460868835, -0.19804449379444122, -0.2665080726146698, -1.2501038312911987, 0.6063572764396667, -0.31633126735687256, -0.6786856651306152, -1.5273858308792114, 0.24546249210834503, -1.1372393369674683, -1.622871994972229, 0.35652369260787964, 1.942851185798645, 2.108964204788208, -0.895586371421814, 1.6236546039581299, -0.22748497128486633, 0.12976117432117462, 1.2098608016967773, 1.0172075033187866, 3.0945076942443848, 1.9352257251739502, -1.2501797676086426, 0.4601132571697235, -0.07810910791158676, -0.41392266750335693, 1.0548670291900635, -1.0470832586288452, 1.3846361637115479, -0.13516396284103394, -1.2249349355697632, -1.214776873588562, 0.9530278444290161, 0.43828633427619934, 0.0108466362580657, -0.4340064823627472, 1.3820545673370361, -0.025890756398439407, 1.3809689283370972, 0.5298408269882202, -0.40979108214378357, 0.6032116413116455, -0.3940890431404114, -0.46931466460227966, 1.6406559944152832, 0.20786772668361664, -1.5186266899108887, -2.2541143894195557, -0.2875972092151642, -0.6492653489112854, 0.1160585805773735, -0.5109955668449402, -0.962867021560669, 1.6193056106567383, 0.4484834372997284, -1.1994740962982178, -0.4633632004261017, -0.4819163978099823, -0.6316137313842773, 2.6247754096984863, -1.5310317277908325, -0.27538275718688965, -0.931179404258728, -0.4385612905025482, 1.610487937927246, -1.3228657245635986, -0.15518006682395935, -1.0542242527008057, -0.5327422022819519, -1.3102092742919922, -0.46818438172340393, -0.11336256563663483, -1.0301014184951782, 0.6537359952926636, 0.06340672075748444, -1.0866304636001587, -0.2756713330745697, -0.7823912501335144, 0.7656410336494446, -0.11955492198467255, 0.31919267773628235, 1.8686513900756836, 0.5234509110450745, -0.4385678172111511, 0.8846893906593323, 1.1616984605789185, 0.6077632904052734, -0.7415838241577148, 0.17737805843353271, -0.6659312844276428, 0.307598352432251, -1.1962015628814697, 0.2754000425338745, -2.9314517974853516, 0.5433976650238037, -0.16883988678455353, -0.12790703773498535, -0.010217657312750816, -1.2316579818725586, 1.156446933746338, 2.499237060546875, -1.1141234636306763, 0.531255841255188, 0.3308524787425995, 1.3402137756347656, -1.6138584613800049, 0.39863237738609314, -0.33236026763916016, 2.1496200561523438, 0.12225611507892609, 1.2365360260009766, -0.6577279567718506, -2.242609739303589, 0.5882036685943604, -1.2926807403564453, -1.1198410987854004, 0.7288323640823364, -0.820663332939148, -0.07249462604522705, -1.4404757022857666, -0.19636017084121704, -0.7109624147415161, -1.3848646879196167, 0.7398182153701782, 0.1572316288948059, 0.49025958776474, -0.5639784336090088, 0.18068158626556396, -2.170065402984619, -1.4586143493652344, -0.22778935730457306, -1.0203649997711182, 0.3077513873577118, -0.5131232738494873, 0.7732153534889221, -0.31971800327301025, 0.0957677960395813, 0.3139335811138153, 1.403587818145752, 3.4725284576416016, 0.37435439229011536, 0.5434079170227051, -0.18726472556591034, -0.8595712184906006, 1.5053683519363403, 0.9731740355491638, -0.07730060070753098, -0.5336488485336304, -0.9667989015579224, 1.2707079648971558, 1.9818055629730225, 0.9514963626861572, 0.043966662138700485, -0.8514114618301392, -0.6401418447494507, -0.08770493417978287, 0.2390553057193756, 0.48468127846717834, 0.8580471277236938, -0.017767786979675293, 0.1725873500108719, 1.4220635890960693, 1.294752597808838, -0.5574294924736023, 0.5168346762657166, -0.686404824256897, -0.5487088561058044, 0.40026286244392395, 0.4477049708366394, -0.0787801519036293, 0.26203230023384094, -0.9006710052490234, -0.3032383322715759, -0.4401318430900574, -0.9645863771438599, -0.6611372828483582, -0.3018406629562378, -0.38385993242263794, 1.6790049076080322, 0.13159936666488647, -0.43548333644866943, 0.012432957999408245, -0.7860693335533142, -0.2180488258600235, -1.0295323133468628, 0.12583866715431213, -0.10231535136699677, -0.18813209235668182, -0.03925051912665367, 1.9304279088974, -1.0615421533584595, -2.252636432647705, 0.3813720941543579, 0.2575329840183258, -0.17539766430854797, 0.19209948182106018, 1.6372601985931396, 0.43446484208106995, 1.4632130861282349, 1.3555108308792114, 0.9187345504760742, -0.881425142288208, -1.3081600666046143, 0.8098008036613464, 0.997073769569397, -1.497031569480896, 0.7591105699539185, -0.02562783658504486, -0.5240655541419983, 0.7008645534515381, 1.1487077474594116, 0.4311193525791168, -1.9757239818572998, 0.9402642250061035, -0.9296637177467346, 0.8076056838035583, 0.790154218673706, 0.6865589618682861, 0.3362002372741699, 0.699869692325592, -1.1601155996322632, -1.187514305114746, -0.8080602288246155, -0.6314237713813782, 1.9935224056243896, -0.3420988619327545, 0.7077888250350952, -0.04818158224225044, -1.3141225576400757, -0.12557169795036316, 0.7058517336845398, 0.26662808656692505, -0.3503352105617523, 0.7634423971176147, -0.7196528315544128, -1.0562509298324585, -1.617817997932434, -0.5202804803848267, -1.1058478355407715, -1.015198826789856, 1.033320426940918, 0.8243086338043213, 0.04479437321424484, 1.9190295934677124, 0.5741239190101624, 0.25562024116516113, -2.540555000305176, 0.96663898229599, 0.3701273500919342, -0.11358625441789627, 0.9163256287574768, 0.35898110270500183, 1.0251890420913696, 0.11600500345230103, 0.4316626787185669, -2.3848795890808105, 2.279557704925537, -0.28673291206359863, 0.7410660982131958, -0.014902809634804726, -0.15118706226348877, 1.295507788658142, 0.48600196838378906, 0.5528537631034851, -1.0302836894989014, 0.6759452223777771, -0.5562939643859863, 1.255765676498413, 0.9770799279212952, -0.7656006217002869, 0.02280932292342186, 1.3502353429794312, 0.5456206798553467, -0.5877475738525391, -0.9327693581581116, -0.9513303637504578, 0.8854659199714661, 1.878731608390808, -0.1156676784157753, 0.0675363689661026, 0.6659654974937439, 0.5352554321289062, -1.2308018207550049, 0.09011759608983994, -0.7293621897697449, -0.7948156595230103, 1.5044406652450562, 2.0024678707122803, -0.12012513726949692, -0.23894000053405762, -0.7574375867843628, -1.261260986328125, 0.7355073690414429, -0.15726427733898163, 0.27098506689071655, 0.6358029842376709, -0.6908068656921387, 1.0741366147994995, 0.9522033333778381, 0.8444346189498901, 0.17287681996822357, 0.1799803525209427, 0.4414481520652771, -0.2872660160064697, -0.9953731894493103, -0.1973651498556137, -1.2418386936187744, -2.56272554397583, 0.4267946779727936, -0.3317955434322357, -1.356149435043335, -0.10912087559700012, -0.9708393812179565, 0.9381614923477173, -0.5799617171287537, -0.9473687410354614, -1.606646180152893, 0.07501531392335892, -0.20906998217105865, 0.8944971561431885, -1.5673636198043823, -0.1924133151769638, 1.2882815599441528, 0.8841696977615356, -0.7293347716331482, 1.179080843925476, 0.17699891328811646, 1.0657680034637451, 0.771302342414856, -0.5038875937461853, 0.4511829912662506, 0.06116102263331413, -1.3943651914596558, 0.4460509419441223, 0.9924776554107666, 0.19241520762443542, 1.4312068223953247, -0.5655803084373474, -0.015607116743922234, 0.4660630226135254, -0.369401216506958, -0.5187347531318665, -0.5065101981163025, 0.769130527973175, 0.04221786931157112, -0.837497889995575, 0.17944970726966858, -0.18350933492183685, -0.3660603165626526, 0.2249681055545807, -1.5474672317504883, -0.27497339248657227, -0.46784085035324097, -0.5454449653625488, -1.3007855415344238, 0.0004748990759253502, 1.3887678384780884, -0.6664525866508484, -0.23893329501152039, 0.560834527015686, 0.5207149982452393, 0.4552554488182068, 0.6900888085365295, -0.6218133568763733, -0.43767446279525757, -0.3060724437236786, -0.18215517699718475, 0.47666680812835693, 1.3213313817977905, -0.3126159608364105, -0.9410083889961243, 0.6515580415725708, -0.21350203454494476, 0.03512898087501526, 1.9961998462677002, 0.1484893411397934, -0.8653765916824341, 0.2771267890930176, -0.6479488015174866, 1.9231483936309814, 1.5270147323608398, 1.3018122911453247, -0.18506589531898499, -0.9024589657783508, 0.7682729959487915, -0.1810581535100937, -0.12897001206874847, 0.900112509727478, 0.45050135254859924, -0.15687400102615356, -1.6743261814117432, 0.5642454624176025, 1.1053721904754639, -0.8035405278205872, -0.9144083261489868, 0.016164451837539673, -0.6901780962944031, 1.0290571451187134, 0.7466030120849609, 0.4734051823616028, 0.1681823432445526, 1.6876330375671387, 0.7529533505439758, -0.5540239214897156, 0.4160774350166321, 0.4974590539932251, -0.11636721342802048, -2.092906951904297, -1.0270525217056274, 0.2891063690185547, -0.4274114966392517, -1.5335257053375244, 1.4496668577194214, -1.1768004894256592, -0.9034251570701599, 0.5324987173080444, 0.0766204372048378, 1.487987756729126, 0.26445135474205017, 1.589390516281128, 2.100553035736084, 0.9413356781005859, 0.31963977217674255, 1.411547064781189, -0.2839232087135315, -0.39942818880081177, 1.8293566703796387, -0.48321157693862915, 0.2827950119972229, 1.141359806060791, -0.4756297767162323, -0.8961915969848633, -0.6477524042129517, -1.1154367923736572, -0.628867506980896, 1.198442816734314, 0.19342054426670074, -0.9872007369995117, 0.1933324784040451, 1.3447799682617188, 0.1301834136247635, -0.3897327780723572, 0.4126455783843994, 0.660827100276947, -0.7506662607192993, -0.07983919233083725, -0.7447037696838379, 0.5498995184898376, -0.23475272953510284, -0.3637547194957733, 0.5478498935699463, 0.4019106328487396, 1.2632795572280884, -0.14086022973060608, 0.14979755878448486, 1.0881553888320923, -1.4295203685760498, 1.3530967235565186, -0.5260352492332458, 0.08680791407823563, -2.255916118621826, 1.4152610301971436, -0.7115464210510254, 1.872178077697754, -2.666933059692383, 0.4531916379928589, -0.6725558638572693, -0.4055706858634949, 0.5304811596870422, -0.3387986421585083, 0.1130109578371048, -0.23640109598636627, -1.0434958934783936, -0.11101455986499786, -0.6661322116851807, 0.4421498775482178, 1.1253567934036255, 1.2108242511749268, -1.0971416234970093, -0.19696789979934692, -1.6616466045379639, -0.05525130778551102, -0.7125082612037659, 0.27709588408470154, -2.127214193344116, -0.3816626965999603, -1.9334325790405273, -2.2359232902526855, -1.3817940950393677, -0.7197831869125366, 1.2166833877563477, 0.26236122846603394, -0.8468043208122253, 1.2215943336486816, -0.32402515411376953, -1.7869025468826294, 1.0077271461486816, -2.064072847366333 ]
https://github.com/huggingface/datasets/issues/5574
c4 dataset streaming fails with `FileNotFoundError`
Also encountering this issue for every dataset I try to stream! Installed datasets from main: ``` - `datasets` version: 2.10.1.dev0 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.9.13 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 ``` Repro: ```python from datasets import load_dataset spigi = load_dataset("kensho/spgispeech", "dev", split="validation", streaming=True, use_auth_token=True) sample = next(iter(spigi)) ``` <details> <summary> Traceback </summary> ```python --------------------------------------------------------------------------- ClientResponseError Traceback (most recent call last) File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:407, in HTTPFileSystem._info(self, url, **kwargs) 405 try: 406 info.update( --> 407 await _file_info( 408 self.encode_url(url), 409 size_policy=policy, 410 session=session, 411 **self.kwargs, 412 **kwargs, 413 ) 414 ) 415 if info.get("size") is not None: File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:792, in _file_info(url, session, size_policy, **kwargs) 791 async with r: --> 792 r.raise_for_status() 794 # TODO: 795 # recognise lack of 'Accept-Ranges', 796 # or 'Accept-Ranges': 'none' (not 'bytes') 797 # to mean streaming only, no random access => return None File ~/venv/lib/python3.9/site-packages/aiohttp/client_reqrep.py:1005, in ClientResponse.raise_for_status(self) 1004 self.release() -> 1005 raise ClientResponseError( 1006 self.request_info, 1007 self.history, 1008 status=self.status, 1009 message=self.reason, 1010 headers=self.headers, 1011 ) ClientResponseError: 403, message='Forbidden', url=URL('[https://cdn-lfs.huggingface.co/repos/e2/89/e28905247d6f48bb4edad5baf9b1bb4158e897a13fdf18bf3b8ee89ff8387ab8/46eca7431a7b6bad344bf451800e5b10cea1dd168f26d1027a6d9eb374b7fac3?response-content-disposition=attachment%3B+filename*%3DUTF-8''dev.csv%3B+filename%3D%22dev.csv%22%3B&response-content-type=text/csv&Expires=1677494732&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL3JlcG9zL2UyLzg5L2UyODkwNTI0N2Q2ZjQ4YmI0ZWRhZDViYWY5YjFiYjQxNThlODk3YTEzZmRmMThiZjNiOGVlODlmZjgzODdhYjgvNDZlY2E3NDMxYTdiNmJhZDM0NGJmNDUxODAwZTViMTBjZWExZGQxNjhmMjZkMTAyN2E2ZDllYjM3NGI3ZmFjMz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPXRleHQlMkZjc3YiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2Nzc0OTQ3MzJ9fX1dfQ__&Signature=EzQB9f7xPckvqfFB6LzcyR-wzTnQCqtPDdWtQUzZ3QJ-gY-IHG5mxQITJgMr1nVTbJZrPmGAaDngMcPFUfSQa8RmCqYH~dZl-UGE8CO4neKNUT1DvA2WEvLDS4WaAJ3SN-9rX0uFb03~c1QS78cIgIRboYvf6ugKiJz86Bd7Vs~tcp201JFR0A6jIMseqApOnkb9d8dHMP3Ny~F6gO3Qf2QpEWM-QsDIyw2Kz2QV55nq8TsDpRYZCZo50~WwD~73Hej0PoDhEA1K37d19pa0CQhkaN-gjCrbT9xLabbvhJWa~ZkWcMdD0teCgjYqv1wKyvFXDAxukxLGEc7OBXVbYw__&Key-Pair-Id=KVTP0A1DKRTAX](https://cdn-lfs.huggingface.co/repos/e2/89/e28905247d6f48bb4edad5baf9b1bb4158e897a13fdf18bf3b8ee89ff8387ab8/46eca7431a7b6bad344bf451800e5b10cea1dd168f26d1027a6d9eb374b7fac3?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27dev.csv%3B+filename%3D%22dev.csv%22%3B&response-content-type=text/csv&Expires=1677494732&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL3JlcG9zL2UyLzg5L2UyODkwNTI0N2Q2ZjQ4YmI0ZWRhZDViYWY5YjFiYjQxNThlODk3YTEzZmRmMThiZjNiOGVlODlmZjgzODdhYjgvNDZlY2E3NDMxYTdiNmJhZDM0NGJmNDUxODAwZTViMTBjZWExZGQxNjhmMjZkMTAyN2E2ZDllYjM3NGI3ZmFjMz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPXRleHQlMkZjc3YiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2Nzc0OTQ3MzJ9fX1dfQ__&Signature=EzQB9f7xPckvqfFB6LzcyR-wzTnQCqtPDdWtQUzZ3QJ-gY-IHG5mxQITJgMr1nVTbJZrPmGAaDngMcPFUfSQa8RmCqYH~dZl-UGE8CO4neKNUT1DvA2WEvLDS4WaAJ3SN-9rX0uFb03~c1QS78cIgIRboYvf6ugKiJz86Bd7Vs~tcp201JFR0A6jIMseqApOnkb9d8dHMP3Ny~F6gO3Qf2QpEWM-QsDIyw2Kz2QV55nq8TsDpRYZCZo50~WwD~73Hej0PoDhEA1K37d19pa0CQhkaN-gjCrbT9xLabbvhJWa~ZkWcMdD0teCgjYqv1wKyvFXDAxukxLGEc7OBXVbYw__&Key-Pair-Id=KVTP0A1DKRTAX)') The above exception was the direct cause of the following exception: FileNotFoundError Traceback (most recent call last) Cell In[5], line 4 1 from datasets import load_dataset 3 spigi = load_dataset("kensho/spgispeech", "dev", split="validation", streaming=True) ----> 4 sample = next(iter(spigi)) File ~/datasets/src/datasets/iterable_dataset.py:937, in IterableDataset.__iter__(self) 934 yield from self._iter_pytorch(ex_iterable) 935 return --> 937 for key, example in ex_iterable: 938 if self.features: 939 # `IterableDataset` automatically fills missing columns with None. 940 # This is done with `_apply_feature_types_on_example`. 941 yield _apply_feature_types_on_example( 942 example, self.features, token_per_repo_id=self._token_per_repo_id 943 ) File ~/datasets/src/datasets/iterable_dataset.py:113, in ExamplesIterable.__iter__(self) 112 def __iter__(self): --> 113 yield from self.generate_examples_fn(**self.kwargs) File ~/.cache/huggingface/modules/datasets_modules/datasets/kensho--spgispeech/5fbf75dd9ef795a9b5a673457d2cbaf0b8fa0de8fb62acbd1da338d83a41e2f0/spgispeech.py:186, in Spgispeech._generate_examples(self, local_extracted_archive_paths, archives, meta_path) 183 dict_keys = ["wav_filename", "wav_filesize", "transcript"] 185 logging.info("Reading metadata...") --> 186 with open(meta_path, encoding="utf-8") as f: 187 csvreader = csv.DictReader(f, delimiter="|") 188 metadata = {x["wav_filename"]: dict((k, x[k]) for k in dict_keys) for x in csvreader} File ~/datasets/src/datasets/streaming.py:70, in extend_module_for_streaming.<locals>.wrap_auth.<locals>.wrapper(*args, **kwargs) 68 @wraps(function) 69 def wrapper(*args, **kwargs): ---> 70 return function(*args, use_auth_token=use_auth_token, **kwargs) File ~/datasets/src/datasets/download/streaming_download_manager.py:495, in xopen(file, mode, use_auth_token, *args, **kwargs) 493 kwargs = {**kwargs, **new_kwargs} 494 try: --> 495 file_obj = fsspec.open(file, mode=mode, *args, **kwargs).open() 496 except ValueError as e: 497 if str(e) == "Cannot seek streaming HTTP file": File ~/venv/lib/python3.9/site-packages/fsspec/core.py:135, in OpenFile.open(self) 128 def open(self): 129 """Materialise this as a real open file without context 130 131 The OpenFile object should be explicitly closed to avoid enclosed file 132 instances persisting. You must, therefore, keep a reference to the OpenFile 133 during the life of the file-like it generates. 134 """ --> 135 return self.__enter__() File ~/venv/lib/python3.9/site-packages/fsspec/core.py:103, in OpenFile.__enter__(self) 100 def __enter__(self): 101 mode = self.mode.replace("t", "").replace("b", "") + "b" --> 103 f = self.fs.open(self.path, mode=mode) 105 self.fobjects = [f] 107 if self.compression is not None: File ~/venv/lib/python3.9/site-packages/fsspec/spec.py:1106, in AbstractFileSystem.open(self, path, mode, block_size, cache_options, compression, **kwargs) 1104 else: 1105 ac = kwargs.pop("autocommit", not self._intrans) -> 1106 f = self._open( 1107 path, 1108 mode=mode, 1109 block_size=block_size, 1110 autocommit=ac, 1111 cache_options=cache_options, 1112 **kwargs, 1113 ) 1114 if compression is not None: 1115 from fsspec.compression import compr File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:346, in HTTPFileSystem._open(self, path, mode, block_size, autocommit, cache_type, cache_options, size, **kwargs) 344 kw["asynchronous"] = self.asynchronous 345 kw.update(kwargs) --> 346 size = size or self.info(path, **kwargs)["size"] 347 session = sync(self.loop, self.set_session) 348 if block_size and size: File ~/venv/lib/python3.9/site-packages/fsspec/asyn.py:113, in sync_wrapper.<locals>.wrapper(*args, **kwargs) 110 @functools.wraps(func) 111 def wrapper(*args, **kwargs): 112 self = obj or args[0] --> 113 return sync(self.loop, func, *args, **kwargs) File ~/venv/lib/python3.9/site-packages/fsspec/asyn.py:98, in sync(loop, func, timeout, *args, **kwargs) 96 raise FSTimeoutError from return_result 97 elif isinstance(return_result, BaseException): ---> 98 raise return_result 99 else: 100 return return_result File ~/venv/lib/python3.9/site-packages/fsspec/asyn.py:53, in _runner(event, coro, result, timeout) 51 coro = asyncio.wait_for(coro, timeout=timeout) 52 try: ---> 53 result[0] = await coro 54 except Exception as ex: 55 result[0] = ex File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:420, in HTTPFileSystem._info(self, url, **kwargs) 417 except Exception as exc: 418 if policy == "get": 419 # If get failed, then raise a FileNotFoundError --> 420 raise FileNotFoundError(url) from exc 421 logger.debug(str(exc)) 423 return {"name": url, "size": None, **info, "type": "file"} FileNotFoundError: https://huggingface.co/datasets/kensho/spgispeech/resolve/main/data/meta/dev.csv ``` </details>
### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
286
655
c4 dataset streaming fails with `FileNotFoundError` ### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Also encountering this issue for every dataset I try to stream! Installed datasets from main: ``` - `datasets` version: 2.10.1.dev0 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.9.13 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 ``` Repro: ```python from datasets import load_dataset spigi = load_dataset("kensho/spgispeech", "dev", split="validation", streaming=True, use_auth_token=True) sample = next(iter(spigi)) ``` <details> <summary> Traceback </summary> ```python --------------------------------------------------------------------------- ClientResponseError Traceback (most recent call last) File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:407, in HTTPFileSystem._info(self, url, **kwargs) 405 try: 406 info.update( --> 407 await _file_info( 408 self.encode_url(url), 409 size_policy=policy, 410 session=session, 411 **self.kwargs, 412 **kwargs, 413 ) 414 ) 415 if info.get("size") is not None: File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:792, in _file_info(url, session, size_policy, **kwargs) 791 async with r: --> 792 r.raise_for_status() 794 # TODO: 795 # recognise lack of 'Accept-Ranges', 796 # or 'Accept-Ranges': 'none' (not 'bytes') 797 # to mean streaming only, no random access => return None File ~/venv/lib/python3.9/site-packages/aiohttp/client_reqrep.py:1005, in ClientResponse.raise_for_status(self) 1004 self.release() -> 1005 raise ClientResponseError( 1006 self.request_info, 1007 self.history, 1008 status=self.status, 1009 message=self.reason, 1010 headers=self.headers, 1011 ) ClientResponseError: 403, message='Forbidden', url=URL('[https://cdn-lfs.huggingface.co/repos/e2/89/e28905247d6f48bb4edad5baf9b1bb4158e897a13fdf18bf3b8ee89ff8387ab8/46eca7431a7b6bad344bf451800e5b10cea1dd168f26d1027a6d9eb374b7fac3?response-content-disposition=attachment%3B+filename*%3DUTF-8''dev.csv%3B+filename%3D%22dev.csv%22%3B&response-content-type=text/csv&Expires=1677494732&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL3JlcG9zL2UyLzg5L2UyODkwNTI0N2Q2ZjQ4YmI0ZWRhZDViYWY5YjFiYjQxNThlODk3YTEzZmRmMThiZjNiOGVlODlmZjgzODdhYjgvNDZlY2E3NDMxYTdiNmJhZDM0NGJmNDUxODAwZTViMTBjZWExZGQxNjhmMjZkMTAyN2E2ZDllYjM3NGI3ZmFjMz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPXRleHQlMkZjc3YiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2Nzc0OTQ3MzJ9fX1dfQ__&Signature=EzQB9f7xPckvqfFB6LzcyR-wzTnQCqtPDdWtQUzZ3QJ-gY-IHG5mxQITJgMr1nVTbJZrPmGAaDngMcPFUfSQa8RmCqYH~dZl-UGE8CO4neKNUT1DvA2WEvLDS4WaAJ3SN-9rX0uFb03~c1QS78cIgIRboYvf6ugKiJz86Bd7Vs~tcp201JFR0A6jIMseqApOnkb9d8dHMP3Ny~F6gO3Qf2QpEWM-QsDIyw2Kz2QV55nq8TsDpRYZCZo50~WwD~73Hej0PoDhEA1K37d19pa0CQhkaN-gjCrbT9xLabbvhJWa~ZkWcMdD0teCgjYqv1wKyvFXDAxukxLGEc7OBXVbYw__&Key-Pair-Id=KVTP0A1DKRTAX](https://cdn-lfs.huggingface.co/repos/e2/89/e28905247d6f48bb4edad5baf9b1bb4158e897a13fdf18bf3b8ee89ff8387ab8/46eca7431a7b6bad344bf451800e5b10cea1dd168f26d1027a6d9eb374b7fac3?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27dev.csv%3B+filename%3D%22dev.csv%22%3B&response-content-type=text/csv&Expires=1677494732&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL3JlcG9zL2UyLzg5L2UyODkwNTI0N2Q2ZjQ4YmI0ZWRhZDViYWY5YjFiYjQxNThlODk3YTEzZmRmMThiZjNiOGVlODlmZjgzODdhYjgvNDZlY2E3NDMxYTdiNmJhZDM0NGJmNDUxODAwZTViMTBjZWExZGQxNjhmMjZkMTAyN2E2ZDllYjM3NGI3ZmFjMz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPXRleHQlMkZjc3YiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2Nzc0OTQ3MzJ9fX1dfQ__&Signature=EzQB9f7xPckvqfFB6LzcyR-wzTnQCqtPDdWtQUzZ3QJ-gY-IHG5mxQITJgMr1nVTbJZrPmGAaDngMcPFUfSQa8RmCqYH~dZl-UGE8CO4neKNUT1DvA2WEvLDS4WaAJ3SN-9rX0uFb03~c1QS78cIgIRboYvf6ugKiJz86Bd7Vs~tcp201JFR0A6jIMseqApOnkb9d8dHMP3Ny~F6gO3Qf2QpEWM-QsDIyw2Kz2QV55nq8TsDpRYZCZo50~WwD~73Hej0PoDhEA1K37d19pa0CQhkaN-gjCrbT9xLabbvhJWa~ZkWcMdD0teCgjYqv1wKyvFXDAxukxLGEc7OBXVbYw__&Key-Pair-Id=KVTP0A1DKRTAX)') The above exception was the direct cause of the following exception: FileNotFoundError Traceback (most recent call last) Cell In[5], line 4 1 from datasets import load_dataset 3 spigi = load_dataset("kensho/spgispeech", "dev", split="validation", streaming=True) ----> 4 sample = next(iter(spigi)) File ~/datasets/src/datasets/iterable_dataset.py:937, in IterableDataset.__iter__(self) 934 yield from self._iter_pytorch(ex_iterable) 935 return --> 937 for key, example in ex_iterable: 938 if self.features: 939 # `IterableDataset` automatically fills missing columns with None. 940 # This is done with `_apply_feature_types_on_example`. 941 yield _apply_feature_types_on_example( 942 example, self.features, token_per_repo_id=self._token_per_repo_id 943 ) File ~/datasets/src/datasets/iterable_dataset.py:113, in ExamplesIterable.__iter__(self) 112 def __iter__(self): --> 113 yield from self.generate_examples_fn(**self.kwargs) File ~/.cache/huggingface/modules/datasets_modules/datasets/kensho--spgispeech/5fbf75dd9ef795a9b5a673457d2cbaf0b8fa0de8fb62acbd1da338d83a41e2f0/spgispeech.py:186, in Spgispeech._generate_examples(self, local_extracted_archive_paths, archives, meta_path) 183 dict_keys = ["wav_filename", "wav_filesize", "transcript"] 185 logging.info("Reading metadata...") --> 186 with open(meta_path, encoding="utf-8") as f: 187 csvreader = csv.DictReader(f, delimiter="|") 188 metadata = {x["wav_filename"]: dict((k, x[k]) for k in dict_keys) for x in csvreader} File ~/datasets/src/datasets/streaming.py:70, in extend_module_for_streaming.<locals>.wrap_auth.<locals>.wrapper(*args, **kwargs) 68 @wraps(function) 69 def wrapper(*args, **kwargs): ---> 70 return function(*args, use_auth_token=use_auth_token, **kwargs) File ~/datasets/src/datasets/download/streaming_download_manager.py:495, in xopen(file, mode, use_auth_token, *args, **kwargs) 493 kwargs = {**kwargs, **new_kwargs} 494 try: --> 495 file_obj = fsspec.open(file, mode=mode, *args, **kwargs).open() 496 except ValueError as e: 497 if str(e) == "Cannot seek streaming HTTP file": File ~/venv/lib/python3.9/site-packages/fsspec/core.py:135, in OpenFile.open(self) 128 def open(self): 129 """Materialise this as a real open file without context 130 131 The OpenFile object should be explicitly closed to avoid enclosed file 132 instances persisting. You must, therefore, keep a reference to the OpenFile 133 during the life of the file-like it generates. 134 """ --> 135 return self.__enter__() File ~/venv/lib/python3.9/site-packages/fsspec/core.py:103, in OpenFile.__enter__(self) 100 def __enter__(self): 101 mode = self.mode.replace("t", "").replace("b", "") + "b" --> 103 f = self.fs.open(self.path, mode=mode) 105 self.fobjects = [f] 107 if self.compression is not None: File ~/venv/lib/python3.9/site-packages/fsspec/spec.py:1106, in AbstractFileSystem.open(self, path, mode, block_size, cache_options, compression, **kwargs) 1104 else: 1105 ac = kwargs.pop("autocommit", not self._intrans) -> 1106 f = self._open( 1107 path, 1108 mode=mode, 1109 block_size=block_size, 1110 autocommit=ac, 1111 cache_options=cache_options, 1112 **kwargs, 1113 ) 1114 if compression is not None: 1115 from fsspec.compression import compr File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:346, in HTTPFileSystem._open(self, path, mode, block_size, autocommit, cache_type, cache_options, size, **kwargs) 344 kw["asynchronous"] = self.asynchronous 345 kw.update(kwargs) --> 346 size = size or self.info(path, **kwargs)["size"] 347 session = sync(self.loop, self.set_session) 348 if block_size and size: File ~/venv/lib/python3.9/site-packages/fsspec/asyn.py:113, in sync_wrapper.<locals>.wrapper(*args, **kwargs) 110 @functools.wraps(func) 111 def wrapper(*args, **kwargs): 112 self = obj or args[0] --> 113 return sync(self.loop, func, *args, **kwargs) File ~/venv/lib/python3.9/site-packages/fsspec/asyn.py:98, in sync(loop, func, timeout, *args, **kwargs) 96 raise FSTimeoutError from return_result 97 elif isinstance(return_result, BaseException): ---> 98 raise return_result 99 else: 100 return return_result File ~/venv/lib/python3.9/site-packages/fsspec/asyn.py:53, in _runner(event, coro, result, timeout) 51 coro = asyncio.wait_for(coro, timeout=timeout) 52 try: ---> 53 result[0] = await coro 54 except Exception as ex: 55 result[0] = ex File ~/venv/lib/python3.9/site-packages/fsspec/implementations/http.py:420, in HTTPFileSystem._info(self, url, **kwargs) 417 except Exception as exc: 418 if policy == "get": 419 # If get failed, then raise a FileNotFoundError --> 420 raise FileNotFoundError(url) from exc 421 logger.debug(str(exc)) 423 return {"name": url, "size": None, **info, "type": "file"} FileNotFoundError: https://huggingface.co/datasets/kensho/spgispeech/resolve/main/data/meta/dev.csv ``` </details>
[ -1.18198561668396, -0.8671308755874634, -0.7479708194732666, 1.3915537595748901, -0.18342715501785278, -1.162192463874817, 0.1917634755373001, -1.0304006338119507, 1.6828891038894653, -0.7545842528343201, 0.3049739897251129, -1.6680021286010742, -0.0791458785533905, -0.578832745552063, -0.6975297331809998, -0.8024681806564331, -0.3378005027770996, -0.7990498542785645, 0.981288492679596, 2.545213222503662, 1.2111519575119019, -1.3076165914535522, 2.7199394702911377, 0.6853140592575073, -0.23325642943382263, -0.9921011328697205, 0.44688791036605835, -0.00644698366522789, -1.2948329448699951, -0.4373388886451721, -0.9246724247932434, -0.052583616226911545, -0.5585552453994751, -0.5038279294967651, 0.06054041534662247, 0.46462708711624146, -0.28849485516548157, -0.41721871495246887, -0.49254268407821655, -0.7544295191764832, 0.47869959473609924, -0.4149181842803955, 0.8989076018333435, -0.3059008717536926, 1.8256340026855469, -0.6632023453712463, 0.3333422839641571, 0.7285239696502686, 1.2712815999984741, 0.21527832746505737, -0.01897159032523632, 0.2867611050605774, 0.3464452922344208, 0.04481873661279678, 0.516229510307312, 1.2206616401672363, 0.6518601179122925, 0.44113409519195557, 0.7456843256950378, -2.196730613708496, 1.267163634300232, -1.012475848197937, 0.2600099444389343, 1.3890913724899292, -0.9730350971221924, 0.40312352776527405, -1.8944706916809082, -0.027948569506406784, 0.5391809940338135, -2.3028619289398193, 0.300811231136322, -1.391396164894104, -0.543342649936676, 1.0236278772354126, 0.27096638083457947, -1.2342345714569092, 0.14679601788520813, -0.4517318308353424, 1.0299351215362549, 0.4151689112186432, 1.119876742362976, -1.7262834310531616, -0.1164325475692749, -0.3360115587711334, 0.22079478204250336, -1.345900297164917, -1.5361508131027222, 0.5601826906204224, 0.6170348525047302, 0.5897222757339478, -0.11046922951936722, 1.0039122104644775, -1.0159918069839478, 0.7815115451812744, -0.9637690186500549, -1.740579605102539, -1.4283554553985596, -2.198756694793701, -2.2011518478393555, 0.7882170677185059, -0.4291399121284485, -0.5082505941390991, 2.0004680156707764, -1.0655828714370728, -1.7953782081604004, 1.0596429109573364, 0.23956194519996643, -0.09313909709453583, 2.3441429138183594, 0.33663344383239746, -0.8210128545761108, 0.41493120789527893, -0.8092342019081116, 0.7160664796829224, -0.36588096618652344, 1.289186954498291, 0.5012664198875427, -1.0484068393707275, 1.6030409336090088, -0.45207783579826355, 0.5385382771492004, -0.7614413499832153, -0.5268469452857971, -0.7842538952827454, 0.26767536997795105, 2.0072224140167236, -0.32655230164527893, 1.5687601566314697, -0.3762831389904022, -1.6276930570602417, -1.5238579511642456, 0.8491527438163757, 0.48842114210128784, -0.7992645502090454, 0.14098592102527618, -0.3787131607532501, 0.10173798352479935, -0.06340158730745316, 1.1443146467208862, 1.265838384628296, 0.7260827422142029, -0.22672128677368164, -0.8402025699615479, 0.22431518137454987, 0.03461138904094696, -0.7019509673118591, -1.799147605895996, -0.40293899178504944, 0.21350906789302826, 0.605130136013031, -1.3046107292175293, 1.716031551361084, 0.8532754182815552, 1.9078530073165894, 0.9942331910133362, -0.35093143582344055, 1.5890995264053345, 0.099454864859581, 1.8675024509429932, -0.4431399405002594, 0.7104858756065369, -0.35064297914505005, -1.1937823295593262, 0.7805866599082947, -0.24395208060741425, -2.0570521354675293, -0.7104834318161011, -0.7600593566894531, -0.1229294165968895, -0.7547918558120728, 0.8612252473831177, -0.3026427924633026, -1.4716228246688843, 0.25155285000801086, -0.7377657890319824, 0.12223131954669952, -1.30393648147583, 0.3001621961593628, 0.7039594054222107, -0.6443126797676086, 0.1506890207529068, -0.2276969701051712, -1.2687965631484985, -0.4499753713607788, 0.22054864466190338, 1.8827193975448608, -0.7546530365943909, 0.8689064979553223, 1.0453194379806519, -0.7014713287353516, -0.0005179839208722115, 0.3933050036430359, -0.32688453793525696, 0.8088018298149109, -1.1174739599227905, -0.32963013648986816, 1.1536955833435059, -0.10426093637943268, -0.6065189242362976, 1.3657318353652954, 0.7595235705375671, -1.0372982025146484, -0.3107476830482483, -0.20655742287635803, -0.8412317633628845, -0.012105060741305351, -1.5869187116622925, -0.18941427767276764, 0.4088137447834015, -1.4502036571502686, -0.4649120569229126, -0.24928182363510132, 1.299058198928833, -0.20489183068275452, 1.3778849840164185, -0.29655972123146057, -0.11529630422592163, -0.31915849447250366, -0.4228074252605438, 0.13598857820034027, -0.18535824120044708, -0.636243462562561, 0.2633437514305115, -0.7588168978691101, 0.2845359146595001, 1.4923895597457886, 0.2975272834300995, 0.021803922951221466, 0.5089473128318787, 1.1632587909698486, 0.38471460342407227, -0.058165594935417175, -0.9388075470924377, -1.5586045980453491, 1.9779736995697021, -1.5143229961395264, 1.9855881929397583, 0.8463456034660339, -0.0060196733102202415, -1.7075518369674683, -1.8812499046325684, 1.3423959016799927, 1.181166648864746, 2.464810848236084, 0.6025875806808472, 0.4605628252029419, -0.7711771726608276, -0.6423198580741882, 0.3247990906238556, -1.0841573476791382, -0.7863677740097046, 0.25309762358665466, 2.4312429428100586, 1.746234655380249, -0.4760136008262634, -0.25764766335487366, -0.9686277508735657, 1.2747669219970703, -0.16945801675319672, 0.17909395694732666, 2.021069049835205, -0.24548009037971497, -1.074048399925232, 1.2798874378204346, -2.3381407260894775, 0.20836889743804932, 1.9926046133041382, 0.24821116030216217, 0.10679217427968979, -1.33994460105896, -0.6990230679512024, -0.24613814055919647, -0.39112842082977295, -1.2568464279174805, 0.5138916969299316, -0.2421485185623169, -0.8284640908241272, -1.5154547691345215, 0.16200606524944305, -1.0699703693389893, -1.677695631980896, 0.256032794713974, 1.90414559841156, 2.0024051666259766, -0.8284715414047241, 1.47433602809906, -0.3521072268486023, 0.1178169995546341, 1.1993176937103271, 1.2664293050765991, 3.09602689743042, 1.8169567584991455, -1.2584826946258545, 0.6913764476776123, -0.16550979018211365, -0.449504554271698, 1.079703688621521, -1.1607917547225952, 1.1789841651916504, -0.1494046151638031, -1.1349987983703613, -1.2475005388259888, 0.8348555564880371, 0.4924165606498718, -0.031089432537555695, -0.4320363402366638, 1.2505935430526733, 0.1735163927078247, 1.450300931930542, 0.5877426266670227, -0.35118764638900757, 0.6628825068473816, -0.32424166798591614, -0.4535715878009796, 1.6010292768478394, 0.20822358131408691, -1.3923147916793823, -2.309295415878296, -0.20437440276145935, -0.8751586079597473, 0.019518859684467316, -0.5622941851615906, -1.0139153003692627, 1.7391722202301025, 0.37758806347846985, -1.226500391960144, -0.23118595778942108, -0.34508848190307617, -0.5450143814086914, 2.666271924972534, -1.3869023323059082, -0.1821945458650589, -0.9872784614562988, -0.5884299278259277, 1.6565076112747192, -1.14018976688385, -0.22997577488422394, -1.021640419960022, -0.5724173784255981, -1.314706563949585, -0.5740138292312622, -0.02235335111618042, -0.888555645942688, 0.8019300103187561, 0.2265414297580719, -1.158161997795105, -0.3164617121219635, -0.9256454110145569, 0.8855909705162048, -0.11083664745092392, 0.23152819275856018, 1.8928371667861938, 0.380719393491745, -0.3485775887966156, 0.7592887282371521, 1.17489492893219, 0.5693942308425903, -0.5678228139877319, 0.2163223922252655, -0.6959114670753479, 0.20863798260688782, -1.403651237487793, 0.29013094305992126, -2.875546455383301, 0.6560531854629517, -0.05333743616938591, 0.01159739214926958, 0.0010785404592752457, -1.3133958578109741, 1.1064482927322388, 2.5986111164093018, -1.1230576038360596, 0.49730372428894043, 0.3342011272907257, 1.1939159631729126, -1.645585298538208, 0.2625283896923065, -0.34912532567977905, 2.0870773792266846, 0.2579837143421173, 1.2880487442016602, -0.44124552607536316, -2.325188636779785, 0.5236799716949463, -1.2687536478042603, -1.1642632484436035, 0.8505805730819702, -0.8472362756729126, 0.027456827461719513, -1.3851531744003296, -0.23613983392715454, -0.8900707364082336, -1.264021396636963, 0.7939884066581726, 0.16840790212154388, 0.505783200263977, -0.6154177784919739, 0.4102368652820587, -2.2002615928649902, -1.2689533233642578, -0.2120397984981537, -0.9276654124259949, 0.4142509996891022, -0.2608483135700226, 0.6724497079849243, -0.1491217464208603, 0.0026833340525627136, 0.3814704418182373, 1.466751217842102, 3.2784957885742188, 0.182830348610878, 0.3085136413574219, -0.19209234416484833, -0.9422527551651001, 1.4415793418884277, 0.951485812664032, -0.13892453908920288, -0.6398009061813354, -1.0751363039016724, 1.243395209312439, 1.9272109270095825, 1.0089449882507324, 0.07078736275434494, -0.8692034482955933, -0.7871600389480591, -0.07388563454151154, 0.17466354370117188, 0.42309999465942383, 0.9450889229774475, 0.08454462885856628, 0.046289972960948944, 1.3976598978042603, 1.146489143371582, -0.454619437456131, 0.4043518006801605, -0.8719555139541626, -0.43694740533828735, 0.4512505531311035, 0.2542286515235901, 0.022339899092912674, 0.3327595591545105, -1.0773283243179321, -0.22859273850917816, -0.2939928472042084, -0.9080915451049805, -0.7953664064407349, -0.4047437906265259, -0.31167855858802795, 1.6655218601226807, 0.05063914135098457, -0.44106221199035645, -0.023265574127435684, -0.7593557238578796, -0.15185172855854034, -1.0999512672424316, 0.2946772277355194, -0.152838796377182, -0.07766350358724594, -0.11977701634168625, 1.7657678127288818, -0.844463050365448, -2.0603158473968506, 0.22271153330802917, 0.25453460216522217, -0.3445355296134949, 0.1775168925523758, 1.7282520532608032, 0.5447964668273926, 1.349109172821045, 1.278214454650879, 1.0004749298095703, -0.6748498678207397, -1.2510706186294556, 0.6398682594299316, 0.9876932501792908, -1.407591462135315, 0.7843125462532043, -0.06435641646385193, -0.4569967985153198, 0.6096659302711487, 1.231424331665039, 0.49373751878738403, -1.9825849533081055, 0.7806410789489746, -0.9786326289176941, 0.5943285822868347, 0.7217333316802979, 0.7707391977310181, 0.22275860607624054, 0.8347954750061035, -1.2164479494094849, -1.1513276100158691, -0.6975107192993164, -0.5816010236740112, 1.9185707569122314, -0.17928862571716309, 0.5125284194946289, -0.12744726240634918, -1.2715480327606201, -0.029282212257385254, 0.6766515374183655, 0.3401062786579132, -0.426474392414093, 0.7764953970909119, -0.6661610007286072, -1.0635409355163574, -1.2791097164154053, -0.5032143592834473, -1.013710856437683, -1.0035289525985718, 0.9207764267921448, 0.7878386378288269, 0.36075425148010254, 1.906898856163025, 0.6993291974067688, 0.22936174273490906, -2.6690852642059326, 0.9261865019798279, 0.306378036737442, -0.02536112815141678, 0.9835656881332397, 0.28817301988601685, 1.0642081499099731, 0.045315809547901154, 0.5942633152008057, -2.4755282402038574, 2.3243606090545654, -0.22868700325489044, 0.7064463496208191, 0.009513932280242443, -0.2116842269897461, 1.0005197525024414, 0.5477866530418396, 0.46741557121276855, -1.0741225481033325, 0.7178301215171814, -0.6334872841835022, 1.1654525995254517, 0.9383055567741394, -0.8614726662635803, -0.015307385474443436, 1.2714910507202148, 0.4008221924304962, -0.5213178396224976, -0.9022655487060547, -0.9264712333679199, 0.8743771910667419, 1.7694216966629028, -0.06032727286219597, 0.0917523130774498, 0.8714603781700134, 0.6581732630729675, -1.2727317810058594, -0.030288878828287125, -0.6849174499511719, -0.8419497609138489, 1.708756446838379, 2.0187265872955322, -0.07095033675432205, -0.3078558146953583, -0.7304962873458862, -1.2048588991165161, 0.8240200877189636, 0.061822764575481415, 0.20823724567890167, 0.6836179494857788, -0.7351353764533997, 1.1608412265777588, 0.8444687724113464, 0.9477465748786926, 0.2512407600879669, 0.3145153224468231, 0.3970641791820526, -0.3392743766307831, -1.161616325378418, -0.24869213998317719, -1.110538125038147, -2.594545841217041, 0.5361595153808594, -0.13675352931022644, -1.4012253284454346, 0.04392225295305252, -1.0361521244049072, 0.8574814796447754, -0.6555566787719727, -1.1308948993682861, -1.504521131515503, 0.27368760108947754, -0.1388975828886032, 0.8699740767478943, -1.685198187828064, -0.082794688642025, 1.266075611114502, 1.0387704372406006, -0.667913556098938, 0.9858787655830383, 0.21722161769866943, 1.07664155960083, 0.8997153043746948, -0.30201956629753113, 0.5494908690452576, 0.07852372527122498, -1.3371508121490479, 0.44229796528816223, 1.2695096731185913, 0.15510165691375732, 1.5404038429260254, -0.5243678092956543, 0.028135981410741806, 0.41697245836257935, -0.5048291683197021, -0.523452639579773, -0.580646276473999, 0.6474800705909729, 0.11934013664722443, -0.9920603036880493, 0.009352724067866802, -0.09035159647464752, -0.10872089117765427, 0.16309359669685364, -1.4849026203155518, -0.1766873002052307, -0.3909732699394226, -0.6083979606628418, -1.2224617004394531, -0.11417273432016373, 1.3160961866378784, -0.7682256698608398, -0.15912184119224548, 0.5638457536697388, 0.41065242886543274, 0.5133741497993469, 0.5895952582359314, -0.7418148517608643, -0.42278873920440674, -0.20296843349933624, -0.46935799717903137, 0.37707558274269104, 1.3727097511291504, -0.033344924449920654, -1.0137704610824585, 0.6449458003044128, -0.3722015917301178, 0.08903147280216217, 1.9366333484649658, 0.06630345433950424, -0.8368895649909973, 0.24645082652568817, -0.6958695650100708, 1.9624931812286377, 1.6471322774887085, 1.3216102123260498, -0.10023301094770432, -0.896787703037262, 0.6754416823387146, -0.3567299544811249, -0.41871345043182373, 0.8796731233596802, 0.42741894721984863, -0.20503436028957367, -1.4132808446884155, 0.6467630863189697, 1.3845256567001343, -0.8558724522590637, -0.8202487826347351, 0.054801516234874725, -0.8154011368751526, 1.0167608261108398, 0.6857567429542542, 0.2794577479362488, 0.23776277899742126, 1.6329772472381592, 0.8335679173469543, -0.44641533493995667, 0.5763647556304932, 0.4517723023891449, -0.16542638838291168, -2.150470018386841, -1.09999418258667, 0.3544441759586334, -0.33896175026893616, -1.5513736009597778, 1.4590139389038086, -1.1634899377822876, -0.9658397436141968, 0.49915921688079834, 0.133842334151268, 1.3924142122268677, 0.3960573971271515, 1.623565435409546, 2.0550525188446045, 0.8553096652030945, 0.3390916585922241, 1.275809407234192, -0.240182563662529, -0.4884893298149109, 1.7054145336151123, -0.4820708930492401, 0.5147645473480225, 1.0041635036468506, -0.3272862732410431, -1.0814135074615479, -0.7944518327713013, -1.297343134880066, -0.7357009649276733, 1.1466114521026611, 0.15080013871192932, -1.107378363609314, 0.2518261671066284, 1.6642941236495972, 0.06009335070848465, -0.33148670196533203, 0.7266225814819336, 0.4494961202144623, -0.8332363963127136, -0.0673023983836174, -0.9198633432388306, 0.5342218279838562, -0.11654295772314072, -0.36573919653892517, 0.24089421331882477, 0.5828793048858643, 1.3069087266921997, 0.0769147202372551, 0.10547960549592972, 1.2548948526382446, -1.350607991218567, 1.503268837928772, -0.7145292162895203, 0.2843598425388336, -2.385833978652954, 1.4074214696884155, -0.8465755581855774, 1.9338244199752808, -2.6111927032470703, 0.463523805141449, -0.4917505085468292, -0.4327998161315918, 0.1758192777633667, -0.3899739384651184, 0.18724140524864197, -0.11047867685556412, -1.0913623571395874, -0.17148569226264954, -0.7175275683403015, 0.5952610969543457, 1.0789823532104492, 1.3908157348632812, -1.0672613382339478, -0.2392701506614685, -1.763149619102478, -0.1634438931941986, -0.7049697041511536, 0.2157379388809204, -1.9864606857299805, -0.19490058720111847, -1.992297649383545, -2.330531597137451, -1.3872838020324707, -0.8011661171913147, 1.0998047590255737, 0.1491515040397644, -0.8621076941490173, 1.1052155494689941, -0.3513416349887848, -1.816162109375, 1.0994641780853271, -2.1634762287139893 ]
https://github.com/huggingface/datasets/issues/5574
c4 dataset streaming fails with `FileNotFoundError`
This problem now appears again, this time with an underlying HTTP 502 status code: ``` aiohttp.client_exceptions.ClientResponseError: 502, message='Bad Gateway', url=URL('https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-validation.00002-of-00008.json.gz') ```
### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
286
21
c4 dataset streaming fails with `FileNotFoundError` ### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 This problem now appears again, this time with an underlying HTTP 502 status code: ``` aiohttp.client_exceptions.ClientResponseError: 502, message='Bad Gateway', url=URL('https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-validation.00002-of-00008.json.gz') ```
[ -1.18198561668396, -0.8671308755874634, -0.7479708194732666, 1.3915537595748901, -0.18342715501785278, -1.162192463874817, 0.1917634755373001, -1.0304006338119507, 1.6828891038894653, -0.7545842528343201, 0.3049739897251129, -1.6680021286010742, -0.0791458785533905, -0.578832745552063, -0.6975297331809998, -0.8024681806564331, -0.3378005027770996, -0.7990498542785645, 0.981288492679596, 2.545213222503662, 1.2111519575119019, -1.3076165914535522, 2.7199394702911377, 0.6853140592575073, -0.23325642943382263, -0.9921011328697205, 0.44688791036605835, -0.00644698366522789, -1.2948329448699951, -0.4373388886451721, -0.9246724247932434, -0.052583616226911545, -0.5585552453994751, -0.5038279294967651, 0.06054041534662247, 0.46462708711624146, -0.28849485516548157, -0.41721871495246887, -0.49254268407821655, -0.7544295191764832, 0.47869959473609924, -0.4149181842803955, 0.8989076018333435, -0.3059008717536926, 1.8256340026855469, -0.6632023453712463, 0.3333422839641571, 0.7285239696502686, 1.2712815999984741, 0.21527832746505737, -0.01897159032523632, 0.2867611050605774, 0.3464452922344208, 0.04481873661279678, 0.516229510307312, 1.2206616401672363, 0.6518601179122925, 0.44113409519195557, 0.7456843256950378, -2.196730613708496, 1.267163634300232, -1.012475848197937, 0.2600099444389343, 1.3890913724899292, -0.9730350971221924, 0.40312352776527405, -1.8944706916809082, -0.027948569506406784, 0.5391809940338135, -2.3028619289398193, 0.300811231136322, -1.391396164894104, -0.543342649936676, 1.0236278772354126, 0.27096638083457947, -1.2342345714569092, 0.14679601788520813, -0.4517318308353424, 1.0299351215362549, 0.4151689112186432, 1.119876742362976, -1.7262834310531616, -0.1164325475692749, -0.3360115587711334, 0.22079478204250336, -1.345900297164917, -1.5361508131027222, 0.5601826906204224, 0.6170348525047302, 0.5897222757339478, -0.11046922951936722, 1.0039122104644775, -1.0159918069839478, 0.7815115451812744, -0.9637690186500549, -1.740579605102539, -1.4283554553985596, -2.198756694793701, -2.2011518478393555, 0.7882170677185059, -0.4291399121284485, -0.5082505941390991, 2.0004680156707764, -1.0655828714370728, -1.7953782081604004, 1.0596429109573364, 0.23956194519996643, -0.09313909709453583, 2.3441429138183594, 0.33663344383239746, -0.8210128545761108, 0.41493120789527893, -0.8092342019081116, 0.7160664796829224, -0.36588096618652344, 1.289186954498291, 0.5012664198875427, -1.0484068393707275, 1.6030409336090088, -0.45207783579826355, 0.5385382771492004, -0.7614413499832153, -0.5268469452857971, -0.7842538952827454, 0.26767536997795105, 2.0072224140167236, -0.32655230164527893, 1.5687601566314697, -0.3762831389904022, -1.6276930570602417, -1.5238579511642456, 0.8491527438163757, 0.48842114210128784, -0.7992645502090454, 0.14098592102527618, -0.3787131607532501, 0.10173798352479935, -0.06340158730745316, 1.1443146467208862, 1.265838384628296, 0.7260827422142029, -0.22672128677368164, -0.8402025699615479, 0.22431518137454987, 0.03461138904094696, -0.7019509673118591, -1.799147605895996, -0.40293899178504944, 0.21350906789302826, 0.605130136013031, -1.3046107292175293, 1.716031551361084, 0.8532754182815552, 1.9078530073165894, 0.9942331910133362, -0.35093143582344055, 1.5890995264053345, 0.099454864859581, 1.8675024509429932, -0.4431399405002594, 0.7104858756065369, -0.35064297914505005, -1.1937823295593262, 0.7805866599082947, -0.24395208060741425, -2.0570521354675293, -0.7104834318161011, -0.7600593566894531, -0.1229294165968895, -0.7547918558120728, 0.8612252473831177, -0.3026427924633026, -1.4716228246688843, 0.25155285000801086, -0.7377657890319824, 0.12223131954669952, -1.30393648147583, 0.3001621961593628, 0.7039594054222107, -0.6443126797676086, 0.1506890207529068, -0.2276969701051712, -1.2687965631484985, -0.4499753713607788, 0.22054864466190338, 1.8827193975448608, -0.7546530365943909, 0.8689064979553223, 1.0453194379806519, -0.7014713287353516, -0.0005179839208722115, 0.3933050036430359, -0.32688453793525696, 0.8088018298149109, -1.1174739599227905, -0.32963013648986816, 1.1536955833435059, -0.10426093637943268, -0.6065189242362976, 1.3657318353652954, 0.7595235705375671, -1.0372982025146484, -0.3107476830482483, -0.20655742287635803, -0.8412317633628845, -0.012105060741305351, -1.5869187116622925, -0.18941427767276764, 0.4088137447834015, -1.4502036571502686, -0.4649120569229126, -0.24928182363510132, 1.299058198928833, -0.20489183068275452, 1.3778849840164185, -0.29655972123146057, -0.11529630422592163, -0.31915849447250366, -0.4228074252605438, 0.13598857820034027, -0.18535824120044708, -0.636243462562561, 0.2633437514305115, -0.7588168978691101, 0.2845359146595001, 1.4923895597457886, 0.2975272834300995, 0.021803922951221466, 0.5089473128318787, 1.1632587909698486, 0.38471460342407227, -0.058165594935417175, -0.9388075470924377, -1.5586045980453491, 1.9779736995697021, -1.5143229961395264, 1.9855881929397583, 0.8463456034660339, -0.0060196733102202415, -1.7075518369674683, -1.8812499046325684, 1.3423959016799927, 1.181166648864746, 2.464810848236084, 0.6025875806808472, 0.4605628252029419, -0.7711771726608276, -0.6423198580741882, 0.3247990906238556, -1.0841573476791382, -0.7863677740097046, 0.25309762358665466, 2.4312429428100586, 1.746234655380249, -0.4760136008262634, -0.25764766335487366, -0.9686277508735657, 1.2747669219970703, -0.16945801675319672, 0.17909395694732666, 2.021069049835205, -0.24548009037971497, -1.074048399925232, 1.2798874378204346, -2.3381407260894775, 0.20836889743804932, 1.9926046133041382, 0.24821116030216217, 0.10679217427968979, -1.33994460105896, -0.6990230679512024, -0.24613814055919647, -0.39112842082977295, -1.2568464279174805, 0.5138916969299316, -0.2421485185623169, -0.8284640908241272, -1.5154547691345215, 0.16200606524944305, -1.0699703693389893, -1.677695631980896, 0.256032794713974, 1.90414559841156, 2.0024051666259766, -0.8284715414047241, 1.47433602809906, -0.3521072268486023, 0.1178169995546341, 1.1993176937103271, 1.2664293050765991, 3.09602689743042, 1.8169567584991455, -1.2584826946258545, 0.6913764476776123, -0.16550979018211365, -0.449504554271698, 1.079703688621521, -1.1607917547225952, 1.1789841651916504, -0.1494046151638031, -1.1349987983703613, -1.2475005388259888, 0.8348555564880371, 0.4924165606498718, -0.031089432537555695, -0.4320363402366638, 1.2505935430526733, 0.1735163927078247, 1.450300931930542, 0.5877426266670227, -0.35118764638900757, 0.6628825068473816, -0.32424166798591614, -0.4535715878009796, 1.6010292768478394, 0.20822358131408691, -1.3923147916793823, -2.309295415878296, -0.20437440276145935, -0.8751586079597473, 0.019518859684467316, -0.5622941851615906, -1.0139153003692627, 1.7391722202301025, 0.37758806347846985, -1.226500391960144, -0.23118595778942108, -0.34508848190307617, -0.5450143814086914, 2.666271924972534, -1.3869023323059082, -0.1821945458650589, -0.9872784614562988, -0.5884299278259277, 1.6565076112747192, -1.14018976688385, -0.22997577488422394, -1.021640419960022, -0.5724173784255981, -1.314706563949585, -0.5740138292312622, -0.02235335111618042, -0.888555645942688, 0.8019300103187561, 0.2265414297580719, -1.158161997795105, -0.3164617121219635, -0.9256454110145569, 0.8855909705162048, -0.11083664745092392, 0.23152819275856018, 1.8928371667861938, 0.380719393491745, -0.3485775887966156, 0.7592887282371521, 1.17489492893219, 0.5693942308425903, -0.5678228139877319, 0.2163223922252655, -0.6959114670753479, 0.20863798260688782, -1.403651237487793, 0.29013094305992126, -2.875546455383301, 0.6560531854629517, -0.05333743616938591, 0.01159739214926958, 0.0010785404592752457, -1.3133958578109741, 1.1064482927322388, 2.5986111164093018, -1.1230576038360596, 0.49730372428894043, 0.3342011272907257, 1.1939159631729126, -1.645585298538208, 0.2625283896923065, -0.34912532567977905, 2.0870773792266846, 0.2579837143421173, 1.2880487442016602, -0.44124552607536316, -2.325188636779785, 0.5236799716949463, -1.2687536478042603, -1.1642632484436035, 0.8505805730819702, -0.8472362756729126, 0.027456827461719513, -1.3851531744003296, -0.23613983392715454, -0.8900707364082336, -1.264021396636963, 0.7939884066581726, 0.16840790212154388, 0.505783200263977, -0.6154177784919739, 0.4102368652820587, -2.2002615928649902, -1.2689533233642578, -0.2120397984981537, -0.9276654124259949, 0.4142509996891022, -0.2608483135700226, 0.6724497079849243, -0.1491217464208603, 0.0026833340525627136, 0.3814704418182373, 1.466751217842102, 3.2784957885742188, 0.182830348610878, 0.3085136413574219, -0.19209234416484833, -0.9422527551651001, 1.4415793418884277, 0.951485812664032, -0.13892453908920288, -0.6398009061813354, -1.0751363039016724, 1.243395209312439, 1.9272109270095825, 1.0089449882507324, 0.07078736275434494, -0.8692034482955933, -0.7871600389480591, -0.07388563454151154, 0.17466354370117188, 0.42309999465942383, 0.9450889229774475, 0.08454462885856628, 0.046289972960948944, 1.3976598978042603, 1.146489143371582, -0.454619437456131, 0.4043518006801605, -0.8719555139541626, -0.43694740533828735, 0.4512505531311035, 0.2542286515235901, 0.022339899092912674, 0.3327595591545105, -1.0773283243179321, -0.22859273850917816, -0.2939928472042084, -0.9080915451049805, -0.7953664064407349, -0.4047437906265259, -0.31167855858802795, 1.6655218601226807, 0.05063914135098457, -0.44106221199035645, -0.023265574127435684, -0.7593557238578796, -0.15185172855854034, -1.0999512672424316, 0.2946772277355194, -0.152838796377182, -0.07766350358724594, -0.11977701634168625, 1.7657678127288818, -0.844463050365448, -2.0603158473968506, 0.22271153330802917, 0.25453460216522217, -0.3445355296134949, 0.1775168925523758, 1.7282520532608032, 0.5447964668273926, 1.349109172821045, 1.278214454650879, 1.0004749298095703, -0.6748498678207397, -1.2510706186294556, 0.6398682594299316, 0.9876932501792908, -1.407591462135315, 0.7843125462532043, -0.06435641646385193, -0.4569967985153198, 0.6096659302711487, 1.231424331665039, 0.49373751878738403, -1.9825849533081055, 0.7806410789489746, -0.9786326289176941, 0.5943285822868347, 0.7217333316802979, 0.7707391977310181, 0.22275860607624054, 0.8347954750061035, -1.2164479494094849, -1.1513276100158691, -0.6975107192993164, -0.5816010236740112, 1.9185707569122314, -0.17928862571716309, 0.5125284194946289, -0.12744726240634918, -1.2715480327606201, -0.029282212257385254, 0.6766515374183655, 0.3401062786579132, -0.426474392414093, 0.7764953970909119, -0.6661610007286072, -1.0635409355163574, -1.2791097164154053, -0.5032143592834473, -1.013710856437683, -1.0035289525985718, 0.9207764267921448, 0.7878386378288269, 0.36075425148010254, 1.906898856163025, 0.6993291974067688, 0.22936174273490906, -2.6690852642059326, 0.9261865019798279, 0.306378036737442, -0.02536112815141678, 0.9835656881332397, 0.28817301988601685, 1.0642081499099731, 0.045315809547901154, 0.5942633152008057, -2.4755282402038574, 2.3243606090545654, -0.22868700325489044, 0.7064463496208191, 0.009513932280242443, -0.2116842269897461, 1.0005197525024414, 0.5477866530418396, 0.46741557121276855, -1.0741225481033325, 0.7178301215171814, -0.6334872841835022, 1.1654525995254517, 0.9383055567741394, -0.8614726662635803, -0.015307385474443436, 1.2714910507202148, 0.4008221924304962, -0.5213178396224976, -0.9022655487060547, -0.9264712333679199, 0.8743771910667419, 1.7694216966629028, -0.06032727286219597, 0.0917523130774498, 0.8714603781700134, 0.6581732630729675, -1.2727317810058594, -0.030288878828287125, -0.6849174499511719, -0.8419497609138489, 1.708756446838379, 2.0187265872955322, -0.07095033675432205, -0.3078558146953583, -0.7304962873458862, -1.2048588991165161, 0.8240200877189636, 0.061822764575481415, 0.20823724567890167, 0.6836179494857788, -0.7351353764533997, 1.1608412265777588, 0.8444687724113464, 0.9477465748786926, 0.2512407600879669, 0.3145153224468231, 0.3970641791820526, -0.3392743766307831, -1.161616325378418, -0.24869213998317719, -1.110538125038147, -2.594545841217041, 0.5361595153808594, -0.13675352931022644, -1.4012253284454346, 0.04392225295305252, -1.0361521244049072, 0.8574814796447754, -0.6555566787719727, -1.1308948993682861, -1.504521131515503, 0.27368760108947754, -0.1388975828886032, 0.8699740767478943, -1.685198187828064, -0.082794688642025, 1.266075611114502, 1.0387704372406006, -0.667913556098938, 0.9858787655830383, 0.21722161769866943, 1.07664155960083, 0.8997153043746948, -0.30201956629753113, 0.5494908690452576, 0.07852372527122498, -1.3371508121490479, 0.44229796528816223, 1.2695096731185913, 0.15510165691375732, 1.5404038429260254, -0.5243678092956543, 0.028135981410741806, 0.41697245836257935, -0.5048291683197021, -0.523452639579773, -0.580646276473999, 0.6474800705909729, 0.11934013664722443, -0.9920603036880493, 0.009352724067866802, -0.09035159647464752, -0.10872089117765427, 0.16309359669685364, -1.4849026203155518, -0.1766873002052307, -0.3909732699394226, -0.6083979606628418, -1.2224617004394531, -0.11417273432016373, 1.3160961866378784, -0.7682256698608398, -0.15912184119224548, 0.5638457536697388, 0.41065242886543274, 0.5133741497993469, 0.5895952582359314, -0.7418148517608643, -0.42278873920440674, -0.20296843349933624, -0.46935799717903137, 0.37707558274269104, 1.3727097511291504, -0.033344924449920654, -1.0137704610824585, 0.6449458003044128, -0.3722015917301178, 0.08903147280216217, 1.9366333484649658, 0.06630345433950424, -0.8368895649909973, 0.24645082652568817, -0.6958695650100708, 1.9624931812286377, 1.6471322774887085, 1.3216102123260498, -0.10023301094770432, -0.896787703037262, 0.6754416823387146, -0.3567299544811249, -0.41871345043182373, 0.8796731233596802, 0.42741894721984863, -0.20503436028957367, -1.4132808446884155, 0.6467630863189697, 1.3845256567001343, -0.8558724522590637, -0.8202487826347351, 0.054801516234874725, -0.8154011368751526, 1.0167608261108398, 0.6857567429542542, 0.2794577479362488, 0.23776277899742126, 1.6329772472381592, 0.8335679173469543, -0.44641533493995667, 0.5763647556304932, 0.4517723023891449, -0.16542638838291168, -2.150470018386841, -1.09999418258667, 0.3544441759586334, -0.33896175026893616, -1.5513736009597778, 1.4590139389038086, -1.1634899377822876, -0.9658397436141968, 0.49915921688079834, 0.133842334151268, 1.3924142122268677, 0.3960573971271515, 1.623565435409546, 2.0550525188446045, 0.8553096652030945, 0.3390916585922241, 1.275809407234192, -0.240182563662529, -0.4884893298149109, 1.7054145336151123, -0.4820708930492401, 0.5147645473480225, 1.0041635036468506, -0.3272862732410431, -1.0814135074615479, -0.7944518327713013, -1.297343134880066, -0.7357009649276733, 1.1466114521026611, 0.15080013871192932, -1.107378363609314, 0.2518261671066284, 1.6642941236495972, 0.06009335070848465, -0.33148670196533203, 0.7266225814819336, 0.4494961202144623, -0.8332363963127136, -0.0673023983836174, -0.9198633432388306, 0.5342218279838562, -0.11654295772314072, -0.36573919653892517, 0.24089421331882477, 0.5828793048858643, 1.3069087266921997, 0.0769147202372551, 0.10547960549592972, 1.2548948526382446, -1.350607991218567, 1.503268837928772, -0.7145292162895203, 0.2843598425388336, -2.385833978652954, 1.4074214696884155, -0.8465755581855774, 1.9338244199752808, -2.6111927032470703, 0.463523805141449, -0.4917505085468292, -0.4327998161315918, 0.1758192777633667, -0.3899739384651184, 0.18724140524864197, -0.11047867685556412, -1.0913623571395874, -0.17148569226264954, -0.7175275683403015, 0.5952610969543457, 1.0789823532104492, 1.3908157348632812, -1.0672613382339478, -0.2392701506614685, -1.763149619102478, -0.1634438931941986, -0.7049697041511536, 0.2157379388809204, -1.9864606857299805, -0.19490058720111847, -1.992297649383545, -2.330531597137451, -1.3872838020324707, -0.8011661171913147, 1.0998047590255737, 0.1491515040397644, -0.8621076941490173, 1.1052155494689941, -0.3513416349887848, -1.816162109375, 1.0994641780853271, -2.1634762287139893 ]
https://github.com/huggingface/datasets/issues/5574
c4 dataset streaming fails with `FileNotFoundError`
Re-executing a minute later, the underlying cause is an HTTP 403 status code, as reported yesterday: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/4bf6b248b0f910dcde2cdf2118d6369d8208c8f9515ec29ab73e531f380b18e2?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-validation.00002-of-00008.json.gz%3B+filename%3D%22c4-validation.00002-of-00008.json.gz%22%3B&response-content-type=application/gzip&Expires=1677571273&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvNGJmNmIyNDhiMGY5MTBkY2RlMmNkZjIxMThkNjM2OWQ4MjA4YzhmOTUxNWVjMjlhYjczZTUzMWYzODBiMThlMj9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzU3MTI3M319fV19&Signature=WW42NOKkLuX~xVB1QfbkqzdvGo2AOXpgbF3PjTXy6iKd~ffilr1N9ScPXfvTXqy5yvdhJg1G0xJy1zYtUjGAL8GEx3Av-0vIhpWMGYTM8XKEU5gYA9qt30oVtNph6TkTYSABrsYTaj-hzQL9WCgyapmjvG69ETMh4wj44r2rcbk4T3j0l6l4u76Gh~lyRSll3aK4qycdUwcyL7FECDu~0W1mJIJwKkCrWHhSpHJSshb-0ElwG71pq4eyQ5g2uxHdK6JbRF7loxUpRQQJ1vlk0EHXdw0wTMaQ9tqHy6xcrQd8Ep0Yvx3tUD8MR0vWOcbQKnL6LwPQByc8tkChlpjnig__&Key-Pair-Id=KVTP0A1DKRTAX') ```
### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
286
22
c4 dataset streaming fails with `FileNotFoundError` ### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Re-executing a minute later, the underlying cause is an HTTP 403 status code, as reported yesterday: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/4bf6b248b0f910dcde2cdf2118d6369d8208c8f9515ec29ab73e531f380b18e2?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-validation.00002-of-00008.json.gz%3B+filename%3D%22c4-validation.00002-of-00008.json.gz%22%3B&response-content-type=application/gzip&Expires=1677571273&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvNGJmNmIyNDhiMGY5MTBkY2RlMmNkZjIxMThkNjM2OWQ4MjA4YzhmOTUxNWVjMjlhYjczZTUzMWYzODBiMThlMj9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzU3MTI3M319fV19&Signature=WW42NOKkLuX~xVB1QfbkqzdvGo2AOXpgbF3PjTXy6iKd~ffilr1N9ScPXfvTXqy5yvdhJg1G0xJy1zYtUjGAL8GEx3Av-0vIhpWMGYTM8XKEU5gYA9qt30oVtNph6TkTYSABrsYTaj-hzQL9WCgyapmjvG69ETMh4wj44r2rcbk4T3j0l6l4u76Gh~lyRSll3aK4qycdUwcyL7FECDu~0W1mJIJwKkCrWHhSpHJSshb-0ElwG71pq4eyQ5g2uxHdK6JbRF7loxUpRQQJ1vlk0EHXdw0wTMaQ9tqHy6xcrQd8Ep0Yvx3tUD8MR0vWOcbQKnL6LwPQByc8tkChlpjnig__&Key-Pair-Id=KVTP0A1DKRTAX') ```
[ -1.18198561668396, -0.8671308755874634, -0.7479708194732666, 1.3915537595748901, -0.18342715501785278, -1.162192463874817, 0.1917634755373001, -1.0304006338119507, 1.6828891038894653, -0.7545842528343201, 0.3049739897251129, -1.6680021286010742, -0.0791458785533905, -0.578832745552063, -0.6975297331809998, -0.8024681806564331, -0.3378005027770996, -0.7990498542785645, 0.981288492679596, 2.545213222503662, 1.2111519575119019, -1.3076165914535522, 2.7199394702911377, 0.6853140592575073, -0.23325642943382263, -0.9921011328697205, 0.44688791036605835, -0.00644698366522789, -1.2948329448699951, -0.4373388886451721, -0.9246724247932434, -0.052583616226911545, -0.5585552453994751, -0.5038279294967651, 0.06054041534662247, 0.46462708711624146, -0.28849485516548157, -0.41721871495246887, -0.49254268407821655, -0.7544295191764832, 0.47869959473609924, -0.4149181842803955, 0.8989076018333435, -0.3059008717536926, 1.8256340026855469, -0.6632023453712463, 0.3333422839641571, 0.7285239696502686, 1.2712815999984741, 0.21527832746505737, -0.01897159032523632, 0.2867611050605774, 0.3464452922344208, 0.04481873661279678, 0.516229510307312, 1.2206616401672363, 0.6518601179122925, 0.44113409519195557, 0.7456843256950378, -2.196730613708496, 1.267163634300232, -1.012475848197937, 0.2600099444389343, 1.3890913724899292, -0.9730350971221924, 0.40312352776527405, -1.8944706916809082, -0.027948569506406784, 0.5391809940338135, -2.3028619289398193, 0.300811231136322, -1.391396164894104, -0.543342649936676, 1.0236278772354126, 0.27096638083457947, -1.2342345714569092, 0.14679601788520813, -0.4517318308353424, 1.0299351215362549, 0.4151689112186432, 1.119876742362976, -1.7262834310531616, -0.1164325475692749, -0.3360115587711334, 0.22079478204250336, -1.345900297164917, -1.5361508131027222, 0.5601826906204224, 0.6170348525047302, 0.5897222757339478, -0.11046922951936722, 1.0039122104644775, -1.0159918069839478, 0.7815115451812744, -0.9637690186500549, -1.740579605102539, -1.4283554553985596, -2.198756694793701, -2.2011518478393555, 0.7882170677185059, -0.4291399121284485, -0.5082505941390991, 2.0004680156707764, -1.0655828714370728, -1.7953782081604004, 1.0596429109573364, 0.23956194519996643, -0.09313909709453583, 2.3441429138183594, 0.33663344383239746, -0.8210128545761108, 0.41493120789527893, -0.8092342019081116, 0.7160664796829224, -0.36588096618652344, 1.289186954498291, 0.5012664198875427, -1.0484068393707275, 1.6030409336090088, -0.45207783579826355, 0.5385382771492004, -0.7614413499832153, -0.5268469452857971, -0.7842538952827454, 0.26767536997795105, 2.0072224140167236, -0.32655230164527893, 1.5687601566314697, -0.3762831389904022, -1.6276930570602417, -1.5238579511642456, 0.8491527438163757, 0.48842114210128784, -0.7992645502090454, 0.14098592102527618, -0.3787131607532501, 0.10173798352479935, -0.06340158730745316, 1.1443146467208862, 1.265838384628296, 0.7260827422142029, -0.22672128677368164, -0.8402025699615479, 0.22431518137454987, 0.03461138904094696, -0.7019509673118591, -1.799147605895996, -0.40293899178504944, 0.21350906789302826, 0.605130136013031, -1.3046107292175293, 1.716031551361084, 0.8532754182815552, 1.9078530073165894, 0.9942331910133362, -0.35093143582344055, 1.5890995264053345, 0.099454864859581, 1.8675024509429932, -0.4431399405002594, 0.7104858756065369, -0.35064297914505005, -1.1937823295593262, 0.7805866599082947, -0.24395208060741425, -2.0570521354675293, -0.7104834318161011, -0.7600593566894531, -0.1229294165968895, -0.7547918558120728, 0.8612252473831177, -0.3026427924633026, -1.4716228246688843, 0.25155285000801086, -0.7377657890319824, 0.12223131954669952, -1.30393648147583, 0.3001621961593628, 0.7039594054222107, -0.6443126797676086, 0.1506890207529068, -0.2276969701051712, -1.2687965631484985, -0.4499753713607788, 0.22054864466190338, 1.8827193975448608, -0.7546530365943909, 0.8689064979553223, 1.0453194379806519, -0.7014713287353516, -0.0005179839208722115, 0.3933050036430359, -0.32688453793525696, 0.8088018298149109, -1.1174739599227905, -0.32963013648986816, 1.1536955833435059, -0.10426093637943268, -0.6065189242362976, 1.3657318353652954, 0.7595235705375671, -1.0372982025146484, -0.3107476830482483, -0.20655742287635803, -0.8412317633628845, -0.012105060741305351, -1.5869187116622925, -0.18941427767276764, 0.4088137447834015, -1.4502036571502686, -0.4649120569229126, -0.24928182363510132, 1.299058198928833, -0.20489183068275452, 1.3778849840164185, -0.29655972123146057, -0.11529630422592163, -0.31915849447250366, -0.4228074252605438, 0.13598857820034027, -0.18535824120044708, -0.636243462562561, 0.2633437514305115, -0.7588168978691101, 0.2845359146595001, 1.4923895597457886, 0.2975272834300995, 0.021803922951221466, 0.5089473128318787, 1.1632587909698486, 0.38471460342407227, -0.058165594935417175, -0.9388075470924377, -1.5586045980453491, 1.9779736995697021, -1.5143229961395264, 1.9855881929397583, 0.8463456034660339, -0.0060196733102202415, -1.7075518369674683, -1.8812499046325684, 1.3423959016799927, 1.181166648864746, 2.464810848236084, 0.6025875806808472, 0.4605628252029419, -0.7711771726608276, -0.6423198580741882, 0.3247990906238556, -1.0841573476791382, -0.7863677740097046, 0.25309762358665466, 2.4312429428100586, 1.746234655380249, -0.4760136008262634, -0.25764766335487366, -0.9686277508735657, 1.2747669219970703, -0.16945801675319672, 0.17909395694732666, 2.021069049835205, -0.24548009037971497, -1.074048399925232, 1.2798874378204346, -2.3381407260894775, 0.20836889743804932, 1.9926046133041382, 0.24821116030216217, 0.10679217427968979, -1.33994460105896, -0.6990230679512024, -0.24613814055919647, -0.39112842082977295, -1.2568464279174805, 0.5138916969299316, -0.2421485185623169, -0.8284640908241272, -1.5154547691345215, 0.16200606524944305, -1.0699703693389893, -1.677695631980896, 0.256032794713974, 1.90414559841156, 2.0024051666259766, -0.8284715414047241, 1.47433602809906, -0.3521072268486023, 0.1178169995546341, 1.1993176937103271, 1.2664293050765991, 3.09602689743042, 1.8169567584991455, -1.2584826946258545, 0.6913764476776123, -0.16550979018211365, -0.449504554271698, 1.079703688621521, -1.1607917547225952, 1.1789841651916504, -0.1494046151638031, -1.1349987983703613, -1.2475005388259888, 0.8348555564880371, 0.4924165606498718, -0.031089432537555695, -0.4320363402366638, 1.2505935430526733, 0.1735163927078247, 1.450300931930542, 0.5877426266670227, -0.35118764638900757, 0.6628825068473816, -0.32424166798591614, -0.4535715878009796, 1.6010292768478394, 0.20822358131408691, -1.3923147916793823, -2.309295415878296, -0.20437440276145935, -0.8751586079597473, 0.019518859684467316, -0.5622941851615906, -1.0139153003692627, 1.7391722202301025, 0.37758806347846985, -1.226500391960144, -0.23118595778942108, -0.34508848190307617, -0.5450143814086914, 2.666271924972534, -1.3869023323059082, -0.1821945458650589, -0.9872784614562988, -0.5884299278259277, 1.6565076112747192, -1.14018976688385, -0.22997577488422394, -1.021640419960022, -0.5724173784255981, -1.314706563949585, -0.5740138292312622, -0.02235335111618042, -0.888555645942688, 0.8019300103187561, 0.2265414297580719, -1.158161997795105, -0.3164617121219635, -0.9256454110145569, 0.8855909705162048, -0.11083664745092392, 0.23152819275856018, 1.8928371667861938, 0.380719393491745, -0.3485775887966156, 0.7592887282371521, 1.17489492893219, 0.5693942308425903, -0.5678228139877319, 0.2163223922252655, -0.6959114670753479, 0.20863798260688782, -1.403651237487793, 0.29013094305992126, -2.875546455383301, 0.6560531854629517, -0.05333743616938591, 0.01159739214926958, 0.0010785404592752457, -1.3133958578109741, 1.1064482927322388, 2.5986111164093018, -1.1230576038360596, 0.49730372428894043, 0.3342011272907257, 1.1939159631729126, -1.645585298538208, 0.2625283896923065, -0.34912532567977905, 2.0870773792266846, 0.2579837143421173, 1.2880487442016602, -0.44124552607536316, -2.325188636779785, 0.5236799716949463, -1.2687536478042603, -1.1642632484436035, 0.8505805730819702, -0.8472362756729126, 0.027456827461719513, -1.3851531744003296, -0.23613983392715454, -0.8900707364082336, -1.264021396636963, 0.7939884066581726, 0.16840790212154388, 0.505783200263977, -0.6154177784919739, 0.4102368652820587, -2.2002615928649902, -1.2689533233642578, -0.2120397984981537, -0.9276654124259949, 0.4142509996891022, -0.2608483135700226, 0.6724497079849243, -0.1491217464208603, 0.0026833340525627136, 0.3814704418182373, 1.466751217842102, 3.2784957885742188, 0.182830348610878, 0.3085136413574219, -0.19209234416484833, -0.9422527551651001, 1.4415793418884277, 0.951485812664032, -0.13892453908920288, -0.6398009061813354, -1.0751363039016724, 1.243395209312439, 1.9272109270095825, 1.0089449882507324, 0.07078736275434494, -0.8692034482955933, -0.7871600389480591, -0.07388563454151154, 0.17466354370117188, 0.42309999465942383, 0.9450889229774475, 0.08454462885856628, 0.046289972960948944, 1.3976598978042603, 1.146489143371582, -0.454619437456131, 0.4043518006801605, -0.8719555139541626, -0.43694740533828735, 0.4512505531311035, 0.2542286515235901, 0.022339899092912674, 0.3327595591545105, -1.0773283243179321, -0.22859273850917816, -0.2939928472042084, -0.9080915451049805, -0.7953664064407349, -0.4047437906265259, -0.31167855858802795, 1.6655218601226807, 0.05063914135098457, -0.44106221199035645, -0.023265574127435684, -0.7593557238578796, -0.15185172855854034, -1.0999512672424316, 0.2946772277355194, -0.152838796377182, -0.07766350358724594, -0.11977701634168625, 1.7657678127288818, -0.844463050365448, -2.0603158473968506, 0.22271153330802917, 0.25453460216522217, -0.3445355296134949, 0.1775168925523758, 1.7282520532608032, 0.5447964668273926, 1.349109172821045, 1.278214454650879, 1.0004749298095703, -0.6748498678207397, -1.2510706186294556, 0.6398682594299316, 0.9876932501792908, -1.407591462135315, 0.7843125462532043, -0.06435641646385193, -0.4569967985153198, 0.6096659302711487, 1.231424331665039, 0.49373751878738403, -1.9825849533081055, 0.7806410789489746, -0.9786326289176941, 0.5943285822868347, 0.7217333316802979, 0.7707391977310181, 0.22275860607624054, 0.8347954750061035, -1.2164479494094849, -1.1513276100158691, -0.6975107192993164, -0.5816010236740112, 1.9185707569122314, -0.17928862571716309, 0.5125284194946289, -0.12744726240634918, -1.2715480327606201, -0.029282212257385254, 0.6766515374183655, 0.3401062786579132, -0.426474392414093, 0.7764953970909119, -0.6661610007286072, -1.0635409355163574, -1.2791097164154053, -0.5032143592834473, -1.013710856437683, -1.0035289525985718, 0.9207764267921448, 0.7878386378288269, 0.36075425148010254, 1.906898856163025, 0.6993291974067688, 0.22936174273490906, -2.6690852642059326, 0.9261865019798279, 0.306378036737442, -0.02536112815141678, 0.9835656881332397, 0.28817301988601685, 1.0642081499099731, 0.045315809547901154, 0.5942633152008057, -2.4755282402038574, 2.3243606090545654, -0.22868700325489044, 0.7064463496208191, 0.009513932280242443, -0.2116842269897461, 1.0005197525024414, 0.5477866530418396, 0.46741557121276855, -1.0741225481033325, 0.7178301215171814, -0.6334872841835022, 1.1654525995254517, 0.9383055567741394, -0.8614726662635803, -0.015307385474443436, 1.2714910507202148, 0.4008221924304962, -0.5213178396224976, -0.9022655487060547, -0.9264712333679199, 0.8743771910667419, 1.7694216966629028, -0.06032727286219597, 0.0917523130774498, 0.8714603781700134, 0.6581732630729675, -1.2727317810058594, -0.030288878828287125, -0.6849174499511719, -0.8419497609138489, 1.708756446838379, 2.0187265872955322, -0.07095033675432205, -0.3078558146953583, -0.7304962873458862, -1.2048588991165161, 0.8240200877189636, 0.061822764575481415, 0.20823724567890167, 0.6836179494857788, -0.7351353764533997, 1.1608412265777588, 0.8444687724113464, 0.9477465748786926, 0.2512407600879669, 0.3145153224468231, 0.3970641791820526, -0.3392743766307831, -1.161616325378418, -0.24869213998317719, -1.110538125038147, -2.594545841217041, 0.5361595153808594, -0.13675352931022644, -1.4012253284454346, 0.04392225295305252, -1.0361521244049072, 0.8574814796447754, -0.6555566787719727, -1.1308948993682861, -1.504521131515503, 0.27368760108947754, -0.1388975828886032, 0.8699740767478943, -1.685198187828064, -0.082794688642025, 1.266075611114502, 1.0387704372406006, -0.667913556098938, 0.9858787655830383, 0.21722161769866943, 1.07664155960083, 0.8997153043746948, -0.30201956629753113, 0.5494908690452576, 0.07852372527122498, -1.3371508121490479, 0.44229796528816223, 1.2695096731185913, 0.15510165691375732, 1.5404038429260254, -0.5243678092956543, 0.028135981410741806, 0.41697245836257935, -0.5048291683197021, -0.523452639579773, -0.580646276473999, 0.6474800705909729, 0.11934013664722443, -0.9920603036880493, 0.009352724067866802, -0.09035159647464752, -0.10872089117765427, 0.16309359669685364, -1.4849026203155518, -0.1766873002052307, -0.3909732699394226, -0.6083979606628418, -1.2224617004394531, -0.11417273432016373, 1.3160961866378784, -0.7682256698608398, -0.15912184119224548, 0.5638457536697388, 0.41065242886543274, 0.5133741497993469, 0.5895952582359314, -0.7418148517608643, -0.42278873920440674, -0.20296843349933624, -0.46935799717903137, 0.37707558274269104, 1.3727097511291504, -0.033344924449920654, -1.0137704610824585, 0.6449458003044128, -0.3722015917301178, 0.08903147280216217, 1.9366333484649658, 0.06630345433950424, -0.8368895649909973, 0.24645082652568817, -0.6958695650100708, 1.9624931812286377, 1.6471322774887085, 1.3216102123260498, -0.10023301094770432, -0.896787703037262, 0.6754416823387146, -0.3567299544811249, -0.41871345043182373, 0.8796731233596802, 0.42741894721984863, -0.20503436028957367, -1.4132808446884155, 0.6467630863189697, 1.3845256567001343, -0.8558724522590637, -0.8202487826347351, 0.054801516234874725, -0.8154011368751526, 1.0167608261108398, 0.6857567429542542, 0.2794577479362488, 0.23776277899742126, 1.6329772472381592, 0.8335679173469543, -0.44641533493995667, 0.5763647556304932, 0.4517723023891449, -0.16542638838291168, -2.150470018386841, -1.09999418258667, 0.3544441759586334, -0.33896175026893616, -1.5513736009597778, 1.4590139389038086, -1.1634899377822876, -0.9658397436141968, 0.49915921688079834, 0.133842334151268, 1.3924142122268677, 0.3960573971271515, 1.623565435409546, 2.0550525188446045, 0.8553096652030945, 0.3390916585922241, 1.275809407234192, -0.240182563662529, -0.4884893298149109, 1.7054145336151123, -0.4820708930492401, 0.5147645473480225, 1.0041635036468506, -0.3272862732410431, -1.0814135074615479, -0.7944518327713013, -1.297343134880066, -0.7357009649276733, 1.1466114521026611, 0.15080013871192932, -1.107378363609314, 0.2518261671066284, 1.6642941236495972, 0.06009335070848465, -0.33148670196533203, 0.7266225814819336, 0.4494961202144623, -0.8332363963127136, -0.0673023983836174, -0.9198633432388306, 0.5342218279838562, -0.11654295772314072, -0.36573919653892517, 0.24089421331882477, 0.5828793048858643, 1.3069087266921997, 0.0769147202372551, 0.10547960549592972, 1.2548948526382446, -1.350607991218567, 1.503268837928772, -0.7145292162895203, 0.2843598425388336, -2.385833978652954, 1.4074214696884155, -0.8465755581855774, 1.9338244199752808, -2.6111927032470703, 0.463523805141449, -0.4917505085468292, -0.4327998161315918, 0.1758192777633667, -0.3899739384651184, 0.18724140524864197, -0.11047867685556412, -1.0913623571395874, -0.17148569226264954, -0.7175275683403015, 0.5952610969543457, 1.0789823532104492, 1.3908157348632812, -1.0672613382339478, -0.2392701506614685, -1.763149619102478, -0.1634438931941986, -0.7049697041511536, 0.2157379388809204, -1.9864606857299805, -0.19490058720111847, -1.992297649383545, -2.330531597137451, -1.3872838020324707, -0.8011661171913147, 1.0998047590255737, 0.1491515040397644, -0.8621076941490173, 1.1052155494689941, -0.3513416349887848, -1.816162109375, 1.0994641780853271, -2.1634762287139893 ]
https://github.com/huggingface/datasets/issues/5574
c4 dataset streaming fails with `FileNotFoundError`
> It's been resolved again ;) I'm experiencing the same issue when trying to load this dataset, `FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/realnewslike/c4-train.00000-of-00512.json.gz`
### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
286
19
c4 dataset streaming fails with `FileNotFoundError` ### Describe the bug Loading the `c4` dataset in streaming mode with `load_dataset("c4", "en", split="validation", streaming=True)` and then using it fails with a `FileNotFoundException`. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("c4", "en", split="train", streaming=True) next(iter(dataset)) ``` causes a ``` FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/en/c4-train.00000-of-01024.json.gz ``` I can download this file manually though e.g. by entering this URL in a browser. There is an underlying HTTP 403 status code: ``` aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://cdn-lfs.huggingface.co/datasets/allenai/c4/8ef8d75b0e045dec4aa5123a671b4564466b0707086a7ed1ba8721626dfffbc9?response-content-disposition=attachment%3B+filename*%3DUTF-8''c4-train.00000-of-01024.json.gz%3B+filename%3D%22c4-train.00000-of-01024.json.gz%22%3B&response-content-type=application/gzip&Expires=1677483770&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4tbGZzLmh1Z2dpbmdmYWNlLmNvL2RhdGFzZXRzL2FsbGVuYWkvYzQvOGVmOGQ3NWIwZTA0NWRlYzRhYTUxMjNhNjcxYjQ1NjQ0NjZiMDcwNzA4NmE3ZWQxYmE4NzIxNjI2ZGZmZmJjOT9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPWFwcGxpY2F0aW9uJTJGZ3ppcCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY3NzQ4Mzc3MH19fV19&Signature=yjL3UeY72cf2xpnvPvD68eAYOEe2qtaUJV55sB-jnPskBJEMwpMJcBZvg2~GqXZdM3O-GWV-Z3CI~d4u5VCb4YZ-HlmOjr3VBYkvox2EKiXnBIhjMecf2UVUPtxhTa9kBVlWjqu4qKzB9gKXZF2Cwpp5ctLzapEaT2nnqF84RAL-rsqMA3I~M8vWWfivQsbBK63hMfgZqqKMgdWM0iKMaItveDl0ufQ29azMFmsR7qd8V7sU2Z-F1fAeohS8HpN9OOnClW34yi~YJ2AbgZJJBXA~qsylfVA0Qp7Q~yX~q4P8JF1vmJ2BjkiSbGrj3bAXOGugpOVU5msI52DT88yMdA__&Key-Pair-Id=KVTP0A1DKRTAX') ``` ### Expected behavior This should retrieve the first example from the C4 validation set. This worked a few days ago but stopped working now. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.31 - Python version: 3.9.16 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 > It's been resolved again ;) I'm experiencing the same issue when trying to load this dataset, `FileNotFoundError: https://huggingface.co/datasets/allenai/c4/resolve/1ddc917116b730e1859edef32896ec5c16be51d0/realnewslike/c4-train.00000-of-00512.json.gz`
[ -1.18198561668396, -0.8671308755874634, -0.7479708194732666, 1.3915537595748901, -0.18342715501785278, -1.162192463874817, 0.1917634755373001, -1.0304006338119507, 1.6828891038894653, -0.7545842528343201, 0.3049739897251129, -1.6680021286010742, -0.0791458785533905, -0.578832745552063, -0.6975297331809998, -0.8024681806564331, -0.3378005027770996, -0.7990498542785645, 0.981288492679596, 2.545213222503662, 1.2111519575119019, -1.3076165914535522, 2.7199394702911377, 0.6853140592575073, -0.23325642943382263, -0.9921011328697205, 0.44688791036605835, -0.00644698366522789, -1.2948329448699951, -0.4373388886451721, -0.9246724247932434, -0.052583616226911545, -0.5585552453994751, -0.5038279294967651, 0.06054041534662247, 0.46462708711624146, -0.28849485516548157, -0.41721871495246887, -0.49254268407821655, -0.7544295191764832, 0.47869959473609924, -0.4149181842803955, 0.8989076018333435, -0.3059008717536926, 1.8256340026855469, -0.6632023453712463, 0.3333422839641571, 0.7285239696502686, 1.2712815999984741, 0.21527832746505737, -0.01897159032523632, 0.2867611050605774, 0.3464452922344208, 0.04481873661279678, 0.516229510307312, 1.2206616401672363, 0.6518601179122925, 0.44113409519195557, 0.7456843256950378, -2.196730613708496, 1.267163634300232, -1.012475848197937, 0.2600099444389343, 1.3890913724899292, -0.9730350971221924, 0.40312352776527405, -1.8944706916809082, -0.027948569506406784, 0.5391809940338135, -2.3028619289398193, 0.300811231136322, -1.391396164894104, -0.543342649936676, 1.0236278772354126, 0.27096638083457947, -1.2342345714569092, 0.14679601788520813, -0.4517318308353424, 1.0299351215362549, 0.4151689112186432, 1.119876742362976, -1.7262834310531616, -0.1164325475692749, -0.3360115587711334, 0.22079478204250336, -1.345900297164917, -1.5361508131027222, 0.5601826906204224, 0.6170348525047302, 0.5897222757339478, -0.11046922951936722, 1.0039122104644775, -1.0159918069839478, 0.7815115451812744, -0.9637690186500549, -1.740579605102539, -1.4283554553985596, -2.198756694793701, -2.2011518478393555, 0.7882170677185059, -0.4291399121284485, -0.5082505941390991, 2.0004680156707764, -1.0655828714370728, -1.7953782081604004, 1.0596429109573364, 0.23956194519996643, -0.09313909709453583, 2.3441429138183594, 0.33663344383239746, -0.8210128545761108, 0.41493120789527893, -0.8092342019081116, 0.7160664796829224, -0.36588096618652344, 1.289186954498291, 0.5012664198875427, -1.0484068393707275, 1.6030409336090088, -0.45207783579826355, 0.5385382771492004, -0.7614413499832153, -0.5268469452857971, -0.7842538952827454, 0.26767536997795105, 2.0072224140167236, -0.32655230164527893, 1.5687601566314697, -0.3762831389904022, -1.6276930570602417, -1.5238579511642456, 0.8491527438163757, 0.48842114210128784, -0.7992645502090454, 0.14098592102527618, -0.3787131607532501, 0.10173798352479935, -0.06340158730745316, 1.1443146467208862, 1.265838384628296, 0.7260827422142029, -0.22672128677368164, -0.8402025699615479, 0.22431518137454987, 0.03461138904094696, -0.7019509673118591, -1.799147605895996, -0.40293899178504944, 0.21350906789302826, 0.605130136013031, -1.3046107292175293, 1.716031551361084, 0.8532754182815552, 1.9078530073165894, 0.9942331910133362, -0.35093143582344055, 1.5890995264053345, 0.099454864859581, 1.8675024509429932, -0.4431399405002594, 0.7104858756065369, -0.35064297914505005, -1.1937823295593262, 0.7805866599082947, -0.24395208060741425, -2.0570521354675293, -0.7104834318161011, -0.7600593566894531, -0.1229294165968895, -0.7547918558120728, 0.8612252473831177, -0.3026427924633026, -1.4716228246688843, 0.25155285000801086, -0.7377657890319824, 0.12223131954669952, -1.30393648147583, 0.3001621961593628, 0.7039594054222107, -0.6443126797676086, 0.1506890207529068, -0.2276969701051712, -1.2687965631484985, -0.4499753713607788, 0.22054864466190338, 1.8827193975448608, -0.7546530365943909, 0.8689064979553223, 1.0453194379806519, -0.7014713287353516, -0.0005179839208722115, 0.3933050036430359, -0.32688453793525696, 0.8088018298149109, -1.1174739599227905, -0.32963013648986816, 1.1536955833435059, -0.10426093637943268, -0.6065189242362976, 1.3657318353652954, 0.7595235705375671, -1.0372982025146484, -0.3107476830482483, -0.20655742287635803, -0.8412317633628845, -0.012105060741305351, -1.5869187116622925, -0.18941427767276764, 0.4088137447834015, -1.4502036571502686, -0.4649120569229126, -0.24928182363510132, 1.299058198928833, -0.20489183068275452, 1.3778849840164185, -0.29655972123146057, -0.11529630422592163, -0.31915849447250366, -0.4228074252605438, 0.13598857820034027, -0.18535824120044708, -0.636243462562561, 0.2633437514305115, -0.7588168978691101, 0.2845359146595001, 1.4923895597457886, 0.2975272834300995, 0.021803922951221466, 0.5089473128318787, 1.1632587909698486, 0.38471460342407227, -0.058165594935417175, -0.9388075470924377, -1.5586045980453491, 1.9779736995697021, -1.5143229961395264, 1.9855881929397583, 0.8463456034660339, -0.0060196733102202415, -1.7075518369674683, -1.8812499046325684, 1.3423959016799927, 1.181166648864746, 2.464810848236084, 0.6025875806808472, 0.4605628252029419, -0.7711771726608276, -0.6423198580741882, 0.3247990906238556, -1.0841573476791382, -0.7863677740097046, 0.25309762358665466, 2.4312429428100586, 1.746234655380249, -0.4760136008262634, -0.25764766335487366, -0.9686277508735657, 1.2747669219970703, -0.16945801675319672, 0.17909395694732666, 2.021069049835205, -0.24548009037971497, -1.074048399925232, 1.2798874378204346, -2.3381407260894775, 0.20836889743804932, 1.9926046133041382, 0.24821116030216217, 0.10679217427968979, -1.33994460105896, -0.6990230679512024, -0.24613814055919647, -0.39112842082977295, -1.2568464279174805, 0.5138916969299316, -0.2421485185623169, -0.8284640908241272, -1.5154547691345215, 0.16200606524944305, -1.0699703693389893, -1.677695631980896, 0.256032794713974, 1.90414559841156, 2.0024051666259766, -0.8284715414047241, 1.47433602809906, -0.3521072268486023, 0.1178169995546341, 1.1993176937103271, 1.2664293050765991, 3.09602689743042, 1.8169567584991455, -1.2584826946258545, 0.6913764476776123, -0.16550979018211365, -0.449504554271698, 1.079703688621521, -1.1607917547225952, 1.1789841651916504, -0.1494046151638031, -1.1349987983703613, -1.2475005388259888, 0.8348555564880371, 0.4924165606498718, -0.031089432537555695, -0.4320363402366638, 1.2505935430526733, 0.1735163927078247, 1.450300931930542, 0.5877426266670227, -0.35118764638900757, 0.6628825068473816, -0.32424166798591614, -0.4535715878009796, 1.6010292768478394, 0.20822358131408691, -1.3923147916793823, -2.309295415878296, -0.20437440276145935, -0.8751586079597473, 0.019518859684467316, -0.5622941851615906, -1.0139153003692627, 1.7391722202301025, 0.37758806347846985, -1.226500391960144, -0.23118595778942108, -0.34508848190307617, -0.5450143814086914, 2.666271924972534, -1.3869023323059082, -0.1821945458650589, -0.9872784614562988, -0.5884299278259277, 1.6565076112747192, -1.14018976688385, -0.22997577488422394, -1.021640419960022, -0.5724173784255981, -1.314706563949585, -0.5740138292312622, -0.02235335111618042, -0.888555645942688, 0.8019300103187561, 0.2265414297580719, -1.158161997795105, -0.3164617121219635, -0.9256454110145569, 0.8855909705162048, -0.11083664745092392, 0.23152819275856018, 1.8928371667861938, 0.380719393491745, -0.3485775887966156, 0.7592887282371521, 1.17489492893219, 0.5693942308425903, -0.5678228139877319, 0.2163223922252655, -0.6959114670753479, 0.20863798260688782, -1.403651237487793, 0.29013094305992126, -2.875546455383301, 0.6560531854629517, -0.05333743616938591, 0.01159739214926958, 0.0010785404592752457, -1.3133958578109741, 1.1064482927322388, 2.5986111164093018, -1.1230576038360596, 0.49730372428894043, 0.3342011272907257, 1.1939159631729126, -1.645585298538208, 0.2625283896923065, -0.34912532567977905, 2.0870773792266846, 0.2579837143421173, 1.2880487442016602, -0.44124552607536316, -2.325188636779785, 0.5236799716949463, -1.2687536478042603, -1.1642632484436035, 0.8505805730819702, -0.8472362756729126, 0.027456827461719513, -1.3851531744003296, -0.23613983392715454, -0.8900707364082336, -1.264021396636963, 0.7939884066581726, 0.16840790212154388, 0.505783200263977, -0.6154177784919739, 0.4102368652820587, -2.2002615928649902, -1.2689533233642578, -0.2120397984981537, -0.9276654124259949, 0.4142509996891022, -0.2608483135700226, 0.6724497079849243, -0.1491217464208603, 0.0026833340525627136, 0.3814704418182373, 1.466751217842102, 3.2784957885742188, 0.182830348610878, 0.3085136413574219, -0.19209234416484833, -0.9422527551651001, 1.4415793418884277, 0.951485812664032, -0.13892453908920288, -0.6398009061813354, -1.0751363039016724, 1.243395209312439, 1.9272109270095825, 1.0089449882507324, 0.07078736275434494, -0.8692034482955933, -0.7871600389480591, -0.07388563454151154, 0.17466354370117188, 0.42309999465942383, 0.9450889229774475, 0.08454462885856628, 0.046289972960948944, 1.3976598978042603, 1.146489143371582, -0.454619437456131, 0.4043518006801605, -0.8719555139541626, -0.43694740533828735, 0.4512505531311035, 0.2542286515235901, 0.022339899092912674, 0.3327595591545105, -1.0773283243179321, -0.22859273850917816, -0.2939928472042084, -0.9080915451049805, -0.7953664064407349, -0.4047437906265259, -0.31167855858802795, 1.6655218601226807, 0.05063914135098457, -0.44106221199035645, -0.023265574127435684, -0.7593557238578796, -0.15185172855854034, -1.0999512672424316, 0.2946772277355194, -0.152838796377182, -0.07766350358724594, -0.11977701634168625, 1.7657678127288818, -0.844463050365448, -2.0603158473968506, 0.22271153330802917, 0.25453460216522217, -0.3445355296134949, 0.1775168925523758, 1.7282520532608032, 0.5447964668273926, 1.349109172821045, 1.278214454650879, 1.0004749298095703, -0.6748498678207397, -1.2510706186294556, 0.6398682594299316, 0.9876932501792908, -1.407591462135315, 0.7843125462532043, -0.06435641646385193, -0.4569967985153198, 0.6096659302711487, 1.231424331665039, 0.49373751878738403, -1.9825849533081055, 0.7806410789489746, -0.9786326289176941, 0.5943285822868347, 0.7217333316802979, 0.7707391977310181, 0.22275860607624054, 0.8347954750061035, -1.2164479494094849, -1.1513276100158691, -0.6975107192993164, -0.5816010236740112, 1.9185707569122314, -0.17928862571716309, 0.5125284194946289, -0.12744726240634918, -1.2715480327606201, -0.029282212257385254, 0.6766515374183655, 0.3401062786579132, -0.426474392414093, 0.7764953970909119, -0.6661610007286072, -1.0635409355163574, -1.2791097164154053, -0.5032143592834473, -1.013710856437683, -1.0035289525985718, 0.9207764267921448, 0.7878386378288269, 0.36075425148010254, 1.906898856163025, 0.6993291974067688, 0.22936174273490906, -2.6690852642059326, 0.9261865019798279, 0.306378036737442, -0.02536112815141678, 0.9835656881332397, 0.28817301988601685, 1.0642081499099731, 0.045315809547901154, 0.5942633152008057, -2.4755282402038574, 2.3243606090545654, -0.22868700325489044, 0.7064463496208191, 0.009513932280242443, -0.2116842269897461, 1.0005197525024414, 0.5477866530418396, 0.46741557121276855, -1.0741225481033325, 0.7178301215171814, -0.6334872841835022, 1.1654525995254517, 0.9383055567741394, -0.8614726662635803, -0.015307385474443436, 1.2714910507202148, 0.4008221924304962, -0.5213178396224976, -0.9022655487060547, -0.9264712333679199, 0.8743771910667419, 1.7694216966629028, -0.06032727286219597, 0.0917523130774498, 0.8714603781700134, 0.6581732630729675, -1.2727317810058594, -0.030288878828287125, -0.6849174499511719, -0.8419497609138489, 1.708756446838379, 2.0187265872955322, -0.07095033675432205, -0.3078558146953583, -0.7304962873458862, -1.2048588991165161, 0.8240200877189636, 0.061822764575481415, 0.20823724567890167, 0.6836179494857788, -0.7351353764533997, 1.1608412265777588, 0.8444687724113464, 0.9477465748786926, 0.2512407600879669, 0.3145153224468231, 0.3970641791820526, -0.3392743766307831, -1.161616325378418, -0.24869213998317719, -1.110538125038147, -2.594545841217041, 0.5361595153808594, -0.13675352931022644, -1.4012253284454346, 0.04392225295305252, -1.0361521244049072, 0.8574814796447754, -0.6555566787719727, -1.1308948993682861, -1.504521131515503, 0.27368760108947754, -0.1388975828886032, 0.8699740767478943, -1.685198187828064, -0.082794688642025, 1.266075611114502, 1.0387704372406006, -0.667913556098938, 0.9858787655830383, 0.21722161769866943, 1.07664155960083, 0.8997153043746948, -0.30201956629753113, 0.5494908690452576, 0.07852372527122498, -1.3371508121490479, 0.44229796528816223, 1.2695096731185913, 0.15510165691375732, 1.5404038429260254, -0.5243678092956543, 0.028135981410741806, 0.41697245836257935, -0.5048291683197021, -0.523452639579773, -0.580646276473999, 0.6474800705909729, 0.11934013664722443, -0.9920603036880493, 0.009352724067866802, -0.09035159647464752, -0.10872089117765427, 0.16309359669685364, -1.4849026203155518, -0.1766873002052307, -0.3909732699394226, -0.6083979606628418, -1.2224617004394531, -0.11417273432016373, 1.3160961866378784, -0.7682256698608398, -0.15912184119224548, 0.5638457536697388, 0.41065242886543274, 0.5133741497993469, 0.5895952582359314, -0.7418148517608643, -0.42278873920440674, -0.20296843349933624, -0.46935799717903137, 0.37707558274269104, 1.3727097511291504, -0.033344924449920654, -1.0137704610824585, 0.6449458003044128, -0.3722015917301178, 0.08903147280216217, 1.9366333484649658, 0.06630345433950424, -0.8368895649909973, 0.24645082652568817, -0.6958695650100708, 1.9624931812286377, 1.6471322774887085, 1.3216102123260498, -0.10023301094770432, -0.896787703037262, 0.6754416823387146, -0.3567299544811249, -0.41871345043182373, 0.8796731233596802, 0.42741894721984863, -0.20503436028957367, -1.4132808446884155, 0.6467630863189697, 1.3845256567001343, -0.8558724522590637, -0.8202487826347351, 0.054801516234874725, -0.8154011368751526, 1.0167608261108398, 0.6857567429542542, 0.2794577479362488, 0.23776277899742126, 1.6329772472381592, 0.8335679173469543, -0.44641533493995667, 0.5763647556304932, 0.4517723023891449, -0.16542638838291168, -2.150470018386841, -1.09999418258667, 0.3544441759586334, -0.33896175026893616, -1.5513736009597778, 1.4590139389038086, -1.1634899377822876, -0.9658397436141968, 0.49915921688079834, 0.133842334151268, 1.3924142122268677, 0.3960573971271515, 1.623565435409546, 2.0550525188446045, 0.8553096652030945, 0.3390916585922241, 1.275809407234192, -0.240182563662529, -0.4884893298149109, 1.7054145336151123, -0.4820708930492401, 0.5147645473480225, 1.0041635036468506, -0.3272862732410431, -1.0814135074615479, -0.7944518327713013, -1.297343134880066, -0.7357009649276733, 1.1466114521026611, 0.15080013871192932, -1.107378363609314, 0.2518261671066284, 1.6642941236495972, 0.06009335070848465, -0.33148670196533203, 0.7266225814819336, 0.4494961202144623, -0.8332363963127136, -0.0673023983836174, -0.9198633432388306, 0.5342218279838562, -0.11654295772314072, -0.36573919653892517, 0.24089421331882477, 0.5828793048858643, 1.3069087266921997, 0.0769147202372551, 0.10547960549592972, 1.2548948526382446, -1.350607991218567, 1.503268837928772, -0.7145292162895203, 0.2843598425388336, -2.385833978652954, 1.4074214696884155, -0.8465755581855774, 1.9338244199752808, -2.6111927032470703, 0.463523805141449, -0.4917505085468292, -0.4327998161315918, 0.1758192777633667, -0.3899739384651184, 0.18724140524864197, -0.11047867685556412, -1.0913623571395874, -0.17148569226264954, -0.7175275683403015, 0.5952610969543457, 1.0789823532104492, 1.3908157348632812, -1.0672613382339478, -0.2392701506614685, -1.763149619102478, -0.1634438931941986, -0.7049697041511536, 0.2157379388809204, -1.9864606857299805, -0.19490058720111847, -1.992297649383545, -2.330531597137451, -1.3872838020324707, -0.8011661171913147, 1.0998047590255737, 0.1491515040397644, -0.8621076941490173, 1.1052155494689941, -0.3513416349887848, -1.816162109375, 1.0994641780853271, -2.1634762287139893 ]
https://github.com/huggingface/datasets/issues/5571
load_dataset fails for JSON in windows
Hi! You need to pass an input json file explicitly as `data_files` to `load_dataset` to avoid this error: ```python ds = load_dataset("json", data_files=args.input_json) ```
### Describe the bug Steps: 1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method. 2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json" 3. I am reading the file in my local PyCharm - the location of python file is different than the location of the JSON. 4. When I read using load_dataset("json",args.input_json), it throws and error from builder.py. raise InvalidConfigName( f"Bad characters from black list '{invalid_windows_characters}' found in '{self.name}'. " f"They could create issues when creating a directory for this config on Windows filesystem." 6. When I bring the data to the current directory, it works fine. ### Steps to reproduce the bug Steps: 1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method. 2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json" 3. I am reading the file in my local PyCharm - the location of python file is different than the location of the JSON. 4. When I read using load_dataset("json",args.input_json), it throws and error from builder.py. raise InvalidConfigName( f"Bad characters from black list '{invalid_windows_characters}' found in '{self.name}'. " f"They could create issues when creating a directory for this config on Windows filesystem." 6. When I bring the data to the current directory, it works fine. ### Expected behavior Should be able to read from a path different than current directory in Windows machine. ### Environment info datasets version: 2.3.1 python version: 3.8 Windows OS
287
24
load_dataset fails for JSON in windows ### Describe the bug Steps: 1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method. 2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json" 3. I am reading the file in my local PyCharm - the location of python file is different than the location of the JSON. 4. When I read using load_dataset("json",args.input_json), it throws and error from builder.py. raise InvalidConfigName( f"Bad characters from black list '{invalid_windows_characters}' found in '{self.name}'. " f"They could create issues when creating a directory for this config on Windows filesystem." 6. When I bring the data to the current directory, it works fine. ### Steps to reproduce the bug Steps: 1. Created a dataset in a Linux VM and created a small sample using dataset.to_json() method. 2. Downloaded the JSON file to my local Windows machine for working and saved in say - r"C:\Users\name\file.json" 3. I am reading the file in my local PyCharm - the location of python file is different than the location of the JSON. 4. When I read using load_dataset("json",args.input_json), it throws and error from builder.py. raise InvalidConfigName( f"Bad characters from black list '{invalid_windows_characters}' found in '{self.name}'. " f"They could create issues when creating a directory for this config on Windows filesystem." 6. When I bring the data to the current directory, it works fine. ### Expected behavior Should be able to read from a path different than current directory in Windows machine. ### Environment info datasets version: 2.3.1 python version: 3.8 Windows OS Hi! You need to pass an input json file explicitly as `data_files` to `load_dataset` to avoid this error: ```python ds = load_dataset("json", data_files=args.input_json) ```
[ -1.2623194456100464, -0.9738195538520813, -0.7303214073181152, 1.5336825847625732, -0.2054997831583023, -1.2278145551681519, 0.10890890657901764, -1.0818012952804565, 1.7445775270462036, -0.730962336063385, 0.21932944655418396, -1.6172125339508057, 0.050212424248456955, -0.5594354867935181, -0.7176865339279175, -0.9704489707946777, -0.52252197265625, -0.770020067691803, 0.9970532059669495, 2.4922914505004883, 1.2482973337173462, -1.3943417072296143, 2.7423813343048096, 0.679520308971405, -0.11141055077314377, -1.0031706094741821, 0.5858449935913086, 0.05744413658976555, -1.2431542873382568, -0.4316868484020233, -0.9130357503890991, -0.11320774257183075, -0.5774733424186707, -0.5417816042900085, -0.0027174479328095913, 0.3586367964744568, -0.3334404230117798, -0.4166100323200226, -0.6478276252746582, -0.7682647705078125, 0.43657124042510986, -0.36243346333503723, 0.9508615136146545, -0.4469815492630005, 1.7351336479187012, -0.47609397768974304, 0.49923256039619446, 0.7978304624557495, 1.3483340740203857, 0.21625074744224548, 0.13784244656562805, 0.3153848648071289, 0.4700793921947479, 0.0025000078603625298, 0.4801061451435089, 1.0912584066390991, 0.6643903851509094, 0.4158860743045807, 0.7226167917251587, -2.1519200801849365, 1.2918124198913574, -0.9494878649711609, 0.28671103715896606, 1.288947343826294, -0.8575206398963928, 0.46319064497947693, -1.7741752862930298, -0.03141628950834274, 0.6171485185623169, -2.231727361679077, 0.1686452329158783, -1.2749125957489014, -0.48388394713401794, 0.9905773997306824, 0.3580178916454315, -1.1198359727859497, 0.0937214195728302, -0.5430481433868408, 1.0193791389465332, 0.46273964643478394, 1.20689058303833, -1.6397360563278198, -0.12506547570228577, -0.23598572611808777, 0.09842360019683838, -1.2645655870437622, -1.4838261604309082, 0.5130538940429688, 0.577667236328125, 0.6417009234428406, -0.062364302575588226, 0.9764322638511658, -1.0345869064331055, 0.7282795310020447, -0.9554694890975952, -1.716113567352295, -1.4099621772766113, -2.2569997310638428, -2.3658573627471924, 0.8057470917701721, -0.4735455811023712, -0.5544719099998474, 2.0693514347076416, -0.9161376357078552, -1.7664482593536377, 1.0682096481323242, 0.21716496348381042, 0.058089692145586014, 2.434521198272705, 0.12496931850910187, -0.7532790303230286, 0.45008474588394165, -0.5832081437110901, 0.7189476490020752, -0.4146314263343811, 1.3303782939910889, 0.3671032190322876, -0.9731975793838501, 1.519700050354004, -0.31316226720809937, 0.6968095898628235, -0.6886951923370361, -0.5278140902519226, -0.7608205080032349, 0.23240703344345093, 1.8408780097961426, -0.25922733545303345, 1.579509973526001, -0.3061589300632477, -1.6017436981201172, -1.6870797872543335, 0.8943530321121216, 0.45170876383781433, -0.7134886980056763, 0.04758436232805252, -0.39606598019599915, 0.1254921704530716, -0.12265955656766891, 1.0756946802139282, 1.3146650791168213, 0.7402536273002625, -0.38915714621543884, -0.8678039312362671, 0.14910538494586945, -0.0985148698091507, -0.6916297078132629, -1.7562150955200195, -0.2301514893770218, 0.1298370212316513, 0.635772705078125, -1.2956798076629639, 1.6011079549789429, 0.9287578463554382, 1.9529742002487183, 1.1241939067840576, -0.3678167164325714, 1.502791166305542, 0.07054032385349274, 1.815900206565857, -0.60661381483078, 0.6096792817115784, -0.24778154492378235, -1.123436450958252, 0.8320263028144836, -0.3306867778301239, -2.0526766777038574, -0.8159473538398743, -0.702155590057373, -0.1505967527627945, -0.7029732465744019, 0.9374082088470459, -0.2841452658176422, -1.3399940729141235, 0.3219548165798187, -0.6893768906593323, 0.08662634342908859, -1.1914451122283936, 0.28830647468566895, 0.610922634601593, -0.6418136358261108, 0.18707101047039032, -0.2835243344306946, -1.2403496503829956, -0.5294878482818604, 0.3512364625930786, 1.7661224603652954, -0.8867377042770386, 0.8921962380409241, 1.0189460515975952, -0.7787384390830994, 0.0822138786315918, 0.3500065207481384, -0.2726934552192688, 0.8764210939407349, -1.10861074924469, -0.40541037917137146, 1.2407554388046265, -0.3218408226966858, -0.5884165167808533, 1.4481885433197021, 0.6667686104774475, -1.0194454193115234, -0.16064774990081787, -0.13295207917690277, -1.0126651525497437, 0.010767278261482716, -1.6143587827682495, -0.14465659856796265, 0.23857033252716064, -1.5827261209487915, -0.4679645001888275, -0.3024423122406006, 1.2846075296401978, -0.11496560275554657, 1.3950742483139038, -0.31089070439338684, -0.24752283096313477, -0.23739616572856903, -0.4236580729484558, 0.13622276484966278, -0.2581275701522827, -0.4442492127418518, 0.21733857691287994, -0.8464629054069519, 0.2876321077346802, 1.3881696462631226, 0.3722419738769531, -0.05096285045146942, 0.5023830533027649, 1.0726990699768066, 0.49344995617866516, -0.1666482836008072, -0.8389220833778381, -1.4324009418487549, 2.0715813636779785, -1.4864567518234253, 1.9523569345474243, 0.6840823888778687, -0.0924491137266159, -1.7908045053482056, -1.929606556892395, 1.3297317028045654, 1.114717960357666, 2.3605499267578125, 0.5829022526741028, 0.39222419261932373, -0.8273618221282959, -0.7358325719833374, 0.22651657462120056, -1.0644292831420898, -0.761872410774231, 0.09982974082231522, 2.406446695327759, 1.7214555740356445, -0.4458925127983093, -0.12410207092761993, -1.0283950567245483, 1.4628263711929321, -0.09966012835502625, 0.2777634561061859, 2.031024694442749, -0.20502391457557678, -1.007079005241394, 1.2811771631240845, -2.3397324085235596, 0.09978243708610535, 1.9393373727798462, 0.2707267105579376, 0.11675535142421722, -1.5006294250488281, -0.7619689106941223, -0.33283987641334534, -0.331631600856781, -1.2154678106307983, 0.5810129046440125, -0.2625037729740143, -0.7642383575439453, -1.559931993484497, 0.1465943455696106, -1.1289217472076416, -1.6952992677688599, 0.2684635519981384, 1.9605358839035034, 1.9970234632492065, -0.7345396280288696, 1.5958178043365479, -0.2725263833999634, 0.10019611567258835, 1.257434368133545, 1.1796972751617432, 3.144721269607544, 1.9720122814178467, -1.2547643184661865, 0.6410938501358032, -0.1058942899107933, -0.3834748864173889, 1.026617407798767, -1.2530815601348877, 1.3039839267730713, -0.16726119816303253, -1.0633749961853027, -1.233349323272705, 1.0421698093414307, 0.46545401215553284, 0.02958943322300911, -0.4749468266963959, 1.2877663373947144, 0.0017004571855068207, 1.3580080270767212, 0.3957984745502472, -0.34009653329849243, 0.6278671026229858, -0.36692988872528076, -0.5517390966415405, 1.6132432222366333, 0.22191433608531952, -1.508840560913086, -2.313016891479492, -0.3338249921798706, -0.8012012243270874, 0.04087609052658081, -0.4789266884326935, -0.9351064562797546, 1.7452094554901123, 0.3853592872619629, -1.281599998474121, -0.31770750880241394, -0.2634759247303009, -0.5961686372756958, 2.7821543216705322, -1.3812955617904663, -0.24695582687854767, -0.9431777000427246, -0.6392847299575806, 1.6569901704788208, -1.1777117252349854, -0.23155146837234497, -1.0250614881515503, -0.562346875667572, -1.3377245664596558, -0.5128321051597595, 0.0024996018037199974, -0.9529854655265808, 0.9066581130027771, 0.2893178462982178, -1.0948041677474976, -0.27926427125930786, -0.8556389212608337, 0.8723269701004028, -0.053843479603528976, 0.24797436594963074, 1.9622840881347656, 0.4393198788166046, -0.31480470299720764, 0.7590950131416321, 1.0723774433135986, 0.5741682052612305, -0.6900762915611267, 0.07617627084255219, -0.70296311378479, 0.4122774600982666, -1.2603904008865356, 0.21867267787456512, -2.8053226470947266, 0.6457377076148987, -0.1545363962650299, -0.04506441578269005, -0.02648017928004265, -1.2413514852523804, 1.0837759971618652, 2.698431968688965, -1.1667122840881348, 0.4544391632080078, 0.42364996671676636, 1.2060266733169556, -1.6429791450500488, 0.4528314769268036, -0.3709132671356201, 2.1080403327941895, 0.20427557826042175, 1.1753761768341064, -0.47839996218681335, -2.3678643703460693, 0.6051092147827148, -1.2179028987884521, -1.1867272853851318, 0.7202019095420837, -0.8359404802322388, 0.08615311235189438, -1.4231947660446167, -0.16366785764694214, -0.7874214053153992, -1.2685613632202148, 0.6028602719306946, 0.26061928272247314, 0.3947177529335022, -0.6016985177993774, 0.3508116602897644, -2.1127841472625732, -1.3840241432189941, -0.3140939772129059, -0.8888013362884521, 0.47869548201560974, -0.44360238313674927, 0.7775288820266724, -0.2179025113582611, 0.003862251527607441, 0.30960774421691895, 1.3714933395385742, 3.41802978515625, 0.13590028882026672, 0.22683219611644745, -0.1571837216615677, -0.9632444381713867, 1.4117710590362549, 0.9065981507301331, -0.13900870084762573, -0.6097394824028015, -1.1219630241394043, 1.1639056205749512, 2.083256483078003, 1.023696780204773, 0.06406116485595703, -0.7850337028503418, -0.6849786639213562, 0.00686939712613821, 0.21846286952495575, 0.5317407250404358, 0.8763984441757202, -0.096964992582798, -0.03996982425451279, 1.5703660249710083, 1.2819241285324097, -0.20989598333835602, 0.23590172827243805, -0.8331586122512817, -0.43697068095207214, 0.5044362545013428, 0.29238250851631165, -0.0037183309905231, 0.3228543698787689, -1.0145530700683594, -0.1751151829957962, -0.47346335649490356, -0.9292920827865601, -0.7429473400115967, -0.3799823522567749, -0.3654212951660156, 1.7097594738006592, 0.21601104736328125, -0.6464037299156189, -0.11477548629045486, -0.6769163012504578, -0.050195202231407166, -0.9990318417549133, 0.4182857275009155, -0.13009269535541534, -0.09830151498317719, -0.0497659407556057, 1.8128210306167603, -1.0167570114135742, -2.1424875259399414, 0.30446434020996094, 0.19990792870521545, -0.2783656716346741, 0.2997463345527649, 1.5181139707565308, 0.5655069351196289, 1.457574486732483, 1.3715626001358032, 0.8734169602394104, -0.783409059047699, -1.3079513311386108, 0.6278557777404785, 0.9959818720817566, -1.481515884399414, 0.7570342421531677, 0.0014283666387200356, -0.5605452060699463, 0.6357283592224121, 1.268211841583252, 0.4440764784812927, -2.131375551223755, 0.7797213792800903, -0.8816034197807312, 0.7433040142059326, 0.6823635101318359, 0.5991306304931641, 0.13319078087806702, 0.7599478363990784, -1.2082439661026, -1.1533105373382568, -0.7632452249526978, -0.7244131565093994, 1.9340282678604126, -0.29127269983291626, 0.6073731184005737, -0.10731460899114609, -1.3346667289733887, -0.10270984470844269, 0.6212511658668518, 0.3571701943874359, -0.4790393114089966, 0.7791785001754761, -0.6807769536972046, -1.1326569318771362, -1.3945012092590332, -0.4512430727481842, -1.0261974334716797, -0.995150625705719, 1.0306267738342285, 0.817754864692688, 0.32745814323425293, 1.8414841890335083, 0.617253303527832, 0.29118627309799194, -2.6330976486206055, 0.914182722568512, 0.3617347180843353, -0.0678110271692276, 0.937643826007843, 0.3390917181968689, 0.8845862746238708, 0.001752336509525776, 0.6023810505867004, -2.3731396198272705, 2.29620361328125, -0.18682605028152466, 0.7045067548751831, 0.05471191182732582, -0.2056093066930771, 1.046211838722229, 0.5214045643806458, 0.5555801391601562, -1.0264767408370972, 0.6833853721618652, -0.4934978485107422, 1.2490344047546387, 0.9180794358253479, -0.747477650642395, -0.039916474372148514, 1.2740129232406616, 0.5561401844024658, -0.49573248624801636, -0.9362857341766357, -0.9852645397186279, 0.8877720832824707, 1.7871274948120117, -0.12695062160491943, 0.020665347576141357, 0.8135647177696228, 0.564058244228363, -1.3426355123519897, 0.07248834520578384, -0.8301458358764648, -0.6446475386619568, 1.6228984594345093, 2.0849416255950928, -0.061989180743694305, -0.13536415994167328, -0.6669027209281921, -1.318885326385498, 0.7376118302345276, -0.018635092303156853, 0.10798806697130203, 0.6410807371139526, -0.6963090300559998, 1.0650702714920044, 0.8552078604698181, 0.9899541735649109, 0.14719125628471375, 0.37744683027267456, 0.43815281987190247, -0.3318781554698944, -1.1013903617858887, -0.21549318730831146, -0.9837777018547058, -2.3356704711914062, 0.42003539204597473, -0.18000613152980804, -1.4456913471221924, -0.09641534835100174, -0.9583468437194824, 0.977614164352417, -0.502790093421936, -1.073400855064392, -1.4845194816589355, 0.19936306774616241, -0.15471842885017395, 0.9232968091964722, -1.5641915798187256, -0.15914058685302734, 1.3259296417236328, 0.8912329077720642, -0.691807210445404, 1.07066011428833, 0.25273236632347107, 1.0300171375274658, 0.7116749882698059, -0.32800307869911194, 0.5359043478965759, -0.02101266384124756, -1.2731587886810303, 0.5166465640068054, 1.085290551185608, 0.2134237140417099, 1.489901065826416, -0.673113226890564, -0.04142194241285324, 0.39541181921958923, -0.5882580280303955, -0.38822680711746216, -0.47089001536369324, 0.7193782329559326, -0.017805594950914383, -0.9124490022659302, 0.031039506196975708, -0.08843155205249786, -0.22141554951667786, 0.18420304358005524, -1.4633771181106567, -0.12400490045547485, -0.4541700780391693, -0.5375963449478149, -1.1738327741622925, -0.012045292183756828, 1.3492650985717773, -0.7154862880706787, -0.28455817699432373, 0.48374098539352417, 0.4419534504413605, 0.5224645137786865, 0.6116485595703125, -0.7297071218490601, -0.3336111009120941, -0.23962900042533875, -0.36123722791671753, 0.34837663173675537, 1.295253038406372, -0.06002937629818916, -1.037864089012146, 0.8177056312561035, -0.46957916021347046, 0.037749581038951874, 1.916539192199707, 0.08845818787813187, -0.7025071978569031, 0.33626559376716614, -0.8176221251487732, 1.9145417213439941, 1.7604941129684448, 1.3734092712402344, -0.12040195614099503, -0.9792344570159912, 0.5851326584815979, -0.2816789448261261, -0.4080219864845276, 0.9010081887245178, 0.4691455066204071, -0.2387537956237793, -1.4509596824645996, 0.6249813437461853, 1.1602059602737427, -0.8679158091545105, -0.7874646186828613, 0.20170345902442932, -0.8193650841712952, 1.0540155172348022, 0.7779437303543091, 0.43797552585601807, 0.20240993797779083, 1.6585471630096436, 0.8244670033454895, -0.48926880955696106, 0.4050958454608917, 0.4615032970905304, -0.1918647438287735, -2.030799627304077, -1.145056962966919, 0.373805433511734, -0.5905075669288635, -1.6020207405090332, 1.4294583797454834, -1.185933232307434, -0.963115930557251, 0.4860895276069641, 0.050638191401958466, 1.3825479745864868, 0.343193918466568, 1.5171022415161133, 2.1211025714874268, 0.9732241034507751, 0.37952136993408203, 1.322590947151184, -0.15702413022518158, -0.5310870409011841, 1.823217749595642, -0.38021793961524963, 0.4492647349834442, 1.075709581375122, -0.36407145857810974, -0.9767922759056091, -0.7835529446601868, -1.0846614837646484, -0.5976011157035828, 1.1375864744186401, 0.09276920557022095, -1.0565000772476196, 0.24663490056991577, 1.4711679220199585, 0.2438853681087494, -0.40611740946769714, 0.5486426949501038, 0.4098398983478546, -0.7998564839363098, -0.12622176110744476, -0.9083355665206909, 0.5432896018028259, -0.3296150267124176, -0.39905595779418945, 0.3206539452075958, 0.3375265896320343, 1.375752568244934, -0.06362735480070114, 0.12927599251270294, 1.182023286819458, -1.4399935007095337, 1.5165084600448608, -0.6697790622711182, 0.2226266711950302, -2.3830153942108154, 1.3922191858291626, -0.7193485498428345, 1.967689871788025, -2.6365890502929688, 0.4496119022369385, -0.6150169372558594, -0.3597746193408966, 0.32421502470970154, -0.32882338762283325, 0.1694784313440323, -0.13647998869419098, -1.1432905197143555, -0.0006272429600358009, -0.6772381663322449, 0.6423367857933044, 1.115702509880066, 1.404971957206726, -1.0512034893035889, -0.30514228343963623, -1.7088017463684082, -0.30831483006477356, -0.8452328443527222, 0.36886993050575256, -1.989752173423767, -0.13083955645561218, -1.8106580972671509, -2.372591972351074, -1.3400014638900757, -0.8304537534713745, 1.0614891052246094, 0.12582284212112427, -0.9701845049858093, 1.32656991481781, -0.4126112461090088, -1.9348585605621338, 1.2170708179473877, -2.204542875289917 ]
https://github.com/huggingface/datasets/issues/5570
load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub
Hi, thanks for the feedback! Would it help to add a tip or note saying the dataset is gated and you need to accept the license before downloading it?
### Describe the bug When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once accepting. ### Steps to reproduce the bug ``` from datasets import load_dataset imagenet = load_dataset("imagenet-1k", split="train", streaming=True) FileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub ``` tested on a colab notebook. ### Expected behavior I would expect a specific error indicating that I have to login then accept the dataset licence. I find this bug very relevant as this code is on a guide on the [Huggingface documentation for Datasets](https://huggingface.co/docs/datasets/about_mapstyle_vs_iterable) ### Environment info google colab cpu-only instance
288
29
load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub ### Describe the bug When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once accepting. ### Steps to reproduce the bug ``` from datasets import load_dataset imagenet = load_dataset("imagenet-1k", split="train", streaming=True) FileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub ``` tested on a colab notebook. ### Expected behavior I would expect a specific error indicating that I have to login then accept the dataset licence. I find this bug very relevant as this code is on a guide on the [Huggingface documentation for Datasets](https://huggingface.co/docs/datasets/about_mapstyle_vs_iterable) ### Environment info google colab cpu-only instance Hi, thanks for the feedback! Would it help to add a tip or note saying the dataset is gated and you need to accept the license before downloading it?
[ -1.2081549167633057, -1.0083028078079224, -0.8004522323608398, 1.5000627040863037, -0.10674864053726196, -1.3200321197509766, 0.05623435229063034, -1.0695385932922363, 1.6160078048706055, -0.853119969367981, 0.3403680622577667, -1.7128607034683228, -0.03753047436475754, -0.6481027007102966, -0.6596255898475647, -0.9384629130363464, -0.3229946792125702, -0.7374936938285828, 1.0772281885147095, 2.4620347023010254, 1.1131025552749634, -1.4041842222213745, 2.738370180130005, 0.679084837436676, -0.20656591653823853, -1.0109131336212158, 0.5157166123390198, 0.02696463093161583, -1.2987622022628784, -0.4290528893470764, -0.9074258208274841, -0.05503396317362785, -0.5912659764289856, -0.5662329792976379, 0.017814449965953827, 0.4420306086540222, -0.326615571975708, -0.44669029116630554, -0.5173943638801575, -0.8580884337425232, 0.4032438397407532, -0.3796497881412506, 0.9517073035240173, -0.3316478133201599, 1.8609356880187988, -0.6070573329925537, 0.3479379117488861, 0.7242870926856995, 1.3495110273361206, 0.22016224265098572, -0.003161332104355097, 0.3289165198802948, 0.3186333477497101, -0.1386519968509674, 0.4490026831626892, 1.0801838636398315, 0.5738051533699036, 0.5062187910079956, 0.6784180998802185, -2.197415828704834, 1.3286597728729248, -0.9870780110359192, 0.23239119350910187, 1.4180418252944946, -1.0031471252441406, 0.4362414479255676, -1.6400177478790283, -0.06689354032278061, 0.5653895139694214, -2.2109944820404053, 0.2425340861082077, -1.226452112197876, -0.4974217414855957, 0.9557858109474182, 0.3214687407016754, -1.149092674255371, 0.1837078481912613, -0.3887700140476227, 1.0772391557693481, 0.4539453089237213, 1.147667646408081, -1.7073872089385986, -0.016887055709958076, -0.24582041800022125, 0.1909533441066742, -1.375840663909912, -1.6295791864395142, 0.5051443576812744, 0.6278663873672485, 0.6091185808181763, -0.05995822325348854, 0.9636700749397278, -0.9298875331878662, 0.7103300094604492, -0.9797013401985168, -1.6596349477767944, -1.4129016399383545, -2.268765449523926, -2.3404860496520996, 0.788901150226593, -0.5389494895935059, -0.546459436416626, 2.0071349143981934, -1.083739161491394, -1.839787244796753, 1.260043978691101, 0.28010669350624084, -0.07461492717266083, 2.3546018600463867, 0.2514931857585907, -0.6620707511901855, 0.5120145082473755, -0.7409797310829163, 0.7894111275672913, -0.42952457070350647, 1.2439706325531006, 0.46769478917121887, -1.0409719944000244, 1.5518856048583984, -0.5054690837860107, 0.6180053949356079, -0.7439329028129578, -0.461257666349411, -0.8483597040176392, 0.3511784076690674, 1.851488709449768, -0.31905701756477356, 1.512431263923645, -0.33762896060943604, -1.5538054704666138, -1.6173126697540283, 0.8552342653274536, 0.4532833993434906, -0.8212686777114868, 0.19712133705615997, -0.2821243405342102, 0.13835813105106354, -0.034454409033060074, 1.0434587001800537, 1.2381908893585205, 0.6057077646255493, -0.2951931953430176, -0.8457009196281433, 0.2397201955318451, 0.008175785653293133, -0.6783456802368164, -1.8178857564926147, -0.3355683982372284, 0.2535395622253418, 0.5907492637634277, -1.2725194692611694, 1.711607813835144, 0.8663319945335388, 1.9256064891815186, 1.006467342376709, -0.3262222707271576, 1.512228012084961, 0.150151789188385, 1.8749459981918335, -0.4701017141342163, 0.739214301109314, -0.33283039927482605, -1.1905149221420288, 0.7196125388145447, -0.38456231355667114, -1.9769864082336426, -0.7045454382896423, -0.8644607663154602, -0.11570170521736145, -0.7271311283111572, 1.001899003982544, -0.3432415723800659, -1.4489119052886963, 0.22973623871803284, -0.696314811706543, 0.24187304079532623, -1.2841417789459229, 0.24351440370082855, 0.7363070845603943, -0.6675750613212585, 0.07019753754138947, -0.2759583592414856, -1.2850902080535889, -0.4263266623020172, 0.35503748059272766, 1.8848975896835327, -0.8189891576766968, 0.9960617423057556, 0.9292650818824768, -0.6975524425506592, 0.011934918351471424, 0.39696189761161804, -0.2322303056716919, 0.8411865234375, -1.0441709756851196, -0.41575855016708374, 1.1841107606887817, -0.18554122745990753, -0.660603404045105, 1.4032737016677856, 0.8345069289207458, -1.0530833005905151, -0.10735804587602615, -0.23996204137802124, -0.8860765695571899, -0.053174491971731186, -1.5956414937973022, -0.06303326040506363, 0.26912662386894226, -1.4948056936264038, -0.4012908637523651, -0.3089640438556671, 1.2301836013793945, -0.16361775994300842, 1.3803763389587402, -0.47763314843177795, -0.269070565700531, -0.3453717529773712, -0.4390881657600403, 0.18797743320465088, -0.34003788232803345, -0.6572847962379456, 0.1470927596092224, -0.7120038270950317, 0.25864753127098083, 1.4199575185775757, 0.3743273913860321, 0.13558080792427063, 0.5229452848434448, 1.117531657218933, 0.347046434879303, -0.08802129328250885, -0.9827712178230286, -1.498789668083191, 1.997622013092041, -1.3674899339675903, 1.9709300994873047, 0.8547833561897278, -0.02216295897960663, -1.8227496147155762, -1.8670183420181274, 1.3622370958328247, 1.2272752523422241, 2.392662286758423, 0.5766202807426453, 0.3313140869140625, -0.8849237561225891, -0.6497319936752319, 0.21880748867988586, -0.9711967706680298, -0.7680918574333191, 0.12167123705148697, 2.325629711151123, 1.8090813159942627, -0.4271533787250519, -0.2537368834018707, -1.0222276449203491, 1.435190200805664, -0.23238225281238556, 0.18803121149539948, 1.9942188262939453, -0.25904253125190735, -1.0688800811767578, 1.278843641281128, -2.2929303646087646, 0.04736413434147835, 1.9727118015289307, 0.2295955866575241, 0.03723050281405449, -1.4058281183242798, -0.8205794095993042, -0.1873811036348343, -0.37433817982673645, -1.2479032278060913, 0.44299623370170593, -0.23724821209907532, -0.6374233365058899, -1.4738982915878296, 0.1305541694164276, -1.017862319946289, -1.6884492635726929, 0.22949691116809845, 1.8199182748794556, 2.036184310913086, -0.8907069563865662, 1.567596197128296, -0.22588835656642914, 0.22133642435073853, 1.2744626998901367, 1.2021820545196533, 3.1153857707977295, 1.8131170272827148, -1.3557305335998535, 0.6568167209625244, -0.07473618537187576, -0.4939550459384918, 1.259974479675293, -1.0731621980667114, 1.2644532918930054, -0.14679333567619324, -1.2356511354446411, -1.244407296180725, 0.9432410597801208, 0.508034884929657, 0.09926757216453552, -0.48500174283981323, 1.2013177871704102, 0.040802258998155594, 1.3822062015533447, 0.6100064516067505, -0.40967801213264465, 0.6559044718742371, -0.37359896302223206, -0.6164990067481995, 1.6282341480255127, 0.1556307077407837, -1.479863166809082, -2.302692413330078, -0.22490724921226501, -0.785848081111908, -0.005713228136301041, -0.6486281752586365, -1.0037058591842651, 1.587943196296692, 0.4149631857872009, -1.2593536376953125, -0.3448008596897125, -0.4198879301548004, -0.5911962985992432, 2.613368272781372, -1.393797516822815, -0.2511403262615204, -0.9758740067481995, -0.5971878170967102, 1.554291009902954, -1.1475307941436768, -0.22930729389190674, -1.1327162981033325, -0.5983417630195618, -1.2944693565368652, -0.544181764125824, -0.04802727326750755, -0.919838547706604, 0.8419802784919739, 0.14859507977962494, -1.1387619972229004, -0.2851085364818573, -0.9433778524398804, 0.8785983920097351, -0.12501728534698486, 0.33366891741752625, 1.9047003984451294, 0.3978651165962219, -0.3489900827407837, 0.7720977067947388, 1.1538934707641602, 0.5765227675437927, -0.7099305987358093, 0.16308720409870148, -0.7071914076805115, 0.2147316187620163, -1.2885257005691528, 0.23956049978733063, -2.9535369873046875, 0.673310399055481, -0.06144709885120392, -0.052962999790906906, 0.04337340593338013, -1.3243169784545898, 1.1325405836105347, 2.663313388824463, -1.1240544319152832, 0.45158687233924866, 0.32274484634399414, 1.2313779592514038, -1.686396837234497, 0.36475393176078796, -0.46036580204963684, 2.099282741546631, 0.1134178414940834, 1.1750438213348389, -0.4506494402885437, -2.276984214782715, 0.588379442691803, -1.228499412536621, -1.2637966871261597, 0.890389084815979, -0.786065399646759, 0.05462895333766937, -1.4667071104049683, -0.19429448246955872, -0.7878101468086243, -1.2085028886795044, 0.7987314462661743, 0.07924851775169373, 0.5428413152694702, -0.5825145840644836, 0.3300292491912842, -2.23494815826416, -1.4217270612716675, -0.2252850979566574, -0.8834039568901062, 0.4512401819229126, -0.3631502389907837, 0.7266770005226135, -0.17516304552555084, 0.07222595065832138, 0.29736948013305664, 1.4433693885803223, 3.3843140602111816, 0.27288562059402466, 0.38686078786849976, -0.10174742341041565, -0.865617573261261, 1.3768978118896484, 0.8774846196174622, -0.2277289777994156, -0.5283878445625305, -1.0239766836166382, 1.2953662872314453, 1.8935188055038452, 1.0187002420425415, 0.03318142518401146, -0.7846062183380127, -0.7355863451957703, -0.030708588659763336, 0.019887391477823257, 0.5091407299041748, 0.9278097748756409, 0.05826553702354431, 0.17341002821922302, 1.5026320219039917, 1.2642943859100342, -0.4373515546321869, 0.4250044822692871, -0.7987732291221619, -0.5165356397628784, 0.45726653933525085, 0.31292200088500977, 0.013099859468638897, 0.3542187213897705, -1.003243088722229, -0.252533495426178, -0.3737904131412506, -0.9015302062034607, -0.7088726162910461, -0.5196728110313416, -0.3437197208404541, 1.6617608070373535, 0.11623059958219528, -0.46993720531463623, -0.1239163726568222, -0.7576926946640015, -0.06768912076950073, -1.0499197244644165, 0.3001258671283722, -0.16379451751708984, -0.139754980802536, -0.09877889603376389, 1.7615573406219482, -1.0143632888793945, -2.0473480224609375, 0.23336590826511383, 0.2724058926105499, -0.24257008731365204, 0.06192045658826828, 1.6946438550949097, 0.524042010307312, 1.4553024768829346, 1.414381504058838, 0.9657872319221497, -0.706786572933197, -1.2277514934539795, 0.6188132762908936, 0.9410661458969116, -1.331817865371704, 0.7865354418754578, -0.029353421181440353, -0.5304960012435913, 0.6694333553314209, 1.314456820487976, 0.4244707524776459, -1.898790955543518, 0.7849018573760986, -0.9428381323814392, 0.7682579159736633, 0.7455613017082214, 0.7929314970970154, 0.1555040329694748, 0.7906835675239563, -1.220285415649414, -1.2148975133895874, -0.7442739009857178, -0.5986989736557007, 1.8616390228271484, -0.2837773561477661, 0.506802499294281, -0.268086314201355, -1.2578312158584595, -0.02915305644273758, 0.8002727627754211, 0.37418317794799805, -0.32717764377593994, 0.7636843323707581, -0.6401896476745605, -1.1453840732574463, -1.4099494218826294, -0.3920377492904663, -0.976871132850647, -0.9117377400398254, 1.0064115524291992, 0.8709460496902466, 0.26835086941719055, 1.9102612733840942, 0.7215433120727539, 0.1520158052444458, -2.630950689315796, 0.961260974407196, 0.2052229940891266, 0.010932405479252338, 0.8915789723396301, 0.35373181104660034, 0.9666780829429626, 0.0022761719301342964, 0.4600088894367218, -2.3595566749572754, 2.2522501945495605, -0.22833287715911865, 0.5996036529541016, -0.08192653208971024, -0.18984083831310272, 1.1662307977676392, 0.47845619916915894, 0.552931547164917, -1.0641478300094604, 0.7425298690795898, -0.48844391107559204, 1.1831674575805664, 0.9189522862434387, -0.8619542121887207, -0.07262013107538223, 1.398809790611267, 0.5027617812156677, -0.5524929761886597, -0.9056149125099182, -0.937518835067749, 0.9996054768562317, 1.7981994152069092, 0.034978464245796204, 0.01652977243065834, 0.8956053853034973, 0.6724639534950256, -1.3180304765701294, 0.0988025888800621, -0.7429078817367554, -0.7320488691329956, 1.688931941986084, 2.0256869792938232, -0.09686720371246338, -0.1396399438381195, -0.7883438467979431, -1.1963809728622437, 0.8409717679023743, 0.08921241015195847, 0.17121411859989166, 0.7187798619270325, -0.7150954604148865, 1.152350664138794, 0.8820965886116028, 0.9315066337585449, 0.2512083649635315, 0.22537462413311005, 0.3902055323123932, -0.3695860207080841, -1.1448062658309937, -0.21180421113967896, -1.083711862564087, -2.372342109680176, 0.44178006052970886, -0.1739656627178192, -1.4866746664047241, 0.07727464288473129, -0.9620566964149475, 0.9574230313301086, -0.5430797934532166, -0.9930991530418396, -1.5998324155807495, 0.2585256099700928, -0.18479810655117035, 0.8519405722618103, -1.5350569486618042, -0.03582724183797836, 1.2328803539276123, 0.9150113463401794, -0.7141809463500977, 0.9706043601036072, 0.10486701130867004, 0.9833318591117859, 0.9332110285758972, -0.38727888464927673, 0.4818650782108307, 0.12799939513206482, -1.3535513877868652, 0.4660557806491852, 1.108579397201538, 0.21383103728294373, 1.5285102128982544, -0.5032594203948975, -0.008530641905963421, 0.3267723321914673, -0.4265325963497162, -0.4968821108341217, -0.5654744505882263, 0.6548386812210083, 0.09471865743398666, -0.8876538872718811, 0.0683259516954422, 0.007614516653120518, -0.25442829728126526, 0.21094268560409546, -1.516281008720398, -0.08727992326021194, -0.37185046076774597, -0.6866021752357483, -1.2401481866836548, 0.02317342907190323, 1.4301689863204956, -0.7572106122970581, -0.20288334786891937, 0.580327033996582, 0.3329119086265564, 0.4769921898841858, 0.6573309898376465, -0.6782695055007935, -0.2568804621696472, -0.2726786732673645, -0.304671972990036, 0.3490981161594391, 1.2554539442062378, -0.19137267768383026, -0.9453326463699341, 0.7415037751197815, -0.368546724319458, 0.05262201651930809, 1.9259299039840698, 0.06527931988239288, -0.8231055736541748, 0.2653222382068634, -0.738972008228302, 2.0163722038269043, 1.7857991456985474, 1.3294391632080078, -0.008235040120780468, -1.0115331411361694, 0.597388505935669, -0.23222431540489197, -0.34906232357025146, 1.0239089727401733, 0.4462858736515045, -0.17794369161128998, -1.3763033151626587, 0.5800772905349731, 1.2949693202972412, -0.8136427998542786, -0.8380481600761414, 0.11093822866678238, -0.8511679172515869, 1.0258930921554565, 0.7128521800041199, 0.4397141635417938, 0.16588053107261658, 1.6249101161956787, 0.819435179233551, -0.4641382098197937, 0.593534529209137, 0.4892853796482086, -0.20958112180233002, -2.0579049587249756, -1.1479859352111816, 0.38203904032707214, -0.4280579388141632, -1.6295487880706787, 1.3606789112091064, -1.164591908454895, -0.9553129076957703, 0.60652756690979, 0.0004243291914463043, 1.395837426185608, 0.2938043475151062, 1.4661285877227783, 2.0748519897460938, 0.9546476006507874, 0.3127951920032501, 1.312046766281128, -0.25773006677627563, -0.4519811272621155, 1.8417106866836548, -0.3923420310020447, 0.4752345383167267, 0.9986247420310974, -0.4195553660392761, -1.0183539390563965, -0.8048456311225891, -1.1855864524841309, -0.6850687861442566, 1.1715037822723389, 0.1487053781747818, -1.0957555770874023, 0.23831221461296082, 1.542741060256958, 0.10735103487968445, -0.255677193403244, 0.7809070348739624, 0.4610459804534912, -0.8672834634780884, 0.022907976061105728, -0.9188219904899597, 0.5362033247947693, -0.19339971244335175, -0.29522475600242615, 0.3297213017940521, 0.42243605852127075, 1.3039579391479492, -0.004126186482608318, 0.1965455412864685, 1.2428842782974243, -1.25614595413208, 1.445570468902588, -0.6757007241249084, 0.2819192707538605, -2.4575724601745605, 1.3671079874038696, -0.8283488750457764, 1.867000937461853, -2.60241436958313, 0.446999728679657, -0.6826421618461609, -0.4689141511917114, 0.26367104053497314, -0.42941710352897644, 0.15431146323680878, -0.10992924869060516, -1.1865501403808594, -0.029721837490797043, -0.7273429036140442, 0.5574935078620911, 1.1357535123825073, 1.387230634689331, -1.0554119348526, -0.2320455014705658, -1.7679789066314697, -0.18666325509548187, -0.7037992477416992, 0.3584798574447632, -1.9785497188568115, -0.14005456864833832, -1.9346165657043457, -2.44492506980896, -1.3353370428085327, -0.7730312943458557, 1.1125284433364868, 0.1765097826719284, -0.9982094764709473, 1.1733570098876953, -0.4347744584083557, -1.8011277914047241, 1.2138588428497314, -2.152824878692627 ]
https://github.com/huggingface/datasets/issues/5570
load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub
The error is now more informative: ``` FileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`. ```
### Describe the bug When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once accepting. ### Steps to reproduce the bug ``` from datasets import load_dataset imagenet = load_dataset("imagenet-1k", split="train", streaming=True) FileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub ``` tested on a colab notebook. ### Expected behavior I would expect a specific error indicating that I have to login then accept the dataset licence. I find this bug very relevant as this code is on a guide on the [Huggingface documentation for Datasets](https://huggingface.co/docs/datasets/about_mapstyle_vs_iterable) ### Environment info google colab cpu-only instance
288
56
load_dataset gives FileNotFoundError on imagenet-1k if license is not accepted on the hub ### Describe the bug When calling ```load_dataset('imagenet-1k')``` FileNotFoundError is raised, if not logged in and if logged in with huggingface-cli but not having accepted the licence on the hub. There is no error once accepting. ### Steps to reproduce the bug ``` from datasets import load_dataset imagenet = load_dataset("imagenet-1k", split="train", streaming=True) FileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub ``` tested on a colab notebook. ### Expected behavior I would expect a specific error indicating that I have to login then accept the dataset licence. I find this bug very relevant as this code is on a guide on the [Huggingface documentation for Datasets](https://huggingface.co/docs/datasets/about_mapstyle_vs_iterable) ### Environment info google colab cpu-only instance The error is now more informative: ``` FileNotFoundError: Couldn't find a dataset script at /content/imagenet-1k/imagenet-1k.py or any data file in the same directory. Couldn't find 'imagenet-1k' on the Hugging Face Hub either: FileNotFoundError: Dataset 'imagenet-1k' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`. ```
[ -1.170973539352417, -1.051756501197815, -0.8071074485778809, 1.500848412513733, -0.10347427427768707, -1.3066271543502808, 0.05303516238927841, -1.0711501836776733, 1.6302049160003662, -0.8009863495826721, 0.3466123938560486, -1.7298086881637573, -0.04814952239394188, -0.6833724975585938, -0.6596361994743347, -0.8666883111000061, -0.306637167930603, -0.7219006419181824, 1.105054497718811, 2.429194927215576, 1.1339521408081055, -1.3690096139907837, 2.7358455657958984, 0.6651161313056946, -0.22335705161094666, -0.9978381395339966, 0.4853828549385071, 0.04908858984708786, -1.2903372049331665, -0.40088826417922974, -0.860497236251831, 0.015322225168347359, -0.6070859432220459, -0.5952686667442322, 0.0029559433460235596, 0.4481700658798218, -0.3260144591331482, -0.5111421346664429, -0.558813214302063, -0.8611901998519897, 0.4090575575828552, -0.35921359062194824, 0.9407212138175964, -0.33884191513061523, 1.8488054275512695, -0.6437561511993408, 0.3269850015640259, 0.7400421500205994, 1.3467426300048828, 0.21553684771060944, -0.011992638930678368, 0.3762010931968689, 0.33809924125671387, -0.15199409425258636, 0.4729582667350769, 1.0963433980941772, 0.5604870915412903, 0.49492698907852173, 0.6959964632987976, -2.2409019470214844, 1.3330705165863037, -0.9494380354881287, 0.19969294965267181, 1.3655056953430176, -0.9777723550796509, 0.44401460886001587, -1.6515376567840576, -0.052228718996047974, 0.5792157649993896, -2.1882619857788086, 0.2970731854438782, -1.2601908445358276, -0.5125634670257568, 0.9312041997909546, 0.3069031834602356, -1.1132928133010864, 0.2015637308359146, -0.37509745359420776, 1.0494831800460815, 0.38546520471572876, 1.1424667835235596, -1.686540126800537, -0.008508579805493355, -0.24048389494419098, 0.17726798355579376, -1.331405520439148, -1.6522144079208374, 0.4961397647857666, 0.622988224029541, 0.5993271470069885, -0.11312542110681534, 0.9606366753578186, -0.9349352121353149, 0.6684921979904175, -1.0021640062332153, -1.7110129594802856, -1.3896067142486572, -2.2312772274017334, -2.297964096069336, 0.7635632157325745, -0.5205176472663879, -0.5156194567680359, 2.0210702419281006, -1.0607010126113892, -1.8907650709152222, 1.2736194133758545, 0.29371142387390137, -0.08925341069698334, 2.300222635269165, 0.2655255198478699, -0.6663399934768677, 0.519056499004364, -0.8066422343254089, 0.7794124484062195, -0.38277292251586914, 1.2755705118179321, 0.42938077449798584, -1.032244086265564, 1.5609382390975952, -0.47440826892852783, 0.6231949925422668, -0.7551743984222412, -0.4373328685760498, -0.7969231009483337, 0.35038888454437256, 1.877447247505188, -0.3279416561126709, 1.4753626585006714, -0.3898366689682007, -1.5534076690673828, -1.5789395570755005, 0.8375134468078613, 0.46715599298477173, -0.8029479384422302, 0.1961701214313507, -0.28243350982666016, 0.16020742058753967, -0.04760190099477768, 1.0796735286712646, 1.2668319940567017, 0.6487178802490234, -0.3202706575393677, -0.8362708687782288, 0.17498022317886353, 0.02519455924630165, -0.6733492612838745, -1.847853422164917, -0.2981756329536438, 0.294553279876709, 0.5911624431610107, -1.3212218284606934, 1.6824066638946533, 0.8989853858947754, 1.9748437404632568, 0.9664267301559448, -0.3225908875465393, 1.475217580795288, 0.15960736572742462, 1.8972333669662476, -0.44552081823349, 0.7138158679008484, -0.3333585262298584, -1.2016350030899048, 0.7360528111457825, -0.3259463310241699, -1.9593431949615479, -0.7007348537445068, -0.8383115530014038, -0.14806844294071198, -0.7444959282875061, 1.0238178968429565, -0.31973010301589966, -1.4627926349639893, 0.20904496312141418, -0.7290409803390503, 0.22729921340942383, -1.2838177680969238, 0.16302655637264252, 0.6993255019187927, -0.695311963558197, 0.15238292515277863, -0.29312318563461304, -1.2852329015731812, -0.4546206593513489, 0.4443843364715576, 1.847449779510498, -0.8596565127372742, 1.0188050270080566, 0.9625886678695679, -0.7099819779396057, 0.053181640803813934, 0.40143299102783203, -0.25986039638519287, 0.8245369791984558, -1.0340464115142822, -0.4432995319366455, 1.1457957029342651, -0.17845772206783295, -0.656999409198761, 1.3950138092041016, 0.851593017578125, -1.0655038356781006, -0.1231306940317154, -0.23770879209041595, -0.8829814195632935, -0.06310894340276718, -1.589216709136963, -0.07263871282339096, 0.2726852297782898, -1.502737283706665, -0.39911192655563354, -0.3470225930213928, 1.2592967748641968, -0.11478179693222046, 1.3426835536956787, -0.43438971042633057, -0.24157112836837769, -0.29258662462234497, -0.40001022815704346, 0.16299888491630554, -0.3317074179649353, -0.6640723943710327, 0.1716708391904831, -0.7026943564414978, 0.27209562063217163, 1.403719186782837, 0.3619789481163025, 0.09288414567708969, 0.49348288774490356, 1.0993061065673828, 0.37331515550613403, -0.05994324013590813, -0.9974691271781921, -1.511593222618103, 1.9756155014038086, -1.404363989830017, 1.9658924341201782, 0.845860481262207, 0.028906770050525665, -1.8427932262420654, -1.9038041830062866, 1.3713802099227905, 1.1826215982437134, 2.4378113746643066, 0.6070469617843628, 0.31553560495376587, -0.8782941102981567, -0.6215580105781555, 0.22690682113170624, -0.9522993564605713, -0.7700337171554565, 0.17451311647891998, 2.328712224960327, 1.7957603931427002, -0.41283029317855835, -0.2669134736061096, -1.0296024084091187, 1.4328030347824097, -0.21932826936244965, 0.18927733600139618, 2.0100505352020264, -0.25791656970977783, -1.0535085201263428, 1.2932168245315552, -2.2991433143615723, 0.07445145398378372, 1.9655039310455322, 0.1801815927028656, 0.0718902051448822, -1.3928531408309937, -0.8035692572593689, -0.18849514424800873, -0.37213945388793945, -1.2283062934875488, 0.45407676696777344, -0.2122778594493866, -0.6645755171775818, -1.50811767578125, 0.17489521205425262, -1.0082429647445679, -1.7143558263778687, 0.26512032747268677, 1.8657312393188477, 2.056777000427246, -0.9299346804618835, 1.586864948272705, -0.2485944777727127, 0.18651822209358215, 1.2988762855529785, 1.1959501504898071, 3.079693078994751, 1.7851200103759766, -1.3798131942749023, 0.6503831744194031, -0.07658117264509201, -0.5097759962081909, 1.2724896669387817, -1.0850462913513184, 1.2334058284759521, -0.1749739944934845, -1.1880338191986084, -1.236092209815979, 0.9490392208099365, 0.5180421471595764, 0.08850348740816116, -0.4255450963973999, 1.1581015586853027, 0.08943071961402893, 1.3557214736938477, 0.6256216764450073, -0.4194709062576294, 0.6989027261734009, -0.3344363570213318, -0.5865700840950012, 1.59718656539917, 0.13880129158496857, -1.4698290824890137, -2.320716142654419, -0.19869443774223328, -0.7873409986495972, 0.005928210914134979, -0.6665282249450684, -1.0027523040771484, 1.5554560422897339, 0.4144384264945984, -1.2644165754318237, -0.29934370517730713, -0.4195900559425354, -0.5676853060722351, 2.566725730895996, -1.3813143968582153, -0.25561225414276123, -0.9672672748565674, -0.5795522928237915, 1.5508081912994385, -1.0858266353607178, -0.2845039963722229, -1.1204392910003662, -0.5295326113700867, -1.3085347414016724, -0.5574093461036682, -0.0031516761519014835, -0.8807753920555115, 0.8626241087913513, 0.16550129652023315, -1.141378402709961, -0.31903141736984253, -0.9519503712654114, 0.9058875441551208, -0.15225167572498322, 0.32212138175964355, 1.934356927871704, 0.3936750292778015, -0.3295477628707886, 0.7816488742828369, 1.1175811290740967, 0.548364520072937, -0.6611114144325256, 0.20604941248893738, -0.6775431036949158, 0.21312235295772552, -1.3334999084472656, 0.2460574060678482, -2.944026231765747, 0.631249189376831, -0.05496255308389664, 0.0018073944374918938, 0.039735402911901474, -1.3634413480758667, 1.1727477312088013, 2.6466188430786133, -1.0996991395950317, 0.456706702709198, 0.28597337007522583, 1.2146315574645996, -1.6548925638198853, 0.3492599129676819, -0.4421408176422119, 2.0966479778289795, 0.06560707837343216, 1.1719328165054321, -0.4504562020301819, -2.2594845294952393, 0.6174404621124268, -1.211930751800537, -1.2524374723434448, 0.8727936744689941, -0.752683162689209, 0.04738519713282585, -1.5040823221206665, -0.25162583589553833, -0.8244390487670898, -1.198272943496704, 0.7832826972007751, 0.09792782366275787, 0.5330625176429749, -0.6379867792129517, 0.3404387831687927, -2.2310447692871094, -1.407541275024414, -0.2554209232330322, -0.9002598524093628, 0.4644201397895813, -0.35360127687454224, 0.7129228711128235, -0.2043999284505844, 0.04758675768971443, 0.30227553844451904, 1.4230804443359375, 3.39998722076416, 0.22905465960502625, 0.3579559922218323, -0.10668250173330307, -0.8411986231803894, 1.3678162097930908, 0.9168888926506042, -0.23359201848506927, -0.5261474251747131, -1.086588740348816, 1.260989785194397, 1.9457125663757324, 1.0006669759750366, 0.023070845752954483, -0.8123756051063538, -0.8292210698127747, -0.011142779141664505, 0.006141677498817444, 0.530998170375824, 0.9386411905288696, 0.09776552021503448, 0.14970612525939941, 1.495098352432251, 1.2220439910888672, -0.4523119330406189, 0.4568115472793579, -0.8148595690727234, -0.4990531802177429, 0.4305106997489929, 0.3094128966331482, 0.011407691985368729, 0.2838173508644104, -1.021367073059082, -0.25281065702438354, -0.37516409158706665, -0.8926112055778503, -0.7121366262435913, -0.4978863596916199, -0.3543938994407654, 1.6297310590744019, 0.11860185861587524, -0.45865845680236816, -0.15743175148963928, -0.6935053467750549, -0.020321404561400414, -0.9969878196716309, 0.3212370276451111, -0.1945107877254486, -0.11793412268161774, -0.13006682693958282, 1.7267109155654907, -0.9914266467094421, -2.022752523422241, 0.24802501499652863, 0.268907368183136, -0.2715755105018616, 0.07697346061468124, 1.753058910369873, 0.5841943025588989, 1.4511841535568237, 1.428276777267456, 0.9565408229827881, -0.6739436388015747, -1.2436926364898682, 0.5735692381858826, 0.9115761518478394, -1.3436040878295898, 0.740536630153656, -0.00588296540081501, -0.4941161274909973, 0.6623302698135376, 1.3581403493881226, 0.4370003342628479, -1.9538363218307495, 0.7565314769744873, -0.9289185404777527, 0.7871092557907104, 0.7800286412239075, 0.8190546035766602, 0.14873285591602325, 0.7383887767791748, -1.1790823936462402, -1.1956019401550293, -0.7639341354370117, -0.6406279802322388, 1.8267173767089844, -0.27966737747192383, 0.4793083071708679, -0.2973420023918152, -1.2790240049362183, -0.06072574108839035, 0.7952056527137756, 0.3927799463272095, -0.3927568793296814, 0.6973462700843811, -0.5825909376144409, -1.1673613786697388, -1.3632756471633911, -0.3998573422431946, -0.9712821245193481, -0.923754870891571, 0.9226450324058533, 0.8563286066055298, 0.3039395213127136, 1.9101083278656006, 0.726809561252594, 0.13869793713092804, -2.6357617378234863, 0.997329831123352, 0.228400319814682, -0.014328830875456333, 0.9135348200798035, 0.37929004430770874, 0.9665679931640625, -0.009651998989284039, 0.4700019955635071, -2.3678410053253174, 2.2636988162994385, -0.18186232447624207, 0.599789023399353, -0.09647145867347717, -0.2178681492805481, 1.1864356994628906, 0.42368829250335693, 0.541228711605072, -1.0464084148406982, 0.8168846368789673, -0.5050652623176575, 1.1838667392730713, 0.8601040244102478, -0.85976642370224, -0.09811807423830032, 1.3820393085479736, 0.4938530921936035, -0.5374888181686401, -0.8623590469360352, -0.9730430245399475, 1.0045745372772217, 1.8122745752334595, 0.010830981656908989, 0.03855317831039429, 0.9010444283485413, 0.6271980404853821, -1.3364373445510864, 0.05819123983383179, -0.7422656416893005, -0.7021217346191406, 1.7016308307647705, 2.0137569904327393, -0.11803869158029556, -0.18163062632083893, -0.821760892868042, -1.192557454109192, 0.8708245754241943, 0.08411823958158493, 0.14397862553596497, 0.7168217897415161, -0.7101688981056213, 1.2202460765838623, 0.8776800632476807, 0.9132893681526184, 0.20422184467315674, 0.22864289581775665, 0.3824741840362549, -0.4172336459159851, -1.1326491832733154, -0.2283468246459961, -1.0885108709335327, -2.2805469036102295, 0.4461192488670349, -0.11303817480802536, -1.513450026512146, 0.05403657257556915, -0.9747540354728699, 0.9594848155975342, -0.5167670845985413, -1.0106642246246338, -1.5966559648513794, 0.25872719287872314, -0.2122586965560913, 0.8501575589179993, -1.5231212377548218, -0.024746855720877647, 1.2613965272903442, 0.9473922848701477, -0.7429404258728027, 0.9414142370223999, 0.0830889344215393, 0.9801435470581055, 0.9595711827278137, -0.3405801057815552, 0.44515520334243774, 0.11533080041408539, -1.298691749572754, 0.42369258403778076, 1.1041247844696045, 0.18021893501281738, 1.5172381401062012, -0.5057972073554993, -0.00180833600461483, 0.3417617678642273, -0.3945164680480957, -0.5056213736534119, -0.5275760293006897, 0.6526527404785156, 0.04694293066859245, -0.8767037391662598, 0.09718137979507446, 0.06127651780843735, -0.230366051197052, 0.22601920366287231, -1.5079185962677002, -0.0985785573720932, -0.3448573350906372, -0.6681990027427673, -1.2483103275299072, 0.028214044868946075, 1.4054421186447144, -0.7131232023239136, -0.235502228140831, 0.6421254277229309, 0.26885753870010376, 0.4805770516395569, 0.6460317969322205, -0.6847817897796631, -0.2768556475639343, -0.2500479519367218, -0.3286488652229309, 0.3601541519165039, 1.2972180843353271, -0.1482488065958023, -0.9593274593353271, 0.736731767654419, -0.38522231578826904, 0.042416274547576904, 1.9294272661209106, 0.006340142339468002, -0.8293219804763794, 0.27485620975494385, -0.7289494872093201, 2.0735697746276855, 1.812219500541687, 1.281107783317566, 0.007824044674634933, -1.0747257471084595, 0.5961132049560547, -0.22723792493343353, -0.33874988555908203, 1.0259164571762085, 0.45052874088287354, -0.18744461238384247, -1.369160771369934, 0.5747168660163879, 1.3427808284759521, -0.8414579629898071, -0.8610763549804688, 0.14052799344062805, -0.838894248008728, 1.027652621269226, 0.7474476099014282, 0.43878471851348877, 0.1686728298664093, 1.5894742012023926, 0.8236417174339294, -0.41700035333633423, 0.6432453393936157, 0.47257375717163086, -0.21847817301750183, -2.09073805809021, -1.1924282312393188, 0.38668692111968994, -0.4268473982810974, -1.6376124620437622, 1.3719843626022339, -1.1823619604110718, -0.9880629181861877, 0.6425437331199646, -0.01129989791661501, 1.3964959383010864, 0.2809157371520996, 1.4795957803726196, 2.095773458480835, 0.9584802389144897, 0.3431330919265747, 1.3084118366241455, -0.2805172801017761, -0.4942646622657776, 1.8307528495788574, -0.43076372146606445, 0.49284470081329346, 0.9834780097007751, -0.3932918310165405, -1.015812635421753, -0.8274978399276733, -1.2065722942352295, -0.7381933331489563, 1.197428822517395, 0.13439147174358368, -1.0992672443389893, 0.28973060846328735, 1.556862235069275, 0.11556373536586761, -0.26704031229019165, 0.7944243550300598, 0.4659122824668884, -0.9258267879486084, 0.0056214891374111176, -0.9188799262046814, 0.542242705821991, -0.21397240459918976, -0.2727399468421936, 0.33937227725982666, 0.4083150625228882, 1.335908055305481, 0.008737016469240189, 0.19008967280387878, 1.2270313501358032, -1.264941930770874, 1.5075898170471191, -0.6893641352653503, 0.33282792568206787, -2.4590487480163574, 1.3605258464813232, -0.8540059924125671, 1.9081881046295166, -2.6298134326934814, 0.44846850633621216, -0.6646756529808044, -0.4520987272262573, 0.1838115006685257, -0.38185936212539673, 0.15908513963222504, -0.1198258027434349, -1.1940199136734009, -0.014083383604884148, -0.7325639128684998, 0.5337017774581909, 1.1793782711029053, 1.4122344255447388, -1.051151990890503, -0.2322576642036438, -1.7696402072906494, -0.21012715995311737, -0.7287188172340393, 0.36969828605651855, -1.9424422979354858, -0.13134071230888367, -1.940290927886963, -2.4269914627075195, -1.3168411254882812, -0.7945517301559448, 1.0990885496139526, 0.15163004398345947, -0.9987059235572815, 1.1502516269683838, -0.4667586088180542, -1.8150385618209839, 1.2302649021148682, -2.1276605129241943 ]
https://github.com/huggingface/datasets/issues/5568
dataset.to_iterable_dataset() loses useful info like dataset features
Hi ! Oh good catch. I think the features should be passed to `IterableDataset.from_generator()` in `to_iterable_dataset()` indeed. Setting this as a good first issue if someone would like to contribute, otherwise we can take care of it :)
### Describe the bug Hello, I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing. When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata like the features. These metadata are useful if you want to interleave iterable datasets, cast columns etc. ### Steps to reproduce the bug ```python dataset = load_dataset("lhoestq/demo1")["train"] print(dataset.features) # {'id': Value(dtype='string', id=None), 'package_name': Value(dtype='string', id=None), 'review': Value(dtype='string', id=None), 'date': Value(dtype='string', id=None), 'star': Value(dtype='int64', id=None), 'version_id': Value(dtype='int64', id=None)} dataset = dataset.to_iterable_dataset() print(dataset.features) # None ``` ### Expected behavior Keep the relevant information ### Environment info datasets==2.10.0
289
38
dataset.to_iterable_dataset() loses useful info like dataset features ### Describe the bug Hello, I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing. When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata like the features. These metadata are useful if you want to interleave iterable datasets, cast columns etc. ### Steps to reproduce the bug ```python dataset = load_dataset("lhoestq/demo1")["train"] print(dataset.features) # {'id': Value(dtype='string', id=None), 'package_name': Value(dtype='string', id=None), 'review': Value(dtype='string', id=None), 'date': Value(dtype='string', id=None), 'star': Value(dtype='int64', id=None), 'version_id': Value(dtype='int64', id=None)} dataset = dataset.to_iterable_dataset() print(dataset.features) # None ``` ### Expected behavior Keep the relevant information ### Environment info datasets==2.10.0 Hi ! Oh good catch. I think the features should be passed to `IterableDataset.from_generator()` in `to_iterable_dataset()` indeed. Setting this as a good first issue if someone would like to contribute, otherwise we can take care of it :)
[ -1.2462466955184937, -1.0350251197814941, -0.749411404132843, 1.6629140377044678, -0.19097687304019928, -1.1181706190109253, 0.13851626217365265, -1.0018445253372192, 1.6432448625564575, -0.7175230383872986, 0.27209797501564026, -1.637208104133606, 0.03228255361318588, -0.643389880657196, -0.7232021689414978, -0.8895464539527893, -0.3759387135505676, -0.7140499949455261, 1.097899317741394, 2.486389398574829, 1.1535786390304565, -1.3553022146224976, 2.7089154720306396, 0.6986129879951477, -0.062484562397003174, -1.0838701725006104, 0.5270276069641113, -0.038540638983249664, -1.1930047273635864, -0.5409049987792969, -0.9067391157150269, -0.16276000440120697, -0.5780678987503052, -0.5330547094345093, 0.015509977005422115, 0.5217469334602356, -0.2552269995212555, -0.5357692837715149, -0.48999908566474915, -0.7688040733337402, 0.5120555758476257, -0.42606180906295776, 0.894987940788269, -0.2876441478729248, 1.8465237617492676, -0.4467985928058624, 0.4202454388141632, 0.616334080696106, 1.3542485237121582, 0.21568980813026428, -0.0038766413927078247, 0.44322308897972107, 0.3929532766342163, 0.010580278001725674, 0.5000055432319641, 1.1081527471542358, 0.6888911128044128, 0.4250296652317047, 0.7691757082939148, -2.2948527336120605, 1.2351750135421753, -1.1426690816879272, 0.4039081931114197, 1.3622273206710815, -0.901616632938385, 0.4443110525608063, -1.7129249572753906, -0.05413012206554413, 0.632926881313324, -2.168084144592285, 0.334715336561203, -1.2550280094146729, -0.4235667586326599, 1.0453778505325317, 0.43277451395988464, -1.2197625637054443, 0.07732413709163666, -0.37763676047325134, 1.0286673307418823, 0.4594106674194336, 1.0690550804138184, -1.7426155805587769, 0.05388849601149559, -0.3178788721561432, 0.08720530569553375, -1.275407314300537, -1.5044220685958862, 0.46497872471809387, 0.5923516750335693, 0.637589156627655, -0.125445157289505, 1.0911860466003418, -1.0383282899856567, 0.6322707533836365, -1.0420708656311035, -1.725080966949463, -1.3720111846923828, -2.357316493988037, -2.315587043762207, 0.7026939392089844, -0.39017239212989807, -0.5650414228439331, 2.0183253288269043, -0.9617063999176025, -1.779402494430542, 1.2794491052627563, 0.3176732361316681, -0.009604401886463165, 2.401007890701294, 0.17716547846794128, -0.6775522232055664, 0.5083999633789062, -0.7636682987213135, 0.7533778548240662, -0.4120149314403534, 1.4181735515594482, 0.45718812942504883, -0.9850668907165527, 1.5681134462356567, -0.41989824175834656, 0.583229660987854, -0.6511519551277161, -0.45695960521698, -0.8973972797393799, 0.38162094354629517, 1.9303780794143677, -0.19546976685523987, 1.5158294439315796, -0.3373606204986572, -1.5932976007461548, -1.5885289907455444, 0.9706659317016602, 0.3283790349960327, -0.7736504673957825, 0.15706951916217804, -0.4002419114112854, 0.18453417718410492, -0.05722895264625549, 1.156251311302185, 1.1915830373764038, 0.5684561729431152, -0.3614581823348999, -0.9232394695281982, 0.23126402497291565, -0.11462943255901337, -0.6553087830543518, -1.7263559103012085, -0.3417390286922455, 0.10128894448280334, 0.6743789315223694, -1.2256793975830078, 1.589883804321289, 0.8862711787223816, 1.8524290323257446, 1.0963070392608643, -0.37258410453796387, 1.4924508333206177, 0.08294191211462021, 1.839141845703125, -0.540520429611206, 0.6591062545776367, -0.3161070644855499, -1.1754673719406128, 0.7934620380401611, -0.3072100579738617, -2.0635457038879395, -0.8553469777107239, -0.8428165316581726, -0.21409986913204193, -0.7551905512809753, 0.9202595353126526, -0.4287576377391815, -1.4920144081115723, 0.2277873456478119, -0.8489171266555786, 0.23943667113780975, -1.1845945119857788, 0.3939970135688782, 0.7173442840576172, -0.6828153133392334, 0.06843578070402145, -0.2579430937767029, -1.2711474895477295, -0.43110334873199463, 0.3877098560333252, 1.9224961996078491, -0.80593341588974, 0.7908546924591064, 1.06704580783844, -0.6940510869026184, 0.036469969898462296, 0.22785665094852448, -0.17511996626853943, 0.8434485197067261, -1.0990043878555298, -0.5885646343231201, 1.294797658920288, -0.2149415910243988, -0.7214764952659607, 1.4554080963134766, 0.7350063323974609, -1.0507500171661377, -0.17818701267242432, -0.17752087116241455, -0.8389115333557129, 0.02691444754600525, -1.608648419380188, -0.07396160066127777, 0.542151153087616, -1.6055679321289062, -0.49755918979644775, -0.2498013973236084, 1.2773202657699585, -0.05459567904472351, 1.417256474494934, -0.35752972960472107, -0.15995721518993378, -0.27140194177627563, -0.38968178629875183, 0.22543638944625854, -0.23721064627170563, -0.669579029083252, 0.08173246681690216, -0.8023582100868225, 0.46194157004356384, 1.412171721458435, 0.328341007232666, 0.09626924246549606, 0.6287919878959656, 1.1460546255111694, 0.40850386023521423, -0.036858994513750076, -0.7837938070297241, -1.6223061084747314, 1.9928991794586182, -1.4731532335281372, 1.9695724248886108, 0.612667977809906, -0.0878818929195404, -1.701366901397705, -1.7812591791152954, 1.4324647188186646, 1.1639859676361084, 2.273665428161621, 0.6241570711135864, 0.41870632767677307, -0.8969396352767944, -0.6845676302909851, 0.1170564815402031, -0.9121204614639282, -0.8069957494735718, 0.19628651440143585, 2.4458744525909424, 1.8360497951507568, -0.42758721113204956, -0.19559761881828308, -1.030738353729248, 1.4665809869766235, -0.2942160665988922, 0.21360571682453156, 2.029008626937866, -0.13208064436912537, -1.092523455619812, 1.3288400173187256, -2.428389072418213, 0.16072341799736023, 1.964619755744934, 0.31762397289276123, 0.13452059030532837, -1.4096968173980713, -0.7161551713943481, -0.2930806875228882, -0.42023342847824097, -1.288760781288147, 0.4920405149459839, -0.28497549891471863, -0.6862733364105225, -1.3771235942840576, 0.22486694157123566, -1.1052520275115967, -1.5867936611175537, 0.1851377785205841, 1.8869798183441162, 2.064617156982422, -0.7089875340461731, 1.621903896331787, -0.14480999112129211, 0.33150139451026917, 1.2900631427764893, 1.1836769580841064, 3.0153377056121826, 1.9399522542953491, -1.2426164150238037, 0.5891331434249878, -0.14985641837120056, -0.5541132688522339, 1.2488044500350952, -1.2613595724105835, 1.2818937301635742, -0.15616270899772644, -1.2872483730316162, -1.1975789070129395, 0.9050660729408264, 0.5983920097351074, -0.004840970039367676, -0.5149922966957092, 1.170964002609253, -0.11254771053791046, 1.2892593145370483, 0.6454098224639893, -0.411899596452713, 0.5550455451011658, -0.48998403549194336, -0.5433849692344666, 1.5011582374572754, 0.12401644140481949, -1.4771260023117065, -2.1473398208618164, -0.15264104306697845, -0.8125323057174683, -0.04750023037195206, -0.6095616221427917, -1.008004903793335, 1.548472285270691, 0.28717297315597534, -1.196374773979187, -0.2448415458202362, -0.3014124929904938, -0.5865763425827026, 2.783148765563965, -1.3176075220108032, -0.37290799617767334, -1.0298093557357788, -0.7201406955718994, 1.621067762374878, -1.1543978452682495, -0.21564021706581116, -1.0546772480010986, -0.6718496084213257, -1.3400472402572632, -0.5499708652496338, 0.03333086520433426, -0.9071585536003113, 0.8946959376335144, 0.3100703954696655, -1.187501072883606, -0.30469849705696106, -0.9074749946594238, 0.914951741695404, -0.14794965088367462, 0.21112310886383057, 1.7909380197525024, 0.42693349719047546, -0.3497692942619324, 0.8029143214225769, 1.1846542358398438, 0.6744405031204224, -0.6671690344810486, 0.22786034643650055, -0.6980288624763489, 0.25271669030189514, -1.2972313165664673, 0.2988768517971039, -2.8645551204681396, 0.5636962652206421, -0.00392152089625597, -0.07159561663866043, 0.012836501933634281, -1.267059326171875, 1.0638586282730103, 2.56809401512146, -1.29433012008667, 0.5683638453483582, 0.3469497859477997, 1.2358574867248535, -1.677008032798767, 0.3213998079299927, -0.4509963393211365, 2.0775601863861084, 0.2474968433380127, 1.258676290512085, -0.4451732337474823, -2.295503854751587, 0.5894187092781067, -1.3561701774597168, -1.2135142087936401, 0.635187566280365, -0.9703176021575928, 0.19274009764194489, -1.4908779859542847, -0.2511613965034485, -0.8311538696289062, -1.275368332862854, 0.787139892578125, 0.2322375774383545, 0.3036154508590698, -0.44924232363700867, 0.4009345471858978, -2.2635769844055176, -1.4012004137039185, -0.24993979930877686, -0.9406144022941589, 0.4648756682872772, -0.42627495527267456, 0.7051293849945068, -0.19314494729042053, -0.049748387187719345, 0.38807591795921326, 1.4346579313278198, 3.37800931930542, 0.2935975193977356, 0.43180832266807556, -0.16578133404254913, -0.9511185884475708, 1.480073094367981, 0.9102023839950562, -0.22146722674369812, -0.450334370136261, -1.1000598669052124, 1.3636482954025269, 1.8825876712799072, 1.0407299995422363, 0.01772305741906166, -0.7351237535476685, -0.6579183340072632, -0.022552451118826866, 0.23678824305534363, 0.4193790555000305, 0.7891404032707214, 0.00017532799392938614, 0.032552462071180344, 1.4330315589904785, 1.0981104373931885, -0.42129841446876526, 0.34176337718963623, -0.7417538166046143, -0.44584256410598755, 0.6212244629859924, 0.17316129803657532, -0.04430096969008446, 0.3454981744289398, -1.0093951225280762, -0.20750126242637634, -0.37707003951072693, -0.8690080046653748, -0.6867791414260864, -0.4023521840572357, -0.3565733730792999, 1.577576756477356, 0.15370483696460724, -0.6009201407432556, -0.1606833040714264, -0.7670953273773193, -0.13312244415283203, -1.0735538005828857, 0.20360183715820312, -0.10642595589160919, -0.22018331289291382, -0.1889277845621109, 1.7502586841583252, -0.9675793051719666, -2.2044899463653564, 0.1421491503715515, 0.2777310907840729, -0.15024201571941376, 0.2759420573711395, 1.6208852529525757, 0.46574151515960693, 1.373256802558899, 1.3078452348709106, 1.0288397073745728, -0.6559842824935913, -1.3905839920043945, 0.6846203804016113, 1.0772947072982788, -1.3522781133651733, 0.7593008875846863, -0.03211012855172157, -0.5225049257278442, 0.6281745433807373, 1.2718708515167236, 0.47180092334747314, -1.9025224447250366, 0.7641938328742981, -1.0273624658584595, 0.8605285286903381, 0.7008094787597656, 0.685523509979248, 0.22286377847194672, 0.8160179853439331, -1.2964714765548706, -1.1268861293792725, -0.7285692691802979, -0.7179158329963684, 2.0493152141571045, -0.2522859275341034, 0.605358362197876, -0.13350620865821838, -1.3748905658721924, 0.06301695853471756, 0.7067424654960632, 0.4034777283668518, -0.5552321076393127, 0.8353050947189331, -0.7059503197669983, -1.1527844667434692, -1.331424593925476, -0.42174041271209717, -1.0499002933502197, -0.9284418225288391, 1.0743662118911743, 0.7290134429931641, 0.1338743269443512, 1.7387157678604126, 0.7111941576004028, 0.27187052369117737, -2.604030132293701, 0.858237087726593, 0.2514825463294983, -0.06646728515625, 0.6570658683776855, 0.4303601086139679, 1.0269534587860107, 0.07012860476970673, 0.564190149307251, -2.3772969245910645, 2.2777864933013916, -0.21293450891971588, 0.7212197780609131, -0.09151666611433029, -0.11067860573530197, 1.0560569763183594, 0.6233212947845459, 0.5755020976066589, -0.9414209127426147, 0.6256399750709534, -0.5770392417907715, 1.2852736711502075, 0.9779230356216431, -0.8872765302658081, -0.07505939900875092, 1.410569667816162, 0.38105618953704834, -0.60072922706604, -1.0330333709716797, -0.841356635093689, 0.9890361428260803, 1.6691192388534546, -0.06594197452068329, -0.023620866239070892, 0.9162099957466125, 0.5876089930534363, -1.25020432472229, 0.11154036223888397, -0.6530361771583557, -0.6792661547660828, 1.7057545185089111, 2.0863454341888428, -0.2924412786960602, -0.20564579963684082, -0.6914681792259216, -1.2140454053878784, 0.7565170526504517, -0.0545644611120224, 0.06859137862920761, 0.6695192456245422, -0.6480542421340942, 0.9410938024520874, 0.9880762696266174, 0.8933428525924683, 0.1786094754934311, 0.19952529668807983, 0.3909129202365875, -0.4021308720111847, -1.1642231941223145, -0.20612271130084991, -1.1673434972763062, -2.556927442550659, 0.3098457455635071, -0.18238922953605652, -1.3402096033096313, 0.12424235790967941, -1.0035059452056885, 1.1463141441345215, -0.529246985912323, -1.102684736251831, -1.453889012336731, 0.15932166576385498, -0.023528113961219788, 0.8994013071060181, -1.653399109840393, -0.1280190795660019, 1.1974343061447144, 0.9251337647438049, -0.7240955829620361, 0.9659197926521301, 0.21720875799655914, 1.0569639205932617, 0.8006239533424377, -0.3262929916381836, 0.5566487312316895, 0.020760133862495422, -1.328418254852295, 0.5948834419250488, 1.1093478202819824, 0.15862876176834106, 1.4462825059890747, -0.564289927482605, -0.1414751261472702, 0.33592844009399414, -0.6127756834030151, -0.3766539692878723, -0.5206125974655151, 0.5902596712112427, 0.05716690793633461, -0.7778348922729492, 0.02730656787753105, -0.02066870592534542, -0.21337834000587463, 0.13209545612335205, -1.5757580995559692, -0.15703636407852173, -0.38071098923683167, -0.6025344729423523, -1.147499918937683, -0.1810874193906784, 1.33254873752594, -0.7865784764289856, -0.3345024883747101, 0.5223056077957153, 0.3773864805698395, 0.5539812445640564, 0.5457563996315002, -0.6747076511383057, -0.21177993714809418, -0.21111330389976501, -0.29198238253593445, 0.22293081879615784, 1.4565317630767822, -0.11568255722522736, -1.012317419052124, 0.791580855846405, -0.3200252056121826, 0.08521733433008194, 1.773322343826294, 0.033410459756851196, -0.8346863389015198, 0.2156391143798828, -0.8293195962905884, 1.9377381801605225, 1.664340853691101, 1.371225118637085, -0.2464243471622467, -0.8615117073059082, 0.6129724383354187, -0.4318949580192566, -0.44093772768974304, 0.8113000988960266, 0.47882410883903503, -0.17739050090312958, -1.3924921751022339, 0.8090950846672058, 1.2292039394378662, -0.7584541440010071, -0.8529056906700134, 0.2216213196516037, -0.7658689618110657, 1.1975674629211426, 0.6466761827468872, 0.39918720722198486, 0.22511447966098785, 1.6870111227035522, 0.7618769407272339, -0.44926202297210693, 0.6012924909591675, 0.5638024210929871, -0.1929352879524231, -2.112440824508667, -1.187869668006897, 0.2953285872936249, -0.5427241921424866, -1.613670825958252, 1.2963792085647583, -1.1061049699783325, -0.8443628549575806, 0.6191410422325134, 0.11308909207582474, 1.4524654150009155, 0.39387258887290955, 1.4474440813064575, 2.02870512008667, 0.7782478928565979, 0.4900895953178406, 1.2150381803512573, -0.13001933693885803, -0.34220385551452637, 1.7095441818237305, -0.3483853042125702, 0.5563287734985352, 1.1151983737945557, -0.24237073957920074, -1.1061664819717407, -0.6723260879516602, -1.4035564661026, -0.6537600159645081, 1.049560308456421, 0.07788348942995071, -1.058524489402771, 0.23171983659267426, 1.6003503799438477, 0.05832609161734581, -0.3747207820415497, 0.6875916123390198, 0.31332290172576904, -0.8388522863388062, -0.05951278284192085, -0.9218811392784119, 0.4355144798755646, -0.24291019141674042, -0.26763761043548584, 0.3747400641441345, 0.4323369860649109, 1.3681964874267578, 0.08688369393348694, 0.16449081897735596, 1.1505557298660278, -1.3122721910476685, 1.4926866292953491, -0.7031484842300415, 0.28183430433273315, -2.3551924228668213, 1.3723204135894775, -0.7058298587799072, 1.9017250537872314, -2.6598520278930664, 0.4919528365135193, -0.6753413081169128, -0.5078624486923218, 0.3089250922203064, -0.3628619313240051, 0.07128235697746277, -0.14692749083042145, -1.1450473070144653, 0.04020184651017189, -0.5969482660293579, 0.5459846258163452, 1.2536909580230713, 1.3348060846328735, -1.0930289030075073, -0.24524015188217163, -1.7834858894348145, -0.15486550331115723, -0.7723764777183533, 0.3649146258831024, -1.9893251657485962, -0.2546127736568451, -1.820098876953125, -2.329312801361084, -1.1725131273269653, -0.7862116098403931, 1.2658747434616089, 0.13274028897285461, -0.8978405594825745, 1.3650540113449097, -0.3936024606227875, -1.8045992851257324, 1.027880311012268, -2.1866095066070557 ]
https://github.com/huggingface/datasets/issues/5568
dataset.to_iterable_dataset() loses useful info like dataset features
seems like the feature parameter is missing from `return IterableDataset.from_generator(Dataset._iter_shards, gen_kwargs={"shards": shards})` hence it defaults to None.
### Describe the bug Hello, I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing. When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata like the features. These metadata are useful if you want to interleave iterable datasets, cast columns etc. ### Steps to reproduce the bug ```python dataset = load_dataset("lhoestq/demo1")["train"] print(dataset.features) # {'id': Value(dtype='string', id=None), 'package_name': Value(dtype='string', id=None), 'review': Value(dtype='string', id=None), 'date': Value(dtype='string', id=None), 'star': Value(dtype='int64', id=None), 'version_id': Value(dtype='int64', id=None)} dataset = dataset.to_iterable_dataset() print(dataset.features) # None ``` ### Expected behavior Keep the relevant information ### Environment info datasets==2.10.0
289
17
dataset.to_iterable_dataset() loses useful info like dataset features ### Describe the bug Hello, I like the new `to_iterable_dataset` feature but I noticed something that seems to be missing. When using `to_iterable_dataset` to transform your map style dataset into iterable dataset, you lose valuable metadata like the features. These metadata are useful if you want to interleave iterable datasets, cast columns etc. ### Steps to reproduce the bug ```python dataset = load_dataset("lhoestq/demo1")["train"] print(dataset.features) # {'id': Value(dtype='string', id=None), 'package_name': Value(dtype='string', id=None), 'review': Value(dtype='string', id=None), 'date': Value(dtype='string', id=None), 'star': Value(dtype='int64', id=None), 'version_id': Value(dtype='int64', id=None)} dataset = dataset.to_iterable_dataset() print(dataset.features) # None ``` ### Expected behavior Keep the relevant information ### Environment info datasets==2.10.0 seems like the feature parameter is missing from `return IterableDataset.from_generator(Dataset._iter_shards, gen_kwargs={"shards": shards})` hence it defaults to None.
[ -1.2547454833984375, -1.0431885719299316, -0.7598384022712708, 1.689414143562317, -0.21614834666252136, -1.1073180437088013, 0.13116535544395447, -1.0087391138076782, 1.6181259155273438, -0.7153283357620239, 0.2624534070491791, -1.636167049407959, 0.005314767360687256, -0.6305069923400879, -0.6839694380760193, -0.8960639834403992, -0.38017532229423523, -0.7175443768501282, 1.1175682544708252, 2.463799238204956, 1.1538360118865967, -1.3193804025650024, 2.693249225616455, 0.7289605140686035, -0.08802154660224915, -1.0815410614013672, 0.5425774455070496, -0.0022385320626199245, -1.1868469715118408, -0.5220039486885071, -0.909405529499054, -0.14486096799373627, -0.5619897246360779, -0.4958481788635254, -0.008857162669301033, 0.4961318075656891, -0.27346891164779663, -0.5323126316070557, -0.5420984625816345, -0.7941285371780396, 0.480316698551178, -0.4244277775287628, 0.8945576548576355, -0.30266669392585754, 1.8621315956115723, -0.414076030254364, 0.4185549318790436, 0.6039475202560425, 1.3531137704849243, 0.213814377784729, 0.048131298273801804, 0.43318885564804077, 0.3905981183052063, 0.005383632145822048, 0.5128092169761658, 1.0848442316055298, 0.682910680770874, 0.41720855236053467, 0.7485105395317078, -2.3127951622009277, 1.2460006475448608, -1.1537526845932007, 0.4089546203613281, 1.3832114934921265, -0.8981871008872986, 0.47105124592781067, -1.7113733291625977, -0.027874380350112915, 0.6452158689498901, -2.1665539741516113, 0.3039977550506592, -1.2273873090744019, -0.41909313201904297, 1.0224308967590332, 0.43554383516311646, -1.202654480934143, 0.07487042993307114, -0.386874258518219, 1.0291529893875122, 0.4576612710952759, 1.0411721467971802, -1.7292749881744385, 0.0383075475692749, -0.28405025601387024, 0.0696495994925499, -1.3128204345703125, -1.5080432891845703, 0.48359885811805725, 0.5859001278877258, 0.6455888748168945, -0.1167462021112442, 1.107684850692749, -1.0405890941619873, 0.6414704322814941, -1.029908537864685, -1.703944444656372, -1.3896207809448242, -2.382101535797119, -2.312925100326538, 0.7090445756912231, -0.40827852487564087, -0.5765588879585266, 2.0225675106048584, -0.9678462147712708, -1.7727720737457275, 1.2706618309020996, 0.3216835856437683, 0.02498888224363327, 2.4381332397460938, 0.15824291110038757, -0.669350266456604, 0.4861895740032196, -0.7506049275398254, 0.7437044978141785, -0.38984251022338867, 1.4281517267227173, 0.44968679547309875, -0.9970600008964539, 1.5672287940979004, -0.3883768320083618, 0.5671544671058655, -0.6436235904693604, -0.4690382778644562, -0.8961742520332336, 0.38033998012542725, 1.9103204011917114, -0.21661460399627686, 1.5158815383911133, -0.3182331323623657, -1.5553957223892212, -1.61233389377594, 0.9567628502845764, 0.3269863724708557, -0.7867901921272278, 0.16398602724075317, -0.4073631167411804, 0.16951826214790344, -0.08866891264915466, 1.173285722732544, 1.192177176475525, 0.5800014734268188, -0.3592507839202881, -0.9116643071174622, 0.238341823220253, -0.11686304211616516, -0.6741530895233154, -1.7240819931030273, -0.3395957946777344, 0.08453042805194855, 0.673488199710846, -1.2497506141662598, 1.5863219499588013, 0.8793184161186218, 1.8687721490859985, 1.0994547605514526, -0.39234885573387146, 1.4849920272827148, 0.06360053271055222, 1.832403540611267, -0.562347948551178, 0.6754124164581299, -0.3457634150981903, -1.180943250656128, 0.79823899269104, -0.32134267687797546, -2.071361780166626, -0.9057702422142029, -0.8460114598274231, -0.2112521529197693, -0.7710165977478027, 0.9121274948120117, -0.4285915493965149, -1.4824854135513306, 0.21079330146312714, -0.8149979114532471, 0.24935489892959595, -1.1668164730072021, 0.38574546575546265, 0.7274448275566101, -0.6602222919464111, 0.048395052552223206, -0.23634639382362366, -1.266383171081543, -0.4249446988105774, 0.3842177987098694, 1.936200499534607, -0.8031631708145142, 0.782241702079773, 1.069179892539978, -0.715646505355835, 0.0723426565527916, 0.19208745658397675, -0.20594307780265808, 0.824587345123291, -1.0768970251083374, -0.6133745312690735, 1.3072092533111572, -0.22662514448165894, -0.7182289958000183, 1.4502060413360596, 0.7423560619354248, -1.050958514213562, -0.21528378129005432, -0.16917847096920013, -0.803083062171936, 0.04797203466296196, -1.590987205505371, -0.07723898440599442, 0.5147402882575989, -1.5955548286437988, -0.4903910756111145, -0.24692517518997192, 1.3029917478561401, -0.05712009593844414, 1.4208546876907349, -0.34046033024787903, -0.1603194624185562, -0.2673865854740143, -0.39437055587768555, 0.24105170369148254, -0.24980780482292175, -0.6329789161682129, 0.099971242249012, -0.8057820796966553, 0.4434669315814972, 1.4017671346664429, 0.35278594493865967, 0.08277279138565063, 0.6485812664031982, 1.1281094551086426, 0.43938159942626953, -0.01684246025979519, -0.7881079912185669, -1.5931663513183594, 1.9627761840820312, -1.4599635601043701, 1.9789824485778809, 0.6026023626327515, -0.1071506068110466, -1.6651970148086548, -1.8113243579864502, 1.424421787261963, 1.1900848150253296, 2.255065441131592, 0.6477949023246765, 0.4302939772605896, -0.9226015210151672, -0.7117339968681335, 0.13284018635749817, -0.9107728600502014, -0.7821711897850037, 0.16660001873970032, 2.438382863998413, 1.8400769233703613, -0.4267807900905609, -0.17911233007907867, -1.004729151725769, 1.4603813886642456, -0.29550400376319885, 0.23337247967720032, 2.0402705669403076, -0.1571846902370453, -1.0917561054229736, 1.3262158632278442, -2.4475767612457275, 0.1679319590330124, 1.9641603231430054, 0.340054988861084, 0.1168079599738121, -1.4077792167663574, -0.7363913059234619, -0.29771843552589417, -0.4082719087600708, -1.2790621519088745, 0.492586225271225, -0.28427526354789734, -0.6843255758285522, -1.408268690109253, 0.21458129584789276, -1.0958665609359741, -1.5840831995010376, 0.19289517402648926, 1.8965662717819214, 2.0600225925445557, -0.712714433670044, 1.5894742012023926, -0.14972200989723206, 0.30638638138771057, 1.2755153179168701, 1.2375131845474243, 3.002711296081543, 1.9291635751724243, -1.2602887153625488, 0.6103859543800354, -0.12663744390010834, -0.5306968688964844, 1.2413347959518433, -1.2663906812667847, 1.286392331123352, -0.13305126130580902, -1.2844969034194946, -1.2272958755493164, 0.9025353789329529, 0.5893735885620117, -0.031065020710229874, -0.5162227153778076, 1.1787067651748657, -0.1028892770409584, 1.3204917907714844, 0.6437085866928101, -0.43170031905174255, 0.5381109714508057, -0.4940292537212372, -0.5440056324005127, 1.5202112197875977, 0.11102414131164551, -1.4705908298492432, -2.1649160385131836, -0.18421559035778046, -0.8189409971237183, -0.055589135736227036, -0.6057894825935364, -1.0287714004516602, 1.5793461799621582, 0.31418466567993164, -1.165076732635498, -0.25954297184944153, -0.3084701895713806, -0.5825031399726868, 2.77278470993042, -1.3098454475402832, -0.35619717836380005, -1.0207901000976562, -0.6991801857948303, 1.6287708282470703, -1.1274442672729492, -0.21121615171432495, -1.0840263366699219, -0.6764640808105469, -1.3421968221664429, -0.5341024398803711, 0.04030200466513634, -0.9231156706809998, 0.886465311050415, 0.32415875792503357, -1.178748369216919, -0.3197178840637207, -0.8934928178787231, 0.9549417495727539, -0.13112053275108337, 0.1952332854270935, 1.7965333461761475, 0.43900322914123535, -0.3620752692222595, 0.8238536715507507, 1.2032890319824219, 0.7141839861869812, -0.6909770965576172, 0.21900637447834015, -0.6898399591445923, 0.25892701745033264, -1.316498875617981, 0.2701406180858612, -2.8982553482055664, 0.5545042157173157, -0.014985335990786552, -0.09871005266904831, 0.030307341367006302, -1.2641043663024902, 1.0723479986190796, 2.5551929473876953, -1.291595697402954, 0.5523958802223206, 0.3547094464302063, 1.2278627157211304, -1.7035073041915894, 0.31371110677719116, -0.4597266912460327, 2.068103790283203, 0.23163484036922455, 1.2629817724227905, -0.44964444637298584, -2.305981397628784, 0.625237226486206, -1.3802566528320312, -1.2146552801132202, 0.6336084604263306, -1.0138572454452515, 0.21109244227409363, -1.5178148746490479, -0.2578865885734558, -0.8212741017341614, -1.2680439949035645, 0.7657907009124756, 0.21334397792816162, 0.27811434864997864, -0.4191318154335022, 0.4206025004386902, -2.2756083011627197, -1.3961609601974487, -0.23136647045612335, -0.9719793200492859, 0.47249528765678406, -0.453590452671051, 0.7275150418281555, -0.16541846096515656, -0.039359916001558304, 0.41785475611686707, 1.4513514041900635, 3.3446195125579834, 0.2774834632873535, 0.4078250527381897, -0.14677539467811584, -0.9710338115692139, 1.5067126750946045, 0.9045097231864929, -0.2022932469844818, -0.43288829922676086, -1.1146693229675293, 1.3571683168411255, 1.897735595703125, 1.0631179809570312, -0.002540990710258484, -0.7337459921836853, -0.6422150731086731, -0.034254834055900574, 0.26372283697128296, 0.43741685152053833, 0.7861868739128113, -0.02595774084329605, 0.044045187532901764, 1.4334731101989746, 1.1116162538528442, -0.4205871522426605, 0.3158399164676666, -0.7567839622497559, -0.4744875133037567, 0.6383067965507507, 0.14903338253498077, -0.06662572175264359, 0.36200177669525146, -1.0313290357589722, -0.2297867238521576, -0.3829335868358612, -0.8440676927566528, -0.650067925453186, -0.41919204592704773, -0.3683616518974304, 1.567469596862793, 0.16686154901981354, -0.613091230392456, -0.14641280472278595, -0.7627368569374084, -0.138272225856781, -1.0814757347106934, 0.18819525837898254, -0.11294044554233551, -0.22559230029582977, -0.2100207656621933, 1.7523263692855835, -0.9794325232505798, -2.186447858810425, 0.11806296557188034, 0.30950987339019775, -0.15015815198421478, 0.2872451841831207, 1.627182960510254, 0.4613526463508606, 1.3900926113128662, 1.3024331331253052, 1.0424695014953613, -0.6510055661201477, -1.3977036476135254, 0.6870844960212708, 1.080156683921814, -1.3207334280014038, 0.7689276933670044, -0.0534561425447464, -0.5159682631492615, 0.5940789580345154, 1.310114860534668, 0.4800325632095337, -1.8830218315124512, 0.7954468727111816, -1.0385369062423706, 0.8832281231880188, 0.7177612781524658, 0.6884142756462097, 0.2069413959980011, 0.7983106374740601, -1.2892237901687622, -1.1217974424362183, -0.7387644052505493, -0.6962968111038208, 2.0365922451019287, -0.272603303194046, 0.6311191916465759, -0.13076616823673248, -1.3419638872146606, 0.07342468947172165, 0.7094954252243042, 0.37303128838539124, -0.5438482165336609, 0.869835615158081, -0.6863653659820557, -1.1504700183868408, -1.3220051527023315, -0.4069839417934418, -1.0751241445541382, -0.9526427388191223, 1.1259371042251587, 0.7321091890335083, 0.12585605680942535, 1.7326924800872803, 0.684329628944397, 0.27121949195861816, -2.610805034637451, 0.8773611783981323, 0.22835040092468262, -0.05957856774330139, 0.6572201251983643, 0.3987506628036499, 1.0396422147750854, 0.06818844377994537, 0.5527925491333008, -2.3455491065979004, 2.2799718379974365, -0.164940744638443, 0.7177914977073669, -0.0774003267288208, -0.09691999107599258, 1.051637053489685, 0.6241109371185303, 0.5701857805252075, -0.9385892152786255, 0.6004941463470459, -0.5382176637649536, 1.280590534210205, 0.9778449535369873, -0.8691216707229614, -0.0653156116604805, 1.4036797285079956, 0.43317484855651855, -0.5902531147003174, -1.0186046361923218, -0.8402461409568787, 0.9764295220375061, 1.6567964553833008, -0.06947191804647446, -0.02681756764650345, 0.9017521739006042, 0.5786912441253662, -1.2422596216201782, 0.10348530113697052, -0.648893415927887, -0.6530364751815796, 1.6993087530136108, 2.0817105770111084, -0.29897043108940125, -0.2106378823518753, -0.6912486553192139, -1.2042663097381592, 0.7356446385383606, -0.09279880672693253, 0.06773508340120316, 0.6736627221107483, -0.6356406211853027, 0.9275953769683838, 0.9404512643814087, 0.878868818283081, 0.17298129200935364, 0.20595885813236237, 0.4140397608280182, -0.41475048661231995, -1.1494619846343994, -0.18533074855804443, -1.1719757318496704, -2.591709852218628, 0.33159661293029785, -0.20878885686397552, -1.3198636770248413, 0.0876259133219719, -1.0160319805145264, 1.1673489809036255, -0.5424684286117554, -1.105458378791809, -1.4435361623764038, 0.14831401407718658, -0.035253580659627914, 0.877711296081543, -1.6797363758087158, -0.1183037981390953, 1.2117867469787598, 0.9081870317459106, -0.7352858185768127, 0.9812988638877869, 0.23095549643039703, 1.0811389684677124, 0.7513104677200317, -0.30315983295440674, 0.5660015344619751, 0.003055846318602562, -1.3431987762451172, 0.599812924861908, 1.0992610454559326, 0.1685999035835266, 1.4846588373184204, -0.5513201951980591, -0.12724873423576355, 0.33798062801361084, -0.5943690538406372, -0.39703142642974854, -0.4905775189399719, 0.5937149524688721, 0.07137158513069153, -0.7879483103752136, 0.006347746588289738, -0.05212802067399025, -0.2527238130569458, 0.10020065307617188, -1.5346482992172241, -0.16458946466445923, -0.39394664764404297, -0.5829707384109497, -1.1536401510238647, -0.1752759963274002, 1.3443105220794678, -0.7829211354255676, -0.3245396316051483, 0.5179242491722107, 0.33674612641334534, 0.5442342758178711, 0.5850738883018494, -0.6802737712860107, -0.20046323537826538, -0.20240698754787445, -0.27625417709350586, 0.2228056937456131, 1.4495539665222168, -0.13898970186710358, -1.012739658355713, 0.785095751285553, -0.2974621057510376, 0.0759548470377922, 1.7677035331726074, 0.037984564900398254, -0.829979658126831, 0.23147429525852203, -0.8201462030410767, 1.9338198900222778, 1.6334280967712402, 1.3872004747390747, -0.26361894607543945, -0.8541542887687683, 0.5975412130355835, -0.43088552355766296, -0.42051470279693604, 0.7894887924194336, 0.47572654485702515, -0.16733427345752716, -1.4206959009170532, 0.824787974357605, 1.2371095418930054, -0.7979335784912109, -0.8169932961463928, 0.2433067262172699, -0.7725579738616943, 1.178154706954956, 0.6032013297080994, 0.370713472366333, 0.23556062579154968, 1.693971037864685, 0.7482828497886658, -0.46254152059555054, 0.5944115519523621, 0.5566826462745667, -0.21786633133888245, -2.094709634780884, -1.1785808801651, 0.30743643641471863, -0.551903247833252, -1.6058961153030396, 1.2874977588653564, -1.0942922830581665, -0.8385431170463562, 0.6253004670143127, 0.11484287679195404, 1.4478262662887573, 0.39641863107681274, 1.4768444299697876, 2.034554958343506, 0.7641310095787048, 0.47025254368782043, 1.2384278774261475, -0.12405811250209808, -0.34379369020462036, 1.7115877866744995, -0.33854547142982483, 0.5318401455879211, 1.111449122428894, -0.24440979957580566, -1.1061069965362549, -0.6726499199867249, -1.388695478439331, -0.6366786360740662, 1.0525708198547363, 0.10838980227708817, -1.0597257614135742, 0.20490066707134247, 1.5808871984481812, 0.07973159849643707, -0.3938264548778534, 0.6919342875480652, 0.33428138494491577, -0.8494940400123596, -0.052796293050050735, -0.9212847352027893, 0.450117826461792, -0.2591950297355652, -0.24482208490371704, 0.34706681966781616, 0.452160507440567, 1.394653558731079, 0.07791775465011597, 0.19458507001399994, 1.1102912425994873, -1.2936357259750366, 1.4927023649215698, -0.7128998041152954, 0.3049463927745819, -2.3411102294921875, 1.355894923210144, -0.7137246131896973, 1.9160267114639282, -2.6500961780548096, 0.5095840096473694, -0.6797183752059937, -0.4771861433982849, 0.3041708767414093, -0.38269203901290894, 0.060174018144607544, -0.1242789551615715, -1.1690367460250854, 0.06749935448169708, -0.6040829420089722, 0.5450121164321899, 1.2526975870132446, 1.3055707216262817, -1.1212109327316284, -0.27371135354042053, -1.7911885976791382, -0.15931124985218048, -0.7703678011894226, 0.3893275856971741, -1.9847429990768433, -0.30071699619293213, -1.8176368474960327, -2.338449478149414, -1.1414666175842285, -0.7663743495941162, 1.2668702602386475, 0.1177370473742485, -0.9098519682884216, 1.366141438484192, -0.38962072134017944, -1.785078763961792, 1.023774266242981, -2.179943799972534 ]
https://github.com/huggingface/datasets/issues/5555
`.shuffle` throwing error `ValueError: Protocol not known: parent`
Hi ! The indices mapping is written in the same cachedirectory as your dataset. Can you run this to show your current cache directory ? ```python print(train_dataset.cache_files) ```
### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4
291
28
`.shuffle` throwing error `ValueError: Protocol not known: parent` ### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4 Hi ! The indices mapping is written in the same cachedirectory as your dataset. Can you run this to show your current cache directory ? ```python print(train_dataset.cache_files) ```
[ -1.1844799518585205, -0.8249237537384033, -0.5923757553100586, 1.3262419700622559, -0.041086725890636444, -1.4175077676773071, 0.15833747386932373, -0.9759659767150879, 1.5685051679611206, -0.851817786693573, 0.36299389600753784, -1.6840460300445557, 0.07002703845500946, -0.6778795123100281, -0.7016051411628723, -0.707056999206543, -0.36941543221473694, -0.7346265316009521, 1.1226531267166138, 2.4588141441345215, 1.2230443954467773, -1.2808680534362793, 2.827425003051758, 0.684469997882843, -0.2890704274177551, -0.7870582342147827, 0.3659692704677582, 0.04231644421815872, -1.4310417175292969, -0.2647177577018738, -0.9587410688400269, -0.12044315040111542, -0.6704680919647217, -0.5302082300186157, 0.09007932245731354, 0.4887654483318329, -0.1251162737607956, -0.36021363735198975, -0.4475574493408203, -0.6941916346549988, 0.5668862462043762, -0.23466753959655762, 0.8320412039756775, -0.353167325258255, 1.8041044473648071, -0.6900607347488403, 0.5430346131324768, 0.5654067397117615, 1.247978925704956, 0.25056174397468567, -0.07981934398412704, 0.3725879490375519, 0.21681712567806244, -0.01646611839532852, 0.5824276804924011, 1.1697264909744263, 0.7126179337501526, 0.4722370207309723, 0.7306128740310669, -2.13327956199646, 1.3373223543167114, -0.8154573440551758, 0.2620062232017517, 1.3891854286193848, -1.0811060667037964, 0.4637649655342102, -1.8888193368911743, -0.16745226085186005, 0.47184595465660095, -2.2643516063690186, 0.11686325073242188, -1.2722675800323486, -0.5843492150306702, 1.0450000762939453, 0.3341113030910492, -1.277321219444275, -0.010808262042701244, -0.4675597846508026, 0.9143755435943604, 0.3624309003353119, 1.1413531303405762, -1.6691374778747559, 0.061380237340927124, -0.24340233206748962, 0.3326505422592163, -1.1674578189849854, -1.6144689321517944, 0.7230926752090454, 0.6058768033981323, 0.6088049411773682, -0.17339015007019043, 0.8459424376487732, -1.1357284784317017, 0.8800049424171448, -1.0189547538757324, -1.7750059366226196, -1.395919919013977, -2.4442410469055176, -2.375688314437866, 0.8468601107597351, -0.45038822293281555, -0.3892379701137543, 2.1786434650421143, -1.1351385116577148, -1.6268173456192017, 0.9781032204627991, 0.28770095109939575, -0.0121620399877429, 2.3988258838653564, 0.2298361361026764, -0.8662192821502686, 0.718359112739563, -0.8888490796089172, 0.6528528928756714, -0.33494243025779724, 1.2593283653259277, 0.3787437677383423, -1.0725429058074951, 1.5563719272613525, -0.4092484712600708, 0.4615350663661957, -0.7108482718467712, -0.3858170211315155, -0.504764974117279, 0.21145299077033997, 1.8931888341903687, -0.0994601771235466, 1.4803123474121094, -0.163105309009552, -1.4761022329330444, -1.396125078201294, 0.6722872257232666, 0.5455814599990845, -0.8732571005821228, 0.2088121473789215, -0.49928510189056396, 0.10486118495464325, 0.1783147156238556, 1.1118247509002686, 1.327652096748352, 0.833561897277832, -0.1842840015888214, -0.9097463488578796, 0.062278956174850464, -0.0578131377696991, -0.6678177714347839, -1.7507531642913818, -0.30160167813301086, 0.1072595864534378, 0.6924363970756531, -1.242026925086975, 1.994715690612793, 0.9203459024429321, 2.0351955890655518, 1.0054258108139038, -0.3973709046840668, 1.559640884399414, 0.07617149502038956, 1.8917081356048584, -0.35679179430007935, 0.7719966769218445, -0.5159755945205688, -1.128044605255127, 0.7293189167976379, -0.38140159845352173, -1.9918901920318604, -0.4405573010444641, -0.8506350517272949, -0.15351742506027222, -0.8909028172492981, 1.002585530281067, -0.1367044597864151, -1.325847864151001, 0.23545515537261963, -0.6752288937568665, 0.09806203097105026, -1.3825671672821045, 0.2818211019039154, 0.7012364864349365, -0.7388705015182495, 0.06124521791934967, -0.4604220390319824, -1.4296424388885498, -0.5850437879562378, 0.3535085916519165, 1.7906162738800049, -0.7095232605934143, 1.0103412866592407, 0.9788466691970825, -0.5657064318656921, -0.055681012570858, 0.4515388607978821, -0.40007874369621277, 0.9058452844619751, -1.112786889076233, -0.443122923374176, 1.0713659524917603, -0.30921295285224915, -0.4648588001728058, 1.3214579820632935, 0.6505296230316162, -1.000849962234497, -0.2872207462787628, -0.14862321317195892, -0.8526675701141357, 0.12531156837940216, -1.6222301721572876, -0.13376036286354065, 0.30146998167037964, -1.4746519327163696, -0.4631118178367615, -0.03954073041677475, 1.3827719688415527, -0.05703194439411163, 1.3240796327590942, -0.23082460463047028, -0.12724576890468597, -0.5913074612617493, -0.4776393175125122, 0.17932426929473877, -0.09990978986024857, -0.6057420372962952, 0.33028414845466614, -0.822900652885437, 0.18807119131088257, 1.4717605113983154, 0.24506069719791412, 0.11128269881010056, 0.5284194350242615, 1.1230781078338623, 0.28943970799446106, -0.1441401243209839, -0.8379173278808594, -1.6860322952270508, 2.0513274669647217, -1.6575928926467896, 1.9423139095306396, 0.9057966470718384, -0.03454965353012085, -1.818500280380249, -1.8321878910064697, 1.4400259256362915, 1.1228910684585571, 2.4514410495758057, 0.5306308269500732, 0.4340689778327942, -0.8161911964416504, -0.645942211151123, 0.46460360288619995, -0.7794535160064697, -0.8738861680030823, 0.1808733195066452, 2.3465116024017334, 1.7221169471740723, -0.36987367272377014, -0.1635797619819641, -0.8647680878639221, 1.2999812364578247, -0.2406722456216812, 0.258379727602005, 1.9404926300048828, -0.44621989130973816, -1.0763885974884033, 1.287778615951538, -2.441197395324707, 0.23575478792190552, 1.9950482845306396, 0.32375243306159973, 0.12464411556720734, -1.125671148300171, -0.6902561783790588, -0.18328186869621277, -0.4647919237613678, -1.2505313158035278, 0.4540518820285797, -0.16798922419548035, -0.8799841403961182, -1.4626532793045044, -0.004184999503195286, -1.2179661989212036, -1.7192212343215942, 0.3161375820636749, 1.7972638607025146, 2.2445766925811768, -0.7969645857810974, 1.324430227279663, -0.3235594928264618, 0.20156681537628174, 1.100502610206604, 1.2845759391784668, 3.1717166900634766, 1.8887828588485718, -1.2729641199111938, 0.631203293800354, -0.19734279811382294, -0.5334903597831726, 1.1025972366333008, -0.9845150113105774, 1.1445527076721191, -0.2659578323364258, -1.3151111602783203, -1.197164535522461, 0.9254089593887329, 0.4143349230289459, -0.05925562232732773, -0.48295241594314575, 1.1646288633346558, 0.24071241915225983, 1.3988921642303467, 0.6563239693641663, -0.30390214920043945, 0.4950612187385559, -0.426453173160553, -0.4771077334880829, 1.5962129831314087, 0.11134030669927597, -1.6088382005691528, -2.3531391620635986, -0.13053816556930542, -1.0695176124572754, -0.01350676454603672, -0.8597657680511475, -1.026882529258728, 1.591813087463379, 0.41792601346969604, -0.9448712468147278, -0.1528390496969223, -0.3355971872806549, -0.5971410274505615, 2.619525194168091, -1.3718819618225098, -0.24524326622486115, -0.8999496102333069, -0.5399044156074524, 1.5548418760299683, -1.1847676038742065, -0.26159384846687317, -1.0723916292190552, -0.47969484329223633, -1.1790341138839722, -0.4068511128425598, -0.0580592155456543, -0.8562831282615662, 0.7611631751060486, -0.06219947338104248, -1.278533697128296, -0.30281031131744385, -1.1276657581329346, 0.7836970090866089, -0.2214963287115097, 0.040666237473487854, 1.6794815063476562, 0.25453588366508484, -0.3924517333507538, 0.8192734718322754, 1.313707709312439, 0.6519535779953003, -0.5605340600013733, 0.14843931794166565, -0.5772692561149597, 0.5370743274688721, -1.130989909172058, 0.3797987401485443, -2.9545724391937256, 0.6967629194259644, -0.055484287440776825, 0.002685079351067543, -0.16076968610286713, -1.517746090888977, 1.0123953819274902, 2.4542152881622314, -1.0855871438980103, 0.6354544758796692, 0.3354995846748352, 1.2185176610946655, -1.6611155271530151, 0.0637185201048851, -0.712295413017273, 2.1126537322998047, 0.08368916809558868, 1.0983422994613647, -0.5533542633056641, -2.306335687637329, 0.610537588596344, -1.2275723218917847, -1.021833896636963, 0.7048782706260681, -0.907514750957489, 0.24508441984653473, -1.2028547525405884, -0.10228662937879562, -0.8541290163993835, -1.1064027547836304, 0.486626535654068, 0.02924949862062931, 0.6262887716293335, -0.5973114371299744, 0.2013995200395584, -2.2939608097076416, -1.4339594841003418, -0.09990043193101883, -0.9299142956733704, 0.45284390449523926, -0.43305662274360657, 0.7690877914428711, -0.02971523255109787, 0.062359750270843506, 0.3179585039615631, 1.4356566667556763, 3.182429075241089, -0.025297021493315697, 0.31625038385391235, -0.2934862971305847, -1.04766047000885, 1.5544682741165161, 0.9040268659591675, -0.2018260806798935, -0.6132214069366455, -0.9810813665390015, 1.3051109313964844, 1.9456126689910889, 1.0710099935531616, 0.05036979168653488, -0.9004895091056824, -0.7331873774528503, 0.09878718107938766, 0.19681113958358765, 0.4415862262248993, 1.0314899682998657, 0.08382440358400345, 0.22289177775382996, 1.463793158531189, 1.0771677494049072, -0.3676004707813263, 0.5023990273475647, -0.7923018336296082, -0.4126085340976715, 0.5067949295043945, 0.3850874900817871, 0.032209038734436035, 0.31037259101867676, -1.0095893144607544, -0.2822887897491455, -0.1955854594707489, -0.7870362401008606, -0.7521498799324036, -0.30735570192337036, -0.46326449513435364, 1.731544852256775, -0.14012102782726288, -0.5044549107551575, 0.060694195330142975, -0.7880762219429016, -0.04613759368658066, -1.0442533493041992, 0.3532092273235321, -0.10582803189754486, 0.003061537630856037, -0.13911768794059753, 1.633530855178833, -0.9368815422058105, -2.20690655708313, 0.12255078554153442, 0.30236953496932983, -0.3585682809352875, -0.09449562430381775, 1.7778127193450928, 0.5810337066650391, 1.4721702337265015, 1.5317622423171997, 1.0672640800476074, -0.6113314628601074, -1.29509437084198, 0.7226957082748413, 0.885479748249054, -1.3587524890899658, 0.8428201079368591, -0.21430805325508118, -0.5678087472915649, 0.5367884039878845, 1.3020302057266235, 0.4708055555820465, -1.9660838842391968, 0.9121959805488586, -1.1430381536483765, 0.9919617176055908, 0.8235556483268738, 0.8406166434288025, 0.15733328461647034, 0.8921734094619751, -1.2706527709960938, -1.0153193473815918, -0.6066173911094666, -0.6672516465187073, 1.8887780904769897, -0.26573312282562256, 0.3555239140987396, -0.3247545659542084, -1.2377368211746216, 0.11880053579807281, 0.6203790903091431, 0.2998912036418915, -0.3231331706047058, 0.7322689294815063, -0.6676462292671204, -1.0612021684646606, -1.3353172540664673, -0.4143665134906769, -0.9856440424919128, -0.8707974553108215, 1.0570317506790161, 0.7787854671478271, 0.5590663552284241, 1.9465360641479492, 0.6643356084823608, 0.20610302686691284, -2.5896434783935547, 0.8154679536819458, 0.3403918743133545, -0.1139414831995964, 0.8531529903411865, 0.3346785008907318, 1.276620626449585, -0.0803353488445282, 0.5579697489738464, -2.3842945098876953, 2.280111312866211, -0.263077974319458, 0.7663052082061768, 0.14024598896503448, 0.04656334966421127, 1.022392988204956, 0.602698028087616, 0.5402119159698486, -1.0588313341140747, 0.9091379046440125, -0.5530781149864197, 1.16569185256958, 0.9215517640113831, -0.8968076109886169, 0.2097417265176773, 1.1651434898376465, 0.45436277985572815, -0.5370769500732422, -1.0472561120986938, -0.8488837480545044, 0.9213002920150757, 1.7944482564926147, -0.03993133455514908, 0.10473089665174484, 0.7370941042900085, 0.6948128342628479, -1.2759835720062256, -0.08873569220304489, -0.6358737349510193, -0.6870019435882568, 1.8157148361206055, 2.0893399715423584, -0.06840701401233673, -0.07129128277301788, -0.6998625993728638, -1.5001977682113647, 0.8737667798995972, 0.027918832376599312, 0.002286529168486595, 0.773902177810669, -0.6467983722686768, 1.1644223928451538, 0.8161618113517761, 0.8517798781394958, 0.2740998864173889, 0.03155595809221268, 0.20986305177211761, -0.24064823985099792, -1.121414065361023, -0.27144935727119446, -1.0120322704315186, -2.631680488586426, 0.386435866355896, -0.3147726058959961, -1.38919198513031, 0.1098482608795166, -0.8753871321678162, 0.7295306324958801, -0.5151932239532471, -1.1064777374267578, -1.3806910514831543, 0.265536367893219, -0.09468311071395874, 0.8473268151283264, -1.6592715978622437, -0.1894754320383072, 1.1060906648635864, 0.8587311506271362, -0.7102662920951843, 0.7567405104637146, 0.30617180466651917, 0.9110744595527649, 0.8848292231559753, -0.3497556447982788, 0.4473724067211151, 0.21092213690280914, -1.3714048862457275, 0.35781556367874146, 1.4270381927490234, 0.08092696219682693, 1.3858758211135864, -0.39364397525787354, -0.049699895083904266, 0.4036417305469513, -0.2518945634365082, -0.5296512246131897, -0.634311854839325, 0.6671149730682373, -0.07798846065998077, -1.017022728919983, -0.19514326751232147, -0.024296000599861145, -0.23304420709609985, 0.2907303273677826, -1.488660454750061, -0.09276355057954788, -0.45842409133911133, -0.652860164642334, -1.366180419921875, -0.12403688579797745, 1.2966104745864868, -0.8157562613487244, -0.046144142746925354, 0.5782206058502197, 0.22964206337928772, 0.5199164152145386, 0.7585052847862244, -0.7946583032608032, -0.30219411849975586, -0.16525229811668396, -0.39894530177116394, 0.24168141186237335, 1.3294984102249146, -0.06487413495779037, -0.9938337206840515, 0.46332794427871704, -0.19805119931697845, 0.16342318058013916, 1.927798867225647, 0.06394807994365692, -0.8945873379707336, 0.39026546478271484, -0.7751485109329224, 1.8463722467422485, 1.5815738439559937, 1.2943285703659058, -0.08559621125459671, -0.958280622959137, 0.6121869087219238, -0.3091248571872711, -0.3342491388320923, 0.8234638571739197, 0.3492913842201233, -0.315568745136261, -1.4462196826934814, 0.7841058373451233, 1.2524880170822144, -0.7967379689216614, -0.7775233387947083, 0.10407368838787079, -0.8492738604545593, 1.250976800918579, 0.6592007279396057, 0.45104360580444336, 0.34486934542655945, 1.6747233867645264, 0.7001954913139343, -0.5859033465385437, 0.4063739776611328, 0.45200201869010925, -0.1765511929988861, -1.9985466003417969, -1.184228777885437, 0.27960798144340515, -0.5037521719932556, -1.4938185214996338, 1.4154084920883179, -1.2286534309387207, -0.9868677258491516, 0.5315307378768921, 0.1503782421350479, 1.3521738052368164, 0.33355164527893066, 1.7328041791915894, 1.970447063446045, 0.9040641784667969, 0.48873239755630493, 1.1601241827011108, -0.24674732983112335, -0.24135816097259521, 1.596612572669983, -0.4351545572280884, 0.6005932688713074, 1.0410430431365967, -0.4656952917575836, -1.2468305826187134, -0.8557344079017639, -1.1536359786987305, -0.8070738315582275, 1.0644004344940186, 0.11202763766050339, -1.1560314893722534, 0.3388615846633911, 1.6254624128341675, -0.010370430536568165, -0.13885605335235596, 0.6025097966194153, 0.3979964256286621, -0.657569169998169, -0.12372066080570221, -1.0681586265563965, 0.6011021733283997, -0.3452959656715393, -0.4110911190509796, 0.2162611335515976, 0.6086545586585999, 1.2813342809677124, 0.11533761024475098, 0.14600275456905365, 1.250477910041809, -1.417795181274414, 1.1893062591552734, -0.9477242827415466, 0.35010161995887756, -2.179494619369507, 1.4365538358688354, -0.9032466411590576, 1.9905211925506592, -2.7084836959838867, 0.44601505994796753, -0.4052141606807709, -0.5852060914039612, 0.17345066368579865, -0.12407074868679047, 0.180131733417511, -0.02101793698966503, -1.070665955543518, -0.1278950273990631, -0.8238283395767212, 0.42646053433418274, 1.2127841711044312, 1.3627488613128662, -0.9263186454772949, -0.2569282054901123, -1.5741443634033203, -0.15833550691604614, -0.5031918287277222, 0.13520240783691406, -1.7653511762619019, -0.1605890542268753, -2.0450987815856934, -2.442152500152588, -1.3304760456085205, -1.036969780921936, 1.4180344343185425, 0.1664886474609375, -0.9722026586532593, 1.1307101249694824, -0.4253106117248535, -1.7586119174957275, 1.2604511976242065, -2.194262981414795 ]
https://github.com/huggingface/datasets/issues/5555
`.shuffle` throwing error `ValueError: Protocol not known: parent`
``` [{'filename': '.../train/dataset.arrow'}, {'filename': '.../train/dataset.arrow'}] ``` These are the actual paths where `.hf` files are stored.
### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4
291
16
`.shuffle` throwing error `ValueError: Protocol not known: parent` ### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4 ``` [{'filename': '.../train/dataset.arrow'}, {'filename': '.../train/dataset.arrow'}] ``` These are the actual paths where `.hf` files are stored.
[ -1.1844799518585205, -0.8249237537384033, -0.5923757553100586, 1.3262419700622559, -0.041086725890636444, -1.4175077676773071, 0.15833747386932373, -0.9759659767150879, 1.5685051679611206, -0.851817786693573, 0.36299389600753784, -1.6840460300445557, 0.07002703845500946, -0.6778795123100281, -0.7016051411628723, -0.707056999206543, -0.36941543221473694, -0.7346265316009521, 1.1226531267166138, 2.4588141441345215, 1.2230443954467773, -1.2808680534362793, 2.827425003051758, 0.684469997882843, -0.2890704274177551, -0.7870582342147827, 0.3659692704677582, 0.04231644421815872, -1.4310417175292969, -0.2647177577018738, -0.9587410688400269, -0.12044315040111542, -0.6704680919647217, -0.5302082300186157, 0.09007932245731354, 0.4887654483318329, -0.1251162737607956, -0.36021363735198975, -0.4475574493408203, -0.6941916346549988, 0.5668862462043762, -0.23466753959655762, 0.8320412039756775, -0.353167325258255, 1.8041044473648071, -0.6900607347488403, 0.5430346131324768, 0.5654067397117615, 1.247978925704956, 0.25056174397468567, -0.07981934398412704, 0.3725879490375519, 0.21681712567806244, -0.01646611839532852, 0.5824276804924011, 1.1697264909744263, 0.7126179337501526, 0.4722370207309723, 0.7306128740310669, -2.13327956199646, 1.3373223543167114, -0.8154573440551758, 0.2620062232017517, 1.3891854286193848, -1.0811060667037964, 0.4637649655342102, -1.8888193368911743, -0.16745226085186005, 0.47184595465660095, -2.2643516063690186, 0.11686325073242188, -1.2722675800323486, -0.5843492150306702, 1.0450000762939453, 0.3341113030910492, -1.277321219444275, -0.010808262042701244, -0.4675597846508026, 0.9143755435943604, 0.3624309003353119, 1.1413531303405762, -1.6691374778747559, 0.061380237340927124, -0.24340233206748962, 0.3326505422592163, -1.1674578189849854, -1.6144689321517944, 0.7230926752090454, 0.6058768033981323, 0.6088049411773682, -0.17339015007019043, 0.8459424376487732, -1.1357284784317017, 0.8800049424171448, -1.0189547538757324, -1.7750059366226196, -1.395919919013977, -2.4442410469055176, -2.375688314437866, 0.8468601107597351, -0.45038822293281555, -0.3892379701137543, 2.1786434650421143, -1.1351385116577148, -1.6268173456192017, 0.9781032204627991, 0.28770095109939575, -0.0121620399877429, 2.3988258838653564, 0.2298361361026764, -0.8662192821502686, 0.718359112739563, -0.8888490796089172, 0.6528528928756714, -0.33494243025779724, 1.2593283653259277, 0.3787437677383423, -1.0725429058074951, 1.5563719272613525, -0.4092484712600708, 0.4615350663661957, -0.7108482718467712, -0.3858170211315155, -0.504764974117279, 0.21145299077033997, 1.8931888341903687, -0.0994601771235466, 1.4803123474121094, -0.163105309009552, -1.4761022329330444, -1.396125078201294, 0.6722872257232666, 0.5455814599990845, -0.8732571005821228, 0.2088121473789215, -0.49928510189056396, 0.10486118495464325, 0.1783147156238556, 1.1118247509002686, 1.327652096748352, 0.833561897277832, -0.1842840015888214, -0.9097463488578796, 0.062278956174850464, -0.0578131377696991, -0.6678177714347839, -1.7507531642913818, -0.30160167813301086, 0.1072595864534378, 0.6924363970756531, -1.242026925086975, 1.994715690612793, 0.9203459024429321, 2.0351955890655518, 1.0054258108139038, -0.3973709046840668, 1.559640884399414, 0.07617149502038956, 1.8917081356048584, -0.35679179430007935, 0.7719966769218445, -0.5159755945205688, -1.128044605255127, 0.7293189167976379, -0.38140159845352173, -1.9918901920318604, -0.4405573010444641, -0.8506350517272949, -0.15351742506027222, -0.8909028172492981, 1.002585530281067, -0.1367044597864151, -1.325847864151001, 0.23545515537261963, -0.6752288937568665, 0.09806203097105026, -1.3825671672821045, 0.2818211019039154, 0.7012364864349365, -0.7388705015182495, 0.06124521791934967, -0.4604220390319824, -1.4296424388885498, -0.5850437879562378, 0.3535085916519165, 1.7906162738800049, -0.7095232605934143, 1.0103412866592407, 0.9788466691970825, -0.5657064318656921, -0.055681012570858, 0.4515388607978821, -0.40007874369621277, 0.9058452844619751, -1.112786889076233, -0.443122923374176, 1.0713659524917603, -0.30921295285224915, -0.4648588001728058, 1.3214579820632935, 0.6505296230316162, -1.000849962234497, -0.2872207462787628, -0.14862321317195892, -0.8526675701141357, 0.12531156837940216, -1.6222301721572876, -0.13376036286354065, 0.30146998167037964, -1.4746519327163696, -0.4631118178367615, -0.03954073041677475, 1.3827719688415527, -0.05703194439411163, 1.3240796327590942, -0.23082460463047028, -0.12724576890468597, -0.5913074612617493, -0.4776393175125122, 0.17932426929473877, -0.09990978986024857, -0.6057420372962952, 0.33028414845466614, -0.822900652885437, 0.18807119131088257, 1.4717605113983154, 0.24506069719791412, 0.11128269881010056, 0.5284194350242615, 1.1230781078338623, 0.28943970799446106, -0.1441401243209839, -0.8379173278808594, -1.6860322952270508, 2.0513274669647217, -1.6575928926467896, 1.9423139095306396, 0.9057966470718384, -0.03454965353012085, -1.818500280380249, -1.8321878910064697, 1.4400259256362915, 1.1228910684585571, 2.4514410495758057, 0.5306308269500732, 0.4340689778327942, -0.8161911964416504, -0.645942211151123, 0.46460360288619995, -0.7794535160064697, -0.8738861680030823, 0.1808733195066452, 2.3465116024017334, 1.7221169471740723, -0.36987367272377014, -0.1635797619819641, -0.8647680878639221, 1.2999812364578247, -0.2406722456216812, 0.258379727602005, 1.9404926300048828, -0.44621989130973816, -1.0763885974884033, 1.287778615951538, -2.441197395324707, 0.23575478792190552, 1.9950482845306396, 0.32375243306159973, 0.12464411556720734, -1.125671148300171, -0.6902561783790588, -0.18328186869621277, -0.4647919237613678, -1.2505313158035278, 0.4540518820285797, -0.16798922419548035, -0.8799841403961182, -1.4626532793045044, -0.004184999503195286, -1.2179661989212036, -1.7192212343215942, 0.3161375820636749, 1.7972638607025146, 2.2445766925811768, -0.7969645857810974, 1.324430227279663, -0.3235594928264618, 0.20156681537628174, 1.100502610206604, 1.2845759391784668, 3.1717166900634766, 1.8887828588485718, -1.2729641199111938, 0.631203293800354, -0.19734279811382294, -0.5334903597831726, 1.1025972366333008, -0.9845150113105774, 1.1445527076721191, -0.2659578323364258, -1.3151111602783203, -1.197164535522461, 0.9254089593887329, 0.4143349230289459, -0.05925562232732773, -0.48295241594314575, 1.1646288633346558, 0.24071241915225983, 1.3988921642303467, 0.6563239693641663, -0.30390214920043945, 0.4950612187385559, -0.426453173160553, -0.4771077334880829, 1.5962129831314087, 0.11134030669927597, -1.6088382005691528, -2.3531391620635986, -0.13053816556930542, -1.0695176124572754, -0.01350676454603672, -0.8597657680511475, -1.026882529258728, 1.591813087463379, 0.41792601346969604, -0.9448712468147278, -0.1528390496969223, -0.3355971872806549, -0.5971410274505615, 2.619525194168091, -1.3718819618225098, -0.24524326622486115, -0.8999496102333069, -0.5399044156074524, 1.5548418760299683, -1.1847676038742065, -0.26159384846687317, -1.0723916292190552, -0.47969484329223633, -1.1790341138839722, -0.4068511128425598, -0.0580592155456543, -0.8562831282615662, 0.7611631751060486, -0.06219947338104248, -1.278533697128296, -0.30281031131744385, -1.1276657581329346, 0.7836970090866089, -0.2214963287115097, 0.040666237473487854, 1.6794815063476562, 0.25453588366508484, -0.3924517333507538, 0.8192734718322754, 1.313707709312439, 0.6519535779953003, -0.5605340600013733, 0.14843931794166565, -0.5772692561149597, 0.5370743274688721, -1.130989909172058, 0.3797987401485443, -2.9545724391937256, 0.6967629194259644, -0.055484287440776825, 0.002685079351067543, -0.16076968610286713, -1.517746090888977, 1.0123953819274902, 2.4542152881622314, -1.0855871438980103, 0.6354544758796692, 0.3354995846748352, 1.2185176610946655, -1.6611155271530151, 0.0637185201048851, -0.712295413017273, 2.1126537322998047, 0.08368916809558868, 1.0983422994613647, -0.5533542633056641, -2.306335687637329, 0.610537588596344, -1.2275723218917847, -1.021833896636963, 0.7048782706260681, -0.907514750957489, 0.24508441984653473, -1.2028547525405884, -0.10228662937879562, -0.8541290163993835, -1.1064027547836304, 0.486626535654068, 0.02924949862062931, 0.6262887716293335, -0.5973114371299744, 0.2013995200395584, -2.2939608097076416, -1.4339594841003418, -0.09990043193101883, -0.9299142956733704, 0.45284390449523926, -0.43305662274360657, 0.7690877914428711, -0.02971523255109787, 0.062359750270843506, 0.3179585039615631, 1.4356566667556763, 3.182429075241089, -0.025297021493315697, 0.31625038385391235, -0.2934862971305847, -1.04766047000885, 1.5544682741165161, 0.9040268659591675, -0.2018260806798935, -0.6132214069366455, -0.9810813665390015, 1.3051109313964844, 1.9456126689910889, 1.0710099935531616, 0.05036979168653488, -0.9004895091056824, -0.7331873774528503, 0.09878718107938766, 0.19681113958358765, 0.4415862262248993, 1.0314899682998657, 0.08382440358400345, 0.22289177775382996, 1.463793158531189, 1.0771677494049072, -0.3676004707813263, 0.5023990273475647, -0.7923018336296082, -0.4126085340976715, 0.5067949295043945, 0.3850874900817871, 0.032209038734436035, 0.31037259101867676, -1.0095893144607544, -0.2822887897491455, -0.1955854594707489, -0.7870362401008606, -0.7521498799324036, -0.30735570192337036, -0.46326449513435364, 1.731544852256775, -0.14012102782726288, -0.5044549107551575, 0.060694195330142975, -0.7880762219429016, -0.04613759368658066, -1.0442533493041992, 0.3532092273235321, -0.10582803189754486, 0.003061537630856037, -0.13911768794059753, 1.633530855178833, -0.9368815422058105, -2.20690655708313, 0.12255078554153442, 0.30236953496932983, -0.3585682809352875, -0.09449562430381775, 1.7778127193450928, 0.5810337066650391, 1.4721702337265015, 1.5317622423171997, 1.0672640800476074, -0.6113314628601074, -1.29509437084198, 0.7226957082748413, 0.885479748249054, -1.3587524890899658, 0.8428201079368591, -0.21430805325508118, -0.5678087472915649, 0.5367884039878845, 1.3020302057266235, 0.4708055555820465, -1.9660838842391968, 0.9121959805488586, -1.1430381536483765, 0.9919617176055908, 0.8235556483268738, 0.8406166434288025, 0.15733328461647034, 0.8921734094619751, -1.2706527709960938, -1.0153193473815918, -0.6066173911094666, -0.6672516465187073, 1.8887780904769897, -0.26573312282562256, 0.3555239140987396, -0.3247545659542084, -1.2377368211746216, 0.11880053579807281, 0.6203790903091431, 0.2998912036418915, -0.3231331706047058, 0.7322689294815063, -0.6676462292671204, -1.0612021684646606, -1.3353172540664673, -0.4143665134906769, -0.9856440424919128, -0.8707974553108215, 1.0570317506790161, 0.7787854671478271, 0.5590663552284241, 1.9465360641479492, 0.6643356084823608, 0.20610302686691284, -2.5896434783935547, 0.8154679536819458, 0.3403918743133545, -0.1139414831995964, 0.8531529903411865, 0.3346785008907318, 1.276620626449585, -0.0803353488445282, 0.5579697489738464, -2.3842945098876953, 2.280111312866211, -0.263077974319458, 0.7663052082061768, 0.14024598896503448, 0.04656334966421127, 1.022392988204956, 0.602698028087616, 0.5402119159698486, -1.0588313341140747, 0.9091379046440125, -0.5530781149864197, 1.16569185256958, 0.9215517640113831, -0.8968076109886169, 0.2097417265176773, 1.1651434898376465, 0.45436277985572815, -0.5370769500732422, -1.0472561120986938, -0.8488837480545044, 0.9213002920150757, 1.7944482564926147, -0.03993133455514908, 0.10473089665174484, 0.7370941042900085, 0.6948128342628479, -1.2759835720062256, -0.08873569220304489, -0.6358737349510193, -0.6870019435882568, 1.8157148361206055, 2.0893399715423584, -0.06840701401233673, -0.07129128277301788, -0.6998625993728638, -1.5001977682113647, 0.8737667798995972, 0.027918832376599312, 0.002286529168486595, 0.773902177810669, -0.6467983722686768, 1.1644223928451538, 0.8161618113517761, 0.8517798781394958, 0.2740998864173889, 0.03155595809221268, 0.20986305177211761, -0.24064823985099792, -1.121414065361023, -0.27144935727119446, -1.0120322704315186, -2.631680488586426, 0.386435866355896, -0.3147726058959961, -1.38919198513031, 0.1098482608795166, -0.8753871321678162, 0.7295306324958801, -0.5151932239532471, -1.1064777374267578, -1.3806910514831543, 0.265536367893219, -0.09468311071395874, 0.8473268151283264, -1.6592715978622437, -0.1894754320383072, 1.1060906648635864, 0.8587311506271362, -0.7102662920951843, 0.7567405104637146, 0.30617180466651917, 0.9110744595527649, 0.8848292231559753, -0.3497556447982788, 0.4473724067211151, 0.21092213690280914, -1.3714048862457275, 0.35781556367874146, 1.4270381927490234, 0.08092696219682693, 1.3858758211135864, -0.39364397525787354, -0.049699895083904266, 0.4036417305469513, -0.2518945634365082, -0.5296512246131897, -0.634311854839325, 0.6671149730682373, -0.07798846065998077, -1.017022728919983, -0.19514326751232147, -0.024296000599861145, -0.23304420709609985, 0.2907303273677826, -1.488660454750061, -0.09276355057954788, -0.45842409133911133, -0.652860164642334, -1.366180419921875, -0.12403688579797745, 1.2966104745864868, -0.8157562613487244, -0.046144142746925354, 0.5782206058502197, 0.22964206337928772, 0.5199164152145386, 0.7585052847862244, -0.7946583032608032, -0.30219411849975586, -0.16525229811668396, -0.39894530177116394, 0.24168141186237335, 1.3294984102249146, -0.06487413495779037, -0.9938337206840515, 0.46332794427871704, -0.19805119931697845, 0.16342318058013916, 1.927798867225647, 0.06394807994365692, -0.8945873379707336, 0.39026546478271484, -0.7751485109329224, 1.8463722467422485, 1.5815738439559937, 1.2943285703659058, -0.08559621125459671, -0.958280622959137, 0.6121869087219238, -0.3091248571872711, -0.3342491388320923, 0.8234638571739197, 0.3492913842201233, -0.315568745136261, -1.4462196826934814, 0.7841058373451233, 1.2524880170822144, -0.7967379689216614, -0.7775233387947083, 0.10407368838787079, -0.8492738604545593, 1.250976800918579, 0.6592007279396057, 0.45104360580444336, 0.34486934542655945, 1.6747233867645264, 0.7001954913139343, -0.5859033465385437, 0.4063739776611328, 0.45200201869010925, -0.1765511929988861, -1.9985466003417969, -1.184228777885437, 0.27960798144340515, -0.5037521719932556, -1.4938185214996338, 1.4154084920883179, -1.2286534309387207, -0.9868677258491516, 0.5315307378768921, 0.1503782421350479, 1.3521738052368164, 0.33355164527893066, 1.7328041791915894, 1.970447063446045, 0.9040641784667969, 0.48873239755630493, 1.1601241827011108, -0.24674732983112335, -0.24135816097259521, 1.596612572669983, -0.4351545572280884, 0.6005932688713074, 1.0410430431365967, -0.4656952917575836, -1.2468305826187134, -0.8557344079017639, -1.1536359786987305, -0.8070738315582275, 1.0644004344940186, 0.11202763766050339, -1.1560314893722534, 0.3388615846633911, 1.6254624128341675, -0.010370430536568165, -0.13885605335235596, 0.6025097966194153, 0.3979964256286621, -0.657569169998169, -0.12372066080570221, -1.0681586265563965, 0.6011021733283997, -0.3452959656715393, -0.4110911190509796, 0.2162611335515976, 0.6086545586585999, 1.2813342809677124, 0.11533761024475098, 0.14600275456905365, 1.250477910041809, -1.417795181274414, 1.1893062591552734, -0.9477242827415466, 0.35010161995887756, -2.179494619369507, 1.4365538358688354, -0.9032466411590576, 1.9905211925506592, -2.7084836959838867, 0.44601505994796753, -0.4052141606807709, -0.5852060914039612, 0.17345066368579865, -0.12407074868679047, 0.180131733417511, -0.02101793698966503, -1.070665955543518, -0.1278950273990631, -0.8238283395767212, 0.42646053433418274, 1.2127841711044312, 1.3627488613128662, -0.9263186454772949, -0.2569282054901123, -1.5741443634033203, -0.15833550691604614, -0.5031918287277222, 0.13520240783691406, -1.7653511762619019, -0.1605890542268753, -2.0450987815856934, -2.442152500152588, -1.3304760456085205, -1.036969780921936, 1.4180344343185425, 0.1664886474609375, -0.9722026586532593, 1.1307101249694824, -0.4253106117248535, -1.7586119174957275, 1.2604511976242065, -2.194262981414795 ]
https://github.com/huggingface/datasets/issues/5555
`.shuffle` throwing error `ValueError: Protocol not known: parent`
I'm not aware of any `.hf` file ? What are you referring to ? Also the error says "Protocol unknown: parent". Is there a chance you may have ended up with a path that contains this string `parent://` ?
### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4
291
39
`.shuffle` throwing error `ValueError: Protocol not known: parent` ### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4 I'm not aware of any `.hf` file ? What are you referring to ? Also the error says "Protocol unknown: parent". Is there a chance you may have ended up with a path that contains this string `parent://` ?
[ -1.1844799518585205, -0.8249237537384033, -0.5923757553100586, 1.3262419700622559, -0.041086725890636444, -1.4175077676773071, 0.15833747386932373, -0.9759659767150879, 1.5685051679611206, -0.851817786693573, 0.36299389600753784, -1.6840460300445557, 0.07002703845500946, -0.6778795123100281, -0.7016051411628723, -0.707056999206543, -0.36941543221473694, -0.7346265316009521, 1.1226531267166138, 2.4588141441345215, 1.2230443954467773, -1.2808680534362793, 2.827425003051758, 0.684469997882843, -0.2890704274177551, -0.7870582342147827, 0.3659692704677582, 0.04231644421815872, -1.4310417175292969, -0.2647177577018738, -0.9587410688400269, -0.12044315040111542, -0.6704680919647217, -0.5302082300186157, 0.09007932245731354, 0.4887654483318329, -0.1251162737607956, -0.36021363735198975, -0.4475574493408203, -0.6941916346549988, 0.5668862462043762, -0.23466753959655762, 0.8320412039756775, -0.353167325258255, 1.8041044473648071, -0.6900607347488403, 0.5430346131324768, 0.5654067397117615, 1.247978925704956, 0.25056174397468567, -0.07981934398412704, 0.3725879490375519, 0.21681712567806244, -0.01646611839532852, 0.5824276804924011, 1.1697264909744263, 0.7126179337501526, 0.4722370207309723, 0.7306128740310669, -2.13327956199646, 1.3373223543167114, -0.8154573440551758, 0.2620062232017517, 1.3891854286193848, -1.0811060667037964, 0.4637649655342102, -1.8888193368911743, -0.16745226085186005, 0.47184595465660095, -2.2643516063690186, 0.11686325073242188, -1.2722675800323486, -0.5843492150306702, 1.0450000762939453, 0.3341113030910492, -1.277321219444275, -0.010808262042701244, -0.4675597846508026, 0.9143755435943604, 0.3624309003353119, 1.1413531303405762, -1.6691374778747559, 0.061380237340927124, -0.24340233206748962, 0.3326505422592163, -1.1674578189849854, -1.6144689321517944, 0.7230926752090454, 0.6058768033981323, 0.6088049411773682, -0.17339015007019043, 0.8459424376487732, -1.1357284784317017, 0.8800049424171448, -1.0189547538757324, -1.7750059366226196, -1.395919919013977, -2.4442410469055176, -2.375688314437866, 0.8468601107597351, -0.45038822293281555, -0.3892379701137543, 2.1786434650421143, -1.1351385116577148, -1.6268173456192017, 0.9781032204627991, 0.28770095109939575, -0.0121620399877429, 2.3988258838653564, 0.2298361361026764, -0.8662192821502686, 0.718359112739563, -0.8888490796089172, 0.6528528928756714, -0.33494243025779724, 1.2593283653259277, 0.3787437677383423, -1.0725429058074951, 1.5563719272613525, -0.4092484712600708, 0.4615350663661957, -0.7108482718467712, -0.3858170211315155, -0.504764974117279, 0.21145299077033997, 1.8931888341903687, -0.0994601771235466, 1.4803123474121094, -0.163105309009552, -1.4761022329330444, -1.396125078201294, 0.6722872257232666, 0.5455814599990845, -0.8732571005821228, 0.2088121473789215, -0.49928510189056396, 0.10486118495464325, 0.1783147156238556, 1.1118247509002686, 1.327652096748352, 0.833561897277832, -0.1842840015888214, -0.9097463488578796, 0.062278956174850464, -0.0578131377696991, -0.6678177714347839, -1.7507531642913818, -0.30160167813301086, 0.1072595864534378, 0.6924363970756531, -1.242026925086975, 1.994715690612793, 0.9203459024429321, 2.0351955890655518, 1.0054258108139038, -0.3973709046840668, 1.559640884399414, 0.07617149502038956, 1.8917081356048584, -0.35679179430007935, 0.7719966769218445, -0.5159755945205688, -1.128044605255127, 0.7293189167976379, -0.38140159845352173, -1.9918901920318604, -0.4405573010444641, -0.8506350517272949, -0.15351742506027222, -0.8909028172492981, 1.002585530281067, -0.1367044597864151, -1.325847864151001, 0.23545515537261963, -0.6752288937568665, 0.09806203097105026, -1.3825671672821045, 0.2818211019039154, 0.7012364864349365, -0.7388705015182495, 0.06124521791934967, -0.4604220390319824, -1.4296424388885498, -0.5850437879562378, 0.3535085916519165, 1.7906162738800049, -0.7095232605934143, 1.0103412866592407, 0.9788466691970825, -0.5657064318656921, -0.055681012570858, 0.4515388607978821, -0.40007874369621277, 0.9058452844619751, -1.112786889076233, -0.443122923374176, 1.0713659524917603, -0.30921295285224915, -0.4648588001728058, 1.3214579820632935, 0.6505296230316162, -1.000849962234497, -0.2872207462787628, -0.14862321317195892, -0.8526675701141357, 0.12531156837940216, -1.6222301721572876, -0.13376036286354065, 0.30146998167037964, -1.4746519327163696, -0.4631118178367615, -0.03954073041677475, 1.3827719688415527, -0.05703194439411163, 1.3240796327590942, -0.23082460463047028, -0.12724576890468597, -0.5913074612617493, -0.4776393175125122, 0.17932426929473877, -0.09990978986024857, -0.6057420372962952, 0.33028414845466614, -0.822900652885437, 0.18807119131088257, 1.4717605113983154, 0.24506069719791412, 0.11128269881010056, 0.5284194350242615, 1.1230781078338623, 0.28943970799446106, -0.1441401243209839, -0.8379173278808594, -1.6860322952270508, 2.0513274669647217, -1.6575928926467896, 1.9423139095306396, 0.9057966470718384, -0.03454965353012085, -1.818500280380249, -1.8321878910064697, 1.4400259256362915, 1.1228910684585571, 2.4514410495758057, 0.5306308269500732, 0.4340689778327942, -0.8161911964416504, -0.645942211151123, 0.46460360288619995, -0.7794535160064697, -0.8738861680030823, 0.1808733195066452, 2.3465116024017334, 1.7221169471740723, -0.36987367272377014, -0.1635797619819641, -0.8647680878639221, 1.2999812364578247, -0.2406722456216812, 0.258379727602005, 1.9404926300048828, -0.44621989130973816, -1.0763885974884033, 1.287778615951538, -2.441197395324707, 0.23575478792190552, 1.9950482845306396, 0.32375243306159973, 0.12464411556720734, -1.125671148300171, -0.6902561783790588, -0.18328186869621277, -0.4647919237613678, -1.2505313158035278, 0.4540518820285797, -0.16798922419548035, -0.8799841403961182, -1.4626532793045044, -0.004184999503195286, -1.2179661989212036, -1.7192212343215942, 0.3161375820636749, 1.7972638607025146, 2.2445766925811768, -0.7969645857810974, 1.324430227279663, -0.3235594928264618, 0.20156681537628174, 1.100502610206604, 1.2845759391784668, 3.1717166900634766, 1.8887828588485718, -1.2729641199111938, 0.631203293800354, -0.19734279811382294, -0.5334903597831726, 1.1025972366333008, -0.9845150113105774, 1.1445527076721191, -0.2659578323364258, -1.3151111602783203, -1.197164535522461, 0.9254089593887329, 0.4143349230289459, -0.05925562232732773, -0.48295241594314575, 1.1646288633346558, 0.24071241915225983, 1.3988921642303467, 0.6563239693641663, -0.30390214920043945, 0.4950612187385559, -0.426453173160553, -0.4771077334880829, 1.5962129831314087, 0.11134030669927597, -1.6088382005691528, -2.3531391620635986, -0.13053816556930542, -1.0695176124572754, -0.01350676454603672, -0.8597657680511475, -1.026882529258728, 1.591813087463379, 0.41792601346969604, -0.9448712468147278, -0.1528390496969223, -0.3355971872806549, -0.5971410274505615, 2.619525194168091, -1.3718819618225098, -0.24524326622486115, -0.8999496102333069, -0.5399044156074524, 1.5548418760299683, -1.1847676038742065, -0.26159384846687317, -1.0723916292190552, -0.47969484329223633, -1.1790341138839722, -0.4068511128425598, -0.0580592155456543, -0.8562831282615662, 0.7611631751060486, -0.06219947338104248, -1.278533697128296, -0.30281031131744385, -1.1276657581329346, 0.7836970090866089, -0.2214963287115097, 0.040666237473487854, 1.6794815063476562, 0.25453588366508484, -0.3924517333507538, 0.8192734718322754, 1.313707709312439, 0.6519535779953003, -0.5605340600013733, 0.14843931794166565, -0.5772692561149597, 0.5370743274688721, -1.130989909172058, 0.3797987401485443, -2.9545724391937256, 0.6967629194259644, -0.055484287440776825, 0.002685079351067543, -0.16076968610286713, -1.517746090888977, 1.0123953819274902, 2.4542152881622314, -1.0855871438980103, 0.6354544758796692, 0.3354995846748352, 1.2185176610946655, -1.6611155271530151, 0.0637185201048851, -0.712295413017273, 2.1126537322998047, 0.08368916809558868, 1.0983422994613647, -0.5533542633056641, -2.306335687637329, 0.610537588596344, -1.2275723218917847, -1.021833896636963, 0.7048782706260681, -0.907514750957489, 0.24508441984653473, -1.2028547525405884, -0.10228662937879562, -0.8541290163993835, -1.1064027547836304, 0.486626535654068, 0.02924949862062931, 0.6262887716293335, -0.5973114371299744, 0.2013995200395584, -2.2939608097076416, -1.4339594841003418, -0.09990043193101883, -0.9299142956733704, 0.45284390449523926, -0.43305662274360657, 0.7690877914428711, -0.02971523255109787, 0.062359750270843506, 0.3179585039615631, 1.4356566667556763, 3.182429075241089, -0.025297021493315697, 0.31625038385391235, -0.2934862971305847, -1.04766047000885, 1.5544682741165161, 0.9040268659591675, -0.2018260806798935, -0.6132214069366455, -0.9810813665390015, 1.3051109313964844, 1.9456126689910889, 1.0710099935531616, 0.05036979168653488, -0.9004895091056824, -0.7331873774528503, 0.09878718107938766, 0.19681113958358765, 0.4415862262248993, 1.0314899682998657, 0.08382440358400345, 0.22289177775382996, 1.463793158531189, 1.0771677494049072, -0.3676004707813263, 0.5023990273475647, -0.7923018336296082, -0.4126085340976715, 0.5067949295043945, 0.3850874900817871, 0.032209038734436035, 0.31037259101867676, -1.0095893144607544, -0.2822887897491455, -0.1955854594707489, -0.7870362401008606, -0.7521498799324036, -0.30735570192337036, -0.46326449513435364, 1.731544852256775, -0.14012102782726288, -0.5044549107551575, 0.060694195330142975, -0.7880762219429016, -0.04613759368658066, -1.0442533493041992, 0.3532092273235321, -0.10582803189754486, 0.003061537630856037, -0.13911768794059753, 1.633530855178833, -0.9368815422058105, -2.20690655708313, 0.12255078554153442, 0.30236953496932983, -0.3585682809352875, -0.09449562430381775, 1.7778127193450928, 0.5810337066650391, 1.4721702337265015, 1.5317622423171997, 1.0672640800476074, -0.6113314628601074, -1.29509437084198, 0.7226957082748413, 0.885479748249054, -1.3587524890899658, 0.8428201079368591, -0.21430805325508118, -0.5678087472915649, 0.5367884039878845, 1.3020302057266235, 0.4708055555820465, -1.9660838842391968, 0.9121959805488586, -1.1430381536483765, 0.9919617176055908, 0.8235556483268738, 0.8406166434288025, 0.15733328461647034, 0.8921734094619751, -1.2706527709960938, -1.0153193473815918, -0.6066173911094666, -0.6672516465187073, 1.8887780904769897, -0.26573312282562256, 0.3555239140987396, -0.3247545659542084, -1.2377368211746216, 0.11880053579807281, 0.6203790903091431, 0.2998912036418915, -0.3231331706047058, 0.7322689294815063, -0.6676462292671204, -1.0612021684646606, -1.3353172540664673, -0.4143665134906769, -0.9856440424919128, -0.8707974553108215, 1.0570317506790161, 0.7787854671478271, 0.5590663552284241, 1.9465360641479492, 0.6643356084823608, 0.20610302686691284, -2.5896434783935547, 0.8154679536819458, 0.3403918743133545, -0.1139414831995964, 0.8531529903411865, 0.3346785008907318, 1.276620626449585, -0.0803353488445282, 0.5579697489738464, -2.3842945098876953, 2.280111312866211, -0.263077974319458, 0.7663052082061768, 0.14024598896503448, 0.04656334966421127, 1.022392988204956, 0.602698028087616, 0.5402119159698486, -1.0588313341140747, 0.9091379046440125, -0.5530781149864197, 1.16569185256958, 0.9215517640113831, -0.8968076109886169, 0.2097417265176773, 1.1651434898376465, 0.45436277985572815, -0.5370769500732422, -1.0472561120986938, -0.8488837480545044, 0.9213002920150757, 1.7944482564926147, -0.03993133455514908, 0.10473089665174484, 0.7370941042900085, 0.6948128342628479, -1.2759835720062256, -0.08873569220304489, -0.6358737349510193, -0.6870019435882568, 1.8157148361206055, 2.0893399715423584, -0.06840701401233673, -0.07129128277301788, -0.6998625993728638, -1.5001977682113647, 0.8737667798995972, 0.027918832376599312, 0.002286529168486595, 0.773902177810669, -0.6467983722686768, 1.1644223928451538, 0.8161618113517761, 0.8517798781394958, 0.2740998864173889, 0.03155595809221268, 0.20986305177211761, -0.24064823985099792, -1.121414065361023, -0.27144935727119446, -1.0120322704315186, -2.631680488586426, 0.386435866355896, -0.3147726058959961, -1.38919198513031, 0.1098482608795166, -0.8753871321678162, 0.7295306324958801, -0.5151932239532471, -1.1064777374267578, -1.3806910514831543, 0.265536367893219, -0.09468311071395874, 0.8473268151283264, -1.6592715978622437, -0.1894754320383072, 1.1060906648635864, 0.8587311506271362, -0.7102662920951843, 0.7567405104637146, 0.30617180466651917, 0.9110744595527649, 0.8848292231559753, -0.3497556447982788, 0.4473724067211151, 0.21092213690280914, -1.3714048862457275, 0.35781556367874146, 1.4270381927490234, 0.08092696219682693, 1.3858758211135864, -0.39364397525787354, -0.049699895083904266, 0.4036417305469513, -0.2518945634365082, -0.5296512246131897, -0.634311854839325, 0.6671149730682373, -0.07798846065998077, -1.017022728919983, -0.19514326751232147, -0.024296000599861145, -0.23304420709609985, 0.2907303273677826, -1.488660454750061, -0.09276355057954788, -0.45842409133911133, -0.652860164642334, -1.366180419921875, -0.12403688579797745, 1.2966104745864868, -0.8157562613487244, -0.046144142746925354, 0.5782206058502197, 0.22964206337928772, 0.5199164152145386, 0.7585052847862244, -0.7946583032608032, -0.30219411849975586, -0.16525229811668396, -0.39894530177116394, 0.24168141186237335, 1.3294984102249146, -0.06487413495779037, -0.9938337206840515, 0.46332794427871704, -0.19805119931697845, 0.16342318058013916, 1.927798867225647, 0.06394807994365692, -0.8945873379707336, 0.39026546478271484, -0.7751485109329224, 1.8463722467422485, 1.5815738439559937, 1.2943285703659058, -0.08559621125459671, -0.958280622959137, 0.6121869087219238, -0.3091248571872711, -0.3342491388320923, 0.8234638571739197, 0.3492913842201233, -0.315568745136261, -1.4462196826934814, 0.7841058373451233, 1.2524880170822144, -0.7967379689216614, -0.7775233387947083, 0.10407368838787079, -0.8492738604545593, 1.250976800918579, 0.6592007279396057, 0.45104360580444336, 0.34486934542655945, 1.6747233867645264, 0.7001954913139343, -0.5859033465385437, 0.4063739776611328, 0.45200201869010925, -0.1765511929988861, -1.9985466003417969, -1.184228777885437, 0.27960798144340515, -0.5037521719932556, -1.4938185214996338, 1.4154084920883179, -1.2286534309387207, -0.9868677258491516, 0.5315307378768921, 0.1503782421350479, 1.3521738052368164, 0.33355164527893066, 1.7328041791915894, 1.970447063446045, 0.9040641784667969, 0.48873239755630493, 1.1601241827011108, -0.24674732983112335, -0.24135816097259521, 1.596612572669983, -0.4351545572280884, 0.6005932688713074, 1.0410430431365967, -0.4656952917575836, -1.2468305826187134, -0.8557344079017639, -1.1536359786987305, -0.8070738315582275, 1.0644004344940186, 0.11202763766050339, -1.1560314893722534, 0.3388615846633911, 1.6254624128341675, -0.010370430536568165, -0.13885605335235596, 0.6025097966194153, 0.3979964256286621, -0.657569169998169, -0.12372066080570221, -1.0681586265563965, 0.6011021733283997, -0.3452959656715393, -0.4110911190509796, 0.2162611335515976, 0.6086545586585999, 1.2813342809677124, 0.11533761024475098, 0.14600275456905365, 1.250477910041809, -1.417795181274414, 1.1893062591552734, -0.9477242827415466, 0.35010161995887756, -2.179494619369507, 1.4365538358688354, -0.9032466411590576, 1.9905211925506592, -2.7084836959838867, 0.44601505994796753, -0.4052141606807709, -0.5852060914039612, 0.17345066368579865, -0.12407074868679047, 0.180131733417511, -0.02101793698966503, -1.070665955543518, -0.1278950273990631, -0.8238283395767212, 0.42646053433418274, 1.2127841711044312, 1.3627488613128662, -0.9263186454772949, -0.2569282054901123, -1.5741443634033203, -0.15833550691604614, -0.5031918287277222, 0.13520240783691406, -1.7653511762619019, -0.1605890542268753, -2.0450987815856934, -2.442152500152588, -1.3304760456085205, -1.036969780921936, 1.4180344343185425, 0.1664886474609375, -0.9722026586532593, 1.1307101249694824, -0.4253106117248535, -1.7586119174957275, 1.2604511976242065, -2.194262981414795 ]
https://github.com/huggingface/datasets/issues/5555
`.shuffle` throwing error `ValueError: Protocol not known: parent`
I figured out why the issue was occuring but don't know the long-term fix. The dataset I was trying to shuffle was loaded from a saved file which had `::` delimiter in filename. When I try with the exact same file without `::` in filename, it works as expected. Quick fix is to not use colons in filename. But if this is expected behaviour, this should be clearly stated in the documentation. Thanks for help @lhoestq
### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4
291
76
`.shuffle` throwing error `ValueError: Protocol not known: parent` ### Describe the bug ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In [16], line 1 ----> 1 train_dataset = train_dataset.shuffle() File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3616, in Dataset.shuffle(self, seed, generator, keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint) 3610 return self._new_dataset_with_indices( 3611 fingerprint=new_fingerprint, indices_cache_file_name=indices_cache_file_name 3612 ) 3614 permutation = generator.permutation(len(self)) -> 3616 return self.select( 3617 indices=permutation, 3618 keep_in_memory=keep_in_memory, 3619 indices_cache_file_name=indices_cache_file_name if not keep_in_memory else None, 3620 writer_batch_size=writer_batch_size, 3621 new_fingerprint=new_fingerprint, 3622 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3266, in Dataset.select(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3263 return self._select_contiguous(start, length, new_fingerprint=new_fingerprint) 3265 # If not contiguous, we need to create a new indices mapping -> 3266 return self._select_with_indices_mapping( 3267 indices, 3268 keep_in_memory=keep_in_memory, 3269 indices_cache_file_name=indices_cache_file_name, 3270 writer_batch_size=writer_batch_size, 3271 new_fingerprint=new_fingerprint, 3272 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:551, in transmit_format.<locals>.wrapper(*args, **kwargs) 544 self_format = { 545 "type": self._format_type, 546 "format_kwargs": self._format_kwargs, 547 "columns": self._format_columns, 548 "output_all_columns": self._output_all_columns, 549 } 550 # apply actual function --> 551 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 552 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 553 # re-apply format to the output File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/fingerprint.py:480, in fingerprint_transform.<locals>._fingerprint.<locals>.wrapper(*args, **kwargs) 476 validate_fingerprint(kwargs[fingerprint_name]) 478 # Call actual function --> 480 out = func(self, *args, **kwargs) 482 # Update fingerprint of in-place transforms + update in-place history of transforms 484 if inplace: # update after calling func so that the fingerprint doesn't change if the function fails File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_dataset.py:3389, in Dataset._select_with_indices_mapping(self, indices, keep_in_memory, indices_cache_file_name, writer_batch_size, new_fingerprint) 3387 logger.info(f"Caching indices mapping at {indices_cache_file_name}") 3388 tmp_file = tempfile.NamedTemporaryFile("wb", dir=os.path.dirname(indices_cache_file_name), delete=False) -> 3389 writer = ArrowWriter( 3390 path=tmp_file.name, writer_batch_size=writer_batch_size, fingerprint=new_fingerprint, unit="indices" 3391 ) 3393 indices = indices if isinstance(indices, list) else list(indices) 3395 size = len(self) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/datasets/arrow_writer.py:315, in ArrowWriter.__init__(self, schema, features, path, stream, fingerprint, writer_batch_size, hash_salt, check_duplicates, disable_nullable, update_features, with_metadata, unit, embed_local_files, storage_options) 312 self._disable_nullable = disable_nullable 314 if stream is None: --> 315 fs_token_paths = fsspec.get_fs_token_paths(path, storage_options=storage_options) 316 self._fs: fsspec.AbstractFileSystem = fs_token_paths[0] 317 self._path = ( 318 fs_token_paths[2][0] 319 if not is_remote_filesystem(self._fs) 320 else self._fs.unstrip_protocol(fs_token_paths[2][0]) 321 ) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:593, in get_fs_token_paths(urlpath, mode, num, name_function, storage_options, protocol, expand) 591 else: 592 urlpath = stringify_path(urlpath) --> 593 chain = _un_chain(urlpath, storage_options or {}) 594 if len(chain) > 1: 595 inkwargs = {} File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/core.py:330, in _un_chain(path, kwargs) 328 for bit in reversed(bits): 329 protocol = split_protocol(bit)[0] or "file" --> 330 cls = get_filesystem_class(protocol) 331 extra_kwargs = cls._get_kwargs_from_urls(bit) 332 kws = kwargs.get(protocol, {}) File /opt/conda/envs/pytorch/lib/python3.9/site-packages/fsspec/registry.py:240, in get_filesystem_class(protocol) 238 if protocol not in registry: 239 if protocol not in known_implementations: --> 240 raise ValueError("Protocol not known: %s" % protocol) 241 bit = known_implementations[protocol] 242 try: ValueError: Protocol not known: parent ``` This is what the `train_dataset` object looks like ``` Dataset({ features: ['label', 'input_ids', 'attention_mask'], num_rows: 364166 }) ``` ### Steps to reproduce the bug The `train_dataset` obj is created by concatenating two datasets And then shuffle is called, but it throws the mentioned error. ### Expected behavior Should shuffle the dataset properly. ### Environment info - `datasets` version: 2.6.1 - Platform: Linux-5.15.0-1022-aws-x86_64-with-glibc2.31 - Python version: 3.9.13 - PyArrow version: 10.0.0 - Pandas version: 1.4.4 I figured out why the issue was occuring but don't know the long-term fix. The dataset I was trying to shuffle was loaded from a saved file which had `::` delimiter in filename. When I try with the exact same file without `::` in filename, it works as expected. Quick fix is to not use colons in filename. But if this is expected behaviour, this should be clearly stated in the documentation. Thanks for help @lhoestq
[ -1.1844799518585205, -0.8249237537384033, -0.5923757553100586, 1.3262419700622559, -0.041086725890636444, -1.4175077676773071, 0.15833747386932373, -0.9759659767150879, 1.5685051679611206, -0.851817786693573, 0.36299389600753784, -1.6840460300445557, 0.07002703845500946, -0.6778795123100281, -0.7016051411628723, -0.707056999206543, -0.36941543221473694, -0.7346265316009521, 1.1226531267166138, 2.4588141441345215, 1.2230443954467773, -1.2808680534362793, 2.827425003051758, 0.684469997882843, -0.2890704274177551, -0.7870582342147827, 0.3659692704677582, 0.04231644421815872, -1.4310417175292969, -0.2647177577018738, -0.9587410688400269, -0.12044315040111542, -0.6704680919647217, -0.5302082300186157, 0.09007932245731354, 0.4887654483318329, -0.1251162737607956, -0.36021363735198975, -0.4475574493408203, -0.6941916346549988, 0.5668862462043762, -0.23466753959655762, 0.8320412039756775, -0.353167325258255, 1.8041044473648071, -0.6900607347488403, 0.5430346131324768, 0.5654067397117615, 1.247978925704956, 0.25056174397468567, -0.07981934398412704, 0.3725879490375519, 0.21681712567806244, -0.01646611839532852, 0.5824276804924011, 1.1697264909744263, 0.7126179337501526, 0.4722370207309723, 0.7306128740310669, -2.13327956199646, 1.3373223543167114, -0.8154573440551758, 0.2620062232017517, 1.3891854286193848, -1.0811060667037964, 0.4637649655342102, -1.8888193368911743, -0.16745226085186005, 0.47184595465660095, -2.2643516063690186, 0.11686325073242188, -1.2722675800323486, -0.5843492150306702, 1.0450000762939453, 0.3341113030910492, -1.277321219444275, -0.010808262042701244, -0.4675597846508026, 0.9143755435943604, 0.3624309003353119, 1.1413531303405762, -1.6691374778747559, 0.061380237340927124, -0.24340233206748962, 0.3326505422592163, -1.1674578189849854, -1.6144689321517944, 0.7230926752090454, 0.6058768033981323, 0.6088049411773682, -0.17339015007019043, 0.8459424376487732, -1.1357284784317017, 0.8800049424171448, -1.0189547538757324, -1.7750059366226196, -1.395919919013977, -2.4442410469055176, -2.375688314437866, 0.8468601107597351, -0.45038822293281555, -0.3892379701137543, 2.1786434650421143, -1.1351385116577148, -1.6268173456192017, 0.9781032204627991, 0.28770095109939575, -0.0121620399877429, 2.3988258838653564, 0.2298361361026764, -0.8662192821502686, 0.718359112739563, -0.8888490796089172, 0.6528528928756714, -0.33494243025779724, 1.2593283653259277, 0.3787437677383423, -1.0725429058074951, 1.5563719272613525, -0.4092484712600708, 0.4615350663661957, -0.7108482718467712, -0.3858170211315155, -0.504764974117279, 0.21145299077033997, 1.8931888341903687, -0.0994601771235466, 1.4803123474121094, -0.163105309009552, -1.4761022329330444, -1.396125078201294, 0.6722872257232666, 0.5455814599990845, -0.8732571005821228, 0.2088121473789215, -0.49928510189056396, 0.10486118495464325, 0.1783147156238556, 1.1118247509002686, 1.327652096748352, 0.833561897277832, -0.1842840015888214, -0.9097463488578796, 0.062278956174850464, -0.0578131377696991, -0.6678177714347839, -1.7507531642913818, -0.30160167813301086, 0.1072595864534378, 0.6924363970756531, -1.242026925086975, 1.994715690612793, 0.9203459024429321, 2.0351955890655518, 1.0054258108139038, -0.3973709046840668, 1.559640884399414, 0.07617149502038956, 1.8917081356048584, -0.35679179430007935, 0.7719966769218445, -0.5159755945205688, -1.128044605255127, 0.7293189167976379, -0.38140159845352173, -1.9918901920318604, -0.4405573010444641, -0.8506350517272949, -0.15351742506027222, -0.8909028172492981, 1.002585530281067, -0.1367044597864151, -1.325847864151001, 0.23545515537261963, -0.6752288937568665, 0.09806203097105026, -1.3825671672821045, 0.2818211019039154, 0.7012364864349365, -0.7388705015182495, 0.06124521791934967, -0.4604220390319824, -1.4296424388885498, -0.5850437879562378, 0.3535085916519165, 1.7906162738800049, -0.7095232605934143, 1.0103412866592407, 0.9788466691970825, -0.5657064318656921, -0.055681012570858, 0.4515388607978821, -0.40007874369621277, 0.9058452844619751, -1.112786889076233, -0.443122923374176, 1.0713659524917603, -0.30921295285224915, -0.4648588001728058, 1.3214579820632935, 0.6505296230316162, -1.000849962234497, -0.2872207462787628, -0.14862321317195892, -0.8526675701141357, 0.12531156837940216, -1.6222301721572876, -0.13376036286354065, 0.30146998167037964, -1.4746519327163696, -0.4631118178367615, -0.03954073041677475, 1.3827719688415527, -0.05703194439411163, 1.3240796327590942, -0.23082460463047028, -0.12724576890468597, -0.5913074612617493, -0.4776393175125122, 0.17932426929473877, -0.09990978986024857, -0.6057420372962952, 0.33028414845466614, -0.822900652885437, 0.18807119131088257, 1.4717605113983154, 0.24506069719791412, 0.11128269881010056, 0.5284194350242615, 1.1230781078338623, 0.28943970799446106, -0.1441401243209839, -0.8379173278808594, -1.6860322952270508, 2.0513274669647217, -1.6575928926467896, 1.9423139095306396, 0.9057966470718384, -0.03454965353012085, -1.818500280380249, -1.8321878910064697, 1.4400259256362915, 1.1228910684585571, 2.4514410495758057, 0.5306308269500732, 0.4340689778327942, -0.8161911964416504, -0.645942211151123, 0.46460360288619995, -0.7794535160064697, -0.8738861680030823, 0.1808733195066452, 2.3465116024017334, 1.7221169471740723, -0.36987367272377014, -0.1635797619819641, -0.8647680878639221, 1.2999812364578247, -0.2406722456216812, 0.258379727602005, 1.9404926300048828, -0.44621989130973816, -1.0763885974884033, 1.287778615951538, -2.441197395324707, 0.23575478792190552, 1.9950482845306396, 0.32375243306159973, 0.12464411556720734, -1.125671148300171, -0.6902561783790588, -0.18328186869621277, -0.4647919237613678, -1.2505313158035278, 0.4540518820285797, -0.16798922419548035, -0.8799841403961182, -1.4626532793045044, -0.004184999503195286, -1.2179661989212036, -1.7192212343215942, 0.3161375820636749, 1.7972638607025146, 2.2445766925811768, -0.7969645857810974, 1.324430227279663, -0.3235594928264618, 0.20156681537628174, 1.100502610206604, 1.2845759391784668, 3.1717166900634766, 1.8887828588485718, -1.2729641199111938, 0.631203293800354, -0.19734279811382294, -0.5334903597831726, 1.1025972366333008, -0.9845150113105774, 1.1445527076721191, -0.2659578323364258, -1.3151111602783203, -1.197164535522461, 0.9254089593887329, 0.4143349230289459, -0.05925562232732773, -0.48295241594314575, 1.1646288633346558, 0.24071241915225983, 1.3988921642303467, 0.6563239693641663, -0.30390214920043945, 0.4950612187385559, -0.426453173160553, -0.4771077334880829, 1.5962129831314087, 0.11134030669927597, -1.6088382005691528, -2.3531391620635986, -0.13053816556930542, -1.0695176124572754, -0.01350676454603672, -0.8597657680511475, -1.026882529258728, 1.591813087463379, 0.41792601346969604, -0.9448712468147278, -0.1528390496969223, -0.3355971872806549, -0.5971410274505615, 2.619525194168091, -1.3718819618225098, -0.24524326622486115, -0.8999496102333069, -0.5399044156074524, 1.5548418760299683, -1.1847676038742065, -0.26159384846687317, -1.0723916292190552, -0.47969484329223633, -1.1790341138839722, -0.4068511128425598, -0.0580592155456543, -0.8562831282615662, 0.7611631751060486, -0.06219947338104248, -1.278533697128296, -0.30281031131744385, -1.1276657581329346, 0.7836970090866089, -0.2214963287115097, 0.040666237473487854, 1.6794815063476562, 0.25453588366508484, -0.3924517333507538, 0.8192734718322754, 1.313707709312439, 0.6519535779953003, -0.5605340600013733, 0.14843931794166565, -0.5772692561149597, 0.5370743274688721, -1.130989909172058, 0.3797987401485443, -2.9545724391937256, 0.6967629194259644, -0.055484287440776825, 0.002685079351067543, -0.16076968610286713, -1.517746090888977, 1.0123953819274902, 2.4542152881622314, -1.0855871438980103, 0.6354544758796692, 0.3354995846748352, 1.2185176610946655, -1.6611155271530151, 0.0637185201048851, -0.712295413017273, 2.1126537322998047, 0.08368916809558868, 1.0983422994613647, -0.5533542633056641, -2.306335687637329, 0.610537588596344, -1.2275723218917847, -1.021833896636963, 0.7048782706260681, -0.907514750957489, 0.24508441984653473, -1.2028547525405884, -0.10228662937879562, -0.8541290163993835, -1.1064027547836304, 0.486626535654068, 0.02924949862062931, 0.6262887716293335, -0.5973114371299744, 0.2013995200395584, -2.2939608097076416, -1.4339594841003418, -0.09990043193101883, -0.9299142956733704, 0.45284390449523926, -0.43305662274360657, 0.7690877914428711, -0.02971523255109787, 0.062359750270843506, 0.3179585039615631, 1.4356566667556763, 3.182429075241089, -0.025297021493315697, 0.31625038385391235, -0.2934862971305847, -1.04766047000885, 1.5544682741165161, 0.9040268659591675, -0.2018260806798935, -0.6132214069366455, -0.9810813665390015, 1.3051109313964844, 1.9456126689910889, 1.0710099935531616, 0.05036979168653488, -0.9004895091056824, -0.7331873774528503, 0.09878718107938766, 0.19681113958358765, 0.4415862262248993, 1.0314899682998657, 0.08382440358400345, 0.22289177775382996, 1.463793158531189, 1.0771677494049072, -0.3676004707813263, 0.5023990273475647, -0.7923018336296082, -0.4126085340976715, 0.5067949295043945, 0.3850874900817871, 0.032209038734436035, 0.31037259101867676, -1.0095893144607544, -0.2822887897491455, -0.1955854594707489, -0.7870362401008606, -0.7521498799324036, -0.30735570192337036, -0.46326449513435364, 1.731544852256775, -0.14012102782726288, -0.5044549107551575, 0.060694195330142975, -0.7880762219429016, -0.04613759368658066, -1.0442533493041992, 0.3532092273235321, -0.10582803189754486, 0.003061537630856037, -0.13911768794059753, 1.633530855178833, -0.9368815422058105, -2.20690655708313, 0.12255078554153442, 0.30236953496932983, -0.3585682809352875, -0.09449562430381775, 1.7778127193450928, 0.5810337066650391, 1.4721702337265015, 1.5317622423171997, 1.0672640800476074, -0.6113314628601074, -1.29509437084198, 0.7226957082748413, 0.885479748249054, -1.3587524890899658, 0.8428201079368591, -0.21430805325508118, -0.5678087472915649, 0.5367884039878845, 1.3020302057266235, 0.4708055555820465, -1.9660838842391968, 0.9121959805488586, -1.1430381536483765, 0.9919617176055908, 0.8235556483268738, 0.8406166434288025, 0.15733328461647034, 0.8921734094619751, -1.2706527709960938, -1.0153193473815918, -0.6066173911094666, -0.6672516465187073, 1.8887780904769897, -0.26573312282562256, 0.3555239140987396, -0.3247545659542084, -1.2377368211746216, 0.11880053579807281, 0.6203790903091431, 0.2998912036418915, -0.3231331706047058, 0.7322689294815063, -0.6676462292671204, -1.0612021684646606, -1.3353172540664673, -0.4143665134906769, -0.9856440424919128, -0.8707974553108215, 1.0570317506790161, 0.7787854671478271, 0.5590663552284241, 1.9465360641479492, 0.6643356084823608, 0.20610302686691284, -2.5896434783935547, 0.8154679536819458, 0.3403918743133545, -0.1139414831995964, 0.8531529903411865, 0.3346785008907318, 1.276620626449585, -0.0803353488445282, 0.5579697489738464, -2.3842945098876953, 2.280111312866211, -0.263077974319458, 0.7663052082061768, 0.14024598896503448, 0.04656334966421127, 1.022392988204956, 0.602698028087616, 0.5402119159698486, -1.0588313341140747, 0.9091379046440125, -0.5530781149864197, 1.16569185256958, 0.9215517640113831, -0.8968076109886169, 0.2097417265176773, 1.1651434898376465, 0.45436277985572815, -0.5370769500732422, -1.0472561120986938, -0.8488837480545044, 0.9213002920150757, 1.7944482564926147, -0.03993133455514908, 0.10473089665174484, 0.7370941042900085, 0.6948128342628479, -1.2759835720062256, -0.08873569220304489, -0.6358737349510193, -0.6870019435882568, 1.8157148361206055, 2.0893399715423584, -0.06840701401233673, -0.07129128277301788, -0.6998625993728638, -1.5001977682113647, 0.8737667798995972, 0.027918832376599312, 0.002286529168486595, 0.773902177810669, -0.6467983722686768, 1.1644223928451538, 0.8161618113517761, 0.8517798781394958, 0.2740998864173889, 0.03155595809221268, 0.20986305177211761, -0.24064823985099792, -1.121414065361023, -0.27144935727119446, -1.0120322704315186, -2.631680488586426, 0.386435866355896, -0.3147726058959961, -1.38919198513031, 0.1098482608795166, -0.8753871321678162, 0.7295306324958801, -0.5151932239532471, -1.1064777374267578, -1.3806910514831543, 0.265536367893219, -0.09468311071395874, 0.8473268151283264, -1.6592715978622437, -0.1894754320383072, 1.1060906648635864, 0.8587311506271362, -0.7102662920951843, 0.7567405104637146, 0.30617180466651917, 0.9110744595527649, 0.8848292231559753, -0.3497556447982788, 0.4473724067211151, 0.21092213690280914, -1.3714048862457275, 0.35781556367874146, 1.4270381927490234, 0.08092696219682693, 1.3858758211135864, -0.39364397525787354, -0.049699895083904266, 0.4036417305469513, -0.2518945634365082, -0.5296512246131897, -0.634311854839325, 0.6671149730682373, -0.07798846065998077, -1.017022728919983, -0.19514326751232147, -0.024296000599861145, -0.23304420709609985, 0.2907303273677826, -1.488660454750061, -0.09276355057954788, -0.45842409133911133, -0.652860164642334, -1.366180419921875, -0.12403688579797745, 1.2966104745864868, -0.8157562613487244, -0.046144142746925354, 0.5782206058502197, 0.22964206337928772, 0.5199164152145386, 0.7585052847862244, -0.7946583032608032, -0.30219411849975586, -0.16525229811668396, -0.39894530177116394, 0.24168141186237335, 1.3294984102249146, -0.06487413495779037, -0.9938337206840515, 0.46332794427871704, -0.19805119931697845, 0.16342318058013916, 1.927798867225647, 0.06394807994365692, -0.8945873379707336, 0.39026546478271484, -0.7751485109329224, 1.8463722467422485, 1.5815738439559937, 1.2943285703659058, -0.08559621125459671, -0.958280622959137, 0.6121869087219238, -0.3091248571872711, -0.3342491388320923, 0.8234638571739197, 0.3492913842201233, -0.315568745136261, -1.4462196826934814, 0.7841058373451233, 1.2524880170822144, -0.7967379689216614, -0.7775233387947083, 0.10407368838787079, -0.8492738604545593, 1.250976800918579, 0.6592007279396057, 0.45104360580444336, 0.34486934542655945, 1.6747233867645264, 0.7001954913139343, -0.5859033465385437, 0.4063739776611328, 0.45200201869010925, -0.1765511929988861, -1.9985466003417969, -1.184228777885437, 0.27960798144340515, -0.5037521719932556, -1.4938185214996338, 1.4154084920883179, -1.2286534309387207, -0.9868677258491516, 0.5315307378768921, 0.1503782421350479, 1.3521738052368164, 0.33355164527893066, 1.7328041791915894, 1.970447063446045, 0.9040641784667969, 0.48873239755630493, 1.1601241827011108, -0.24674732983112335, -0.24135816097259521, 1.596612572669983, -0.4351545572280884, 0.6005932688713074, 1.0410430431365967, -0.4656952917575836, -1.2468305826187134, -0.8557344079017639, -1.1536359786987305, -0.8070738315582275, 1.0644004344940186, 0.11202763766050339, -1.1560314893722534, 0.3388615846633911, 1.6254624128341675, -0.010370430536568165, -0.13885605335235596, 0.6025097966194153, 0.3979964256286621, -0.657569169998169, -0.12372066080570221, -1.0681586265563965, 0.6011021733283997, -0.3452959656715393, -0.4110911190509796, 0.2162611335515976, 0.6086545586585999, 1.2813342809677124, 0.11533761024475098, 0.14600275456905365, 1.250477910041809, -1.417795181274414, 1.1893062591552734, -0.9477242827415466, 0.35010161995887756, -2.179494619369507, 1.4365538358688354, -0.9032466411590576, 1.9905211925506592, -2.7084836959838867, 0.44601505994796753, -0.4052141606807709, -0.5852060914039612, 0.17345066368579865, -0.12407074868679047, 0.180131733417511, -0.02101793698966503, -1.070665955543518, -0.1278950273990631, -0.8238283395767212, 0.42646053433418274, 1.2127841711044312, 1.3627488613128662, -0.9263186454772949, -0.2569282054901123, -1.5741443634033203, -0.15833550691604614, -0.5031918287277222, 0.13520240783691406, -1.7653511762619019, -0.1605890542268753, -2.0450987815856934, -2.442152500152588, -1.3304760456085205, -1.036969780921936, 1.4180344343185425, 0.1664886474609375, -0.9722026586532593, 1.1307101249694824, -0.4253106117248535, -1.7586119174957275, 1.2604511976242065, -2.194262981414795 ]
https://github.com/huggingface/datasets/issues/5546
Downloaded datasets do not cache at $HF_HOME
Hi ! Can you make sure you set `HF_HOME` before importing `datasets` ? Then you can print ```python print(datasets.config.HF_CACHE_HOME) print(datasets.config.HF_DATASETS_CACHE) ```
### Describe the bug In the huggingface course (https://huggingface.co/course/chapter3/2?fw=pt) it said that if we set HF_HOME, downloaded datasets would be cached at specified address but it does not. downloaded models from checkpoint names are downloaded and cached at HF_HOME but this is not the case for datasets, they are still cached at ~/.cache/huggingface/datasets. ### Steps to reproduce the bug Run the following code ``` from datasets import load_dataset raw_datasets = load_dataset("glue", "mrpc") raw_datasets ``` it downloads and store dataset at ~/.cache/huggingface/datasets ### Expected behavior to cache dataset at HF_HOME. ### Environment info python 3.10.6 Kubuntu 22.04 HF_HOME located on a separate partition
292
21
Downloaded datasets do not cache at $HF_HOME ### Describe the bug In the huggingface course (https://huggingface.co/course/chapter3/2?fw=pt) it said that if we set HF_HOME, downloaded datasets would be cached at specified address but it does not. downloaded models from checkpoint names are downloaded and cached at HF_HOME but this is not the case for datasets, they are still cached at ~/.cache/huggingface/datasets. ### Steps to reproduce the bug Run the following code ``` from datasets import load_dataset raw_datasets = load_dataset("glue", "mrpc") raw_datasets ``` it downloads and store dataset at ~/.cache/huggingface/datasets ### Expected behavior to cache dataset at HF_HOME. ### Environment info python 3.10.6 Kubuntu 22.04 HF_HOME located on a separate partition Hi ! Can you make sure you set `HF_HOME` before importing `datasets` ? Then you can print ```python print(datasets.config.HF_CACHE_HOME) print(datasets.config.HF_DATASETS_CACHE) ```
[ -1.073030710220337, -0.9087356328964233, -0.6936896443367004, 1.4957488775253296, -0.1721569001674652, -1.316701054573059, 0.15854528546333313, -1.050142526626587, 1.7263950109481812, -0.8836342096328735, 0.23554116487503052, -1.7613087892532349, -0.05776538699865341, -0.5205405354499817, -0.8168242573738098, -0.9522011876106262, -0.3227941691875458, -0.7792264223098755, 0.9618398547172546, 2.5684421062469482, 1.2503482103347778, -1.2618048191070557, 2.6853396892547607, 0.5932106375694275, -0.1387486755847931, -1.0032517910003662, 0.47750401496887207, 0.07372093945741653, -1.31455397605896, -0.4562380611896515, -0.9140469431877136, -0.061838116496801376, -0.5821408033370972, -0.5885236263275146, 0.07067559659481049, 0.476394921541214, -0.38216859102249146, -0.3684436082839966, -0.5253194570541382, -0.7904112935066223, 0.4199925661087036, -0.3866347372531891, 1.0127878189086914, -0.4748609662055969, 1.8957562446594238, -0.6361651420593262, 0.44333183765411377, 0.6788800358772278, 1.2607861757278442, 0.2199932485818863, 0.05803345516324043, 0.25624680519104004, 0.3917636275291443, 0.04704092815518379, 0.47531378269195557, 1.122295618057251, 0.6172722578048706, 0.5468645095825195, 0.6410954594612122, -2.19124436378479, 1.2951830625534058, -0.9601386189460754, 0.2784743309020996, 1.2838973999023438, -0.9610536098480225, 0.2139148861169815, -1.6670944690704346, -0.08134230226278305, 0.5659125447273254, -2.200070381164551, 0.2749861180782318, -1.304621696472168, -0.4214932322502136, 1.1112213134765625, 0.3488290309906006, -1.2761974334716797, 0.17256024479866028, -0.4776594638824463, 1.060206413269043, 0.5000455975532532, 1.1284241676330566, -1.780164361000061, -0.11591355502605438, -0.29479360580444336, 0.029628325253725052, -1.312087059020996, -1.6070464849472046, 0.5254790782928467, 0.6191011071205139, 0.6941092610359192, -0.12838223576545715, 1.012200117111206, -1.044771671295166, 0.6681745052337646, -1.021679401397705, -1.7198330163955688, -1.4457056522369385, -2.2775917053222656, -2.3343849182128906, 0.7084578275680542, -0.43162772059440613, -0.5050088763237, 2.009279727935791, -1.0241650342941284, -1.806244969367981, 1.120461106300354, 0.30906954407691956, 0.028352532535791397, 2.296933650970459, 0.2679170072078705, -0.7032960057258606, 0.45092642307281494, -0.6499814987182617, 0.7206439971923828, -0.3527458608150482, 1.3705192804336548, 0.4534613788127899, -1.1458426713943481, 1.5288666486740112, -0.5197871327400208, 0.6455637812614441, -0.6566935181617737, -0.5246887803077698, -0.8800814747810364, 0.20558448135852814, 1.8952674865722656, -0.3315969407558441, 1.6619473695755005, -0.3082011342048645, -1.5665534734725952, -1.6394165754318237, 0.8342350125312805, 0.41376444697380066, -0.7257654666900635, 0.033007074147462845, -0.4555808901786804, 0.08487992733716965, -0.13638806343078613, 1.090761423110962, 1.0909693241119385, 0.7031946182250977, -0.4150357246398926, -0.8945249915122986, 0.27643609046936035, -0.07604193687438965, -0.6999568343162537, -1.8127723932266235, -0.3177925646305084, 0.12191891670227051, 0.5910812616348267, -1.1411904096603394, 1.652417540550232, 0.8970513343811035, 1.875176191329956, 1.0338661670684814, -0.24370530247688293, 1.3272775411605835, 0.10981987416744232, 1.9141616821289062, -0.546829879283905, 0.6900492906570435, -0.18551641702651978, -1.126261830329895, 0.7936979532241821, -0.5153350830078125, -2.1239817142486572, -0.865533709526062, -0.7721161246299744, -0.10877712815999985, -0.8643980622291565, 0.94184809923172, -0.1994093656539917, -1.5317708253860474, 0.20138365030288696, -0.6394917964935303, 0.2223387062549591, -1.217935562133789, 0.29291531443595886, 0.8094881176948547, -0.6608492136001587, 0.02783716842532158, -0.16472472250461578, -1.310515284538269, -0.39327186346054077, 0.28374183177948, 1.9692713022232056, -0.7808623313903809, 0.9843761324882507, 1.052634596824646, -0.6803362369537354, 0.06762000918388367, 0.21965312957763672, -0.373822420835495, 0.9088205099105835, -1.0848292112350464, -0.2161651849746704, 1.3511059284210205, -0.2994578182697296, -0.6233705878257751, 1.476479172706604, 0.8085512518882751, -1.0211138725280762, -0.01486940961331129, -0.1341535896062851, -0.7980604767799377, -0.08200965076684952, -1.547206997871399, -0.03163100779056549, 0.36031869053840637, -1.4394371509552002, -0.539493203163147, -0.18187765777111053, 1.413321614265442, -0.19322559237480164, 1.3495348691940308, -0.2955279052257538, -0.2243754267692566, -0.3595757782459259, -0.3782239556312561, 0.1347130388021469, -0.270638644695282, -0.6183978319168091, 0.24305906891822815, -0.7712138295173645, 0.31470420956611633, 1.3567368984222412, 0.34723997116088867, 0.01990094780921936, 0.5611680746078491, 1.1369062662124634, 0.32604143023490906, -0.110622838139534, -0.7617778182029724, -1.6698633432388306, 1.9072740077972412, -1.3133114576339722, 1.9873284101486206, 0.7580792903900146, -0.0670144185423851, -1.7852962017059326, -1.895552635192871, 1.319498062133789, 1.1376844644546509, 2.364252805709839, 0.4994596838951111, 0.3369189500808716, -0.7692636847496033, -0.7093465328216553, 0.37907832860946655, -1.087091088294983, -0.5930245518684387, 0.06565166264772415, 2.328685760498047, 1.7159528732299805, -0.48555848002433777, -0.1828620880842209, -1.0324479341506958, 1.3102573156356812, -0.27169308066368103, 0.2252827137708664, 1.9805346727371216, -0.25950029492378235, -1.0494753122329712, 1.3750746250152588, -2.212139368057251, 0.2821645438671112, 2.041344165802002, 0.24200859665870667, -0.008716721087694168, -1.4671368598937988, -0.67552250623703, -0.34645843505859375, -0.37300026416778564, -1.2716413736343384, 0.5477268695831299, -0.3114721179008484, -0.8044224381446838, -1.4134329557418823, 0.13610196113586426, -1.051671028137207, -1.6674396991729736, 0.33911967277526855, 1.9498677253723145, 1.8268656730651855, -0.6651855111122131, 1.505465030670166, -0.20745156705379486, 0.1939908266067505, 1.308280110359192, 1.3663051128387451, 3.1853787899017334, 1.912611484527588, -1.372377634048462, 0.8428348302841187, -0.0366787314414978, -0.4727573096752167, 1.2654248476028442, -1.14725923538208, 1.3219724893569946, -0.1926099807024002, -1.2305608987808228, -1.400262713432312, 0.8953132629394531, 0.5142503976821899, 0.0221719890832901, -0.4884883463382721, 1.286684513092041, 0.028119828552007675, 1.3191583156585693, 0.5858438014984131, -0.4335690140724182, 0.6703447103500366, -0.4713454246520996, -0.5239017605781555, 1.4482903480529785, 0.33171671628952026, -1.4133144617080688, -2.374725818634033, -0.235232874751091, -0.8408565521240234, -0.08880714327096939, -0.5242670178413391, -1.0423284769058228, 1.6944082975387573, 0.5340160131454468, -1.2333102226257324, -0.20054443180561066, -0.20437033474445343, -0.5577438473701477, 2.7188377380371094, -1.3059334754943848, -0.09599696099758148, -1.022413730621338, -0.6425285935401917, 1.6447540521621704, -1.2519811391830444, -0.22614170610904694, -1.1075325012207031, -0.6721526980400085, -1.316626787185669, -0.5828474164009094, 0.017898328602313995, -0.9160540699958801, 0.8171088695526123, 0.1809210628271103, -1.2679778337478638, -0.34203916788101196, -0.9228672385215759, 0.9474761486053467, -0.09857146441936493, 0.25137853622436523, 1.8507710695266724, 0.4721548855304718, -0.5487369298934937, 0.6378777623176575, 1.201582431793213, 0.6538893580436707, -0.725765585899353, 0.21772411465644836, -0.7077425122261047, 0.27407896518707275, -1.3768244981765747, 0.17659327387809753, -2.919989824295044, 0.6450090408325195, -0.12595820426940918, -0.0841582641005516, -0.01073054876178503, -1.3239984512329102, 1.0025575160980225, 2.4938952922821045, -1.2054914236068726, 0.43071311712265015, 0.3141144812107086, 1.1197181940078735, -1.6149357557296753, 0.3303649127483368, -0.4328944683074951, 2.0410354137420654, 0.22039806842803955, 1.2543045282363892, -0.43914976716041565, -2.0453381538391113, 0.6910262107849121, -1.3218035697937012, -1.2156914472579956, 0.9030752778053284, -0.8791136741638184, 0.16914021968841553, -1.4294683933258057, -0.20566010475158691, -0.8615099787712097, -1.3175737857818604, 0.7251063585281372, 0.029744282364845276, 0.43068331480026245, -0.4777070879936218, 0.41586175560951233, -2.0753979682922363, -1.2598509788513184, -0.2697378098964691, -0.9665955901145935, 0.461870014667511, -0.29120296239852905, 0.6514387726783752, -0.20115067064762115, 0.04774285480380058, 0.4863964021205902, 1.4404221773147583, 3.421304225921631, 0.18122521042823792, 0.24922806024551392, -0.041764285415410995, -0.9895987510681152, 1.3592640161514282, 0.9191615581512451, -0.1658719778060913, -0.6310650110244751, -1.0241034030914307, 1.237100601196289, 1.8978091478347778, 1.0741273164749146, 0.03856135904788971, -0.7403207421302795, -0.7111153602600098, -0.027540702372789383, 0.06829551607370377, 0.4688728451728821, 0.8896028995513916, 0.06342922151088715, 0.08295959234237671, 1.4900740385055542, 1.1247316598892212, -0.3409867286682129, 0.4238242208957672, -0.8190964460372925, -0.4751214385032654, 0.47489598393440247, 0.32310736179351807, -0.01304714847356081, 0.3552110493183136, -1.0204660892486572, -0.24435602128505707, -0.39641183614730835, -0.9151620268821716, -0.7752524018287659, -0.6040871739387512, -0.39507821202278137, 1.6002074480056763, 0.014661331661045551, -0.4523274600505829, -0.07253566384315491, -0.7295186519622803, -0.16121307015419006, -1.0571084022521973, 0.39724716544151306, -0.12628518044948578, -0.15196847915649414, -0.030793171375989914, 1.561340570449829, -1.0308979749679565, -2.1183722019195557, 0.17418240010738373, 0.23619753122329712, -0.3653763234615326, 0.11611643433570862, 1.6148585081100464, 0.5817740559577942, 1.3791322708129883, 1.2965402603149414, 0.9799513816833496, -0.6619827151298523, -1.4005043506622314, 0.6830766201019287, 0.9325748085975647, -1.435689926147461, 0.9571942687034607, 0.030026253312826157, -0.5768435001373291, 0.6807683110237122, 1.286768913269043, 0.5053581595420837, -1.8409146070480347, 0.6890297532081604, -0.7959004044532776, 0.7005935907363892, 0.6820814609527588, 0.7848529815673828, 0.24988672137260437, 0.8553407788276672, -1.3320878744125366, -1.13438081741333, -0.6589083671569824, -0.621887743473053, 1.950562596321106, -0.24659322202205658, 0.5466884970664978, -0.20725546777248383, -1.3070164918899536, -0.21138526499271393, 0.7680184841156006, 0.32972630858421326, -0.47831594944000244, 0.865574300289154, -0.5719237923622131, -1.0325300693511963, -1.3201754093170166, -0.33221864700317383, -1.14809250831604, -0.8692257404327393, 1.0419270992279053, 0.7858052253723145, 0.3291001617908478, 1.8097341060638428, 0.6608167886734009, 0.3219669461250305, -2.613860607147217, 0.9005085825920105, 0.2958779036998749, -0.054028671234846115, 0.8657066226005554, 0.25618240237236023, 1.0031734704971313, 0.033811189234256744, 0.6743699908256531, -2.4338181018829346, 2.20755672454834, -0.26439863443374634, 0.5719023942947388, -0.040136802941560745, -0.18681484460830688, 1.1661969423294067, 0.578883945941925, 0.572174608707428, -1.0923877954483032, 0.7193341255187988, -0.6099666357040405, 1.0924031734466553, 1.0021394491195679, -0.9400670528411865, -0.017798196524381638, 1.419046401977539, 0.514056384563446, -0.4355376362800598, -0.9715097546577454, -0.8956085443496704, 0.9873543977737427, 1.6496976613998413, 0.0030955541878938675, -0.08273401856422424, 0.9438811540603638, 0.6735827922821045, -1.3420065641403198, 0.22571955621242523, -0.7469334602355957, -0.7973772287368774, 1.7131773233413696, 2.049208402633667, -0.021652329713106155, -0.23135441541671753, -0.7311235070228577, -1.135321021080017, 0.811901867389679, 0.02322426438331604, 0.015546315349638462, 0.6872091889381409, -0.6544137597084045, 1.0574533939361572, 0.7755176424980164, 0.949455201625824, 0.1068471297621727, 0.29844504594802856, 0.44182413816452026, -0.2273188829421997, -1.2129795551300049, -0.2721073627471924, -1.1131212711334229, -2.5280330181121826, 0.4202142357826233, -0.25301098823547363, -1.480398178100586, 0.06965509057044983, -1.1543275117874146, 0.8942840695381165, -0.5872652530670166, -1.2159204483032227, -1.6367744207382202, 0.23347240686416626, -0.058949027210474014, 0.8118481040000916, -1.5088876485824585, -0.060870274901390076, 1.2594538927078247, 0.8066830635070801, -0.5713769793510437, 1.0325156450271606, 0.15847374498844147, 0.9857616424560547, 0.8699833750724792, -0.3582284152507782, 0.5226176381111145, 0.1336209923028946, -1.3953993320465088, 0.5275854468345642, 1.230564832687378, 0.18279731273651123, 1.549851655960083, -0.5026078820228577, 0.13945505023002625, 0.46718931198120117, -0.6112256646156311, -0.44454124569892883, -0.5131736993789673, 0.7802852392196655, 0.1514151394367218, -0.8452529311180115, -0.03065302222967148, -0.11530658602714539, -0.2841228246688843, 0.16983361542224884, -1.4634716510772705, -0.14219287037849426, -0.24372442066669464, -0.603438675403595, -1.1841466426849365, -0.11057963222265244, 1.395007610321045, -0.736323893070221, -0.2779322564601898, 0.5594286322593689, 0.3193356990814209, 0.572307288646698, 0.5539432168006897, -0.6134786009788513, -0.19826443493366241, -0.3773843050003052, -0.36675572395324707, 0.2206990122795105, 1.3625478744506836, -0.10030312091112137, -0.9487206339836121, 0.7660921216011047, -0.4129519760608673, 0.07443685829639435, 1.9320729970932007, 0.03017277643084526, -0.7660994529724121, 0.34703192114830017, -0.671604335308075, 1.973429560661316, 1.7891336679458618, 1.4188344478607178, 0.012053265236318111, -0.9824000597000122, 0.548418402671814, -0.2521975338459015, -0.4982019066810608, 1.0484563112258911, 0.47966402769088745, -0.15455010533332825, -1.2648570537567139, 0.7216673493385315, 1.1757925748825073, -0.9127362370491028, -0.7404197454452515, 0.11637502908706665, -0.9137923121452332, 1.0601129531860352, 0.649562656879425, 0.4424334764480591, 0.30877530574798584, 1.5131430625915527, 0.7078195214271545, -0.40968137979507446, 0.5570057034492493, 0.5169665813446045, -0.1119697242975235, -1.9827157258987427, -1.0488334894180298, 0.48228394985198975, -0.5622595548629761, -1.6116729974746704, 1.3626567125320435, -1.187299132347107, -0.9491887092590332, 0.5306564569473267, 0.13198505342006683, 1.4134297370910645, 0.39227792620658875, 1.6826059818267822, 2.084749698638916, 0.9498541951179504, 0.28219109773635864, 1.3358324766159058, -0.02256900817155838, -0.4303416907787323, 1.801705002784729, -0.3948952257633209, 0.4489247500896454, 1.0114505290985107, -0.3964374363422394, -1.111227035522461, -0.7871883511543274, -1.1928960084915161, -0.5829459428787231, 1.0968395471572876, 0.11368810385465622, -1.1511529684066772, 0.14685986936092377, 1.5321071147918701, 0.11317805200815201, -0.22145871818065643, 0.7193992137908936, 0.34184813499450684, -0.6926278471946716, -0.0821121335029602, -0.898574709892273, 0.512620210647583, -0.18482479453086853, -0.3538268208503723, 0.32634207606315613, 0.5567501783370972, 1.357612133026123, -0.027634382247924805, 0.11872263252735138, 1.2345079183578491, -1.397592544555664, 1.439623475074768, -0.6522727608680725, 0.20357921719551086, -2.4741766452789307, 1.4440457820892334, -0.7590237855911255, 1.7941807508468628, -2.598905563354492, 0.4530394971370697, -0.575452983379364, -0.4629189670085907, 0.3662661910057068, -0.41458261013031006, 0.17342010140419006, -0.12973399460315704, -1.1471353769302368, -0.04469311237335205, -0.7419487833976746, 0.6527982950210571, 1.1335301399230957, 1.3148218393325806, -1.238752841949463, -0.34739261865615845, -1.7687636613845825, -0.2099640816450119, -0.6975299715995789, 0.4256860613822937, -1.9006288051605225, -0.045864537358284, -1.9187328815460205, -2.493237018585205, -1.3238651752471924, -0.7414618134498596, 0.9192909598350525, 0.16869843006134033, -0.8534851670265198, 1.172956109046936, -0.3116816282272339, -1.8544586896896362, 1.0193403959274292, -2.244767189025879 ]
https://github.com/huggingface/datasets/issues/5543
the pile datasets url seems to change back
Thanks for reporting, @wjfwzzc. I am transferring this issue to the corresponding dataset on the Hub: https://huggingface.co/datasets/bookcorpusopen/discussions/1
### Describe the bug in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again. ### Steps to reproduce the bug ```python3 from datasets import load_dataset dataset = load_dataset("bookcorpusopen") ``` shows ```python3 ConnectionError: Couldn't reach https://mystic.the-eye.eu/public/AI/pile_preliminary_components/books1.tar.gz (ProxyError(MaxRetryError("HTTPSConnectionPool(host='mystic.the-eye.eu', port=443): Max retries exceeded with url: /public/AI/pile_pr eliminary_components/books1.tar.gz (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 504 Gateway Timeout')))"))) ``` ### Expected behavior Downloading as normal. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31 - Python version: 3.9.2 - PyArrow version: 6.0.1 - Pandas version: 1.5.3
293
17
the pile datasets url seems to change back ### Describe the bug in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again. ### Steps to reproduce the bug ```python3 from datasets import load_dataset dataset = load_dataset("bookcorpusopen") ``` shows ```python3 ConnectionError: Couldn't reach https://mystic.the-eye.eu/public/AI/pile_preliminary_components/books1.tar.gz (ProxyError(MaxRetryError("HTTPSConnectionPool(host='mystic.the-eye.eu', port=443): Max retries exceeded with url: /public/AI/pile_pr eliminary_components/books1.tar.gz (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 504 Gateway Timeout')))"))) ``` ### Expected behavior Downloading as normal. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31 - Python version: 3.9.2 - PyArrow version: 6.0.1 - Pandas version: 1.5.3 Thanks for reporting, @wjfwzzc. I am transferring this issue to the corresponding dataset on the Hub: https://huggingface.co/datasets/bookcorpusopen/discussions/1
[ -1.150075912475586, -0.878979504108429, -0.7697440385818481, 1.5033409595489502, -0.10427336394786835, -1.226611852645874, 0.10909775644540787, -0.9541971683502197, 1.6623444557189941, -0.7431823015213013, 0.31688979268074036, -1.6592267751693726, 0.01862042024731636, -0.5786975026130676, -0.7478295564651489, -0.8650939464569092, -0.3675764203071594, -0.6438911557197571, 1.0623630285263062, 2.529003381729126, 1.193412184715271, -1.367319107055664, 2.736910104751587, 0.719613254070282, -0.1456029862165451, -1.0125664472579956, 0.5232617855072021, -0.04462224617600441, -1.3822060823440552, -0.40064361691474915, -0.9669474363327026, -0.07092501223087311, -0.585469126701355, -0.5292287468910217, 0.0819207951426506, 0.41265004873275757, -0.36075377464294434, -0.4533480703830719, -0.5855226516723633, -0.8097140192985535, 0.43581074476242065, -0.3544064462184906, 0.9159107804298401, -0.3525112271308899, 1.7826437950134277, -0.5204501152038574, 0.47766759991645813, 0.7452385425567627, 1.2886942625045776, 0.11368410289287567, -0.0535782091319561, 0.407575398683548, 0.3439406752586365, 0.09634946286678314, 0.49757254123687744, 1.103359580039978, 0.6160852909088135, 0.3741260766983032, 0.6419169902801514, -2.2229740619659424, 1.3491722345352173, -0.9831244349479675, 0.19674678146839142, 1.3346997499465942, -1.0594017505645752, 0.3207785487174988, -1.7820568084716797, -0.03259020298719406, 0.5270897746086121, -2.302250623703003, 0.23097088932991028, -1.3612388372421265, -0.5060994625091553, 1.07503080368042, 0.36466681957244873, -1.2335907220840454, 0.00882710237056017, -0.43718382716178894, 1.0263432264328003, 0.48119255900382996, 1.1650068759918213, -1.6928685903549194, -0.09406682103872299, -0.271964430809021, 0.12751103937625885, -1.3006749153137207, -1.5668329000473022, 0.536185622215271, 0.7393600940704346, 0.5831008553504944, -0.09455884993076324, 0.9387496709823608, -0.9224406480789185, 0.717221736907959, -0.8814202547073364, -1.8390707969665527, -1.4398438930511475, -2.3369369506835938, -2.2443604469299316, 0.7534881830215454, -0.43173983693122864, -0.4822819232940674, 2.083552122116089, -1.047376275062561, -1.841500163078308, 1.1142679452896118, 0.2917248010635376, -0.05518408119678497, 2.3467280864715576, 0.17640557885169983, -0.7443829774856567, 0.43799829483032227, -0.7483083009719849, 0.7290295958518982, -0.3587621748447418, 1.3235758543014526, 0.42092540860176086, -1.0278042554855347, 1.6104263067245483, -0.33592966198921204, 0.582602322101593, -0.6710578799247742, -0.40577268600463867, -0.709014892578125, 0.30269986391067505, 1.9288148880004883, -0.35989484190940857, 1.562142014503479, -0.29726725816726685, -1.4801419973373413, -1.5126057863235474, 0.8101872801780701, 0.5245200395584106, -0.7629162669181824, 0.1467840075492859, -0.3736075162887573, 0.07507439702749252, -0.03282995894551277, 1.140088677406311, 1.2764915227890015, 0.690146267414093, -0.29097920656204224, -0.9326661229133606, 0.26838502287864685, -0.02122648060321808, -0.667935848236084, -1.7970564365386963, -0.34683525562286377, 0.19267511367797852, 0.6418565511703491, -1.280602216720581, 1.7063037157058716, 0.7585306167602539, 1.9806102514266968, 1.0346741676330566, -0.3698064088821411, 1.5043668746948242, 0.09931305050849915, 1.8637137413024902, -0.4421272277832031, 0.6313113570213318, -0.3152981996536255, -1.1187056303024292, 0.79377681016922, -0.32672277092933655, -2.0875518321990967, -0.659882664680481, -0.8330718278884888, -0.08162501454353333, -0.7278097867965698, 0.9823266267776489, -0.26603928208351135, -1.3320180177688599, 0.20823362469673157, -0.8191232681274414, 0.10608747601509094, -1.2983834743499756, 0.168908029794693, 0.7782019376754761, -0.6249076724052429, 0.06694001704454422, -0.3242257833480835, -1.2845789194107056, -0.45828884840011597, 0.4245927333831787, 1.7890353202819824, -0.6992092728614807, 0.9666045904159546, 1.0232471227645874, -0.7177707552909851, 0.012096368707716465, 0.34908175468444824, -0.34610652923583984, 0.9318187236785889, -1.0104997158050537, -0.4695744216442108, 1.157443642616272, -0.19340859353542328, -0.6785856485366821, 1.4567852020263672, 0.7320885062217712, -1.0111432075500488, -0.2918863892555237, -0.13442280888557434, -0.8261204361915588, 0.09517805278301239, -1.705125093460083, -0.1442403942346573, 0.32370689511299133, -1.5685760974884033, -0.47446343302726746, -0.23796722292900085, 1.391778588294983, -0.05126222223043442, 1.5082430839538574, -0.3099287450313568, -0.13213825225830078, -0.44876033067703247, -0.42342284321784973, 0.1020493358373642, -0.16241085529327393, -0.6032031774520874, 0.2508563995361328, -0.8522101640701294, 0.37078219652175903, 1.4413069486618042, 0.3069179654121399, 0.07473141700029373, 0.6679150462150574, 1.0849417448043823, 0.36718860268592834, -0.11934768408536911, -0.886931836605072, -1.6335774660110474, 2.0100204944610596, -1.3613206148147583, 1.9900809526443481, 0.7464314699172974, -0.014457272365689278, -1.827217936515808, -1.941510796546936, 1.3904218673706055, 1.0901093482971191, 2.290097951889038, 0.6362964510917664, 0.4274957776069641, -0.788023829460144, -0.6622400283813477, 0.3430841267108917, -0.9133095145225525, -0.8106237649917603, 0.19189268350601196, 2.4202427864074707, 1.7031139135360718, -0.3857537806034088, -0.20167674124240875, -1.0434123277664185, 1.3549087047576904, -0.1495162695646286, 0.13375750184059143, 2.008746862411499, -0.1646999716758728, -1.037755012512207, 1.2647699117660522, -2.2661917209625244, 0.2467852234840393, 1.995351791381836, 0.21758721768856049, 0.0650310143828392, -1.386674165725708, -0.7407529950141907, -0.2136855572462082, -0.3989870548248291, -1.2129759788513184, 0.48495277762413025, -0.24978141486644745, -0.9131114482879639, -1.4419653415679932, 0.12317011505365372, -1.082168698310852, -1.7430305480957031, 0.15674173831939697, 1.8440080881118774, 1.9386928081512451, -0.7325582504272461, 1.4750462770462036, -0.23517340421676636, 0.13109664618968964, 1.281889796257019, 1.1772630214691162, 3.150468587875366, 1.9830117225646973, -1.2724058628082275, 0.8030803203582764, -0.06214306131005287, -0.46923303604125977, 1.2116810083389282, -1.228384017944336, 1.2136483192443848, -0.27744725346565247, -1.2452164888381958, -1.190514087677002, 0.9811311364173889, 0.5463653206825256, -0.03010481968522072, -0.5127942562103271, 1.2528271675109863, 0.07305306196212769, 1.3275092840194702, 0.5795074701309204, -0.36764007806777954, 0.6225618720054626, -0.4212357997894287, -0.5376592874526978, 1.5328528881072998, 0.19953018426895142, -1.3804081678390503, -2.3011527061462402, -0.18894146382808685, -0.8350853323936462, -0.04259810224175453, -0.6235024333000183, -0.9764408469200134, 1.6586155891418457, 0.47507357597351074, -1.1733884811401367, -0.304540753364563, -0.45224589109420776, -0.5661864280700684, 2.743452310562134, -1.4078292846679688, -0.22403374314308167, -1.0675956010818481, -0.5002252459526062, 1.5948293209075928, -1.1807835102081299, -0.2609361708164215, -1.0676484107971191, -0.6091195940971375, -1.2920715808868408, -0.5971544981002808, -0.07735104858875275, -0.858632504940033, 0.7764660120010376, 0.05824032053351402, -1.1989315748214722, -0.25012317299842834, -0.8798959851264954, 0.9477961659431458, -0.11680783331394196, 0.13513301312923431, 1.910664677619934, 0.3955872356891632, -0.39610156416893005, 0.741691529750824, 1.0728261470794678, 0.6010540127754211, -0.5840098857879639, 0.31477537751197815, -0.5876402854919434, 0.29810699820518494, -1.3783507347106934, 0.2834194302558899, -2.843580484390259, 0.6691004633903503, -0.05547221377491951, -0.01588849537074566, -0.10925843566656113, -1.285387635231018, 1.0639443397521973, 2.6251227855682373, -1.2414319515228271, 0.538554847240448, 0.36214765906333923, 1.1104986667633057, -1.5860759019851685, 0.25730812549591064, -0.48896124958992004, 2.0894598960876465, 0.14477944374084473, 1.2035287618637085, -0.44734910130500793, -2.252013921737671, 0.6933077573776245, -1.222233772277832, -1.0570766925811768, 0.7806317806243896, -0.8108905553817749, 0.0938572809100151, -1.3118975162506104, -0.162362203001976, -0.7823718786239624, -1.2410989999771118, 0.7181693315505981, 0.08951780200004578, 0.5087165236473083, -0.5555626153945923, 0.3911861479282379, -2.2154033184051514, -1.3562771081924438, -0.23018869757652283, -1.003280758857727, 0.4541739225387573, -0.3164530098438263, 0.6722247004508972, -0.13528160750865936, 0.038458045572042465, 0.33098968863487244, 1.339842438697815, 3.4227187633514404, 0.10478756576776505, 0.25869646668434143, -0.14311057329177856, -1.0136929750442505, 1.3868746757507324, 0.8786718845367432, -0.1944187879562378, -0.572834849357605, -1.0483163595199585, 1.316240906715393, 1.9827897548675537, 1.0776253938674927, 0.13354139029979706, -0.8641976118087769, -0.8275203108787537, 0.070962093770504, 0.13767683506011963, 0.5136426687240601, 0.8967914581298828, 0.1487184762954712, 0.1428440362215042, 1.440752387046814, 1.166579246520996, -0.2631065547466278, 0.4197400212287903, -0.869015634059906, -0.37200450897216797, 0.5182671546936035, 0.3166765868663788, 0.012746798805892467, 0.3426802456378937, -1.066514253616333, -0.24430078268051147, -0.34860721230506897, -0.9230177998542786, -0.7678982019424438, -0.36960285902023315, -0.36947786808013916, 1.7509959936141968, 0.08082956820726395, -0.42663824558258057, -0.08717604726552963, -0.7222404479980469, -0.04180174320936203, -0.971706211566925, 0.350348562002182, -0.13898609578609467, -0.0475003756582737, -0.16963909566402435, 1.643612265586853, -0.9414582252502441, -2.156893014907837, 0.2259715348482132, 0.22046977281570435, -0.3689829707145691, 0.20156806707382202, 1.6810115575790405, 0.579599142074585, 1.3873705863952637, 1.3294692039489746, 0.9825043082237244, -0.6343327164649963, -1.2925981283187866, 0.5856114029884338, 1.0491069555282593, -1.4187519550323486, 0.7695701122283936, -0.022904228419065475, -0.49910521507263184, 0.62098628282547, 1.3426214456558228, 0.4419129192829132, -2.0191166400909424, 0.7170478701591492, -0.8695401549339294, 0.7495035529136658, 0.6848896741867065, 0.7766658067703247, 0.12351272255182266, 0.7937706708908081, -1.318069338798523, -1.134008765220642, -0.6743687391281128, -0.6525403261184692, 1.922263264656067, -0.2591032385826111, 0.5284213423728943, -0.19625383615493774, -1.3965950012207031, -0.08595427125692368, 0.6708645224571228, 0.3154936730861664, -0.48916298151016235, 0.8886763453483582, -0.6345387101173401, -1.1445322036743164, -1.3625270128250122, -0.4769400656223297, -0.9709317088127136, -0.9243214726448059, 1.008196234703064, 0.8198489546775818, 0.3503772020339966, 1.8981014490127563, 0.5391942858695984, 0.15005290508270264, -2.6907782554626465, 0.8984967470169067, 0.34696143865585327, 0.015686914324760437, 0.9247986078262329, 0.26582810282707214, 1.0871294736862183, -0.10782352089881897, 0.6557765007019043, -2.2790369987487793, 2.264848232269287, -0.2153964787721634, 0.6632900238037109, 0.03988257423043251, -0.14847679436206818, 0.948591411113739, 0.532443642616272, 0.6541970372200012, -1.0746957063674927, 0.7785676121711731, -0.6720424890518188, 1.2370390892028809, 0.8776386380195618, -0.8355015516281128, -0.05026901513338089, 1.3194955587387085, 0.49220019578933716, -0.4843637943267822, -0.9208426475524902, -0.9655728340148926, 0.9849229454994202, 1.7734522819519043, -0.055064015090465546, 0.08754453808069229, 0.8691690564155579, 0.5933306217193604, -1.3175444602966309, 0.05923446640372276, -0.7832708954811096, -0.6806315183639526, 1.6547759771347046, 2.0550034046173096, -0.15107785165309906, -0.2527754008769989, -0.812029242515564, -1.2872114181518555, 0.7664022445678711, 0.00794991571456194, 0.05965545400977135, 0.748984158039093, -0.5826724767684937, 1.1206104755401611, 0.740887463092804, 0.9786584973335266, 0.12927885353565216, 0.26693466305732727, 0.2515116333961487, -0.3374233543872833, -1.268930435180664, -0.3002883791923523, -1.029126763343811, -2.5363259315490723, 0.534290075302124, -0.1983078122138977, -1.4193881750106812, 0.03841830790042877, -1.0545765161514282, 0.8638549447059631, -0.593765377998352, -1.1323546171188354, -1.40913987159729, 0.2787090539932251, -0.15696893632411957, 0.8956112265586853, -1.6205010414123535, -0.09521672874689102, 1.3307609558105469, 0.9740291237831116, -0.7124400734901428, 0.9546841979026794, 0.19738495349884033, 1.0506203174591064, 0.9203982949256897, -0.31150126457214355, 0.47155365347862244, 0.12899211049079895, -1.2697296142578125, 0.4945594072341919, 1.1328154802322388, 0.22906644642353058, 1.4831507205963135, -0.6530313491821289, 0.01435799989849329, 0.40524718165397644, -0.49060162901878357, -0.47510236501693726, -0.6690623760223389, 0.7549698948860168, -0.018425405025482178, -0.9765759706497192, 0.03918185830116272, -0.08722527325153351, -0.13871613144874573, 0.15618668496608734, -1.4672476053237915, -0.12430020421743393, -0.2719208300113678, -0.5900132060050964, -1.3170596361160278, -0.10607991367578506, 1.2786290645599365, -0.8228598237037659, -0.17033633589744568, 0.5259130597114563, 0.26465603709220886, 0.5600137114524841, 0.6547577381134033, -0.6511065363883972, -0.3724898397922516, -0.1966281533241272, -0.3516603410243988, 0.36240339279174805, 1.3037198781967163, -0.06699059158563614, -0.9820350408554077, 0.7373467087745667, -0.39656227827072144, 0.12195000797510147, 1.9608350992202759, 0.08628557622432709, -0.8220141530036926, 0.3205289840698242, -0.6441982388496399, 1.9006705284118652, 1.6823925971984863, 1.3306093215942383, -0.10550270229578018, -0.9800928235054016, 0.637954592704773, -0.26851436495780945, -0.38928326964378357, 0.9106147885322571, 0.43572282791137695, -0.23131202161312103, -1.2839466333389282, 0.6586640477180481, 1.2724279165267944, -0.9411788582801819, -0.9233170747756958, 0.1514572650194168, -0.8779438734054565, 1.0732992887496948, 0.7087799906730652, 0.307762086391449, 0.17558647692203522, 1.6170512437820435, 0.7722899317741394, -0.4977050721645355, 0.5314043164253235, 0.4624079167842865, -0.25491806864738464, -2.080005168914795, -1.0223758220672607, 0.3569120168685913, -0.46427443623542786, -1.6761806011199951, 1.3186497688293457, -1.2106741666793823, -0.9490430355072021, 0.49821776151657104, 0.1100187748670578, 1.443671703338623, 0.2680145502090454, 1.6375304460525513, 1.987117052078247, 0.8807041049003601, 0.3823428750038147, 1.2728956937789917, -0.13869154453277588, -0.38172903656959534, 1.7502003908157349, -0.46963924169540405, 0.608052670955658, 1.0450636148452759, -0.4334551990032196, -1.0679203271865845, -0.8287298679351807, -1.2344343662261963, -0.7345917820930481, 1.202501654624939, 0.14784477651119232, -1.1011065244674683, 0.24675527215003967, 1.528733730316162, 0.1504092663526535, -0.2594467103481293, 0.6592282652854919, 0.39820975065231323, -0.7953628301620483, -0.05478912591934204, -0.9475660920143127, 0.553573489189148, -0.1734079122543335, -0.3383897542953491, 0.3398383557796478, 0.47211211919784546, 1.2841389179229736, 0.03134980797767639, 0.14703500270843506, 1.2483909130096436, -1.3388832807540894, 1.5559782981872559, -0.6571887135505676, 0.29649388790130615, -2.3825418949127197, 1.3671241998672485, -0.8554456830024719, 1.8884583711624146, -2.5880446434020996, 0.48606109619140625, -0.5523363351821899, -0.4356541633605957, 0.2621692419052124, -0.31005963683128357, 0.08477629721164703, -0.1738736778497696, -1.1330331563949585, -0.1568581610918045, -0.7696107029914856, 0.5190561413764954, 1.199540615081787, 1.3934822082519531, -1.058316707611084, -0.2227381020784378, -1.8169569969177246, -0.20562341809272766, -0.6795746088027954, 0.46727123856544495, -1.9362777471542358, -0.20842351019382477, -1.92696213722229, -2.4578001499176025, -1.2628692388534546, -0.8336035013198853, 1.1044570207595825, 0.06657196581363678, -0.858836829662323, 1.101760983467102, -0.35625752806663513, -1.8051085472106934, 1.1012693643569946, -2.1867706775665283 ]
https://github.com/huggingface/datasets/issues/5543
the pile datasets url seems to change back
Thank you. All fixes are done: - [x] https://huggingface.co/datasets/bookcorpusopen/discussions/2 - [x] https://huggingface.co/datasets/the_pile/discussions/1 - [x] https://huggingface.co/datasets/the_pile_books3/discussions/1 - [x] https://huggingface.co/datasets/the_pile_openwebtext2/discussions/2 - [x] https://huggingface.co/datasets/the_pile_stack_exchange/discussions/2
### Describe the bug in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again. ### Steps to reproduce the bug ```python3 from datasets import load_dataset dataset = load_dataset("bookcorpusopen") ``` shows ```python3 ConnectionError: Couldn't reach https://mystic.the-eye.eu/public/AI/pile_preliminary_components/books1.tar.gz (ProxyError(MaxRetryError("HTTPSConnectionPool(host='mystic.the-eye.eu', port=443): Max retries exceeded with url: /public/AI/pile_pr eliminary_components/books1.tar.gz (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 504 Gateway Timeout')))"))) ``` ### Expected behavior Downloading as normal. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31 - Python version: 3.9.2 - PyArrow version: 6.0.1 - Pandas version: 1.5.3
293
21
the pile datasets url seems to change back ### Describe the bug in #3627, the host url of the pile dataset became `https://mystic.the-eye.eu`. Now the new url is broken, but `https://the-eye.eu` seems to work again. ### Steps to reproduce the bug ```python3 from datasets import load_dataset dataset = load_dataset("bookcorpusopen") ``` shows ```python3 ConnectionError: Couldn't reach https://mystic.the-eye.eu/public/AI/pile_preliminary_components/books1.tar.gz (ProxyError(MaxRetryError("HTTPSConnectionPool(host='mystic.the-eye.eu', port=443): Max retries exceeded with url: /public/AI/pile_pr eliminary_components/books1.tar.gz (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 504 Gateway Timeout')))"))) ``` ### Expected behavior Downloading as normal. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31 - Python version: 3.9.2 - PyArrow version: 6.0.1 - Pandas version: 1.5.3 Thank you. All fixes are done: - [x] https://huggingface.co/datasets/bookcorpusopen/discussions/2 - [x] https://huggingface.co/datasets/the_pile/discussions/1 - [x] https://huggingface.co/datasets/the_pile_books3/discussions/1 - [x] https://huggingface.co/datasets/the_pile_openwebtext2/discussions/2 - [x] https://huggingface.co/datasets/the_pile_stack_exchange/discussions/2
[ -1.145060420036316, -0.8541693091392517, -0.806215763092041, 1.494767665863037, -0.08526314049959183, -1.2706862688064575, 0.09951090812683105, -0.9158296585083008, 1.6551194190979004, -0.724471926689148, 0.29737499356269836, -1.673732876777649, -0.029381105676293373, -0.6031084060668945, -0.7361161112785339, -0.8466819524765015, -0.3310289978981018, -0.7116081118583679, 1.0185847282409668, 2.4871883392333984, 1.201219916343689, -1.3545430898666382, 2.755690813064575, 0.7367130517959595, -0.17191360890865326, -1.0174850225448608, 0.542064368724823, -0.06935909390449524, -1.401755452156067, -0.4004155099391937, -0.9492956399917603, -0.010225428268313408, -0.5887823104858398, -0.48916095495224, 0.09927064925432205, 0.41995176672935486, -0.29815563559532166, -0.3776203393936157, -0.6137856841087341, -0.7563327550888062, 0.4186544418334961, -0.3456861674785614, 0.9133902788162231, -0.35830843448638916, 1.7753355503082275, -0.5295507311820984, 0.40544989705085754, 0.7292784452438354, 1.263218641281128, 0.11098932474851608, 0.031564630568027496, 0.34998106956481934, 0.373322993516922, 0.10429374128580093, 0.5345103740692139, 1.1921300888061523, 0.6165999174118042, 0.4184417128562927, 0.6670327186584473, -2.26159930229187, 1.3466429710388184, -0.9032358527183533, 0.20169241726398468, 1.328107237815857, -0.9940021634101868, 0.3120051324367523, -1.8082979917526245, -0.006288951262831688, 0.5687103271484375, -2.3124046325683594, 0.16948996484279633, -1.3635574579238892, -0.55460524559021, 1.0322346687316895, 0.3499158024787903, -1.21669602394104, 0.049073584377765656, -0.4648665487766266, 1.044067144393921, 0.5089167952537537, 1.1949764490127563, -1.6636087894439697, -0.06362306326627731, -0.20228488743305206, 0.11481768637895584, -1.302000641822815, -1.6030957698822021, 0.5510544180870056, 0.7685077786445618, 0.6292600631713867, -0.1424373835325241, 0.9355109930038452, -0.9355654120445251, 0.7540656924247742, -0.8839768171310425, -1.84776771068573, -1.4462621212005615, -2.3333725929260254, -2.2072579860687256, 0.7649364471435547, -0.4241754412651062, -0.3970024287700653, 2.0322766304016113, -1.0586826801300049, -1.8153347969055176, 1.053077220916748, 0.30708006024360657, 0.05309736728668213, 2.3171844482421875, 0.1888366937637329, -0.7783334255218506, 0.3980775475502014, -0.7097092270851135, 0.7310991287231445, -0.2821309268474579, 1.2670842409133911, 0.42169666290283203, -1.0173481702804565, 1.614406943321228, -0.3723122179508209, 0.5679094195365906, -0.7136878371238708, -0.43580979108810425, -0.7009598612785339, 0.25691357254981995, 1.9221863746643066, -0.4017390012741089, 1.5905755758285522, -0.28789642453193665, -1.491961121559143, -1.5208834409713745, 0.7535181641578674, 0.5184873938560486, -0.8067880868911743, 0.07979169487953186, -0.42818087339401245, 0.0715513601899147, -0.037776872515678406, 1.1735589504241943, 1.2488501071929932, 0.6950405240058899, -0.29698050022125244, -0.8458812832832336, 0.23546935617923737, -0.043163955211639404, -0.6982247233390808, -1.7978525161743164, -0.3441151976585388, 0.2704249620437622, 0.6453258395195007, -1.2966216802597046, 1.747391939163208, 0.7404147982597351, 2.0151326656341553, 1.0639241933822632, -0.37879693508148193, 1.5115365982055664, 0.0809357687830925, 1.8684329986572266, -0.482200562953949, 0.5727589130401611, -0.3478781282901764, -1.114011287689209, 0.8027328848838806, -0.3325127959251404, -2.072960615158081, -0.6620856523513794, -0.8259007930755615, -0.08732875436544418, -0.7441738843917847, 0.9311479926109314, -0.2687200903892517, -1.3501025438308716, 0.12965743243694305, -0.7944333553314209, 0.10394710302352905, -1.278510332107544, 0.08827965706586838, 0.8263367414474487, -0.6795196533203125, 0.011013301089406013, -0.2885254919528961, -1.3339089155197144, -0.47458675503730774, 0.45489126443862915, 1.80410897731781, -0.6524877548217773, 0.942555844783783, 1.0382181406021118, -0.6975802183151245, 0.08686704188585281, 0.3234463930130005, -0.3599209189414978, 0.8696548342704773, -1.0370995998382568, -0.474549800157547, 1.1145168542861938, -0.18430224061012268, -0.7413457036018372, 1.4509389400482178, 0.7715534567832947, -1.013925313949585, -0.3400537967681885, -0.10224657505750656, -0.7723977565765381, 0.05814658850431442, -1.6522189378738403, -0.15578271448612213, 0.3092361390590668, -1.5415222644805908, -0.4818513095378876, -0.21142207086086273, 1.4119641780853271, -0.08644375950098038, 1.4659825563430786, -0.24976903200149536, -0.11933894455432892, -0.435542494058609, -0.48442307114601135, 0.08639288693666458, -0.16671578586101532, -0.6436454057693481, 0.28248798847198486, -0.9054759740829468, 0.3075381815433502, 1.4548890590667725, 0.31740236282348633, 0.07008448988199234, 0.6503589749336243, 1.1124064922332764, 0.37780529260635376, -0.10868079960346222, -0.892885148525238, -1.6550195217132568, 2.0202183723449707, -1.3523277044296265, 1.9836074113845825, 0.7826935648918152, -0.05015560984611511, -1.8534373044967651, -1.955991506576538, 1.3800290822982788, 1.0290231704711914, 2.343130588531494, 0.5847769975662231, 0.453461617231369, -0.7685794234275818, -0.7007968425750732, 0.3864634037017822, -0.8661354780197144, -0.7739987969398499, 0.1691286414861679, 2.417658805847168, 1.7404757738113403, -0.40290307998657227, -0.2273407131433487, -0.9712629318237305, 1.2663915157318115, -0.18814267218112946, 0.16314035654067993, 2.0347166061401367, -0.154964879155159, -1.0046197175979614, 1.302788496017456, -2.2967188358306885, 0.27867257595062256, 2.0229029655456543, 0.20831206440925598, 0.05983763188123703, -1.3966774940490723, -0.7202115058898926, -0.23382213711738586, -0.46795153617858887, -1.2440749406814575, 0.4790654182434082, -0.27760252356529236, -1.0021827220916748, -1.3862087726593018, 0.06014446169137955, -1.1093662977218628, -1.7480225563049316, 0.218553364276886, 1.8813761472702026, 1.945369005203247, -0.7614343166351318, 1.4532898664474487, -0.267329603433609, 0.09836408495903015, 1.2762906551361084, 1.2317168712615967, 3.2109546661376953, 1.9425989389419556, -1.3122096061706543, 0.8079190850257874, -0.12834253907203674, -0.45526325702667236, 1.1599994897842407, -1.1756360530853271, 1.1750112771987915, -0.34620535373687744, -1.3151099681854248, -1.2023423910140991, 1.064562201499939, 0.5627850890159607, -0.009507562965154648, -0.5342987775802612, 1.2911288738250732, 0.06796906143426895, 1.276221752166748, 0.5878129601478577, -0.42167890071868896, 0.5470154881477356, -0.37844371795654297, -0.5674076080322266, 1.5378917455673218, 0.15513446927070618, -1.4171277284622192, -2.2670414447784424, -0.20451760292053223, -0.9026845693588257, -0.09936811029911041, -0.6652042865753174, -1.0049827098846436, 1.654494285583496, 0.4784477949142456, -1.2199501991271973, -0.3138222098350525, -0.4421328008174896, -0.5349341034889221, 2.72005033493042, -1.410595178604126, -0.19174280762672424, -1.0694392919540405, -0.4481125473976135, 1.610453724861145, -1.1733052730560303, -0.23080727458000183, -1.0438185930252075, -0.6433594226837158, -1.299094796180725, -0.5653205513954163, -0.01594609022140503, -0.8314124345779419, 0.7803645730018616, 0.006799180060625076, -1.1606013774871826, -0.22785505652427673, -0.9042810201644897, 1.0441592931747437, -0.14472736418247223, 0.09988629817962646, 1.9440981149673462, 0.3729458153247833, -0.4180775284767151, 0.718822181224823, 1.0914807319641113, 0.6536378860473633, -0.6143807768821716, 0.2848774492740631, -0.5582103133201599, 0.3276479244232178, -1.4720512628555298, 0.24516898393630981, -2.87185001373291, 0.6852973699569702, -0.02512998878955841, -0.03431353345513344, -0.05654656141996384, -1.3014503717422485, 1.023438572883606, 2.6121022701263428, -1.2437371015548706, 0.4729609787464142, 0.3986000120639801, 1.130120873451233, -1.5808384418487549, 0.21999458968639374, -0.5342316031455994, 2.0316660404205322, 0.11881709098815918, 1.2074342966079712, -0.4417259395122528, -2.152448892593384, 0.6466663479804993, -1.232850193977356, -0.917712390422821, 0.8471450209617615, -0.8119186162948608, 0.17967046797275543, -1.3579232692718506, -0.1460990309715271, -0.8331127166748047, -1.2048189640045166, 0.708379864692688, 0.11256273835897446, 0.4931321442127228, -0.5815059542655945, 0.3777458667755127, -2.1689517498016357, -1.3428057432174683, -0.16915690898895264, -1.0179060697555542, 0.5081529021263123, -0.30867668986320496, 0.6514607667922974, -0.053172603249549866, 0.03282082825899124, 0.31646955013275146, 1.3261569738388062, 3.4312703609466553, 0.09649576991796494, 0.22352981567382812, -0.16690093278884888, -1.0076663494110107, 1.3913419246673584, 0.9103590250015259, -0.14198924601078033, -0.5632266402244568, -1.02128267288208, 1.3680833578109741, 2.004631757736206, 1.1277974843978882, 0.15735657513141632, -0.9099916815757751, -0.8784160614013672, 0.11581586301326752, 0.2017565667629242, 0.5581437349319458, 0.894170880317688, 0.10005214810371399, 0.1559966653585434, 1.4283859729766846, 1.1705513000488281, -0.23957040905952454, 0.4466265141963959, -0.9593759179115295, -0.37095656991004944, 0.4987007677555084, 0.3400976061820984, 0.09268400073051453, 0.4013110101222992, -1.135237693786621, -0.22203640639781952, -0.332327276468277, -0.8837960958480835, -0.7443786859512329, -0.3565612733364105, -0.37697020173072815, 1.6714330911636353, 0.062261879444122314, -0.43513423204421997, -0.02340647391974926, -0.7163904309272766, -0.1185556948184967, -0.9750143885612488, 0.3602144718170166, -0.15257659554481506, 0.02058763988316059, -0.21034224331378937, 1.5961233377456665, -0.9696004390716553, -2.1614418029785156, 0.20116516947746277, 0.2075214385986328, -0.39635586738586426, 0.18883278965950012, 1.7152749300003052, 0.5662188529968262, 1.3331515789031982, 1.3158446550369263, 0.989942729473114, -0.6040326356887817, -1.272299885749817, 0.5680109858512878, 1.0293045043945312, -1.3752995729446411, 0.8571125864982605, -0.14343638718128204, -0.5450909733772278, 0.6812328100204468, 1.3666412830352783, 0.3834821879863739, -2.02962589263916, 0.7385064363479614, -0.8599412441253662, 0.7686957716941833, 0.6679899096488953, 0.8143807649612427, 0.1718580573797226, 0.8417407274246216, -1.34674072265625, -1.1425719261169434, -0.6598256230354309, -0.6597529649734497, 1.9082401990890503, -0.205247163772583, 0.5282431244850159, -0.18731050193309784, -1.3583450317382812, -0.11985957622528076, 0.6915356516838074, 0.3329765200614929, -0.49473249912261963, 0.9093647003173828, -0.6366852521896362, -1.0629961490631104, -1.3057342767715454, -0.5130521655082703, -0.9423957467079163, -0.9152769446372986, 1.0129402875900269, 0.8099737763404846, 0.4421235918998718, 1.9274441003799438, 0.49447396397590637, 0.20371612906455994, -2.700660228729248, 0.8728162050247192, 0.29486867785453796, 0.017614005133509636, 0.9424810409545898, 0.2600760757923126, 1.144515872001648, -0.07587820291519165, 0.6394935250282288, -2.2642738819122314, 2.223660469055176, -0.23420587182044983, 0.6369956731796265, -0.01651954837143421, -0.16991519927978516, 0.952787458896637, 0.5350269675254822, 0.6578245162963867, -1.0798866748809814, 0.7806671261787415, -0.6447967886924744, 1.1435973644256592, 0.8583698272705078, -0.8679606318473816, 0.0023999102413654327, 1.336379051208496, 0.49085262417793274, -0.4838854968547821, -0.9039946794509888, -0.9230602979660034, 0.9412065148353577, 1.7120177745819092, 0.00830596312880516, 0.08426619321107864, 0.899363100528717, 0.6049519777297974, -1.2874736785888672, 0.07141457498073578, -0.7169666290283203, -0.6231644153594971, 1.6717610359191895, 2.05135440826416, -0.15436340868473053, -0.17108190059661865, -0.7867391705513, -1.2465450763702393, 0.7031670212745667, -0.07163345068693161, 0.029860245063900948, 0.7935535907745361, -0.6319423913955688, 1.1448901891708374, 0.6346953511238098, 1.0045766830444336, 0.011715972796082497, 0.3341138958930969, 0.2913956642150879, -0.3897468149662018, -1.3108878135681152, -0.39132359623908997, -1.0142537355422974, -2.494800567626953, 0.4944160282611847, -0.20341856777668, -1.4330403804779053, 0.0565866082906723, -1.0725910663604736, 0.8395137190818787, -0.6564207673072815, -1.1266049146652222, -1.3577051162719727, 0.3663100004196167, -0.1331380307674408, 0.8904694318771362, -1.6217466592788696, -0.11670917272567749, 1.3004107475280762, 0.9571185111999512, -0.6505078673362732, 0.9293492436408997, 0.23386062681674957, 1.0612443685531616, 0.8884066343307495, -0.2905499041080475, 0.4138806462287903, 0.15017485618591309, -1.274461030960083, 0.4299851953983307, 1.1508853435516357, 0.2503426969051361, 1.4628432989120483, -0.631566047668457, 0.05830175429582596, 0.46192651987075806, -0.5305725932121277, -0.4512089788913727, -0.6619135737419128, 0.7497579455375671, 0.006364027038216591, -1.0091828107833862, -0.04063183814287186, -0.11568354070186615, -0.1711263209581375, 0.16012851893901825, -1.4394142627716064, -0.1461741179227829, -0.24323952198028564, -0.5477343797683716, -1.3278740644454956, -0.008821502327919006, 1.2471462488174438, -0.8264445662498474, -0.17138710618019104, 0.5406739711761475, 0.23178984224796295, 0.5589674711227417, 0.6459317803382874, -0.6591324210166931, -0.3319959342479706, -0.21987368166446686, -0.33177897334098816, 0.3022286295890808, 1.2970056533813477, -0.07845483720302582, -0.9822845458984375, 0.7397362589836121, -0.4527766704559326, 0.14262861013412476, 2.023137331008911, 0.054484009742736816, -0.7918555736541748, 0.3309045433998108, -0.6680028438568115, 1.8531954288482666, 1.7009485960006714, 1.3235807418823242, -0.06780527532100677, -0.9061092138290405, 0.6083174347877502, -0.279613196849823, -0.37300530076026917, 0.919881284236908, 0.418411523103714, -0.25050681829452515, -1.3338643312454224, 0.6034908294677734, 1.320643424987793, -0.9921887516975403, -0.8502905368804932, 0.20961640775203705, -0.8835535645484924, 1.106981873512268, 0.6904036402702332, 0.2961996793746948, 0.19546262919902802, 1.5229779481887817, 0.7482315897941589, -0.4706839919090271, 0.4933963716030121, 0.47257718443870544, -0.2325221747159958, -2.088021755218506, -0.9783127903938293, 0.34141114354133606, -0.40628525614738464, -1.6599632501602173, 1.304867148399353, -1.2345956563949585, -0.963036060333252, 0.4692712128162384, 0.14458170533180237, 1.3561030626296997, 0.2842221260070801, 1.686509370803833, 2.0471057891845703, 0.8526657819747925, 0.3555341064929962, 1.2883955240249634, -0.08300865441560745, -0.39211082458496094, 1.7293404340744019, -0.5132725834846497, 0.6616019010543823, 1.0005972385406494, -0.4088986814022064, -1.0936452150344849, -0.8112896084785461, -1.2405098676681519, -0.6985542178153992, 1.1967483758926392, 0.15752366185188293, -1.0894479751586914, 0.23310068249702454, 1.5172882080078125, 0.12782716751098633, -0.21456259489059448, 0.7137113809585571, 0.4147628843784332, -0.7493506669998169, -0.08889178931713104, -0.8919891119003296, 0.5854458212852478, -0.16787423193454742, -0.3018414378166199, 0.32220983505249023, 0.5228200554847717, 1.281119704246521, 0.01074378564953804, 0.11766047775745392, 1.3010609149932861, -1.3604222536087036, 1.5750547647476196, -0.6569640040397644, 0.3142464756965637, -2.457629442214966, 1.382764458656311, -0.8366348147392273, 1.8772629499435425, -2.5680720806121826, 0.51408851146698, -0.5328838229179382, -0.4833272099494934, 0.27120113372802734, -0.24707497656345367, 0.04270969331264496, -0.1688900887966156, -1.0513317584991455, -0.10118827223777771, -0.8148187398910522, 0.5132218599319458, 1.2409058809280396, 1.4066417217254639, -1.0959514379501343, -0.2475278079509735, -1.8419904708862305, -0.2115730345249176, -0.7489491701126099, 0.4494275152683258, -1.953363060951233, -0.16462376713752747, -1.9386414289474487, -2.4860856533050537, -1.3514916896820068, -0.8454358577728271, 1.0721694231033325, 0.1367647647857666, -0.8938523530960083, 1.1432569026947021, -0.34765470027923584, -1.787992000579834, 1.0199013948440552, -2.1957123279571533 ]
https://github.com/huggingface/datasets/issues/5541
Flattening indices in selected datasets is extremely inefficient
Running the script above on the branch https://github.com/huggingface/datasets/pull/5542 results in the expected behaviour: ``` Num chunks for original ds: 1 Original ds save/load save_to_disk -- RAM memory used: 0.671875 MB -- Total time: 0.255265 s load_from_disk -- RAM memory used: 42.796875 MB -- Total time: 0.014899 s Num chunks for original ds after reloading: 5000 Num chunks for selected ds: 1 flatten_indices -- RAM memory used: 42.546875 MB -- Total time: 23.735089 s Num chunks for selected ds after flattening: 5000 Selected ds save/load save_to_disk -- RAM memory used: 0.0 MB -- Total time: 0.287112 s load_from_disk -- RAM memory used: 38.84375 MB -- Total time: 0.014772 s Num chunks for selected ds after reloading: 5000 ```
### Describe the bug If we perform a `select` (or `shuffle`, `train_test_split`, etc.) operation on a dataset , we end up with a dataset with an `indices_table`. Currently, flattening such dataset consumes a lot of memory and the resulting flat dataset contains ChunkedArrays with as many chunks as there are rows. This is extremely inefficient and slows down the operations on the flat dataset, e.g., saving/loading the dataset to disk becomes really slow. Perhaps more importantly, loading the dataset back from disk basically loads the whole table into RAM, as it cannot take advantage of memory mapping. ### Steps to reproduce the bug The following script reproduces the issue: ```python import gc import os import psutil import tempfile import time from datasets import Dataset DATASET_SIZE = 5000000 def profile(func): def wrapper(*args, **kwargs): mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024) start = time.time() # Run function here out = func(*args, **kwargs) end = time.time() mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024) print(f"{func.__name__} -- RAM memory used: {mem_after - mem_before} MB -- Total time: {end - start:.6f} s") return out return wrapper def main(): ds = Dataset.from_list([{'col': i} for i in range(DATASET_SIZE)]) print(f"Num chunks for original ds: {ds.data['col'].num_chunks}") with tempfile.TemporaryDirectory() as tmpdir: path1 = os.path.join(tmpdir, 'ds1') print("Original ds save/load") profile(ds.save_to_disk)(path1) ds_loaded = profile(Dataset.load_from_disk)(path1) print(f"Num chunks for original ds after reloading: {ds_loaded.data['col'].num_chunks}") print("") ds_select = ds.select(reversed(range(len(ds)))) print(f"Num chunks for selected ds: {ds_select.data['col'].num_chunks}") del ds del ds_loaded gc.collect() # This would happen anyway when we call save_to_disk ds_select = profile(ds_select.flatten_indices)() print(f"Num chunks for selected ds after flattening: {ds_select.data['col'].num_chunks}") print("") path2 = os.path.join(tmpdir, 'ds2') print("Selected ds save/load") profile(ds_select.save_to_disk)(path2) del ds_select gc.collect() ds_select_loaded = profile(Dataset.load_from_disk)(path2) print(f"Num chunks for selected ds after reloading: {ds_select_loaded.data['col'].num_chunks}") if __name__ == '__main__': main() ``` Sample result: ``` Num chunks for original ds: 1 Original ds save/load save_to_disk -- RAM memory used: 0.515625 MB -- Total time: 0.253888 s load_from_disk -- RAM memory used: 42.765625 MB -- Total time: 0.015176 s Num chunks for original ds after reloading: 5000 Num chunks for selected ds: 1 flatten_indices -- RAM memory used: 4852.609375 MB -- Total time: 46.116774 s Num chunks for selected ds after flattening: 5000000 Selected ds save/load save_to_disk -- RAM memory used: 1326.65625 MB -- Total time: 42.309825 s load_from_disk -- RAM memory used: 2085.953125 MB -- Total time: 11.659137 s Num chunks for selected ds after reloading: 5000000 ``` ### Expected behavior Saving/loading the dataset should be much faster and consume almost no extra memory thanks to pyarrow memory mapping. ### Environment info - `datasets` version: 2.9.1.dev0 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
294
117
Flattening indices in selected datasets is extremely inefficient ### Describe the bug If we perform a `select` (or `shuffle`, `train_test_split`, etc.) operation on a dataset , we end up with a dataset with an `indices_table`. Currently, flattening such dataset consumes a lot of memory and the resulting flat dataset contains ChunkedArrays with as many chunks as there are rows. This is extremely inefficient and slows down the operations on the flat dataset, e.g., saving/loading the dataset to disk becomes really slow. Perhaps more importantly, loading the dataset back from disk basically loads the whole table into RAM, as it cannot take advantage of memory mapping. ### Steps to reproduce the bug The following script reproduces the issue: ```python import gc import os import psutil import tempfile import time from datasets import Dataset DATASET_SIZE = 5000000 def profile(func): def wrapper(*args, **kwargs): mem_before = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024) start = time.time() # Run function here out = func(*args, **kwargs) end = time.time() mem_after = psutil.Process(os.getpid()).memory_info().rss / (1024 * 1024) print(f"{func.__name__} -- RAM memory used: {mem_after - mem_before} MB -- Total time: {end - start:.6f} s") return out return wrapper def main(): ds = Dataset.from_list([{'col': i} for i in range(DATASET_SIZE)]) print(f"Num chunks for original ds: {ds.data['col'].num_chunks}") with tempfile.TemporaryDirectory() as tmpdir: path1 = os.path.join(tmpdir, 'ds1') print("Original ds save/load") profile(ds.save_to_disk)(path1) ds_loaded = profile(Dataset.load_from_disk)(path1) print(f"Num chunks for original ds after reloading: {ds_loaded.data['col'].num_chunks}") print("") ds_select = ds.select(reversed(range(len(ds)))) print(f"Num chunks for selected ds: {ds_select.data['col'].num_chunks}") del ds del ds_loaded gc.collect() # This would happen anyway when we call save_to_disk ds_select = profile(ds_select.flatten_indices)() print(f"Num chunks for selected ds after flattening: {ds_select.data['col'].num_chunks}") print("") path2 = os.path.join(tmpdir, 'ds2') print("Selected ds save/load") profile(ds_select.save_to_disk)(path2) del ds_select gc.collect() ds_select_loaded = profile(Dataset.load_from_disk)(path2) print(f"Num chunks for selected ds after reloading: {ds_select_loaded.data['col'].num_chunks}") if __name__ == '__main__': main() ``` Sample result: ``` Num chunks for original ds: 1 Original ds save/load save_to_disk -- RAM memory used: 0.515625 MB -- Total time: 0.253888 s load_from_disk -- RAM memory used: 42.765625 MB -- Total time: 0.015176 s Num chunks for original ds after reloading: 5000 Num chunks for selected ds: 1 flatten_indices -- RAM memory used: 4852.609375 MB -- Total time: 46.116774 s Num chunks for selected ds after flattening: 5000000 Selected ds save/load save_to_disk -- RAM memory used: 1326.65625 MB -- Total time: 42.309825 s load_from_disk -- RAM memory used: 2085.953125 MB -- Total time: 11.659137 s Num chunks for selected ds after reloading: 5000000 ``` ### Expected behavior Saving/loading the dataset should be much faster and consume almost no extra memory thanks to pyarrow memory mapping. ### Environment info - `datasets` version: 2.9.1.dev0 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.10.8 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Running the script above on the branch https://github.com/huggingface/datasets/pull/5542 results in the expected behaviour: ``` Num chunks for original ds: 1 Original ds save/load save_to_disk -- RAM memory used: 0.671875 MB -- Total time: 0.255265 s load_from_disk -- RAM memory used: 42.796875 MB -- Total time: 0.014899 s Num chunks for original ds after reloading: 5000 Num chunks for selected ds: 1 flatten_indices -- RAM memory used: 42.546875 MB -- Total time: 23.735089 s Num chunks for selected ds after flattening: 5000 Selected ds save/load save_to_disk -- RAM memory used: 0.0 MB -- Total time: 0.287112 s load_from_disk -- RAM memory used: 38.84375 MB -- Total time: 0.014772 s Num chunks for selected ds after reloading: 5000 ```
[ -1.4144846200942993, -0.9966012239456177, -0.6537461876869202, 1.38670015335083, -0.2331400364637375, -1.186317801475525, 0.13665515184402466, -1.0323795080184937, 1.6344138383865356, -0.7777537107467651, 0.33987748622894287, -1.6300874948501587, 0.049949634820222855, -0.6063641309738159, -0.7781811356544495, -0.8555662631988525, -0.456972599029541, -0.7740215063095093, 1.0494548082351685, 2.553011178970337, 1.1707003116607666, -1.3855611085891724, 2.781893730163574, 0.6687237024307251, -0.18387570977210999, -1.0254719257354736, 0.491596519947052, -0.0031536323949694633, -1.3482986688613892, -0.442486047744751, -0.9717336297035217, -0.03716898709535599, -0.4926758408546448, -0.5217600464820862, 0.04919183999300003, 0.36972105503082275, -0.2261618822813034, -0.4677363634109497, -0.5373170375823975, -0.7631010413169861, 0.5302264094352722, -0.393385648727417, 0.9107313752174377, -0.3367645740509033, 1.7640752792358398, -0.5414597392082214, 0.5101541876792908, 0.7007421851158142, 1.4045071601867676, 0.1912575513124466, -0.08161811530590057, 0.49768537282943726, 0.40591198205947876, 0.05369722098112106, 0.5515371561050415, 1.177833080291748, 0.7366253733634949, 0.4042431712150574, 0.6669089198112488, -2.1751856803894043, 1.2709788084030151, -1.1512762308120728, 0.34625816345214844, 1.4011573791503906, -0.9780641794204712, 0.436948299407959, -1.725927710533142, -0.13864949345588684, 0.5842235684394836, -2.262957811355591, 0.1939457207918167, -1.2771985530853271, -0.42592501640319824, 1.0588716268539429, 0.4228641390800476, -1.2894421815872192, 0.12823805212974548, -0.5054355263710022, 1.0609992742538452, 0.360448956489563, 1.1846730709075928, -1.6375380754470825, -0.1392764151096344, -0.26293015480041504, 0.0672212764620781, -1.252511739730835, -1.5032198429107666, 0.6232103109359741, 0.6362006068229675, 0.5218702554702759, -0.17063400149345398, 1.0040439367294312, -1.0233819484710693, 0.8053424954414368, -1.0243772268295288, -1.6819313764572144, -1.5422048568725586, -2.2913808822631836, -2.226567268371582, 0.8204765915870667, -0.3777581453323364, -0.5901384353637695, 2.0398459434509277, -1.0196069478988647, -1.790960669517517, 1.1335177421569824, 0.20597732067108154, -0.03704534098505974, 2.349658966064453, 0.19210243225097656, -0.7722998857498169, 0.5197092294692993, -0.6949891448020935, 0.7733267545700073, -0.350003719329834, 1.3719866275787354, 0.44026464223861694, -1.021165370941162, 1.526353120803833, -0.3837422728538513, 0.49805861711502075, -0.5443465709686279, -0.5033238530158997, -0.7257816791534424, 0.36663758754730225, 1.9396263360977173, -0.31170958280563354, 1.5491228103637695, -0.3845590353012085, -1.6074532270431519, -1.6170077323913574, 0.8202716112136841, 0.53963303565979, -0.7519689202308655, 0.12129178643226624, -0.5227893590927124, 0.1187097579240799, -0.012696024030447006, 1.1476218700408936, 1.2917600870132446, 0.7187979817390442, -0.3889614939689636, -0.883111298084259, 0.2498595267534256, -0.03302587941288948, -0.6863074898719788, -1.7581233978271484, -0.34662020206451416, 0.10989273339509964, 0.6678453683853149, -1.1678662300109863, 1.7839291095733643, 0.9110866189002991, 1.8901736736297607, 1.0832138061523438, -0.2383272647857666, 1.420397400856018, 0.14172153174877167, 1.8228867053985596, -0.5688519477844238, 0.7126629948616028, -0.322548508644104, -1.1289879083633423, 0.7867677807807922, -0.3840835690498352, -2.1076457500457764, -0.7281106114387512, -0.7915990948677063, -0.16497808694839478, -0.8054183721542358, 0.9353006482124329, -0.3129221796989441, -1.3797496557235718, 0.3005715012550354, -0.7822014093399048, 0.15945866703987122, -1.1529796123504639, 0.26801782846450806, 0.6804966330528259, -0.6188635230064392, 0.08924783766269684, -0.21622207760810852, -1.2479100227355957, -0.41010916233062744, 0.27715808153152466, 1.829590082168579, -0.8781848549842834, 0.992403507232666, 1.034128189086914, -0.656597912311554, 0.04463491961359978, 0.2974337339401245, -0.26051872968673706, 0.901327908039093, -0.9692542552947998, -0.4026104211807251, 1.229972243309021, -0.20552828907966614, -0.5101836323738098, 1.4956272840499878, 0.6951881647109985, -0.9997180104255676, -0.23377537727355957, -0.11196274310350418, -0.9083494544029236, -0.01786569133400917, -1.6276261806488037, -0.09805133193731308, 0.44684481620788574, -1.5666569471359253, -0.5063891410827637, -0.21002940833568573, 1.3168842792510986, -0.09707123041152954, 1.4363957643508911, -0.451279878616333, -0.13858595490455627, -0.36733293533325195, -0.3267565369606018, 0.17933610081672668, -0.1850689798593521, -0.5483898520469666, 0.22439710795879364, -0.8389020562171936, 0.3754309415817261, 1.4463355541229248, 0.4292283058166504, 0.02647780254483223, 0.601411759853363, 1.084010362625122, 0.38559073209762573, -0.12190724164247513, -0.8394707441329956, -1.6379358768463135, 2.031170129776001, -1.4924910068511963, 1.9303417205810547, 0.7488669753074646, -0.04479553550481796, -1.7378902435302734, -1.932694435119629, 1.2782788276672363, 1.1507936716079712, 2.356872081756592, 0.5212579369544983, 0.4329199194908142, -0.7860400080680847, -0.6650373935699463, 0.3600924015045166, -1.059383511543274, -0.7975030541419983, 0.08851422369480133, 2.3769736289978027, 1.8566467761993408, -0.4018145203590393, -0.19563700258731842, -1.0278178453445435, 1.4291282892227173, -0.19375868141651154, 0.22039099037647247, 2.0226166248321533, -0.27164947986602783, -1.0685909986495972, 1.389714241027832, -2.363643169403076, 0.15342338383197784, 2.0088558197021484, 0.31999391317367554, 0.029041524976491928, -1.3908023834228516, -0.5765735507011414, -0.2980479598045349, -0.3312408924102783, -1.239707112312317, 0.5697959661483765, -0.2904475927352905, -0.864381730556488, -1.3686785697937012, 0.11249774694442749, -1.0918476581573486, -1.6295665502548218, 0.32751941680908203, 1.7412365674972534, 2.05246901512146, -0.7202409505844116, 1.5672069787979126, -0.36191248893737793, 0.2121841013431549, 1.2608277797698975, 1.187955379486084, 3.1875908374786377, 1.940978765487671, -1.323986530303955, 0.6390425562858582, -0.21652071177959442, -0.42276203632354736, 1.1045588254928589, -1.2985138893127441, 1.273222804069519, -0.0801718458533287, -1.2096128463745117, -1.1723265647888184, 1.0489197969436646, 0.44062119722366333, 0.04867159202694893, -0.4625762104988098, 1.1670441627502441, 0.052757926285266876, 1.3607609272003174, 0.5226157903671265, -0.35548484325408936, 0.6116729378700256, -0.43677979707717896, -0.5239753723144531, 1.5059067010879517, 0.21512654423713684, -1.4351544380187988, -2.1924564838409424, -0.22501631081104279, -0.8261810541152954, 0.10424908995628357, -0.6294266581535339, -0.9450820684432983, 1.6004143953323364, 0.3333340883255005, -1.2872251272201538, -0.2996653914451599, -0.3857111930847168, -0.5261631011962891, 2.66406512260437, -1.41520357131958, -0.25087296962738037, -1.0246751308441162, -0.6027599573135376, 1.6497584581375122, -1.2039272785186768, -0.2694386839866638, -1.040541410446167, -0.5704876780509949, -1.2238181829452515, -0.5784503221511841, -0.03632200509309769, -0.9535029530525208, 0.7186812162399292, 0.07075364142656326, -1.0671148300170898, -0.33215826749801636, -0.8305802941322327, 0.8918260931968689, -0.16956649720668793, 0.15422600507736206, 1.836975336074829, 0.2998412251472473, -0.3696087598800659, 0.766727089881897, 1.171155333518982, 0.6389861106872559, -0.6463362574577332, 0.14071421325206757, -0.6935901045799255, 0.41282880306243896, -1.3105617761611938, 0.30002421140670776, -2.837926149368286, 0.6457945704460144, -0.0652945339679718, 0.01564093492925167, -0.07161755114793777, -1.355626106262207, 1.1122617721557617, 2.5413782596588135, -1.1549601554870605, 0.4759060740470886, 0.334297239780426, 1.149916410446167, -1.6308578252792358, 0.32492953538894653, -0.4661768078804016, 2.1602373123168945, 0.24194665253162384, 1.2211284637451172, -0.45059049129486084, -2.2282700538635254, 0.6639254093170166, -1.2563122510910034, -1.1814758777618408, 0.6980534791946411, -0.8781324625015259, 0.11492668837308884, -1.449743628501892, -0.19588088989257812, -0.8452556729316711, -1.0627855062484741, 0.5654016733169556, 0.13281866908073425, 0.34139180183410645, -0.6191518902778625, 0.32832711935043335, -2.20099139213562, -1.3136950731277466, -0.24004648625850677, -1.0153707265853882, 0.4797220826148987, -0.35800451040267944, 0.6200186014175415, -0.13977056741714478, -0.02503375895321369, 0.37919747829437256, 1.429979920387268, 3.371509313583374, 0.16024720668792725, 0.3196377158164978, -0.10727951675653458, -0.9763385653495789, 1.4055554866790771, 0.8801136016845703, -0.17543061077594757, -0.5945407748222351, -1.0359063148498535, 1.2929813861846924, 1.9227712154388428, 1.0153266191482544, 0.015796681866049767, -0.8221115469932556, -0.741701602935791, 0.01556716300547123, 0.13896632194519043, 0.4836272597312927, 0.897036075592041, 0.024913545697927475, 0.12746421992778778, 1.471943736076355, 1.1809515953063965, -0.38887959718704224, 0.38754719495773315, -0.8764098882675171, -0.5109807848930359, 0.46563369035720825, 0.29103004932403564, -0.11702271550893784, 0.29056107997894287, -0.981444239616394, -0.23322553932666779, -0.3421945571899414, -0.9287681579589844, -0.7398995757102966, -0.36747270822525024, -0.3751367926597595, 1.6424415111541748, 0.18067647516727448, -0.5436044335365295, -0.12797316908836365, -0.7955306172370911, -0.17432521283626556, -1.0227237939834595, 0.3588114380836487, -0.07932143658399582, -0.1313612163066864, -0.14882394671440125, 1.6771830320358276, -0.8238711953163147, -2.053359270095825, 0.24642552435398102, 0.2360365092754364, -0.35010218620300293, 0.13610835373401642, 1.5851503610610962, 0.6004170179367065, 1.4434984922409058, 1.3919702768325806, 0.8602253198623657, -0.5787267088890076, -1.2853715419769287, 0.7628487348556519, 0.9283958673477173, -1.446852684020996, 0.805169939994812, -0.04206249117851257, -0.4703429937362671, 0.6023659706115723, 1.29470956325531, 0.5435220003128052, -2.002936840057373, 0.8384875059127808, -1.0043361186981201, 0.7327141165733337, 0.7412248849868774, 0.6649209856987, 0.20698226988315582, 0.7882900238037109, -1.2604832649230957, -1.1334017515182495, -0.8066056370735168, -0.7077419757843018, 1.9899709224700928, -0.23631896078586578, 0.6078546047210693, -0.24522870779037476, -1.2603206634521484, -0.1796460747718811, 0.6486010551452637, 0.26032620668411255, -0.521307110786438, 0.811697781085968, -0.6664702296257019, -1.132874608039856, -1.407204508781433, -0.4403781294822693, -0.9955586791038513, -0.9011247754096985, 1.0174760818481445, 0.8042148947715759, 0.294251024723053, 1.8884590864181519, 0.6101417541503906, 0.23020294308662415, -2.6339309215545654, 0.8882767558097839, 0.26592791080474854, -0.06377743184566498, 0.9248842000961304, 0.25990092754364014, 0.9535425305366516, 0.0038728369399905205, 0.5443090796470642, -2.379596471786499, 2.224684476852417, -0.21119281649589539, 0.7577206492424011, -0.037060290575027466, -0.12472904473543167, 1.1178733110427856, 0.602754533290863, 0.5633463263511658, -1.0643725395202637, 0.7063340544700623, -0.5872644782066345, 1.332115650177002, 0.8643589615821838, -0.7947189211845398, -0.05660364776849747, 1.3273941278457642, 0.4226531386375427, -0.4579671621322632, -0.9636809825897217, -0.9344362616539001, 0.9429306983947754, 1.8006737232208252, -0.11974305659532547, -0.014700282365083694, 0.7580148577690125, 0.6935838460922241, -1.3029813766479492, 0.03852381929755211, -0.7724022269248962, -0.690828263759613, 1.707092523574829, 2.092664957046509, -0.11039604991674423, -0.20622040331363678, -0.683498740196228, -1.3555394411087036, 0.7617064714431763, -0.06122690811753273, 0.1295759081840515, 0.7707712650299072, -0.6259964108467102, 1.1488873958587646, 0.9340903759002686, 0.905281662940979, 0.1903732568025589, 0.2320922613143921, 0.26566606760025024, -0.24391688406467438, -1.1662343740463257, -0.2648225426673889, -1.0463918447494507, -2.5915658473968506, 0.42726969718933105, -0.20457391440868378, -1.3975846767425537, 0.08517587929964066, -1.006597876548767, 0.995648980140686, -0.6203688979148865, -1.0980249643325806, -1.5475139617919922, 0.23461312055587769, 0.0017905710265040398, 0.9576308727264404, -1.6279696226119995, -0.11174843460321426, 1.1824315786361694, 0.8413451910018921, -0.5785090923309326, 0.9962254762649536, 0.2678222060203552, 1.011472463607788, 0.7751230597496033, -0.346546471118927, 0.5256425142288208, 0.028500117361545563, -1.3109287023544312, 0.5590139031410217, 1.1751857995986938, 0.20451785624027252, 1.5067343711853027, -0.5456582903862, 0.0042556822299957275, 0.39507561922073364, -0.6549051403999329, -0.40083473920822144, -0.4666612148284912, 0.7066260576248169, 0.004020016640424728, -0.9125815033912659, -0.04554900899529457, -0.0542403869330883, -0.2664088010787964, 0.15177302062511444, -1.429937720298767, -0.17251525819301605, -0.3843153119087219, -0.6534997820854187, -1.2168400287628174, -0.08914801478385925, 1.4197945594787598, -0.9366234540939331, -0.1702539175748825, 0.5249108076095581, 0.32452231645584106, 0.5521981120109558, 0.7310900092124939, -0.6812278032302856, -0.3198091387748718, -0.20595981180667877, -0.34372150897979736, 0.23980341851711273, 1.371781587600708, -0.020878218114376068, -0.9201746582984924, 0.7447529435157776, -0.3626006245613098, 0.03745150566101074, 1.8711796998977661, 0.1175229400396347, -0.75510573387146, 0.31240975856781006, -0.6869456171989441, 1.983993649482727, 1.646418809890747, 1.3265448808670044, -0.13134631514549255, -0.9780005216598511, 0.576084554195404, -0.2694033980369568, -0.31623250246047974, 0.8371988534927368, 0.44250959157943726, -0.2404385656118393, -1.3522614240646362, 0.7389332056045532, 1.2232099771499634, -0.954721987247467, -0.7576216459274292, 0.09962073713541031, -0.81633460521698, 1.0887266397476196, 0.6841037273406982, 0.4025738835334778, 0.24707694351673126, 1.6954290866851807, 0.7668022513389587, -0.4166112542152405, 0.46030616760253906, 0.5452482104301453, -0.15161670744419098, -2.249497175216675, -1.0597612857818604, 0.32546675205230713, -0.49823111295700073, -1.529433250427246, 1.2715359926223755, -1.0751622915267944, -0.9222122430801392, 0.5136264562606812, 0.09744153916835785, 1.5146530866622925, 0.3621121048927307, 1.5991923809051514, 2.0584352016448975, 0.9640257358551025, 0.3501940965652466, 1.3613144159317017, -0.09304914623498917, -0.39666008949279785, 1.7350209951400757, -0.3296675682067871, 0.5149245858192444, 1.1069883108139038, -0.3877773880958557, -1.0386141538619995, -0.7619941234588623, -1.2276992797851562, -0.7528206706047058, 1.1136225461959839, 0.10344211012125015, -1.0591181516647339, 0.23363573849201202, 1.5074489116668701, 0.1975385844707489, -0.28310757875442505, 0.5460940599441528, 0.4339559078216553, -0.790980875492096, -0.06212100014090538, -0.9292041659355164, 0.5154296159744263, -0.23181146383285522, -0.42247265577316284, 0.2690480947494507, 0.4200480580329895, 1.3636499643325806, -0.07246901094913483, 0.12798544764518738, 1.1384707689285278, -1.4466934204101562, 1.457889437675476, -0.7327942252159119, 0.2938939332962036, -2.319089889526367, 1.3879127502441406, -0.8490732312202454, 1.9445396661758423, -2.7168936729431152, 0.5044172406196594, -0.5931054949760437, -0.42011117935180664, 0.3043544292449951, -0.3542816638946533, 0.07516723871231079, -0.040116794407367706, -1.2073476314544678, -0.01667112484574318, -0.6626384258270264, 0.6260032057762146, 1.1739182472229004, 1.4009333848953247, -1.1820435523986816, -0.27304697036743164, -1.777896761894226, -0.20196418464183807, -0.764202356338501, 0.3205185532569885, -1.990640640258789, -0.09774463623762131, -1.9089102745056152, -2.344501256942749, -1.2176119089126587, -0.8487280607223511, 1.0907942056655884, 0.10639049857854843, -0.8685066103935242, 1.1527209281921387, -0.43484604358673096, -1.8286792039871216, 1.1272225379943848, -2.2654550075531006 ]
https://github.com/huggingface/datasets/issues/5539
IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number
Hi! The `set_transform` does not apply a custom formatting transform on a single example but the entire batch, so the fixed version of your transform would look as follows: ```python from datasets import load_dataset import torch dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') def t(batch): return {"test": torch.tensor([1] * len(batch[next(iter(batch))]))} dataset.set_transform(t) d_0 = dataset[0] ``` Still, the formatter's error message should mention that a dict of **sequences** is expected as the returned value (not just a dict) to make debugging easier.
### Describe the bug When dataset contains a 0-dim tensor, formatting.py raises a following error and fails. ```bash Traceback (most recent call last): File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 501, in format_row return _unnest(formatted_batch) File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in _unnest return {key: array[0] for key, array in py_dict.items()} File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in <dictcomp> return {key: array[0] for key, array in py_dict.items()} IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number ``` ### Steps to reproduce the bug Load whichever dataset and add transform method to add 0-dim tensor. Or create/find a dataset containing 0-dim tensor. E.g. ```python from datasets import load_dataset import torch dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') def t(batch): return {"test": torch.tensor(1)} dataset.set_transform(t) d_0 = dataset[0] ``` ### Expected behavior Extractor will correctly get a row from the dataset, even if it contains 0-dim tensor. ### Environment info `datasets==2.8.0`, but it looks like it is also applicable to main branch version (as of 16th February)
295
78
IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number ### Describe the bug When dataset contains a 0-dim tensor, formatting.py raises a following error and fails. ```bash Traceback (most recent call last): File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 501, in format_row return _unnest(formatted_batch) File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in _unnest return {key: array[0] for key, array in py_dict.items()} File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in <dictcomp> return {key: array[0] for key, array in py_dict.items()} IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number ``` ### Steps to reproduce the bug Load whichever dataset and add transform method to add 0-dim tensor. Or create/find a dataset containing 0-dim tensor. E.g. ```python from datasets import load_dataset import torch dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') def t(batch): return {"test": torch.tensor(1)} dataset.set_transform(t) d_0 = dataset[0] ``` ### Expected behavior Extractor will correctly get a row from the dataset, even if it contains 0-dim tensor. ### Environment info `datasets==2.8.0`, but it looks like it is also applicable to main branch version (as of 16th February) Hi! The `set_transform` does not apply a custom formatting transform on a single example but the entire batch, so the fixed version of your transform would look as follows: ```python from datasets import load_dataset import torch dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') def t(batch): return {"test": torch.tensor([1] * len(batch[next(iter(batch))]))} dataset.set_transform(t) d_0 = dataset[0] ``` Still, the formatter's error message should mention that a dict of **sequences** is expected as the returned value (not just a dict) to make debugging easier.
[ -1.2230236530303955, -0.9111908674240112, -0.6155933737754822, 1.4079370498657227, -0.12640199065208435, -1.3362057209014893, 0.1638043075799942, -1.0651549100875854, 1.7161568403244019, -0.7853018641471863, 0.2807149887084961, -1.6716252565383911, 0.027124546468257904, -0.5514797568321228, -0.745354413986206, -0.8683632016181946, -0.46820902824401855, -0.7453455924987793, 1.0890560150146484, 2.445871591567993, 1.3258812427520752, -1.3945016860961914, 2.7021682262420654, 0.755052924156189, -0.2808230519294739, -0.9107652902603149, 0.5023033618927002, -0.02392774447798729, -1.3475288152694702, -0.4479299485683441, -0.8601193428039551, -0.0850059986114502, -0.5065008997917175, -0.5777066946029663, -0.019593052566051483, 0.37550652027130127, -0.3113953173160553, -0.41533926129341125, -0.5771241784095764, -0.8463752865791321, 0.44583895802497864, -0.3427121639251709, 0.9379528164863586, -0.32226693630218506, 1.7627315521240234, -0.6201715469360352, 0.4885561764240265, 0.6814095377922058, 1.3893243074417114, 0.1468265950679779, 0.029828883707523346, 0.3914591372013092, 0.39313995838165283, -0.029295798391103745, 0.5523353815078735, 1.24598228931427, 0.6238112449645996, 0.48830386996269226, 0.6949503421783447, -2.265110969543457, 1.2941056489944458, -0.9252040386199951, 0.3266160190105438, 1.223035216331482, -0.9285319447517395, 0.35515785217285156, -1.7377012968063354, -0.14930647611618042, 0.5706843137741089, -2.2597570419311523, 0.3224622309207916, -1.3883792161941528, -0.5464407205581665, 0.9396158456802368, 0.372029572725296, -1.0893899202346802, 0.10865354537963867, -0.43103259801864624, 1.0263561010360718, 0.41778597235679626, 1.1224547624588013, -1.7229069471359253, 0.008231260813772678, -0.3245311677455902, 0.13251113891601562, -1.133081078529358, -1.5584194660186768, 0.6029715538024902, 0.6581456661224365, 0.6523170471191406, -0.10786326974630356, 1.0960209369659424, -1.0176732540130615, 0.7973732352256775, -1.0143424272537231, -1.7456198930740356, -1.4323890209197998, -2.3333218097686768, -2.2933461666107178, 0.7277212738990784, -0.4874856472015381, -0.5444391965866089, 2.1055164337158203, -0.9966058135032654, -1.8328759670257568, 1.1562541723251343, 0.3247204124927521, -0.0926191583275795, 2.359442710876465, 0.1439826786518097, -0.6858943700790405, 0.5837525725364685, -0.8048976063728333, 0.8146274089813232, -0.4439190924167633, 1.2739149332046509, 0.47391989827156067, -1.0317343473434448, 1.575606107711792, -0.4540831446647644, 0.5830793976783752, -0.732994019985199, -0.460803747177124, -0.7026727795600891, 0.28498712182044983, 1.8848539590835571, -0.3369334042072296, 1.5089051723480225, -0.294579416513443, -1.556689977645874, -1.5684329271316528, 0.8499304056167603, 0.4632459282875061, -0.792147159576416, 0.18450240790843964, -0.46299514174461365, 0.2064519077539444, 0.012450930662453175, 1.1152480840682983, 1.2467737197875977, 0.7154973745346069, -0.2794100344181061, -0.882330596446991, 0.20153893530368805, -0.019780650734901428, -0.7269191741943359, -1.730039119720459, -0.3271024227142334, 0.17997585237026215, 0.5068625211715698, -1.1608635187149048, 1.8331217765808105, 0.9256850481033325, 2.0106258392333984, 1.0493954420089722, -0.31698107719421387, 1.5799247026443481, 0.06007428094744682, 1.806182861328125, -0.41591328382492065, 0.6630980968475342, -0.40982314944267273, -1.1725090742111206, 0.8601245284080505, -0.35390427708625793, -2.017758369445801, -0.6738002300262451, -0.7717112898826599, -0.18731288611888885, -0.8130658864974976, 0.9881576299667358, -0.2625671923160553, -1.45713472366333, 0.17984944581985474, -0.7505185604095459, 0.149723619222641, -1.2675472497940063, 0.2863306403160095, 0.7153913974761963, -0.589925229549408, 0.07606656104326248, -0.3269628882408142, -1.299370288848877, -0.4611727297306061, 0.352449893951416, 1.9077832698822021, -0.7252742648124695, 0.8963062763214111, 1.0504318475723267, -0.6913444995880127, 0.021750599145889282, 0.2702368199825287, -0.2223389744758606, 0.818694531917572, -1.1019707918167114, -0.3636285960674286, 1.2107287645339966, -0.17232570052146912, -0.5964088439941406, 1.4481123685836792, 0.7163112163543701, -1.0594462156295776, -0.19934697449207306, -0.13230687379837036, -0.8146425485610962, -0.029366225004196167, -1.5624727010726929, -0.08934594690799713, 0.43745940923690796, -1.5223240852355957, -0.4876183271408081, -0.23371005058288574, 1.2499217987060547, -0.1777447760105133, 1.4663128852844238, -0.35958945751190186, -0.12027907371520996, -0.4044168293476105, -0.3968535363674164, 0.08125149458646774, -0.15523789823055267, -0.6527588367462158, 0.13387177884578705, -0.706667959690094, 0.3550735116004944, 1.493816614151001, 0.2712142765522003, 0.1739056259393692, 0.49934086203575134, 1.1158114671707153, 0.3585756719112396, -0.13856202363967896, -0.8095447421073914, -1.5291001796722412, 2.0220866203308105, -1.4464004039764404, 1.9393218755722046, 0.7614673376083374, -0.011190812103450298, -1.8088741302490234, -1.9671931266784668, 1.2999069690704346, 1.1534823179244995, 2.3463895320892334, 0.5110090374946594, 0.424646258354187, -0.8095449805259705, -0.6499671936035156, 0.30901098251342773, -1.0165537595748901, -0.7178585529327393, 0.1409239023923874, 2.329989433288574, 1.7730575799942017, -0.4633142054080963, -0.27243173122406006, -1.0026977062225342, 1.4064868688583374, -0.24047483503818512, 0.21835938096046448, 1.9354102611541748, -0.3451627790927887, -0.9655880331993103, 1.228957176208496, -2.39393949508667, 0.15646176040172577, 2.020156145095825, 0.19023887813091278, 0.14097324013710022, -1.2918158769607544, -0.6185879111289978, -0.29262062907218933, -0.5263980627059937, -1.2645066976547241, 0.5014125108718872, -0.228030726313591, -0.7296158075332642, -1.4180668592453003, 0.20740653574466705, -1.0667692422866821, -1.7132900953292847, 0.22506210207939148, 1.896296501159668, 2.0164899826049805, -0.8260797262191772, 1.480532169342041, -0.37695881724357605, 0.1269136369228363, 1.2823997735977173, 1.2531538009643555, 3.057263135910034, 2.0120365619659424, -1.2931798696517944, 0.6876077055931091, -0.1753079742193222, -0.5030562877655029, 1.226176381111145, -1.2512520551681519, 1.2908287048339844, -0.1492273062467575, -1.2705541849136353, -1.1847259998321533, 0.9895691871643066, 0.44660308957099915, 0.08717667311429977, -0.5002748966217041, 1.2212423086166382, 0.11415714770555496, 1.2860124111175537, 0.5661511421203613, -0.3717759847640991, 0.6685418486595154, -0.310545414686203, -0.4849787652492523, 1.494990348815918, 0.22957201302051544, -1.4504139423370361, -2.3688623905181885, -0.13003499805927277, -0.9709765315055847, -0.005296887829899788, -0.6471017599105835, -0.9980047941207886, 1.6656242609024048, 0.2985725700855255, -1.1599955558776855, -0.22365054488182068, -0.2909524738788605, -0.542088508605957, 2.6854076385498047, -1.3518030643463135, -0.2583546042442322, -0.9865820407867432, -0.5968828797340393, 1.6859790086746216, -1.2267347574234009, -0.17561990022659302, -1.0479174852371216, -0.523902952671051, -1.2936289310455322, -0.5148823857307434, -0.045976702123880386, -0.941742479801178, 0.8127778172492981, 0.17335249483585358, -1.2576186656951904, -0.31800100207328796, -0.9333586096763611, 0.9311540126800537, -0.15143261849880219, 0.24471527338027954, 1.9403939247131348, 0.381851464509964, -0.39720964431762695, 0.7949954867362976, 1.2506301403045654, 0.5908015370368958, -0.6124160289764404, 0.2050183117389679, -0.691653847694397, 0.40454715490341187, -1.3296760320663452, 0.25606802105903625, -2.7554171085357666, 0.7356467247009277, -0.05281628668308258, -0.07594280689954758, -0.07351880520582199, -1.4097052812576294, 1.0298632383346558, 2.5478878021240234, -1.1969525814056396, 0.4789377450942993, 0.29555025696754456, 1.1708366870880127, -1.515284538269043, 0.2815054953098297, -0.5273773074150085, 2.1250696182250977, 0.17417952418327332, 1.2350232601165771, -0.4254300892353058, -2.3438384532928467, 0.6253722906112671, -1.2697505950927734, -1.1310696601867676, 0.7704877257347107, -0.9239498972892761, 0.0603136382997036, -1.3190652132034302, -0.16654768586158752, -0.853647768497467, -1.1438127756118774, 0.7243804931640625, 0.10839429497718811, 0.5137275457382202, -0.6849417686462402, 0.33705151081085205, -2.2053422927856445, -1.3552019596099854, -0.231245756149292, -0.9474464058876038, 0.49621710181236267, -0.3860035538673401, 0.6035167574882507, -0.16834306716918945, -0.005019521340727806, 0.3595699071884155, 1.4443906545639038, 3.3275551795959473, 0.20329344272613525, 0.33351218700408936, -0.17116063833236694, -1.0380399227142334, 1.4306854009628296, 0.8576954007148743, -0.2286553531885147, -0.54734206199646, -0.9967972040176392, 1.3308069705963135, 1.8880342245101929, 1.045168399810791, -0.016577180474996567, -0.8362972736358643, -0.7768831849098206, 0.04360254481434822, 0.16881950199604034, 0.44107532501220703, 0.942209780216217, 0.14984145760536194, 0.11266817897558212, 1.4245479106903076, 1.151890516281128, -0.3649996221065521, 0.4232597351074219, -0.8335630893707275, -0.46420395374298096, 0.4837064743041992, 0.28502726554870605, 0.04435169696807861, 0.40690433979034424, -0.9897094368934631, -0.30698540806770325, -0.4295876920223236, -0.8447617292404175, -0.7927305102348328, -0.3837636113166809, -0.3603634238243103, 1.6471459865570068, 0.04482743889093399, -0.5112084746360779, 0.07351549714803696, -0.7063206434249878, -0.09157394617795944, -1.005048394203186, 0.21152730286121368, -0.06266899406909943, -0.10099805891513824, -0.12250414490699768, 1.6910027265548706, -0.9532501697540283, -2.051319122314453, 0.24526727199554443, 0.18878814578056335, -0.352914035320282, 0.16525062918663025, 1.6093673706054688, 0.5495968461036682, 1.4444289207458496, 1.3529719114303589, 0.9618813991546631, -0.649082362651825, -1.2988550662994385, 0.7387088537216187, 0.9885298609733582, -1.3252941370010376, 0.8698394298553467, 0.00503305159509182, -0.6027658581733704, 0.6134523153305054, 1.261046290397644, 0.4533052444458008, -2.023944616317749, 0.8640021085739136, -1.002631425857544, 0.8113800883293152, 0.7121824622154236, 0.7473357915878296, 0.23923605680465698, 0.8327176570892334, -1.2758471965789795, -1.1709918975830078, -0.6689251661300659, -0.7491927742958069, 1.880272388458252, -0.323183536529541, 0.5708203315734863, -0.2478605955839157, -1.375709891319275, -0.09496646374464035, 0.7216234803199768, 0.3197786211967468, -0.5419914126396179, 0.8246023654937744, -0.5995287895202637, -0.9987930655479431, -1.3265130519866943, -0.4344483017921448, -1.0674216747283936, -0.887968897819519, 1.0018013715744019, 0.8531560301780701, 0.28874173760414124, 1.9134541749954224, 0.6517873406410217, 0.23594535887241364, -2.6621549129486084, 0.9409328699111938, 0.2384108603000641, -0.08418343216180801, 0.7765011191368103, 0.275202214717865, 0.9901634454727173, -0.009295589290559292, 0.564791202545166, -2.354337692260742, 2.261901617050171, -0.16907967627048492, 0.6999577283859253, 0.04980574920773506, -0.0757104903459549, 1.0438337326049805, 0.5363531112670898, 0.5433326959609985, -1.069810152053833, 0.6419720649719238, -0.5904555320739746, 1.23655366897583, 0.8594454526901245, -0.8328595161437988, 0.002217072993516922, 1.3636189699172974, 0.4441964626312256, -0.5178518891334534, -0.9815599322319031, -0.9397305250167847, 0.9975142478942871, 1.7523696422576904, -0.014733013696968555, 0.07581157982349396, 0.8739067912101746, 0.6714681386947632, -1.3094353675842285, 0.059929151087999344, -0.7771207690238953, -0.699418842792511, 1.6664620637893677, 2.0717129707336426, -0.17910437285900116, -0.15879495441913605, -0.6968857049942017, -1.2293834686279297, 0.87303626537323, -0.01264169905334711, 0.029697958379983902, 0.7245621085166931, -0.6620712876319885, 1.1018425226211548, 0.7857542634010315, 0.9865497350692749, 0.1861826777458191, 0.2353433072566986, 0.3195887506008148, -0.3684829771518707, -1.145509958267212, -0.20107047259807587, -1.007590413093567, -2.5713469982147217, 0.3746946454048157, -0.2101641595363617, -1.4532101154327393, 0.04877151548862457, -1.0768500566482544, 0.9272528886795044, -0.5677875280380249, -1.0331852436065674, -1.470708966255188, 0.19076062738895416, -0.04758670926094055, 0.9013048410415649, -1.6078002452850342, -0.12236092239618301, 1.2201590538024902, 0.9489372968673706, -0.7028656601905823, 0.9276290535926819, 0.24806377291679382, 0.9946635961532593, 0.8904452919960022, -0.371354341506958, 0.5875551700592041, -0.01466846838593483, -1.3517076969146729, 0.4388308823108673, 1.2653008699417114, 0.16868138313293457, 1.3919494152069092, -0.5496504306793213, -0.03049837052822113, 0.39886584877967834, -0.5292649865150452, -0.43887582421302795, -0.5092424154281616, 0.6354255080223083, 0.05450605973601341, -1.015150547027588, -0.09241177886724472, -0.03831489384174347, -0.23403143882751465, 0.1999683976173401, -1.5043745040893555, -0.15904822945594788, -0.3424833416938782, -0.5920700430870056, -1.3174487352371216, -0.025931645184755325, 1.3942605257034302, -0.8023256063461304, -0.15859945118427277, 0.488945871591568, 0.3136511445045471, 0.538012683391571, 0.5677679181098938, -0.6662707924842834, -0.2875392735004425, -0.2816019654273987, -0.34093233942985535, 0.3394358158111572, 1.3547253608703613, -0.08004436641931534, -0.9504916667938232, 0.6924101114273071, -0.3920819163322449, 0.15744204819202423, 1.8758243322372437, 0.05708598718047142, -0.7695819735527039, 0.3029239773750305, -0.6906375288963318, 1.8202699422836304, 1.7782766819000244, 1.2928296327590942, -0.09640850871801376, -0.9602413177490234, 0.6035925149917603, -0.39784130454063416, -0.3679240345954895, 0.8651636242866516, 0.35398855805397034, -0.18414048850536346, -1.371131181716919, 0.7264623045921326, 1.2353219985961914, -0.7745317220687866, -0.8377684354782104, 0.03705264627933502, -0.8015965223312378, 1.1587936878204346, 0.6970691084861755, 0.3823575973510742, 0.23665818572044373, 1.602858066558838, 0.850365161895752, -0.43314048647880554, 0.5776566863059998, 0.5288984179496765, -0.10789327323436737, -2.115372896194458, -1.1170920133590698, 0.27819034457206726, -0.4089808762073517, -1.653293490409851, 1.357747197151184, -1.2176538705825806, -0.9855883717536926, 0.547711968421936, 0.09463842213153839, 1.4542913436889648, 0.3312247395515442, 1.5871500968933105, 2.1783432960510254, 0.9308860301971436, 0.444749116897583, 1.2504665851593018, -0.24042803049087524, -0.39905112981796265, 1.7135614156723022, -0.3928626477718353, 0.5022052526473999, 0.9541937708854675, -0.4338188171386719, -1.0336859226226807, -0.8014189004898071, -1.3039109706878662, -0.745053231716156, 1.1567305326461792, 0.0692991241812706, -1.0979654788970947, 0.3340655565261841, 1.5716692209243774, 0.07636383920907974, -0.22317273914813995, 0.6935883164405823, 0.39327120780944824, -0.812847912311554, -0.1261640191078186, -0.9117200374603271, 0.5575768947601318, -0.13147878646850586, -0.4077382981777191, 0.3289813995361328, 0.40996822714805603, 1.2851567268371582, 0.07282230257987976, 0.11566831916570663, 1.1515476703643799, -1.383082389831543, 1.474758505821228, -0.7037374377250671, 0.19888681173324585, -2.4021012783050537, 1.4425675868988037, -0.8260869383811951, 1.9004076719284058, -2.6863582134246826, 0.4776557683944702, -0.5312517285346985, -0.446787565946579, 0.3326677083969116, -0.3499141037464142, 0.1297202706336975, -0.1865486353635788, -1.0795528888702393, -0.055848490446805954, -0.6147878170013428, 0.5680229663848877, 1.0814871788024902, 1.40449857711792, -1.1157130002975464, -0.2728120982646942, -1.727349042892456, -0.094263955950737, -0.7116482853889465, 0.32323452830314636, -1.9714113473892212, -0.11007978767156601, -1.9748433828353882, -2.447360038757324, -1.2896252870559692, -0.8335116505622864, 1.117079257965088, 0.11467275768518448, -0.8371548056602478, 1.2054272890090942, -0.44103774428367615, -1.8468468189239502, 1.1667349338531494, -2.1814820766448975 ]
https://github.com/huggingface/datasets/issues/5539
IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number
> Hi! The `set_transform` does not apply a custom formatting transform on a single example but the entire batch, so the fixed version of your transform would look as follows: > > ```python > from datasets import load_dataset > import torch > > dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') > def t(batch): > return {"test": torch.tensor([1] * len(batch[next(iter(batch))]))} > > dataset.set_transform(t) > d_0 = dataset[0] > ``` > > Still, the formatter's error message should mention that a dict of **sequences** is expected as the returned value (not just a dict) to make debugging easier. ok, will change it according to suggestion. Thanks for the reply!
### Describe the bug When dataset contains a 0-dim tensor, formatting.py raises a following error and fails. ```bash Traceback (most recent call last): File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 501, in format_row return _unnest(formatted_batch) File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in _unnest return {key: array[0] for key, array in py_dict.items()} File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in <dictcomp> return {key: array[0] for key, array in py_dict.items()} IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number ``` ### Steps to reproduce the bug Load whichever dataset and add transform method to add 0-dim tensor. Or create/find a dataset containing 0-dim tensor. E.g. ```python from datasets import load_dataset import torch dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') def t(batch): return {"test": torch.tensor(1)} dataset.set_transform(t) d_0 = dataset[0] ``` ### Expected behavior Extractor will correctly get a row from the dataset, even if it contains 0-dim tensor. ### Environment info `datasets==2.8.0`, but it looks like it is also applicable to main branch version (as of 16th February)
295
104
IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number ### Describe the bug When dataset contains a 0-dim tensor, formatting.py raises a following error and fails. ```bash Traceback (most recent call last): File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 501, in format_row return _unnest(formatted_batch) File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in _unnest return {key: array[0] for key, array in py_dict.items()} File "<path>/lib/python3.8/site-packages/datasets/formatting/formatting.py", line 137, in <dictcomp> return {key: array[0] for key, array in py_dict.items()} IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number ``` ### Steps to reproduce the bug Load whichever dataset and add transform method to add 0-dim tensor. Or create/find a dataset containing 0-dim tensor. E.g. ```python from datasets import load_dataset import torch dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') def t(batch): return {"test": torch.tensor(1)} dataset.set_transform(t) d_0 = dataset[0] ``` ### Expected behavior Extractor will correctly get a row from the dataset, even if it contains 0-dim tensor. ### Environment info `datasets==2.8.0`, but it looks like it is also applicable to main branch version (as of 16th February) > Hi! The `set_transform` does not apply a custom formatting transform on a single example but the entire batch, so the fixed version of your transform would look as follows: > > ```python > from datasets import load_dataset > import torch > > dataset = load_dataset("lambdalabs/pokemon-blip-captions", split='train') > def t(batch): > return {"test": torch.tensor([1] * len(batch[next(iter(batch))]))} > > dataset.set_transform(t) > d_0 = dataset[0] > ``` > > Still, the formatter's error message should mention that a dict of **sequences** is expected as the returned value (not just a dict) to make debugging easier. ok, will change it according to suggestion. Thanks for the reply!
[ -1.2193645238876343, -0.9118183255195618, -0.619399905204773, 1.408189058303833, -0.13033972680568695, -1.3387686014175415, 0.16156235337257385, -1.0673973560333252, 1.7126332521438599, -0.7874516844749451, 0.2819618284702301, -1.6725255250930786, 0.026825476437807083, -0.5507980585098267, -0.7416903376579285, -0.870069146156311, -0.4685242176055908, -0.747275173664093, 1.0905077457427979, 2.4492273330688477, 1.3288592100143433, -1.3935056924819946, 2.7016797065734863, 0.757199764251709, -0.28280895948410034, -0.90989750623703, 0.5058861374855042, -0.02259872481226921, -1.3486013412475586, -0.447285920381546, -0.8598818778991699, -0.08531996607780457, -0.5073642134666443, -0.5768654942512512, -0.01748257875442505, 0.3758006691932678, -0.31293365359306335, -0.4135986566543579, -0.5770294666290283, -0.8476980328559875, 0.445449560880661, -0.3456766605377197, 0.9392696022987366, -0.32407650351524353, 1.7603353261947632, -0.6194018125534058, 0.48618388175964355, 0.6799852848052979, 1.3905298709869385, 0.14748209714889526, 0.02955133095383644, 0.39019426703453064, 0.3923884332180023, -0.028675928711891174, 0.550326406955719, 1.2413051128387451, 0.6248407363891602, 0.49031516909599304, 0.6968885064125061, -2.26556134223938, 1.2933003902435303, -0.9205430746078491, 0.3272493779659271, 1.2203261852264404, -0.927719235420227, 0.3566346764564514, -1.737586498260498, -0.15025033056735992, 0.5762510895729065, -2.262932300567627, 0.31994637846946716, -1.3905847072601318, -0.5451070070266724, 0.9385796785354614, 0.3725776970386505, -1.089630126953125, 0.10541568696498871, -0.43483853340148926, 1.0252748727798462, 0.41630420088768005, 1.118363618850708, -1.725420355796814, 0.00641645397990942, -0.32635602355003357, 0.13155128061771393, -1.1325366497039795, -1.5584756135940552, 0.6055474281311035, 0.6605651378631592, 0.6537413001060486, -0.10589529573917389, 1.0909370183944702, -1.0120183229446411, 0.7914611101150513, -1.0141500234603882, -1.7486491203308105, -1.4325937032699585, -2.331435203552246, -2.2909679412841797, 0.7242928743362427, -0.4891868829727173, -0.5429670214653015, 2.105248212814331, -0.9960198998451233, -1.8345376253128052, 1.156238079071045, 0.32195231318473816, -0.09197602421045303, 2.3620760440826416, 0.1416814923286438, -0.6873140335083008, 0.5879706144332886, -0.8052813410758972, 0.8157704472541809, -0.44167712330818176, 1.2727255821228027, 0.47078314423561096, -1.030380129814148, 1.5783919095993042, -0.45708417892456055, 0.5826799869537354, -0.7313225269317627, -0.4605342149734497, -0.7034069895744324, 0.2818202078342438, 1.8863593339920044, -0.3355408310890198, 1.5106785297393799, -0.29224732518196106, -1.556342601776123, -1.5677767992019653, 0.8460893630981445, 0.46442410349845886, -0.7940367460250854, 0.1856774538755417, -0.46435868740081787, 0.20600971579551697, 0.013257213868200779, 1.1181780099868774, 1.248605728149414, 0.7167733907699585, -0.2773759067058563, -0.8813048601150513, 0.20205402374267578, -0.01952299103140831, -0.7278798818588257, -1.7328803539276123, -0.3274473249912262, 0.1812363564968109, 0.5105733871459961, -1.158944010734558, 1.8318551778793335, 0.9251836538314819, 2.010664463043213, 1.0495115518569946, -0.31756824254989624, 1.5755621194839478, 0.05944637209177017, 1.8051835298538208, -0.42004674673080444, 0.6651214361190796, -0.4093519151210785, -1.1699708700180054, 0.8607879877090454, -0.35448184609413147, -2.0140089988708496, -0.6730656623840332, -0.7687565684318542, -0.18878307938575745, -0.8110173344612122, 0.9896866679191589, -0.26088646054267883, -1.455007553100586, 0.18586686253547668, -0.754865288734436, 0.1481115221977234, -1.2707809209823608, 0.28727036714553833, 0.7151929140090942, -0.588526725769043, 0.0739368423819542, -0.3313824236392975, -1.302370309829712, -0.46495357155799866, 0.3466196060180664, 1.9082907438278198, -0.7264836430549622, 0.8952994346618652, 1.0468478202819824, -0.6916537880897522, 0.020821843296289444, 0.2723546326160431, -0.22247520089149475, 0.8182304501533508, -1.1040745973587036, -0.36106497049331665, 1.2138416767120361, -0.17453865706920624, -0.5960108041763306, 1.4465200901031494, 0.7165387868881226, -1.0562925338745117, -0.19768665730953217, -0.13491949439048767, -0.8164107203483582, -0.028126414865255356, -1.5665525197982788, -0.08927057683467865, 0.4388308525085449, -1.5218271017074585, -0.4902634918689728, -0.23483280837535858, 1.2516136169433594, -0.1747979074716568, 1.4636257886886597, -0.35608184337615967, -0.12107888609170914, -0.40443676710128784, -0.39517682790756226, 0.07980358600616455, -0.15590456128120422, -0.6531137824058533, 0.13316595554351807, -0.7097561955451965, 0.3515445291996002, 1.4936131238937378, 0.2697252929210663, 0.1734854280948639, 0.4957878589630127, 1.1162161827087402, 0.35876527428627014, -0.14218582212924957, -0.8085843324661255, -1.5283925533294678, 2.024362564086914, -1.4480500221252441, 1.9396910667419434, 0.7615572214126587, -0.011187361553311348, -1.8070570230484009, -1.9658948183059692, 1.2997552156448364, 1.1531044244766235, 2.344311475753784, 0.5156471729278564, 0.4257621467113495, -0.8095534443855286, -0.6520122289657593, 0.30438750982284546, -1.016786813735962, -0.7213729619979858, 0.13877999782562256, 2.33096981048584, 1.7696173191070557, -0.4670899510383606, -0.268329381942749, -1.0025136470794678, 1.4050955772399902, -0.23663215339183807, 0.21672220528125763, 1.9351195096969604, -0.3441421389579773, -0.9670112729072571, 1.2294892072677612, -2.393252372741699, 0.15544144809246063, 2.0204615592956543, 0.18978078663349152, 0.14312644302845, -1.291317343711853, -0.6229637861251831, -0.29167044162750244, -0.5218183994293213, -1.2676042318344116, 0.5055637359619141, -0.2262866497039795, -0.7294961214065552, -1.4216835498809814, 0.2074928730726242, -1.0613397359848022, -1.710811972618103, 0.22186611592769623, 1.8973890542984009, 2.0193276405334473, -0.8226879239082336, 1.4831485748291016, -0.3814134895801544, 0.12615852057933807, 1.2797387838363647, 1.2554258108139038, 3.0551793575286865, 2.015789031982422, -1.2922720909118652, 0.6874247789382935, -0.17515257000923157, -0.5026606917381287, 1.2290282249450684, -1.2515745162963867, 1.2877906560897827, -0.14892525970935822, -1.2759753465652466, -1.1851396560668945, 0.9874932169914246, 0.44405582547187805, 0.08512619137763977, -0.5007924437522888, 1.222113013267517, 0.10872547328472137, 1.2858860492706299, 0.5651383996009827, -0.3695839047431946, 0.6711044907569885, -0.31494808197021484, -0.48247769474983215, 1.4983744621276855, 0.22958336770534515, -1.44994056224823, -2.37370228767395, -0.1292477250099182, -0.9725989103317261, -0.0021779416128993034, -0.6486161351203918, -1.0038522481918335, 1.668259620666504, 0.2989317774772644, -1.1555105447769165, -0.22605635225772858, -0.28798720240592957, -0.540099561214447, 2.6855812072753906, -1.3505183458328247, -0.2572762370109558, -0.9880052804946899, -0.5966998934745789, 1.6845381259918213, -1.2306872606277466, -0.17416445910930634, -1.0504064559936523, -0.5213983654975891, -1.2944295406341553, -0.5123778581619263, -0.04824883118271828, -0.9410335421562195, 0.8102651238441467, 0.1745469570159912, -1.2590008974075317, -0.31592997908592224, -0.9316050410270691, 0.9291869401931763, -0.15146464109420776, 0.2480289489030838, 1.941202163696289, 0.3822799623012543, -0.39337167143821716, 0.7932915687561035, 1.2502901554107666, 0.5927945375442505, -0.613099217414856, 0.20279762148857117, -0.6900604963302612, 0.40563294291496277, -1.3279136419296265, 0.2540196180343628, -2.755333185195923, 0.7410640120506287, -0.05241168290376663, -0.07385535538196564, -0.07136178016662598, -1.4109328985214233, 1.0291378498077393, 2.551582098007202, -1.1990419626235962, 0.47680214047431946, 0.29252657294273376, 1.1697592735290527, -1.514189600944519, 0.2810770273208618, -0.5283560752868652, 2.1284618377685547, 0.1751933991909027, 1.2359801530838013, -0.4231444001197815, -2.3474109172821045, 0.6273319721221924, -1.2672237157821655, -1.1332813501358032, 0.770144522190094, -0.9219223260879517, 0.05256011337041855, -1.3191773891448975, -0.16474410891532898, -0.8549989461898804, -1.143625259399414, 0.7258760333061218, 0.10357552766799927, 0.5137795805931091, -0.6828386783599854, 0.33415886759757996, -2.2054107189178467, -1.354867696762085, -0.2302836775779724, -0.9478775262832642, 0.5001047253608704, -0.38164547085762024, 0.6039644479751587, -0.16701163351535797, -0.0030679558403789997, 0.3597894012928009, 1.4446691274642944, 3.3267927169799805, 0.19884000718593597, 0.3346300721168518, -0.17228347063064575, -1.0391457080841064, 1.4309110641479492, 0.8569713830947876, -0.2287067174911499, -0.5477438569068909, -0.9985923767089844, 1.330975890159607, 1.8895690441131592, 1.0407711267471313, -0.014553898945450783, -0.8387724757194519, -0.7705280780792236, 0.04244309663772583, 0.17276211082935333, 0.44237375259399414, 0.9398546814918518, 0.15260250866413116, 0.11135244369506836, 1.425232172012329, 1.153588056564331, -0.36405080556869507, 0.4261416494846344, -0.8348165154457092, -0.460345983505249, 0.4882284104824066, 0.28650471568107605, 0.0430133119225502, 0.40551695227622986, -0.9868813157081604, -0.30333611369132996, -0.42514869570732117, -0.8435350060462952, -0.7913631200790405, -0.38189277052879333, -0.35840028524398804, 1.6474288702011108, 0.042004697024822235, -0.5131664276123047, 0.0779159665107727, -0.704898476600647, -0.09258276969194412, -1.0101280212402344, 0.21183468401432037, -0.06590773910284042, -0.10278446227312088, -0.12208270281553268, 1.6907910108566284, -0.9536545872688293, -2.0526278018951416, 0.24494419991970062, 0.19478170573711395, -0.3578890562057495, 0.16565030813217163, 1.6114548444747925, 0.5493380427360535, 1.444035291671753, 1.352964997291565, 0.9636502265930176, -0.6509070992469788, -1.295823335647583, 0.7373921275138855, 0.9857621788978577, -1.3233487606048584, 0.8747719526290894, 0.0015608211979269981, -0.6047613620758057, 0.6108186841011047, 1.2628991603851318, 0.4549276828765869, -2.0237863063812256, 0.8650727868080139, -0.9993095397949219, 0.8128871917724609, 0.7141249179840088, 0.7504085302352905, 0.2394874095916748, 0.8319521546363831, -1.2786283493041992, -1.1675350666046143, -0.6677513718605042, -0.7472693920135498, 1.8818864822387695, -0.3241714537143707, 0.5704451203346252, -0.2485509067773819, -1.3749691247940063, -0.09734228998422623, 0.7209802269935608, 0.3211115598678589, -0.540922224521637, 0.8245924711227417, -0.5992155075073242, -1.0023194551467896, -1.3251621723175049, -0.4364905059337616, -1.066427230834961, -0.8905723094940186, 1.005794882774353, 0.8513195514678955, 0.29243823885917664, 1.9129794836044312, 0.6468422412872314, 0.2308139204978943, -2.661087989807129, 0.9412457346916199, 0.23367831110954285, -0.08441731333732605, 0.7775652408599854, 0.28092631697654724, 0.9922873377799988, -0.011667955666780472, 0.5663267970085144, -2.349534749984741, 2.2625620365142822, -0.1696709543466568, 0.6990789175033569, 0.05221633240580559, -0.07346591353416443, 1.0376461744308472, 0.5345245003700256, 0.5444895625114441, -1.0686054229736328, 0.6426084041595459, -0.590079128742218, 1.237254023551941, 0.8630567193031311, -0.8313696980476379, 0.003717506304383278, 1.3658618927001953, 0.4461636245250702, -0.5184364318847656, -0.9845827221870422, -0.9346218705177307, 0.9969691634178162, 1.7515878677368164, -0.014448506757616997, 0.07194387167692184, 0.8688667416572571, 0.6708792448043823, -1.3117302656173706, 0.058226317167282104, -0.7784861326217651, -0.6993342638015747, 1.6663211584091187, 2.065042495727539, -0.17464569211006165, -0.1588040590286255, -0.7013113498687744, -1.2303130626678467, 0.8723207116127014, -0.009109608829021454, 0.02439209073781967, 0.7232773900032043, -0.657880961894989, 1.1010959148406982, 0.7857638001441956, 0.9855011105537415, 0.18713122606277466, 0.24146021902561188, 0.32215580344200134, -0.3665013313293457, -1.146025538444519, -0.20352493226528168, -1.0119050741195679, -2.5700125694274902, 0.37732648849487305, -0.21409040689468384, -1.4530938863754272, 0.04213358089327812, -1.077907681465149, 0.9279532432556152, -0.5677549839019775, -1.0319567918777466, -1.4666179418563843, 0.18829581141471863, -0.04677116125822067, 0.901588499546051, -1.6064170598983765, -0.11764006316661835, 1.2192816734313965, 0.9494637250900269, -0.7049033641815186, 0.9287630319595337, 0.2494633048772812, 0.9953344464302063, 0.8895217776298523, -0.36867082118988037, 0.5871104001998901, -0.017791587859392166, -1.3504295349121094, 0.43853652477264404, 1.2617762088775635, 0.17094355821609497, 1.389959454536438, -0.5484189391136169, -0.0340854674577713, 0.400138795375824, -0.5271242260932922, -0.43648019433021545, -0.5085012912750244, 0.6328292489051819, 0.05941838026046753, -1.0168946981430054, -0.09396672248840332, -0.03609815984964371, -0.23305971920490265, 0.20019230246543884, -1.5029617547988892, -0.15575352311134338, -0.3457283079624176, -0.5898993015289307, -1.3153903484344482, -0.026537682861089706, 1.399764060974121, -0.8062788248062134, -0.15659581124782562, 0.4894395172595978, 0.31453362107276917, 0.5380851030349731, 0.5669875741004944, -0.6672410368919373, -0.28840172290802, -0.2833150327205658, -0.34399616718292236, 0.3391791880130768, 1.3515897989273071, -0.0804925486445427, -0.9494889378547668, 0.6908122301101685, -0.3894830048084259, 0.159336119890213, 1.8762329816818237, 0.05561055988073349, -0.7711622714996338, 0.29849880933761597, -0.6870941519737244, 1.819207787513733, 1.7787951231002808, 1.290123462677002, -0.0969809964299202, -0.9582656621932983, 0.6061928272247314, -0.39821118116378784, -0.3682436943054199, 0.857410192489624, 0.35795751214027405, -0.18371069431304932, -1.37217378616333, 0.7280765771865845, 1.2350988388061523, -0.7760350108146667, -0.8379756212234497, 0.03408762812614441, -0.8023245930671692, 1.1547541618347168, 0.6988223195075989, 0.38276344537734985, 0.23438960313796997, 1.604383945465088, 0.8468604683876038, -0.4328007698059082, 0.5784540772438049, 0.5302713513374329, -0.10858337581157684, -2.1116881370544434, -1.120834231376648, 0.2761768400669098, -0.4095214605331421, -1.6551543474197388, 1.3577189445495605, -1.2212754487991333, -0.9862018823623657, 0.5461304187774658, 0.09947480261325836, 1.4580825567245483, 0.32849207520484924, 1.5880569219589233, 2.1766555309295654, 0.9328296780586243, 0.44211456179618835, 1.2512928247451782, -0.24426379799842834, -0.3984958529472351, 1.7091866731643677, -0.38918668031692505, 0.5053105354309082, 0.9576272964477539, -0.4354075789451599, -1.0316307544708252, -0.8036352396011353, -1.3009586334228516, -0.7476792931556702, 1.1572428941726685, 0.0703735500574112, -1.0989145040512085, 0.3342231214046478, 1.5739836692810059, 0.07238440960645676, -0.22321991622447968, 0.6913711428642273, 0.39476704597473145, -0.8105211853981018, -0.1261661946773529, -0.9150695204734802, 0.5600138902664185, -0.13216455280780792, -0.4083159565925598, 0.3263939917087555, 0.40789490938186646, 1.2902947664260864, 0.07531285285949707, 0.11777529865503311, 1.1510307788848877, -1.379242181777954, 1.47226083278656, -0.7027857303619385, 0.20005175471305847, -2.4025840759277344, 1.4456169605255127, -0.8221746683120728, 1.898372769355774, -2.6848347187042236, 0.4754621088504791, -0.5293103456497192, -0.4395403265953064, 0.3294801115989685, -0.3506307899951935, 0.1327921599149704, -0.18816564977169037, -1.077071189880371, -0.055900126695632935, -0.6151609420776367, 0.5658091902732849, 1.0807441473007202, 1.4028905630111694, -1.113399863243103, -0.2715992331504822, -1.7269471883773804, -0.0954919308423996, -0.7122694253921509, 0.32065537571907043, -1.9717844724655151, -0.10953006893396378, -1.974073886871338, -2.4531075954437256, -1.2877471446990967, -0.8313058018684387, 1.1154755353927612, 0.11586263030767441, -0.8357402086257935, 1.2073875665664673, -0.4387574791908264, -1.8454244136810303, 1.169560194015503, -2.1803879737854004 ]
https://github.com/huggingface/datasets/issues/5538
load_dataset in seaborn is not working for me. getting this error.
Hi! `seaborn`'s `load_dataset` pulls datasets from [here](https://github.com/mwaskom/seaborn-data) and not from our Hub, so this issue is not related to our library in any way and should be reported in their repo instead.
TimeoutError Traceback (most recent call last) ~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 1345 try: -> 1346 h.request(req.get_method(), req.selector, req.data, headers, 1347 encode_chunked=req.has_header('Transfer-encoding')) ~\anaconda3\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) 1278 """Send a complete request to the server.""" -> 1279 self._send_request(method, url, body, headers, encode_chunked) 1280 ~\anaconda3\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) 1324 body = _encode(body, 'body') -> 1325 self.endheaders(body, encode_chunked=encode_chunked) 1326 ~\anaconda3\lib\http\client.py in endheaders(self, message_body, encode_chunked) 1273 raise CannotSendHeader() -> 1274 self._send_output(message_body, encode_chunked=encode_chunked) 1275 ~\anaconda3\lib\http\client.py in _send_output(self, message_body, encode_chunked) 1033 del self._buffer[:] -> 1034 self.send(msg) 1035 ~\anaconda3\lib\http\client.py in send(self, data) 973 if self.auto_open: --> 974 self.connect() 975 else: ~\anaconda3\lib\http\client.py in connect(self) 1440 -> 1441 super().connect() 1442 ~\anaconda3\lib\http\client.py in connect(self) 944 """Connect to the host and port specified in __init__.""" --> 945 self.sock = self._create_connection( 946 (self.host,self.port), self.timeout, self.source_address) ~\anaconda3\lib\socket.py in create_connection(address, timeout, source_address) 843 try: --> 844 raise err 845 finally: ~\anaconda3\lib\socket.py in create_connection(address, timeout, source_address) 831 sock.bind(source_address) --> 832 sock.connect(sa) 833 # Break explicitly a reference cycle TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond During handling of the above exception, another exception occurred: URLError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_12220/2927704185.py in <module> 1 import seaborn as sn ----> 2 iris = sn.load_dataset('iris') ~\anaconda3\lib\site-packages\seaborn\utils.py in load_dataset(name, cache, data_home, **kws) 594 if name not in get_dataset_names(): 595 raise ValueError(f"'{name}' is not one of the example datasets.") --> 596 urlretrieve(url, cache_path) 597 full_path = cache_path 598 else: ~\anaconda3\lib\urllib\request.py in urlretrieve(url, filename, reporthook, data) 237 url_type, path = _splittype(url) 238 --> 239 with contextlib.closing(urlopen(url, data)) as fp: 240 headers = fp.info() 241 ~\anaconda3\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 212 else: 213 opener = _opener --> 214 return opener.open(url, data, timeout) 215 216 def install_opener(opener): ~\anaconda3\lib\urllib\request.py in open(self, fullurl, data, timeout) 515 516 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method()) --> 517 response = self._open(req, data) 518 519 # post-process response ~\anaconda3\lib\urllib\request.py in _open(self, req, data) 532 533 protocol = req.type --> 534 result = self._call_chain(self.handle_open, protocol, protocol + 535 '_open', req) 536 if result: ~\anaconda3\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args) 492 for handler in handlers: 493 func = getattr(handler, meth_name) --> 494 result = func(*args) 495 if result is not None: 496 return result ~\anaconda3\lib\urllib\request.py in https_open(self, req) 1387 1388 def https_open(self, req): -> 1389 return self.do_open(http.client.HTTPSConnection, req, 1390 context=self._context, check_hostname=self._check_hostname) 1391 ~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 1347 encode_chunked=req.has_header('Transfer-encoding')) 1348 except OSError as err: # timeout error -> 1349 raise URLError(err) 1350 r = h.getresponse() 1351 except: URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
296
32
load_dataset in seaborn is not working for me. getting this error. TimeoutError Traceback (most recent call last) ~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 1345 try: -> 1346 h.request(req.get_method(), req.selector, req.data, headers, 1347 encode_chunked=req.has_header('Transfer-encoding')) ~\anaconda3\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) 1278 """Send a complete request to the server.""" -> 1279 self._send_request(method, url, body, headers, encode_chunked) 1280 ~\anaconda3\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) 1324 body = _encode(body, 'body') -> 1325 self.endheaders(body, encode_chunked=encode_chunked) 1326 ~\anaconda3\lib\http\client.py in endheaders(self, message_body, encode_chunked) 1273 raise CannotSendHeader() -> 1274 self._send_output(message_body, encode_chunked=encode_chunked) 1275 ~\anaconda3\lib\http\client.py in _send_output(self, message_body, encode_chunked) 1033 del self._buffer[:] -> 1034 self.send(msg) 1035 ~\anaconda3\lib\http\client.py in send(self, data) 973 if self.auto_open: --> 974 self.connect() 975 else: ~\anaconda3\lib\http\client.py in connect(self) 1440 -> 1441 super().connect() 1442 ~\anaconda3\lib\http\client.py in connect(self) 944 """Connect to the host and port specified in __init__.""" --> 945 self.sock = self._create_connection( 946 (self.host,self.port), self.timeout, self.source_address) ~\anaconda3\lib\socket.py in create_connection(address, timeout, source_address) 843 try: --> 844 raise err 845 finally: ~\anaconda3\lib\socket.py in create_connection(address, timeout, source_address) 831 sock.bind(source_address) --> 832 sock.connect(sa) 833 # Break explicitly a reference cycle TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond During handling of the above exception, another exception occurred: URLError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_12220/2927704185.py in <module> 1 import seaborn as sn ----> 2 iris = sn.load_dataset('iris') ~\anaconda3\lib\site-packages\seaborn\utils.py in load_dataset(name, cache, data_home, **kws) 594 if name not in get_dataset_names(): 595 raise ValueError(f"'{name}' is not one of the example datasets.") --> 596 urlretrieve(url, cache_path) 597 full_path = cache_path 598 else: ~\anaconda3\lib\urllib\request.py in urlretrieve(url, filename, reporthook, data) 237 url_type, path = _splittype(url) 238 --> 239 with contextlib.closing(urlopen(url, data)) as fp: 240 headers = fp.info() 241 ~\anaconda3\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 212 else: 213 opener = _opener --> 214 return opener.open(url, data, timeout) 215 216 def install_opener(opener): ~\anaconda3\lib\urllib\request.py in open(self, fullurl, data, timeout) 515 516 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method()) --> 517 response = self._open(req, data) 518 519 # post-process response ~\anaconda3\lib\urllib\request.py in _open(self, req, data) 532 533 protocol = req.type --> 534 result = self._call_chain(self.handle_open, protocol, protocol + 535 '_open', req) 536 if result: ~\anaconda3\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args) 492 for handler in handlers: 493 func = getattr(handler, meth_name) --> 494 result = func(*args) 495 if result is not None: 496 return result ~\anaconda3\lib\urllib\request.py in https_open(self, req) 1387 1388 def https_open(self, req): -> 1389 return self.do_open(http.client.HTTPSConnection, req, 1390 context=self._context, check_hostname=self._check_hostname) 1391 ~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 1347 encode_chunked=req.has_header('Transfer-encoding')) 1348 except OSError as err: # timeout error -> 1349 raise URLError(err) 1350 r = h.getresponse() 1351 except: URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond> Hi! `seaborn`'s `load_dataset` pulls datasets from [here](https://github.com/mwaskom/seaborn-data) and not from our Hub, so this issue is not related to our library in any way and should be reported in their repo instead.
[ -1.3493822813034058, -0.9833536744117737, -0.6325235962867737, 1.399228572845459, -0.21243597567081451, -1.2577965259552002, 0.1318170130252838, -1.091442346572876, 1.6390981674194336, -0.8145342469215393, 0.25954797863960266, -1.7373191118240356, 0.12101535499095917, -0.5672935843467712, -0.7502237558364868, -0.8922698497772217, -0.4344591200351715, -0.9516218304634094, 1.1034539937973022, 2.611848831176758, 1.3997095823287964, -1.3054193258285522, 2.8312342166900635, 0.7263011932373047, -0.14745382964611053, -1.0368841886520386, 0.5881146788597107, -0.053967639803886414, -1.3013525009155273, -0.5411328673362732, -1.0241965055465698, -0.14308182895183563, -0.7150534391403198, -0.4672008752822876, -0.06019306182861328, 0.38378551602363586, -0.2534451484680176, -0.33662694692611694, -0.6153339743614197, -0.7895867228507996, 0.5664083361625671, -0.46954646706581116, 0.9750109910964966, -0.25367453694343567, 1.6957223415374756, -0.6718578934669495, 0.5092435479164124, 0.6816306114196777, 1.3461500406265259, 0.22109320759773254, -0.12884396314620972, 0.26600518822669983, 0.1931455135345459, 0.04243938624858856, 0.5689910054206848, 1.117061972618103, 0.7155755162239075, 0.44330689311027527, 0.7056094408035278, -2.1183366775512695, 1.4212819337844849, -1.076724886894226, 0.2185932844877243, 1.3747999668121338, -0.9663033485412598, 0.4179474413394928, -1.8030109405517578, -0.2135799080133438, 0.6767719984054565, -2.158679485321045, 0.17446310818195343, -1.270322561264038, -0.511795699596405, 1.0825414657592773, 0.39055296778678894, -1.2110997438430786, 0.14487296342849731, -0.561661958694458, 1.0414315462112427, 0.3643516004085541, 0.915092945098877, -1.6879585981369019, 0.027761539444327354, -0.3750518262386322, 0.18756751716136932, -1.3775551319122314, -1.583093285560608, 0.7246999144554138, 0.5793899893760681, 0.545915961265564, 0.03672599047422409, 1.0393743515014648, -1.1435761451721191, 0.7998995780944824, -1.0892103910446167, -1.6574101448059082, -1.4364317655563354, -2.4123425483703613, -2.265842914581299, 0.6943820118904114, -0.4369761645793915, -0.6159947514533997, 2.1755728721618652, -1.127842664718628, -1.6655842065811157, 1.1257002353668213, 0.12215080857276917, 0.013265131041407585, 2.4911534786224365, 0.26092830300331116, -0.8282143473625183, 0.549496054649353, -0.8352699279785156, 0.8130462169647217, -0.14563055336475372, 1.395998477935791, 0.36223506927490234, -1.04844069480896, 1.6378777027130127, -0.4943748712539673, 0.5156113505363464, -0.5432696342468262, -0.6062235236167908, -0.6800472140312195, 0.3134843111038208, 1.8923672437667847, -0.1936464160680771, 1.6094565391540527, -0.3819722533226013, -1.5220390558242798, -1.3955020904541016, 0.7424802184104919, 0.4210197925567627, -0.8623915314674377, 0.12953169643878937, -0.4649815857410431, 0.09326660633087158, 0.1490960419178009, 1.2750531435012817, 1.3994542360305786, 0.6026056408882141, -0.37610071897506714, -0.9207821488380432, 0.14077915251255035, -0.059358686208724976, -0.7176125645637512, -1.7458579540252686, -0.43052801489830017, -0.0835869088768959, 0.7754834294319153, -1.2159464359283447, 1.8093560934066772, 0.983005166053772, 1.9644421339035034, 1.1789149045944214, -0.3584921360015869, 1.379183053970337, 0.10290182381868362, 1.7912324666976929, -0.5731281638145447, 0.8871445059776306, -0.5166164040565491, -1.0841553211212158, 0.8509546518325806, -0.4017344117164612, -2.046203851699829, -0.7449361085891724, -0.592698335647583, -0.18204553425312042, -0.7717610001564026, 1.0018527507781982, -0.3500053882598877, -1.436384916305542, 0.322795033454895, -0.854152500629425, 0.061916038393974304, -1.261012077331543, 0.22803786396980286, 0.6567899584770203, -0.5629703998565674, 0.2268860787153244, -0.24755977094173431, -1.3041093349456787, -0.36377832293510437, 0.19201552867889404, 1.8320324420928955, -0.6703837513923645, 0.8529688715934753, 1.0308241844177246, -0.5191041231155396, 0.06819095462560654, 0.3539832532405853, -0.24539847671985626, 0.8810861110687256, -1.0341472625732422, -0.4981861710548401, 1.1633899211883545, -0.2426532804965973, -0.551094651222229, 1.4274952411651611, 0.5819373726844788, -1.099345088005066, -0.3265119791030884, -0.06431178003549576, -1.0043160915374756, 0.12306272983551025, -1.602907419204712, -0.22915038466453552, 0.5895726680755615, -1.6001230478286743, -0.40474799275398254, -0.10174019634723663, 1.5028856992721558, -0.019100889563560486, 1.4903720617294312, -0.4842100143432617, -0.12962335348129272, -0.2793392539024353, -0.5788788199424744, 0.18944494426250458, -0.1539543867111206, -0.36571240425109863, 0.1469591110944748, -0.8874796032905579, 0.39389458298683167, 1.51531183719635, 0.27803003787994385, 0.06284993886947632, 0.3474425673484802, 1.0926769971847534, 0.31091296672821045, -0.11501842737197876, -0.7400197386741638, -1.6148207187652588, 2.0682272911071777, -1.599982500076294, 2.0826423168182373, 0.8225271105766296, -0.0672508180141449, -1.7505104541778564, -1.699702262878418, 1.2537567615509033, 1.1616439819335938, 2.1707098484039307, 0.5865017771720886, 0.34815531969070435, -0.8483582139015198, -0.6174494028091431, 0.4096042811870575, -1.1193517446517944, -0.7042909860610962, 0.2025488018989563, 2.390303134918213, 1.7716991901397705, -0.413804292678833, -0.13128457963466644, -0.8965522646903992, 1.3236509561538696, -0.23794347047805786, 0.2633969187736511, 2.001552104949951, -0.27593711018562317, -1.083962082862854, 1.3754678964614868, -2.3272433280944824, 0.18033726513385773, 2.029118776321411, 0.31517863273620605, 0.13765442371368408, -1.4329757690429688, -0.5719666481018066, -0.4879714846611023, -0.30054470896720886, -1.2377254962921143, 0.5383044481277466, -0.2637307941913605, -0.9495795965194702, -1.4708720445632935, 0.020075669512152672, -1.2176331281661987, -1.7694205045700073, 0.3916614055633545, 1.72736656665802, 2.260570526123047, -0.7798436284065247, 1.5978970527648926, -0.3554747700691223, 0.1406002789735794, 1.0956989526748657, 1.2377369403839111, 2.9974594116210938, 1.892140507698059, -1.165055513381958, 0.6025625467300415, -0.21307732164859772, -0.4368712604045868, 1.1555991172790527, -1.2300736904144287, 1.3443942070007324, -0.08615373820066452, -1.1780391931533813, -1.2219327688217163, 0.9292777180671692, 0.36143961548805237, -0.14798791706562042, -0.4328361749649048, 1.3568956851959229, 0.14931602776050568, 1.2700694799423218, 0.35173264145851135, -0.21739840507507324, 0.4993520677089691, -0.4813108444213867, -0.6166336536407471, 1.468512773513794, 0.15025129914283752, -1.5979441404342651, -2.142754077911377, -0.25474265217781067, -0.7190970778465271, 0.09181499481201172, -0.6919577717781067, -0.9078249931335449, 1.7088567018508911, 0.2691875100135803, -1.1521587371826172, -0.22848540544509888, -0.4656965136528015, -0.42904242873191833, 2.748840093612671, -1.2650035619735718, -0.17333127558231354, -0.9647743701934814, -0.6336447596549988, 1.53507399559021, -1.2592216730117798, -0.12248169630765915, -0.9154645204544067, -0.6562631130218506, -1.2261419296264648, -0.5079853534698486, -0.005384606309235096, -0.9628793597221375, 0.6209425330162048, 0.2978365421295166, -1.0385050773620605, -0.30921000242233276, -0.7868950366973877, 0.9428877234458923, -0.1703517735004425, 0.2742302715778351, 1.8777480125427246, 0.1504284143447876, -0.4265718460083008, 0.8510903716087341, 1.2398678064346313, 0.5758693814277649, -0.5563530325889587, -0.08586977422237396, -0.5530789494514465, 0.5071310997009277, -1.212222933769226, 0.2796115577220917, -2.855323076248169, 0.6784931421279907, -0.0007031112909317017, -0.0864071175456047, -0.11932594329118729, -1.22423255443573, 1.0690206289291382, 2.5341453552246094, -1.1926788091659546, 0.5634773969650269, 0.415452241897583, 1.0874539613723755, -1.5245898962020874, 0.3950202167034149, -0.4691850543022156, 2.1089794635772705, 0.37199947237968445, 1.2013509273529053, -0.5794970393180847, -2.3622500896453857, 0.7394020557403564, -1.1988816261291504, -1.074479103088379, 0.7033323049545288, -0.975609302520752, 0.128228560090065, -1.3969378471374512, -0.15994098782539368, -1.0252907276153564, -1.1828666925430298, 0.5714744329452515, 0.24102188646793365, 0.40912607312202454, -0.5792369246482849, 0.26305651664733887, -2.180971145629883, -1.3268604278564453, -0.17631465196609497, -1.0151928663253784, 0.48499056696891785, -0.48321565985679626, 0.546219527721405, -0.12095169723033905, 0.0312514528632164, 0.41239437460899353, 1.5173983573913574, 3.341887950897217, -0.0016445284709334373, 0.21397902071475983, -0.2813172936439514, -1.0090553760528564, 1.4577950239181519, 0.9281420111656189, -0.17568910121917725, -0.5585256814956665, -1.0387123823165894, 1.3288986682891846, 1.9576280117034912, 0.8942164778709412, 0.009014716371893883, -0.9468400478363037, -0.708164393901825, -0.039612337946891785, 0.2673110067844391, 0.4028644859790802, 0.8859124779701233, 0.024446411058306694, 0.033501364290714264, 1.6381336450576782, 1.096521019935608, -0.41224655508995056, 0.25141584873199463, -0.9804397225379944, -0.35375672578811646, 0.4576326310634613, 0.19646498560905457, -0.038694269955158234, 0.3401266634464264, -0.8697119951248169, -0.2637081444263458, -0.2842300832271576, -0.8037657141685486, -0.7869226336479187, -0.2643987536430359, -0.33327725529670715, 1.6946625709533691, 0.12670882046222687, -0.4425547420978546, 0.015663953498005867, -0.7325564622879028, -0.23384928703308105, -1.098787546157837, 0.27022045850753784, -0.026921380311250687, -0.15514619648456573, -0.25786665081977844, 1.6678507328033447, -0.7692573666572571, -2.0582356452941895, 0.2601492702960968, 0.18883675336837769, -0.26076996326446533, 0.23320159316062927, 1.6151870489120483, 0.6163198947906494, 1.401848554611206, 1.3141019344329834, 0.9243780374526978, -0.6451183557510376, -1.369362235069275, 0.680396318435669, 0.9089586734771729, -1.5207669734954834, 0.9534210562705994, -0.14681807160377502, -0.5100496411323547, 0.611174464225769, 1.278677225112915, 0.6497020721435547, -1.9469562768936157, 0.883762001991272, -1.0415608882904053, 0.9247585535049438, 0.6888232827186584, 0.6703125834465027, 0.2208334505558014, 0.7611741423606873, -1.1068005561828613, -1.1594164371490479, -0.6796965599060059, -0.7011824250221252, 1.9300734996795654, -0.3786288797855377, 0.6420502662658691, -0.23381851613521576, -1.133660912513733, -0.06939329206943512, 0.6458721160888672, 0.3510357141494751, -0.47702011466026306, 0.8813399076461792, -0.6534641981124878, -1.0825949907302856, -1.2196204662322998, -0.3969610929489136, -0.9617339372634888, -0.9603051543235779, 0.9018983840942383, 0.5695865154266357, 0.4706531763076782, 1.9747371673583984, 0.5307775139808655, 0.32690832018852234, -2.495786428451538, 0.9408319592475891, 0.21691574156284332, -0.13682013750076294, 0.9217149615287781, 0.33337634801864624, 1.045414924621582, -0.018000001087784767, 0.5319471955299377, -2.3996639251708984, 2.2957091331481934, -0.25339508056640625, 0.7118400931358337, 0.04111621528863907, -0.09822890162467957, 1.0497297048568726, 0.6739431619644165, 0.4507718086242676, -0.9817265868186951, 0.6432137489318848, -0.4981415569782257, 1.3404115438461304, 1.0119290351867676, -0.7900053262710571, 0.0033820178359746933, 1.2706761360168457, 0.394525945186615, -0.613359272480011, -0.961776852607727, -0.9990513324737549, 0.9124031662940979, 1.7460458278656006, -0.14201784133911133, -0.03930541127920151, 0.7329297065734863, 0.7034500241279602, -1.0703003406524658, 0.01884150132536888, -0.7334677577018738, -0.8208152055740356, 1.6160386800765991, 2.092240571975708, -0.09313488006591797, -0.11485885083675385, -0.6039002537727356, -1.3293206691741943, 0.8928267955780029, -0.19732491672039032, 0.04571876674890518, 0.5493887066841125, -0.5483684539794922, 1.0586611032485962, 0.8927810788154602, 0.9612290859222412, 0.27642709016799927, 0.2815615236759186, 0.32326361536979675, -0.2797222137451172, -1.1794068813323975, -0.24841628968715668, -1.0138965845108032, -2.603085517883301, 0.34279608726501465, -0.2960318326950073, -1.5451290607452393, 0.049135722219944, -0.9830655455589294, 0.854241669178009, -0.5258293747901917, -1.10279381275177, -1.5367460250854492, 0.20123963057994843, 0.03748221695423126, 1.0602185726165771, -1.6218359470367432, -0.135428324341774, 1.2210899591445923, 0.8439623117446899, -0.5638710260391235, 1.066075325012207, 0.3912985920906067, 1.0308133363723755, 0.6744495034217834, -0.34511345624923706, 0.7104954719543457, 0.13357868790626526, -1.2702664136886597, 0.473539799451828, 1.2055978775024414, 0.15414288640022278, 1.4139769077301025, -0.40322643518447876, 0.060609713196754456, 0.3677441477775574, -0.658098578453064, -0.4216271936893463, -0.4103100895881653, 0.7403469681739807, -0.00611050333827734, -0.8229288458824158, -0.2234673798084259, -0.17848965525627136, -0.2289043664932251, 0.18475426733493805, -1.5720770359039307, -0.2260536253452301, -0.5385543704032898, -0.5150086283683777, -1.3377002477645874, -0.24593763053417206, 1.4768015146255493, -0.7089162468910217, -0.14193320274353027, 0.5025767087936401, 0.5049986839294434, 0.5160546898841858, 0.7106074094772339, -0.766299307346344, -0.3948844373226166, -0.2862219512462616, -0.31899702548980713, 0.4089399576187134, 1.2571524381637573, 0.1102098748087883, -0.9952078461647034, 0.6060566306114197, -0.38451606035232544, 0.24954186379909515, 1.9230594635009766, 0.0773637592792511, -0.7903582453727722, 0.26659926772117615, -0.6463855504989624, 1.9069592952728271, 1.5877399444580078, 1.1687132120132446, -0.21081699430942535, -0.8641085624694824, 0.6667969226837158, -0.31591376662254333, -0.35601454973220825, 0.6908654570579529, 0.3567805588245392, -0.23917028307914734, -1.3085170984268188, 0.8199630975723267, 1.188593864440918, -0.7743751406669617, -0.785994291305542, 0.0950692743062973, -0.7598692178726196, 1.1792428493499756, 0.670350193977356, 0.34339624643325806, 0.3948291838169098, 1.714028239250183, 0.8312438130378723, -0.47590869665145874, 0.46894627809524536, 0.5035368800163269, -0.29611626267433167, -2.1365628242492676, -1.1359796524047852, 0.22519253194332123, -0.48337823152542114, -1.514732837677002, 1.3777222633361816, -1.2322423458099365, -1.0146920680999756, 0.440072625875473, -0.03216101974248886, 1.2421634197235107, 0.30512189865112305, 1.5717309713363647, 2.066486358642578, 0.8146747946739197, 0.42956995964050293, 1.270620584487915, -0.1908402293920517, -0.39695996046066284, 1.7703126668930054, -0.3952791392803192, 0.5024237632751465, 1.1719789505004883, -0.3164450228214264, -1.1099120378494263, -0.8764740228652954, -1.2569565773010254, -0.7561268210411072, 1.0783500671386719, 0.09372793138027191, -1.1322845220565796, 0.3233991861343384, 1.540184497833252, 0.20586402714252472, -0.3757845163345337, 0.44223248958587646, 0.4279279112815857, -0.6914887428283691, -0.1271229237318039, -0.9188768267631531, 0.4316401779651642, -0.308744877576828, -0.45290952920913696, 0.35726824402809143, 0.36590576171875, 1.3096909523010254, -0.08967667818069458, 0.14207619428634644, 1.0375444889068604, -1.468660831451416, 1.539149522781372, -0.5357118844985962, 0.34364640712738037, -2.239471912384033, 1.3504279851913452, -0.6915143728256226, 1.9977343082427979, -2.764782190322876, 0.4606098532676697, -0.3596660792827606, -0.5637698173522949, 0.21194683015346527, -0.37433260679244995, 0.20432166755199432, -0.07104798406362534, -0.9584773182868958, -0.021696284413337708, -0.550771951675415, 0.6205641627311707, 1.0926637649536133, 1.403845191001892, -1.1235867738723755, -0.16547557711601257, -1.6211475133895874, -0.09047164022922516, -0.8212540149688721, 0.12007246911525726, -2.0316271781921387, -0.2104947715997696, -1.997113823890686, -2.399334192276001, -1.2844452857971191, -0.8718319535255432, 1.2910093069076538, 0.20538610219955444, -0.8084040284156799, 1.258815050125122, -0.3343626856803894, -1.8285945653915405, 1.0981706380844116, -2.102778673171997 ]
https://github.com/huggingface/datasets/issues/5537
Increase speed of data files resolution
You were right, if `self.dir_cache` is not None in glob, it is exactly the same as what is returned by find, at least for all the tests we have, and some extended evaluation I did across a random sample of about 1000 datasets. Thanks for the nice hints, and let me know if this is not exactly what we want here! see PR: https://github.com/huggingface/datasets/pull/5704
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ?
297
64
Increase speed of data files resolution Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ? You were right, if `self.dir_cache` is not None in glob, it is exactly the same as what is returned by find, at least for all the tests we have, and some extended evaluation I did across a random sample of about 1000 datasets. Thanks for the nice hints, and let me know if this is not exactly what we want here! see PR: https://github.com/huggingface/datasets/pull/5704
[ -1.1481151580810547, -0.8770433664321899, -0.7696927785873413, 1.5075335502624512, -0.09976627677679062, -1.3418065309524536, 0.14190419018268585, -1.0838178396224976, 1.709913730621338, -0.8657216429710388, 0.3817557394504547, -1.6710846424102783, 0.011488673277199268, -0.5867823362350464, -0.797671377658844, -0.9148019552230835, -0.43529853224754333, -0.8848540186882019, 1.0393192768096924, 2.3764147758483887, 1.1868137121200562, -1.3482941389083862, 2.6711385250091553, 0.6294915080070496, -0.19778472185134888, -1.0800591707229614, 0.5169022679328918, -0.024474848061800003, -1.2158082723617554, -0.5091264843940735, -0.9247706532478333, -0.09921541810035706, -0.6544099450111389, -0.5513834953308105, 0.08588679879903793, 0.38163337111473083, -0.2425311654806137, -0.4421041011810303, -0.49432703852653503, -0.8733583092689514, 0.45436298847198486, -0.3314448297023773, 1.0366584062576294, -0.3373611867427826, 1.8095264434814453, -0.5745400190353394, 0.3858601748943329, 0.7292720675468445, 1.4223155975341797, 0.3026333153247833, -0.054890118539333344, 0.2402106523513794, 0.3270789682865143, -0.01476914994418621, 0.5176699757575989, 1.1362497806549072, 0.6210998892784119, 0.5443915724754333, 0.7238743305206299, -2.2860090732574463, 1.3508623838424683, -1.1305478811264038, 0.2736818790435791, 1.3632408380508423, -0.9495336413383484, 0.25801315903663635, -1.7809497117996216, -0.00005983281880617142, 0.5517581701278687, -2.2752697467803955, 0.24186326563358307, -1.3023086786270142, -0.38615885376930237, 1.063693881034851, 0.3260968029499054, -1.2243536710739136, 0.20928938686847687, -0.3390638530254364, 0.9988453388214111, 0.43015873432159424, 1.1115632057189941, -1.7386133670806885, -0.05864624306559563, -0.35168635845184326, 0.15273472666740417, -1.2833889722824097, -1.5429503917694092, 0.49804484844207764, 0.7038200497627258, 0.48474299907684326, -0.14825378358364105, 1.0936189889907837, -0.9303970336914062, 0.8344906568527222, -0.992414116859436, -1.649643063545227, -1.4109646081924438, -2.1574599742889404, -2.3060462474823, 0.7467437982559204, -0.5801857709884644, -0.48736751079559326, 2.0288383960723877, -1.0511958599090576, -1.7493321895599365, 1.1503846645355225, 0.2909838855266571, 0.03724865987896919, 2.33561110496521, 0.255954384803772, -0.7332191467285156, 0.356656938791275, -0.7028586864471436, 0.7792778015136719, -0.36444273591041565, 1.3840991258621216, 0.4486212730407715, -1.14332115650177, 1.589361548423767, -0.404981791973114, 0.5197378993034363, -0.6916104555130005, -0.5752859711647034, -0.811255693435669, 0.3772100508213043, 1.88697350025177, -0.32714220881462097, 1.5846503973007202, -0.3507417142391205, -1.5697884559631348, -1.566891074180603, 0.8517831563949585, 0.44415801763534546, -0.8134930729866028, 0.08496550470590591, -0.37528547644615173, 0.16287457942962646, -0.04758531600236893, 1.1202406883239746, 1.2131458520889282, 0.6689484119415283, -0.38698339462280273, -0.8054290413856506, 0.24219317734241486, 0.007240752689540386, -0.7470808625221252, -1.7782007455825806, -0.3820113241672516, 0.1553906798362732, 0.6034367084503174, -1.1480993032455444, 1.8168007135391235, 0.8759622573852539, 1.9261119365692139, 0.9715471863746643, -0.34466752409935, 1.5159657001495361, -0.009798330254852772, 1.9010887145996094, -0.4920283854007721, 0.6463513970375061, -0.3659093976020813, -1.2337919473648071, 0.8627321124076843, -0.3100545108318329, -1.9987919330596924, -0.8183285593986511, -0.7621626853942871, -0.14881139993667603, -0.7091143131256104, 0.882608950138092, -0.3370203673839569, -1.4462645053863525, 0.2044077217578888, -0.6572610139846802, 0.17972928285598755, -1.292563796043396, 0.3402293026447296, 0.7409536242485046, -0.7339661121368408, 0.11944928765296936, -0.22408504784107208, -1.2508779764175415, -0.47408145666122437, 0.2930116057395935, 1.8958699703216553, -0.7831270694732666, 0.9250035881996155, 1.1008813381195068, -0.7036248445510864, 0.041219256818294525, 0.3280876874923706, -0.2700745761394501, 0.8683286309242249, -1.0849833488464355, -0.442991703748703, 1.2806501388549805, -0.16094647347927094, -0.6739591360092163, 1.4557039737701416, 0.7649509906768799, -1.057245135307312, -0.18016211688518524, -0.13460581004619598, -0.8163084983825684, 0.08882275968790054, -1.6188713312149048, -0.0882599726319313, 0.37046197056770325, -1.5468504428863525, -0.4160027801990509, -0.21641595661640167, 1.3522415161132812, -0.25173047184944153, 1.5241061449050903, -0.3714189827442169, -0.2235480397939682, -0.3137698471546173, -0.370635986328125, 0.2082003504037857, -0.23964287340641022, -0.636805534362793, 0.26775309443473816, -0.728524386882782, 0.37914931774139404, 1.424648642539978, 0.28159335255622864, -0.010249074548482895, 0.4991224408149719, 1.1970560550689697, 0.2834409475326538, 0.010695780627429485, -0.9256458878517151, -1.5756418704986572, 2.090561628341675, -1.445329189300537, 2.032676935195923, 0.7076141834259033, -0.009568523615598679, -1.6353096961975098, -1.817874789237976, 1.3603047132492065, 1.1171355247497559, 2.2599306106567383, 0.5935196280479431, 0.3282601535320282, -0.8570205569267273, -0.5815370082855225, 0.4199276268482208, -1.077933669090271, -0.7118871212005615, 0.11488533020019531, 2.350719928741455, 1.703210711479187, -0.43091481924057007, -0.27559757232666016, -0.9670018553733826, 1.3726931810379028, -0.32978320121765137, 0.23721091449260712, 2.006685495376587, -0.27632924914360046, -1.142405390739441, 1.3050463199615479, -2.3871850967407227, 0.1665971279144287, 2.0418612957000732, 0.3286078870296478, 0.03915319964289665, -1.470343828201294, -0.5807661414146423, -0.2806049585342407, -0.3550287187099457, -1.2131736278533936, 0.5561599731445312, -0.252113401889801, -0.7377738356590271, -1.3972880840301514, 0.23312708735466003, -1.1399931907653809, -1.7231723070144653, 0.33765655755996704, 1.8284263610839844, 1.971078634262085, -0.7123773097991943, 1.5085444450378418, -0.3443448543548584, 0.1900884360074997, 1.2923883199691772, 1.2720388174057007, 3.1315407752990723, 1.8183108568191528, -1.3228658437728882, 0.6410613059997559, -0.13488101959228516, -0.550886869430542, 1.2122663259506226, -1.1444556713104248, 1.2477060556411743, -0.1284029334783554, -1.2087124586105347, -1.3128540515899658, 0.8971133828163147, 0.45059648156166077, 0.07829257100820541, -0.5597753524780273, 1.1546534299850464, 0.1694033443927765, 1.2709406614303589, 0.5286738872528076, -0.37741249799728394, 0.5819123983383179, -0.29893770813941956, -0.5314748883247375, 1.5752818584442139, 0.23870648443698883, -1.3700610399246216, -2.3178272247314453, -0.22120659053325653, -0.7895699143409729, 0.05172601342201233, -0.5798900723457336, -0.9673231244087219, 1.6758465766906738, 0.4024006426334381, -1.309038519859314, -0.2710781991481781, -0.3692280352115631, -0.5650011897087097, 2.6968374252319336, -1.3516117334365845, -0.1476779580116272, -0.9739455580711365, -0.5924279093742371, 1.6887353658676147, -1.210768461227417, -0.21144510805606842, -1.0082262754440308, -0.5762950778007507, -1.3068201541900635, -0.5913898944854736, 0.01858336851000786, -0.8927024602890015, 0.7577505111694336, 0.2895537316799164, -1.2350401878356934, -0.4096139669418335, -0.8584768176078796, 0.8926543593406677, -0.16608750820159912, 0.28411418199539185, 1.8763841390609741, 0.4670252203941345, -0.3914851248264313, 0.7494767904281616, 1.1185965538024902, 0.6699746251106262, -0.5048696994781494, 0.2633633315563202, -0.6416049599647522, 0.24522016942501068, -1.3440842628479004, 0.2833823263645172, -2.8920040130615234, 0.6181151866912842, -0.09195486456155777, 0.02472415566444397, -0.05922767519950867, -1.3677126169204712, 1.103340983390808, 2.611405849456787, -1.1555421352386475, 0.41122832894325256, 0.34759101271629333, 1.1277719736099243, -1.6365759372711182, 0.3190578520298004, -0.38545113801956177, 2.1670238971710205, 0.1850414276123047, 1.2632373571395874, -0.44256943464279175, -2.318321943283081, 0.5441979765892029, -1.30181086063385, -1.1792242527008057, 0.9465504288673401, -0.9025816321372986, 0.009800971485674381, -1.4038894176483154, -0.2401544749736786, -0.8523132801055908, -1.2277107238769531, 0.8623175024986267, 0.06789093464612961, 0.45092448592185974, -0.628593385219574, 0.3934844434261322, -2.10212779045105, -1.319186806678772, -0.23963552713394165, -0.9984794855117798, 0.37606146931648254, -0.33330237865448, 0.6364748477935791, -0.15674632787704468, 0.0388384684920311, 0.38791513442993164, 1.5203781127929688, 3.3505473136901855, 0.2764076888561249, 0.3596080541610718, -0.1634681671857834, -0.8851554989814758, 1.4110749959945679, 0.9028422832489014, -0.22439880669116974, -0.49474412202835083, -0.9637097716331482, 1.237414002418518, 1.9128073453903198, 0.9898891448974609, -0.004556502681225538, -0.7491889595985413, -0.7939096093177795, -0.0472080260515213, 0.12535446882247925, 0.5370002388954163, 0.814628005027771, 0.07150383293628693, 0.05608966201543808, 1.3133717775344849, 1.1365524530410767, -0.514703094959259, 0.3850642144680023, -0.8220778107643127, -0.43977755308151245, 0.544120728969574, 0.2208205759525299, 0.030309509485960007, 0.4064783453941345, -0.8622714281082153, -0.25133848190307617, -0.3945291042327881, -0.9426268339157104, -0.6870249509811401, -0.546556830406189, -0.3452225923538208, 1.647842526435852, 0.042541515082120895, -0.5423778891563416, -0.00937992800027132, -0.7342244386672974, -0.07113635540008545, -1.0205893516540527, 0.20941144227981567, -0.08313138037919998, -0.1493564397096634, -0.05537109076976776, 1.7035094499588013, -0.9517357349395752, -1.9878994226455688, 0.238278329372406, 0.22524769604206085, -0.40682512521743774, 0.23502309620380402, 1.7342381477355957, 0.37634027004241943, 1.4116500616073608, 1.3799206018447876, 1.0031687021255493, -0.6824641227722168, -1.2903610467910767, 0.6436676383018494, 0.9511103630065918, -1.4765293598175049, 0.8852946758270264, 0.048586323857307434, -0.4628431797027588, 0.660849928855896, 1.2866995334625244, 0.4376872777938843, -1.971632719039917, 0.7865405082702637, -0.922743558883667, 0.737923264503479, 0.7190065979957581, 0.7869687080383301, 0.16076700389385223, 0.7715813517570496, -1.1096842288970947, -1.183322548866272, -0.7591237425804138, -0.6862078309059143, 1.8467345237731934, -0.22002583742141724, 0.48948490619659424, -0.07701007276773453, -1.347413182258606, -0.11616287380456924, 0.7568680047988892, 0.3601939082145691, -0.44991129636764526, 0.8258355855941772, -0.725432276725769, -1.0617684125900269, -1.4327856302261353, -0.496563583612442, -1.0622038841247559, -0.9802443981170654, 1.0768004655838013, 0.81151282787323, 0.2674696743488312, 1.8037832975387573, 0.7104302644729614, 0.25272950530052185, -2.5966362953186035, 0.9356145262718201, 0.3008641302585602, -0.13682794570922852, 0.873319149017334, 0.32754480838775635, 0.9830353260040283, -0.005839431658387184, 0.5522436499595642, -2.4374818801879883, 2.335909605026245, -0.2582734525203705, 0.6630601286888123, 0.03759163245558739, -0.26797983050346375, 1.1458353996276855, 0.5339497923851013, 0.5473055243492126, -1.2228108644485474, 0.6798371076583862, -0.62322598695755, 1.1491637229919434, 0.8889727592468262, -0.9088905453681946, -0.017932824790477753, 1.3773407936096191, 0.4412967562675476, -0.5243977308273315, -0.9444595575332642, -1.0116984844207764, 0.9654789566993713, 1.6530877351760864, -0.014162030071020126, -0.07778038084506989, 0.9378513693809509, 0.7651181221008301, -1.233405351638794, 0.13842430710792542, -0.7846881151199341, -0.8838574290275574, 1.6049058437347412, 1.9855704307556152, -0.105937160551548, -0.24100181460380554, -0.8290789723396301, -1.081987977027893, 0.7476425170898438, -0.03371647745370865, 0.08533110469579697, 0.5909174084663391, -0.6426196694374084, 1.175762414932251, 0.9100297689437866, 0.8805216550827026, 0.23414310812950134, 0.29712218046188354, 0.33283647894859314, -0.2583645284175873, -1.0925121307373047, -0.20182763040065765, -1.12627375125885, -2.641186475753784, 0.47379234433174133, -0.24969758093357086, -1.4050452709197998, 0.05242190510034561, -1.0359559059143066, 0.813982367515564, -0.6024011969566345, -1.1023180484771729, -1.481055736541748, 0.18473456799983978, -0.08574791252613068, 0.8841897249221802, -1.6005089282989502, -0.08412080258131027, 1.290428876876831, 0.8616326451301575, -0.6499999165534973, 0.9060322642326355, 0.21129554510116577, 1.0521166324615479, 0.8942365050315857, -0.386984258890152, 0.5794754028320312, 0.09409873932600021, -1.3543646335601807, 0.5304831862449646, 1.145284652709961, 0.1262054145336151, 1.5303874015808105, -0.4765585958957672, 0.03314131870865822, 0.3971370458602905, -0.6003105640411377, -0.5140113830566406, -0.6636363863945007, 0.6901779174804688, 0.06063278764486313, -0.854671835899353, 0.16397950053215027, -0.10132425278425217, -0.15341395139694214, 0.17400895059108734, -1.5767652988433838, -0.1946108639240265, -0.30407747626304626, -0.526508092880249, -1.2442739009857178, -0.12076618522405624, 1.385955810546875, -0.721498429775238, -0.260073184967041, 0.5212555527687073, 0.39249446988105774, 0.5122395157814026, 0.6094039082527161, -0.6565832495689392, -0.3025865852832794, -0.2794455885887146, -0.39252927899360657, 0.36206310987472534, 1.3086364269256592, -0.10153388231992722, -0.8534433245658875, 0.75925612449646, -0.2863328754901886, 0.00133442971855402, 1.9536107778549194, 0.11155298352241516, -0.8071621060371399, 0.33678433299064636, -0.6589527130126953, 1.9164327383041382, 1.727415680885315, 1.2306638956069946, -0.09441913664340973, -1.0770442485809326, 0.7098994851112366, -0.39339858293533325, -0.3550635874271393, 0.9482159614562988, 0.37469252943992615, -0.18220439553260803, -1.3812572956085205, 0.6510435342788696, 1.2794677019119263, -0.7564850449562073, -0.7992790937423706, 0.021450918167829514, -0.7951714992523193, 1.0075492858886719, 0.6625419855117798, 0.367837518453598, 0.27996912598609924, 1.6616133451461792, 0.7497256398200989, -0.40761929750442505, 0.5659282803535461, 0.4827609658241272, -0.18378609418869019, -2.0741958618164062, -1.145339012145996, 0.35890594124794006, -0.48810720443725586, -1.5811529159545898, 1.4126155376434326, -1.1689945459365845, -0.9836954474449158, 0.5228221416473389, 0.0911484882235527, 1.510488748550415, 0.3307926654815674, 1.6479307413101196, 2.1066224575042725, 0.8688684701919556, 0.2995935380458832, 1.3436537981033325, -0.13780473172664642, -0.5081472992897034, 1.829465627670288, -0.43136197328567505, 0.4277351498603821, 1.1449869871139526, -0.2879221737384796, -1.0163722038269043, -0.8234308958053589, -1.2470813989639282, -0.7175849676132202, 1.16860830783844, 0.06026092916727066, -1.0746861696243286, 0.33174633979797363, 1.5864518880844116, 0.14718084037303925, -0.25290805101394653, 0.6942406892776489, 0.4290100932121277, -0.803293764591217, -0.059902120381593704, -0.963834822177887, 0.46680256724357605, -0.19960834085941315, -0.3464081883430481, 0.3850078582763672, 0.42776092886924744, 1.3121039867401123, 0.03877081722021103, 0.1360088586807251, 1.1149952411651611, -1.4233685731887817, 1.45380437374115, -0.6716965436935425, 0.26771748065948486, -2.411447525024414, 1.4076242446899414, -0.8782240152359009, 1.9272164106369019, -2.596630096435547, 0.42672666907310486, -0.5985820293426514, -0.48531225323677063, 0.39854896068573, -0.4516642391681671, 0.17025373876094818, -0.14835873246192932, -1.1591594219207764, -0.1430436372756958, -0.7072546482086182, 0.6708024144172668, 1.0665985345840454, 1.3819520473480225, -1.0829464197158813, -0.36057233810424805, -1.7290732860565186, -0.16717155277729034, -0.5426710247993469, 0.4050920009613037, -1.954923152923584, -0.07137436419725418, -1.9648085832595825, -2.325756549835205, -1.3292388916015625, -0.7332938313484192, 1.0520777702331543, 0.1916675716638565, -0.8350381851196289, 1.1274445056915283, -0.4101371467113495, -1.8385792970657349, 1.0730271339416504, -2.1177544593811035 ]
https://github.com/huggingface/datasets/issues/5537
Increase speed of data files resolution
I think we can make the data files resolution (significantly) faster in 2 steps: 1. `glob` calls `find` (which in turn calls `ls`), so we need `find` to be fast, and this can be achieved by fetching all the entries in a single API call and avoiding calls to `ls`. Implementing this for `HfFileSystem.find` (the one in `huggingface_hub`) is on my TO-DO list. 2. caching the repeated `find` calls in `_get_data_files_patterns` when the `data_files` patterns are not provided in `load_dataset`. To address this, we can introduce a `_resolve_single_pattern` function that would accept a filesystem object and a list of regex patterns to resolve. Then we can wrap this filesystem object in `_get_data_files_patterns` with an object that would cache the find calls before resolving the patterns with `_resolve_single_pattern`. (Feel free to suggest a cleaner implementation) WDYT?
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ?
297
135
Increase speed of data files resolution Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ? I think we can make the data files resolution (significantly) faster in 2 steps: 1. `glob` calls `find` (which in turn calls `ls`), so we need `find` to be fast, and this can be achieved by fetching all the entries in a single API call and avoiding calls to `ls`. Implementing this for `HfFileSystem.find` (the one in `huggingface_hub`) is on my TO-DO list. 2. caching the repeated `find` calls in `_get_data_files_patterns` when the `data_files` patterns are not provided in `load_dataset`. To address this, we can introduce a `_resolve_single_pattern` function that would accept a filesystem object and a list of regex patterns to resolve. Then we can wrap this filesystem object in `_get_data_files_patterns` with an object that would cache the find calls before resolving the patterns with `_resolve_single_pattern`. (Feel free to suggest a cleaner implementation) WDYT?
[ -1.130543828010559, -0.8842692971229553, -0.7165008783340454, 1.5434623956680298, -0.11563576012849808, -1.3647692203521729, 0.23286041617393494, -1.1472439765930176, 1.7751344442367554, -0.854800820350647, 0.3880634903907776, -1.6561031341552734, 0.08156341314315796, -0.6451812386512756, -0.8771894574165344, -0.863932192325592, -0.3891715705394745, -0.8229053020477295, 1.0403703451156616, 2.339512586593628, 1.252008318901062, -1.2880315780639648, 2.6137630939483643, 0.6976990103721619, -0.21939831972122192, -1.0067412853240967, 0.44379666447639465, -0.03609133139252663, -1.2422356605529785, -0.47389283776283264, -0.8813641667366028, -0.155753493309021, -0.6644346714019775, -0.6051072478294373, 0.026948295533657074, 0.4709199070930481, -0.3179401159286499, -0.49210309982299805, -0.5196261405944824, -0.82433021068573, 0.4675355851650238, -0.30294546484947205, 1.0322951078414917, -0.3387744128704071, 1.8247884511947632, -0.6225921511650085, 0.40657418966293335, 0.7537486553192139, 1.3933165073394775, 0.2381107211112976, -0.07721821963787079, 0.2511867880821228, 0.3083592653274536, -0.017074333503842354, 0.5735209584236145, 1.2060003280639648, 0.6416783332824707, 0.6108852028846741, 0.8085082769393921, -2.335228204727173, 1.3340121507644653, -1.1400874853134155, 0.29490628838539124, 1.2181291580200195, -0.9162189364433289, 0.2600310742855072, -1.7528595924377441, -0.0006834808737039566, 0.5794863104820251, -2.190462827682495, 0.3072830140590668, -1.3916633129119873, -0.4662263095378876, 1.0553488731384277, 0.3439864218235016, -1.182732105255127, 0.18869724869728088, -0.3318541646003723, 1.0232378244400024, 0.4283839762210846, 1.0566400289535522, -1.717303991317749, -0.014587154611945152, -0.4098885953426361, 0.15377092361450195, -1.2535206079483032, -1.4931169748306274, 0.49037203192710876, 0.7337690591812134, 0.4366644024848938, -0.19568508863449097, 1.1508649587631226, -1.005679726600647, 0.8302568793296814, -1.021782398223877, -1.7093420028686523, -1.4154638051986694, -2.1277472972869873, -2.2565112113952637, 0.6954590678215027, -0.5697914958000183, -0.5102124810218811, 2.124159574508667, -1.0588631629943848, -1.7475563287734985, 1.146946907043457, 0.22249850630760193, -0.04076594486832619, 2.247922420501709, 0.2293764054775238, -0.7223578095436096, 0.37020620703697205, -0.7133596539497375, 0.7523448467254639, -0.4025190472602844, 1.3712671995162964, 0.37753769755363464, -1.1542444229125977, 1.5516467094421387, -0.3482242822647095, 0.5823017358779907, -0.6933561563491821, -0.5574831366539001, -0.7349902391433716, 0.41484948992729187, 1.881102442741394, -0.3572492003440857, 1.5459576845169067, -0.33473026752471924, -1.5869749784469604, -1.5858408212661743, 0.9047929644584656, 0.4840995967388153, -0.7562203407287598, 0.08083020150661469, -0.43555542826652527, 0.11921253055334091, -0.13002538681030273, 1.226308822631836, 1.2233165502548218, 0.7588024735450745, -0.40937089920043945, -0.7321682572364807, 0.16443204879760742, 0.03179391101002693, -0.7512734532356262, -1.7917929887771606, -0.358619749546051, 0.1835004985332489, 0.5448983311653137, -1.0717697143554688, 1.824067234992981, 0.8451874256134033, 1.9328786134719849, 1.0222294330596924, -0.25905710458755493, 1.516054630279541, 0.02613436058163643, 1.9225759506225586, -0.4551405906677246, 0.5987430214881897, -0.4129202365875244, -1.2091764211654663, 0.939731240272522, -0.2774462401866913, -2.0142123699188232, -0.7192323207855225, -0.7712228894233704, -0.17695352435112, -0.6800937652587891, 0.8562055230140686, -0.3150536119937897, -1.413994312286377, 0.13813534379005432, -0.6536298990249634, 0.18316948413848877, -1.230532169342041, 0.3544779419898987, 0.744117796421051, -0.7516079545021057, 0.17846578359603882, -0.25314489006996155, -1.2317829132080078, -0.45205625891685486, 0.36773544549942017, 1.8129078149795532, -0.7951095700263977, 0.8759058713912964, 1.1211071014404297, -0.6922667622566223, 0.031285855919122696, 0.3417508006095886, -0.3310362994670868, 0.8222143054008484, -1.0356093645095825, -0.36562108993530273, 1.2776466608047485, -0.16180464625358582, -0.7048519253730774, 1.4562519788742065, 0.7132546305656433, -1.0331015586853027, -0.1373210847377777, -0.1125161424279213, -0.8636400103569031, 0.13183251023292542, -1.5744508504867554, -0.030184663832187653, 0.48288118839263916, -1.5555819272994995, -0.4653877913951874, -0.18640080094337463, 1.3369693756103516, -0.20068103075027466, 1.4934126138687134, -0.3341447710990906, -0.19605359435081482, -0.2823862135410309, -0.361619234085083, 0.1765975058078766, -0.18664517998695374, -0.601158857345581, 0.19616088271141052, -0.6534873843193054, 0.38231387734413147, 1.399849534034729, 0.17915409803390503, -0.016278255730867386, 0.4904167652130127, 1.2257159948349, 0.2716082036495209, -0.0031606480479240417, -0.8917620182037354, -1.6174695491790771, 2.0248327255249023, -1.4618667364120483, 2.0851125717163086, 0.7251224517822266, 0.04547666013240814, -1.7067017555236816, -1.904015302658081, 1.3668969869613647, 1.0716097354888916, 2.252915859222412, 0.5579831004142761, 0.31550782918930054, -0.861727237701416, -0.588547945022583, 0.47582918405532837, -1.0794408321380615, -0.6652876138687134, 0.12158284336328506, 2.3180885314941406, 1.723097801208496, -0.41221314668655396, -0.31013351678848267, -0.9829726815223694, 1.4111523628234863, -0.29484790563583374, 0.284512996673584, 1.9555093050003052, -0.23914894461631775, -1.0873218774795532, 1.2838116884231567, -2.329768419265747, 0.1729445457458496, 2.032153367996216, 0.2505137622356415, 0.049792252480983734, -1.3953015804290771, -0.4847436249256134, -0.2262365221977234, -0.3850391209125519, -1.1937000751495361, 0.5410668849945068, -0.19583874940872192, -0.6742144823074341, -1.4035181999206543, 0.28589174151420593, -1.116746425628662, -1.6788538694381714, 0.2887040972709656, 1.9305461645126343, 1.9585031270980835, -0.6883502006530762, 1.6419312953948975, -0.40235471725463867, 0.18408101797103882, 1.2774006128311157, 1.2687416076660156, 3.148691415786743, 1.8229886293411255, -1.334312081336975, 0.6186211109161377, -0.11974828690290451, -0.5688270330429077, 1.2549856901168823, -1.1801731586456299, 1.2822198867797852, -0.16712990403175354, -1.1698129177093506, -1.319370985031128, 0.9385193586349487, 0.4440162777900696, 0.12793201208114624, -0.5183742642402649, 1.1224952936172485, 0.1738758087158203, 1.217624545097351, 0.5704109072685242, -0.36569100618362427, 0.6469226479530334, -0.2836763560771942, -0.5318994522094727, 1.4988957643508911, 0.2336188554763794, -1.233750343322754, -2.2720751762390137, -0.2319951057434082, -0.8037440776824951, 0.11764264851808548, -0.5667068958282471, -0.936217725276947, 1.6371060609817505, 0.4122772514820099, -1.3474842309951782, -0.20187637209892273, -0.31144979596138, -0.5253009796142578, 2.735135078430176, -1.3208121061325073, -0.17088401317596436, -1.0458976030349731, -0.619006335735321, 1.708308458328247, -1.179693579673767, -0.24429672956466675, -1.0106253623962402, -0.43233373761177063, -1.2420676946640015, -0.586713969707489, 0.03238466754555702, -0.8598788976669312, 0.8639166355133057, 0.24982455372810364, -1.2942737340927124, -0.46802985668182373, -0.888514518737793, 0.9696775078773499, -0.22826069593429565, 0.21085503697395325, 1.8748048543930054, 0.39657625555992126, -0.4172741770744324, 0.8169874548912048, 1.0599920749664307, 0.6768144965171814, -0.46260467171669006, 0.3596207797527313, -0.6367318630218506, 0.23590797185897827, -1.3736920356750488, 0.29672113060951233, -2.8640594482421875, 0.5648959875106812, -0.06314148008823395, 0.02542020007967949, -0.06125893443822861, -1.487787127494812, 0.9830533862113953, 2.5867278575897217, -1.1683399677276611, 0.4003918170928955, 0.3339247703552246, 1.1606793403625488, -1.6447385549545288, 0.3233720064163208, -0.4175932705402374, 2.1317176818847656, 0.16096219420433044, 1.2748810052871704, -0.4025859236717224, -2.355424642562866, 0.5165272355079651, -1.3421658277511597, -1.2406504154205322, 0.971139132976532, -0.8729155659675598, -0.025136664509773254, -1.3943846225738525, -0.3174983859062195, -0.853611171245575, -1.2052249908447266, 0.8097816109657288, 0.10655523836612701, 0.4501267075538635, -0.7290604710578918, 0.3331819474697113, -2.090909004211426, -1.2757713794708252, -0.26439961791038513, -0.9563591480255127, 0.40709856152534485, -0.31498631834983826, 0.6196513772010803, -0.2078762948513031, 0.06675827503204346, 0.38468220829963684, 1.5679543018341064, 3.4147682189941406, 0.2549038827419281, 0.2989577353000641, -0.27188655734062195, -0.8402901887893677, 1.3438191413879395, 0.9073299765586853, -0.24288547039031982, -0.5563229918479919, -0.9949192404747009, 1.1406140327453613, 1.926636815071106, 0.9424659609794617, -0.0461101308465004, -0.7775283455848694, -0.8870008587837219, -0.10322725772857666, 0.07535857707262039, 0.461994469165802, 0.8077536821365356, 0.19554471969604492, 0.032089948654174805, 1.2570899724960327, 1.1227843761444092, -0.5295905470848083, 0.4205411970615387, -0.8242512345314026, -0.41783004999160767, 0.5374494194984436, 0.30641117691993713, -0.04457991570234299, 0.26556387543678284, -0.8720736503601074, -0.2004016637802124, -0.525532603263855, -0.8685370683670044, -0.7429869174957275, -0.496463805437088, -0.3171222507953644, 1.6691217422485352, 0.08153271675109863, -0.5758976936340332, -0.06912016868591309, -0.6593940854072571, -0.07863546907901764, -0.9900373816490173, 0.2611784040927887, -0.13894999027252197, -0.158853679895401, -0.0359719842672348, 1.6503833532333374, -0.9711242318153381, -1.8660197257995605, 0.269984632730484, 0.1376594603061676, -0.4235738217830658, 0.27990415692329407, 1.7806191444396973, 0.40953385829925537, 1.4102346897125244, 1.411362648010254, 1.001546859741211, -0.6882787346839905, -1.3040364980697632, 0.6327145099639893, 0.9341392517089844, -1.5286498069763184, 0.7863531112670898, 0.13898736238479614, -0.48067331314086914, 0.6613501906394958, 1.2389655113220215, 0.5041476488113403, -2.0925021171569824, 0.7410993576049805, -0.9891731142997742, 0.6984112858772278, 0.7535313963890076, 0.7243996858596802, 0.22839859127998352, 0.8020479679107666, -1.0441550016403198, -1.2186583280563354, -0.7152416706085205, -0.7619314789772034, 1.868481159210205, -0.2855963408946991, 0.5632330775260925, -0.04028592258691788, -1.4381438493728638, -0.15853172540664673, 0.7900198698043823, 0.3970739245414734, -0.5108992457389832, 0.7803992033004761, -0.7265558242797852, -0.9969309568405151, -1.3439394235610962, -0.5029481053352356, -1.1445448398590088, -0.9764891862869263, 0.9892014861106873, 0.8266232013702393, 0.32616862654685974, 1.8443472385406494, 0.7129923701286316, 0.31202462315559387, -2.595745325088501, 0.8745357990264893, 0.2995644807815552, -0.14766114950180054, 0.7977949380874634, 0.3756091296672821, 0.9216724038124084, -0.018923694267868996, 0.5728204846382141, -2.487196445465088, 2.3501455783843994, -0.27473878860473633, 0.633272111415863, -0.023770619183778763, -0.2989862263202667, 1.144127368927002, 0.4561662971973419, 0.5372689962387085, -1.1818715333938599, 0.6372602581977844, -0.6458695530891418, 1.1672381162643433, 0.8075811266899109, -0.9229865670204163, -0.08111836761236191, 1.4221632480621338, 0.39897918701171875, -0.6013248562812805, -0.9299372434616089, -1.1359403133392334, 0.9147877097129822, 1.5992927551269531, -0.036122024059295654, -0.05227067321538925, 0.9563161134719849, 0.7649653553962708, -1.2077620029449463, 0.20239457488059998, -0.7871977090835571, -0.895216166973114, 1.5690659284591675, 1.984667181968689, -0.17570343613624573, -0.19005820155143738, -0.866404116153717, -1.0717289447784424, 0.7704359292984009, -0.042930614203214645, -0.014793362468481064, 0.536666750907898, -0.5769931674003601, 1.113193154335022, 0.9411829710006714, 0.9201292991638184, 0.2536361813545227, 0.31731778383255005, 0.415496826171875, -0.3086851239204407, -1.1240222454071045, -0.19785088300704956, -1.0867090225219727, -2.5990543365478516, 0.48273634910583496, -0.17869499325752258, -1.415014624595642, 0.00064083281904459, -1.0440577268600464, 0.8342426419258118, -0.5813330411911011, -1.1412054300308228, -1.5025323629379272, 0.19568926095962524, -0.06526447087526321, 0.9153556227684021, -1.569268822669983, -0.07695398479700089, 1.1855095624923706, 0.8552506566047668, -0.7053539752960205, 0.9133955240249634, 0.16872087121009827, 1.0441967248916626, 0.9478566646575928, -0.3596116602420807, 0.530836284160614, 0.06679687649011612, -1.3367912769317627, 0.5509418845176697, 1.1583123207092285, 0.08989623188972473, 1.479520559310913, -0.49918749928474426, 0.006983207538723946, 0.3962121605873108, -0.6051542162895203, -0.4446321427822113, -0.6115625500679016, 0.7070609331130981, 0.015881044790148735, -0.7988119721412659, 0.1279335916042328, -0.0408402755856514, -0.22665980458259583, 0.14517441391944885, -1.6088790893554688, -0.1014484390616417, -0.3030909597873688, -0.609645664691925, -1.2311125993728638, -0.07876334339380264, 1.411458134651184, -0.6053592562675476, -0.2668854594230652, 0.5221255421638489, 0.3643871247768402, 0.5197219252586365, 0.5892331600189209, -0.6758027076721191, -0.240375816822052, -0.25732964277267456, -0.4096883535385132, 0.43912917375564575, 1.4111196994781494, -0.0513593852519989, -0.8182520866394043, 0.7416146397590637, -0.32924947142601013, -0.011661513708531857, 1.9709323644638062, 0.16966187953948975, -0.7875179648399353, 0.27740374207496643, -0.6631412506103516, 1.9346500635147095, 1.819736123085022, 1.2145073413848877, -0.04746847599744797, -1.105904221534729, 0.6934219002723694, -0.46114373207092285, -0.3874821960926056, 0.984988272190094, 0.3268046975135803, -0.21604382991790771, -1.3357537984848022, 0.7591725587844849, 1.2942464351654053, -0.7410507798194885, -0.7927990555763245, 0.019711991772055626, -0.7574784159660339, 1.0083330869674683, 0.6447683572769165, 0.33108872175216675, 0.34293094277381897, 1.588634729385376, 0.7513481378555298, -0.383365273475647, 0.6171876192092896, 0.516374945640564, -0.14373522996902466, -2.1522555351257324, -1.1746445894241333, 0.4139896631240845, -0.5017987489700317, -1.6747126579284668, 1.4592418670654297, -1.2038606405258179, -0.9885711669921875, 0.4945518374443054, 0.04474509879946709, 1.5218724012374878, 0.3412235975265503, 1.6015956401824951, 2.134073257446289, 0.8622590899467468, 0.4004438817501068, 1.367017149925232, -0.1819837987422943, -0.5536168217658997, 1.8115274906158447, -0.5394631028175354, 0.42488327622413635, 1.1490224599838257, -0.27364280819892883, -1.084139108657837, -0.8307828307151794, -1.2525410652160645, -0.7084560394287109, 1.2148393392562866, 0.014541953802108765, -1.057677984237671, 0.4112430512905121, 1.653634786605835, 0.13068220019340515, -0.29225873947143555, 0.7249499559402466, 0.34805405139923096, -0.8351427316665649, -0.08149813860654831, -0.9200785756111145, 0.49617481231689453, -0.2363893687725067, -0.3478453457355499, 0.45728600025177, 0.41730228066444397, 1.2923789024353027, 0.006005766801536083, 0.11497792601585388, 1.0526635646820068, -1.4790709018707275, 1.42759108543396, -0.6783290505409241, 0.29305219650268555, -2.398057460784912, 1.4380778074264526, -0.8547560572624207, 1.9442260265350342, -2.5904290676116943, 0.41109928488731384, -0.5555717945098877, -0.5443745255470276, 0.36054980754852295, -0.35098975896835327, 0.10037921369075775, -0.12878745794296265, -1.2242639064788818, -0.08420471101999283, -0.7292624115943909, 0.7310028672218323, 1.0447001457214355, 1.4093573093414307, -1.0807416439056396, -0.3012191653251648, -1.686166524887085, -0.15578743815422058, -0.5309277772903442, 0.38986462354660034, -1.9925284385681152, -0.10944150388240814, -1.985303521156311, -2.330035448074341, -1.2760274410247803, -0.7210027575492859, 1.0033224821090698, 0.17132121324539185, -0.7752951383590698, 1.1551895141601562, -0.4079988896846771, -1.898863673210144, 1.0796995162963867, -2.09958553314209 ]
https://github.com/huggingface/datasets/issues/5537
Increase speed of data files resolution
Good idea :) For 2: That would work ! It's also possible to have a FileSystem with a cache on `.find` and use it inside the resolver passed to `_get_data_files_patterns`. Right now they're pretty simple: ```python # for remote repositories resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info, base_path=base_path) # for local resolver = partial(_resolve_single_pattern_locally, base_path) ```
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ?
297
53
Increase speed of data files resolution Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ? Good idea :) For 2: That would work ! It's also possible to have a FileSystem with a cache on `.find` and use it inside the resolver passed to `_get_data_files_patterns`. Right now they're pretty simple: ```python # for remote repositories resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info, base_path=base_path) # for local resolver = partial(_resolve_single_pattern_locally, base_path) ```
[ -1.1449564695358276, -0.8754437565803528, -0.7184962034225464, 1.6449583768844604, -0.0929897353053093, -1.3104180097579956, 0.18239636719226837, -1.0742056369781494, 1.7528446912765503, -0.8558838367462158, 0.36126774549484253, -1.6449629068374634, 0.040926672518253326, -0.5980839133262634, -0.8067604303359985, -0.9264237880706787, -0.39842212200164795, -0.8155222535133362, 1.1067817211151123, 2.3199141025543213, 1.2128307819366455, -1.3440154790878296, 2.6594738960266113, 0.6479111909866333, -0.21523866057395935, -1.0665249824523926, 0.443815678358078, -0.032977957278490067, -1.1857093572616577, -0.5126858353614807, -0.870441734790802, -0.1473930925130844, -0.681024432182312, -0.5566046237945557, 0.09462249279022217, 0.45280855894088745, -0.2997509241104126, -0.49029314517974854, -0.5240792632102966, -0.845461905002594, 0.43982070684432983, -0.2920125722885132, 0.979177713394165, -0.3317842185497284, 1.8150358200073242, -0.5971108078956604, 0.4043083190917969, 0.7535378932952881, 1.4196193218231201, 0.2337239682674408, -0.04888114333152771, 0.2522733509540558, 0.3429635763168335, 0.016615573316812515, 0.5737272500991821, 1.155027985572815, 0.608627200126648, 0.616283118724823, 0.7277012467384338, -2.3228373527526855, 1.3459399938583374, -1.1875474452972412, 0.2911173701286316, 1.3029305934906006, -0.9472393989562988, 0.23874664306640625, -1.7232606410980225, 0.01163268368691206, 0.6189609169960022, -2.2062957286834717, 0.32139623165130615, -1.3226960897445679, -0.44062259793281555, 1.0975089073181152, 0.39881008863449097, -1.2212612628936768, 0.15760624408721924, -0.354636549949646, 1.06804621219635, 0.43284639716148376, 1.0144485235214233, -1.735842227935791, -0.011302714236080647, -0.35758092999458313, 0.14731939136981964, -1.2896268367767334, -1.5175970792770386, 0.5098078846931458, 0.6984769701957703, 0.4518152177333832, -0.1583230197429657, 1.1392892599105835, -1.012445330619812, 0.8033152222633362, -1.0493305921554565, -1.645539402961731, -1.416043996810913, -2.191821575164795, -2.2786598205566406, 0.6820195913314819, -0.5156621336936951, -0.5159567594528198, 2.079944372177124, -1.0170295238494873, -1.714209794998169, 1.1585177183151245, 0.2379819005727768, 0.02370099350810051, 2.2976057529449463, 0.2287396490573883, -0.724524199962616, 0.32626110315322876, -0.7578279376029968, 0.8153369426727295, -0.3959101140499115, 1.3805158138275146, 0.451398640871048, -1.1968034505844116, 1.5225961208343506, -0.2923080623149872, 0.5606937408447266, -0.6609467267990112, -0.5694655179977417, -0.7705793976783752, 0.3162565231323242, 1.905777096748352, -0.29250651597976685, 1.5286221504211426, -0.30338144302368164, -1.5457165241241455, -1.592354655265808, 0.9258101582527161, 0.430785208940506, -0.8072329759597778, 0.11468078196048737, -0.4026581048965454, 0.19986094534397125, -0.12719875574111938, 1.2304942607879639, 1.2527366876602173, 0.6816589832305908, -0.46285825967788696, -0.7562054395675659, 0.12644658982753754, 0.02105123922228813, -0.7158271670341492, -1.7760107517242432, -0.376057893037796, 0.14632874727249146, 0.5895061492919922, -1.1027687788009644, 1.802018642425537, 0.8609052300453186, 1.8869614601135254, 1.0102752447128296, -0.2971189022064209, 1.52041494846344, 0.007545097731053829, 1.9151171445846558, -0.5186164975166321, 0.5764424204826355, -0.4005957841873169, -1.2471656799316406, 0.8937764167785645, -0.2851351499557495, -2.0126430988311768, -0.8084585070610046, -0.7275461554527283, -0.16457463800907135, -0.7063166499137878, 0.8279053568840027, -0.356934517621994, -1.472546100616455, 0.1647389829158783, -0.6695255637168884, 0.244841068983078, -1.2245899438858032, 0.38251984119415283, 0.7187368273735046, -0.7305895090103149, 0.1520787924528122, -0.2430582195520401, -1.1993694305419922, -0.49445682764053345, 0.38845473527908325, 1.8449745178222656, -0.7587791085243225, 0.9011721014976501, 1.0968598127365112, -0.6935026049613953, 0.0017506293952465057, 0.27923738956451416, -0.26414063572883606, 0.8756137490272522, -1.0648410320281982, -0.4655347168445587, 1.3114197254180908, -0.22547656297683716, -0.731667160987854, 1.4771720170974731, 0.7164868712425232, -1.0590938329696655, -0.19249142706394196, -0.14216051995754242, -0.8498333692550659, 0.11840911209583282, -1.5651131868362427, -0.04089580848813057, 0.5200844407081604, -1.5887269973754883, -0.3954908549785614, -0.18010413646697998, 1.3634033203125, -0.26602235436439514, 1.4829864501953125, -0.36307597160339355, -0.21426750719547272, -0.2511436343193054, -0.39153072237968445, 0.19084756076335907, -0.19933781027793884, -0.5782581567764282, 0.1315680891275406, -0.6832146644592285, 0.42085161805152893, 1.4237817525863647, 0.20360548794269562, 0.004706926643848419, 0.46549126505851746, 1.2763123512268066, 0.28483614325523376, 0.014174659736454487, -0.928883969783783, -1.565192699432373, 2.0224294662475586, -1.4626314640045166, 2.093905210494995, 0.693011999130249, 0.0006496282294392586, -1.6657050848007202, -1.8292627334594727, 1.34062659740448, 1.0887117385864258, 2.2377641201019287, 0.5597006678581238, 0.33273565769195557, -0.9016901254653931, -0.5982435345649719, 0.4061121344566345, -1.0583574771881104, -0.6641003489494324, 0.15662376582622528, 2.350778579711914, 1.7246707677841187, -0.36021754145622253, -0.3121011555194855, -0.9753029346466064, 1.4642161130905151, -0.3278760612010956, 0.2658393979072571, 2.0109803676605225, -0.19840140640735626, -1.1181905269622803, 1.263944387435913, -2.355567216873169, 0.17828622460365295, 2.0836424827575684, 0.3202771544456482, 0.08858931064605713, -1.448622465133667, -0.5446409583091736, -0.29734301567077637, -0.3321691155433655, -1.2129590511322021, 0.538149356842041, -0.2415819764137268, -0.671755850315094, -1.3779209852218628, 0.2890312373638153, -1.1010881662368774, -1.7033286094665527, 0.2673003077507019, 1.9301813840866089, 1.9960765838623047, -0.6865060329437256, 1.5784053802490234, -0.38612210750579834, 0.1916983276605606, 1.3231961727142334, 1.2901029586791992, 3.097632646560669, 1.8036459684371948, -1.3109550476074219, 0.6204059720039368, -0.1405479460954666, -0.5612278580665588, 1.2400022745132446, -1.2018154859542847, 1.2790162563323975, -0.13713890314102173, -1.1625643968582153, -1.3815693855285645, 0.9657683968544006, 0.487158864736557, 0.08234402537345886, -0.5623306035995483, 1.1294325590133667, 0.14847899973392487, 1.2532687187194824, 0.5735571384429932, -0.38647332787513733, 0.5484443306922913, -0.3599657714366913, -0.5529763698577881, 1.5391199588775635, 0.23966112732887268, -1.3304283618927002, -2.2603323459625244, -0.2250414937734604, -0.7913026213645935, 0.09224444627761841, -0.5093832612037659, -0.9809533357620239, 1.6385917663574219, 0.387587308883667, -1.3530750274658203, -0.22157469391822815, -0.31212273240089417, -0.5225389003753662, 2.7637441158294678, -1.2635427713394165, -0.13821272552013397, -0.9756826162338257, -0.6508051753044128, 1.729259729385376, -1.2071263790130615, -0.25619271397590637, -1.0320074558258057, -0.4928455948829651, -1.234737753868103, -0.5637283325195312, 0.05301624909043312, -0.8999139666557312, 0.796197235584259, 0.2586677372455597, -1.2699534893035889, -0.443158358335495, -0.8425595760345459, 0.9451470971107483, -0.22528231143951416, 0.24382290244102478, 1.8290661573410034, 0.3753158450126648, -0.4134363830089569, 0.8177359104156494, 1.0869518518447876, 0.6731045246124268, -0.49009227752685547, 0.3059409260749817, -0.5861721038818359, 0.2595690190792084, -1.296781301498413, 0.30644282698631287, -2.896787405014038, 0.5448999404907227, -0.08399433642625809, -0.013703865930438042, -0.06627577543258667, -1.418589472770691, 1.023115873336792, 2.5742344856262207, -1.2272799015045166, 0.44658756256103516, 0.3345381021499634, 1.1193830966949463, -1.7005939483642578, 0.32268205285072327, -0.38858935236930847, 2.157230854034424, 0.21467840671539307, 1.3063857555389404, -0.4370248019695282, -2.37941837310791, 0.5044064521789551, -1.3100461959838867, -1.2268320322036743, 0.9238407015800476, -0.8960622549057007, 0.02975495159626007, -1.4091558456420898, -0.3504968285560608, -0.824191689491272, -1.2723511457443237, 0.8120827078819275, 0.12266978621482849, 0.438053160905838, -0.6197782754898071, 0.3584459125995636, -2.143399715423584, -1.3284550905227661, -0.19406762719154358, -1.0104000568389893, 0.4298161566257477, -0.40670961141586304, 0.6437192559242249, -0.19241899251937866, 0.05744494870305061, 0.3773792088031769, 1.6174800395965576, 3.417360544204712, 0.3012118637561798, 0.2983255088329315, -0.23874303698539734, -0.8466193675994873, 1.3869467973709106, 0.888839840888977, -0.23774872720241547, -0.5313236117362976, -1.019571304321289, 1.1872377395629883, 1.9147980213165283, 0.916695773601532, -0.040690913796424866, -0.7792126536369324, -0.833700954914093, -0.1362733691930771, 0.08764021843671799, 0.5154816508293152, 0.7669399976730347, 0.14333628118038177, 0.04898523539304733, 1.2569618225097656, 1.1166988611221313, -0.5024014115333557, 0.3720480799674988, -0.8054066896438599, -0.4077044427394867, 0.5339487791061401, 0.20617714524269104, -0.05018032714724541, 0.3221551477909088, -0.8862108588218689, -0.1963144987821579, -0.5009317398071289, -0.8712400794029236, -0.7203410267829895, -0.5087329745292664, -0.3815115690231323, 1.6412137746810913, 0.0892624631524086, -0.5818194150924683, -0.05598844587802887, -0.6716598272323608, -0.07779790461063385, -1.036143183708191, 0.24056097865104675, -0.11556676030158997, -0.18258750438690186, -0.09844101965427399, 1.7009621858596802, -0.9634901881217957, -1.9285589456558228, 0.23355141282081604, 0.21303769946098328, -0.37454643845558167, 0.2781846523284912, 1.75237238407135, 0.3682907223701477, 1.3799091577529907, 1.3890432119369507, 0.9822703003883362, -0.7202479839324951, -1.3455452919006348, 0.6429672241210938, 0.9630544781684875, -1.5288242101669312, 0.8444129824638367, 0.06042786315083504, -0.4450315833091736, 0.646662712097168, 1.2401520013809204, 0.48684000968933105, -1.9905449151992798, 0.7711586356163025, -1.0066828727722168, 0.7606956958770752, 0.7709450721740723, 0.7285324931144714, 0.1983940452337265, 0.812995433807373, -1.0492914915084839, -1.1557691097259521, -0.7138897776603699, -0.7476575970649719, 1.844887375831604, -0.34075927734375, 0.5369288325309753, -0.05159005522727966, -1.378415584564209, -0.12873850762844086, 0.7976284623146057, 0.3943016231060028, -0.4483596086502075, 0.7968257665634155, -0.7440352439880371, -1.0091110467910767, -1.3363031148910522, -0.5282394289970398, -1.1254569292068481, -1.0404350757598877, 1.0281811952590942, 0.7782149910926819, 0.28952887654304504, 1.7872833013534546, 0.7223169803619385, 0.31578966975212097, -2.597146511077881, 0.883531391620636, 0.284055233001709, -0.13349997997283936, 0.8263064622879028, 0.3756835162639618, 0.9684284329414368, 0.006137416698038578, 0.552380383014679, -2.4709601402282715, 2.380363941192627, -0.2431662231683731, 0.6306812763214111, -0.04237959533929825, -0.2899438738822937, 1.169298529624939, 0.5166960954666138, 0.5108537673950195, -1.1438169479370117, 0.6970493793487549, -0.5889962315559387, 1.135467290878296, 0.8055450916290283, -0.896560788154602, -0.09077142924070358, 1.4450995922088623, 0.3973994851112366, -0.6052934527397156, -0.9172943830490112, -1.0357739925384521, 0.911128580570221, 1.6038899421691895, -0.018419254571199417, -0.05899675562977791, 0.9378523826599121, 0.7441244125366211, -1.1880850791931152, 0.1945447474718094, -0.7341561317443848, -0.8822817802429199, 1.5625697374343872, 1.9883224964141846, -0.18301646411418915, -0.206538587808609, -0.8171375393867493, -1.0860462188720703, 0.7270866632461548, -0.06156971678137779, -0.03192394971847534, 0.48006725311279297, -0.605440080165863, 1.057302713394165, 0.9272117018699646, 0.9324632883071899, 0.21426396071910858, 0.289549857378006, 0.40090101957321167, -0.29896441102027893, -1.1648310422897339, -0.22992707788944244, -1.106186032295227, -2.6628408432006836, 0.44092410802841187, -0.22032321989536285, -1.378152847290039, 0.05611896142363548, -1.0179227590560913, 0.8486447930335999, -0.5999742746353149, -1.1266266107559204, -1.5140095949172974, 0.16969570517539978, -0.08738142251968384, 0.9301531910896301, -1.6071903705596924, -0.09021381288766861, 1.207663655281067, 0.8528808355331421, -0.7024964690208435, 0.9360767602920532, 0.14441998302936554, 1.0397937297821045, 0.9002944827079773, -0.37528955936431885, 0.6312220096588135, 0.09341253340244293, -1.36553156375885, 0.5742718577384949, 1.1502610445022583, 0.105118528008461, 1.5597997903823853, -0.46281448006629944, 0.004164534620940685, 0.39575162529945374, -0.6666945815086365, -0.4067743420600891, -0.5612732172012329, 0.7052555084228516, 0.03343629091978073, -0.8287175893783569, 0.15059854090213776, -0.03515423834323883, -0.21279363334178925, 0.16092249751091003, -1.61251699924469, -0.13663576543331146, -0.33315205574035645, -0.558057427406311, -1.2305322885513306, -0.13127122819423676, 1.376521348953247, -0.6198660135269165, -0.32042911648750305, 0.5360279679298401, 0.41407227516174316, 0.5175904631614685, 0.6036713719367981, -0.6630500555038452, -0.23634111881256104, -0.2728910744190216, -0.37896063923835754, 0.40916135907173157, 1.3650208711624146, -0.07146469503641129, -0.8068814277648926, 0.7488917708396912, -0.2945712208747864, 0.012518947012722492, 1.9437906742095947, 0.1479891687631607, -0.7956166863441467, 0.34138017892837524, -0.7071300745010376, 1.9295819997787476, 1.750990867614746, 1.2366944551467896, -0.09366242587566376, -1.0859249830245972, 0.7197412848472595, -0.4491621255874634, -0.38075879216194153, 0.893795907497406, 0.32857584953308105, -0.22258538007736206, -1.3374935388565063, 0.8023303151130676, 1.2418839931488037, -0.7269940376281738, -0.8409276008605957, 0.09973687678575516, -0.756726086139679, 1.0171164274215698, 0.5816300511360168, 0.36676648259162903, 0.31242480874061584, 1.6474785804748535, 0.775428831577301, -0.4007670283317566, 0.6078099012374878, 0.496071994304657, -0.19205746054649353, -2.115377902984619, -1.185146450996399, 0.4172472059726715, -0.5673368573188782, -1.6429927349090576, 1.407830834388733, -1.1783169507980347, -0.9853120446205139, 0.574658215045929, 0.07023771107196808, 1.4951062202453613, 0.3330893814563751, 1.6116509437561035, 2.0811991691589355, 0.8240973949432373, 0.4300190806388855, 1.3295825719833374, -0.17168273031711578, -0.5558022260665894, 1.8513684272766113, -0.5324845314025879, 0.42720139026641846, 1.1848129034042358, -0.27921515703201294, -1.0697083473205566, -0.7750607132911682, -1.2421133518218994, -0.7285781502723694, 1.1577162742614746, 0.04565407335758209, -1.0597869157791138, 0.36601904034614563, 1.6110934019088745, 0.14277644455432892, -0.2171216607093811, 0.7301750183105469, 0.35502204298973083, -0.8341798186302185, -0.059933967888355255, -0.9366773962974548, 0.4524400532245636, -0.23649732768535614, -0.35818788409233093, 0.43123775720596313, 0.3901917338371277, 1.2816636562347412, 0.023501917719841003, 0.11540037393569946, 1.0555249452590942, -1.4708583354949951, 1.4202827215194702, -0.6345510482788086, 0.28404390811920166, -2.3495700359344482, 1.3878929615020752, -0.838509738445282, 1.9660587310791016, -2.59098482131958, 0.4222278594970703, -0.6282870173454285, -0.535835325717926, 0.36079141497612, -0.37381139397621155, 0.1333187371492386, -0.15312206745147705, -1.1884719133377075, -0.06797991693019867, -0.7263703942298889, 0.7163696885108948, 1.061221718788147, 1.421151041984558, -1.0822283029556274, -0.292506605386734, -1.6870132684707642, -0.14755041897296906, -0.5705835223197937, 0.3883039653301239, -1.9586553573608398, -0.10239166021347046, -1.9519520998001099, -2.325378179550171, -1.2549382448196411, -0.6739473342895508, 1.0120397806167603, 0.18017183244228363, -0.769877016544342, 1.2398533821105957, -0.356594055891037, -1.8274695873260498, 1.034389853477478, -2.090646982192993 ]
https://github.com/huggingface/datasets/issues/5537
Increase speed of data files resolution
something like this maybe (with Quentin's reimplementation of `HfFilesystem.find`)? ``` @lru_cache(max_size=None) def _find(self, path, maxdepth=None, withdirs=False, detail=False, **kwargs): ``` In any case please let me know if I can help in any way!
Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ?
297
33
Increase speed of data files resolution Certain datasets like `bigcode/the-stack-dedup` have so many files that loading them takes forever right from the data files resolution step. `datasets` uses file patterns to check the structure of the repository but it takes too much time to iterate over and over again on all the data files. This comes from `resolve_patterns_in_dataset_repository` which calls `_resolve_single_pattern_in_dataset_repository`, which iterates on all the files at ```python glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] ``` but calling `glob` on such a dataset is too expensive. Indeed it calls `ls()` in `hffilesystem.py` too many times. Maybe `glob` can be more optimized in `hffilesystem.py`, or the data files resolution can directly be implemented in the filesystem by checking its `dir_cache` ? something like this maybe (with Quentin's reimplementation of `HfFilesystem.find`)? ``` @lru_cache(max_size=None) def _find(self, path, maxdepth=None, withdirs=False, detail=False, **kwargs): ``` In any case please let me know if I can help in any way!
[ -1.149220585823059, -0.8485963344573975, -0.7264913320541382, 1.5436252355575562, -0.17794209718704224, -1.2910369634628296, 0.20202431082725525, -1.0815874338150024, 1.7180505990982056, -0.8715571761131287, 0.41410377621650696, -1.6535228490829468, 0.03643404692411423, -0.6431575417518616, -0.8486123085021973, -0.877993643283844, -0.42160192131996155, -0.8064545392990112, 1.0596896409988403, 2.326119899749756, 1.1912692785263062, -1.3423861265182495, 2.6617445945739746, 0.6563659906387329, -0.2293979376554489, -1.0473192930221558, 0.4168775975704193, 0.025637224316596985, -1.2067490816116333, -0.5136036276817322, -0.921809196472168, -0.15387888252735138, -0.6211352944374084, -0.6132315993309021, 0.07069709897041321, 0.4002688527107239, -0.27626293897628784, -0.4728138744831085, -0.46109381318092346, -0.8883987069129944, 0.4549444615840912, -0.340634286403656, 0.9687596559524536, -0.3436819911003113, 1.8424041271209717, -0.6161720752716064, 0.3721534013748169, 0.7524695992469788, 1.372756004333496, 0.27713748812675476, -0.07665692269802094, 0.3103099763393402, 0.34505170583724976, -0.017824586480855942, 0.5675185322761536, 1.1734241247177124, 0.6763008236885071, 0.579516589641571, 0.7524808645248413, -2.268965005874634, 1.3082739114761353, -1.1826509237289429, 0.266720175743103, 1.32085382938385, -0.9842067956924438, 0.25094345211982727, -1.7365326881408691, -0.0024363351985812187, 0.6088048815727234, -2.252042055130005, 0.3079717755317688, -1.3237345218658447, -0.38767290115356445, 1.0905745029449463, 0.34926965832710266, -1.2422865629196167, 0.16445405781269073, -0.33434274792671204, 1.0153878927230835, 0.36597493290901184, 1.0444597005844116, -1.7152280807495117, -0.03659454733133316, -0.39849960803985596, 0.1291843056678772, -1.2622982263565063, -1.4759308099746704, 0.4940730333328247, 0.6691372990608215, 0.44941359758377075, -0.1775137484073639, 1.124932050704956, -0.9428080320358276, 0.8525094985961914, -1.0333364009857178, -1.6460065841674805, -1.4400874376296997, -2.1446728706359863, -2.2489020824432373, 0.7687851786613464, -0.5349533557891846, -0.5554172992706299, 2.0285322666168213, -1.033827543258667, -1.7587813138961792, 1.1630229949951172, 0.23076938092708588, -0.022059069946408272, 2.3176472187042236, 0.21325789391994476, -0.7271764278411865, 0.34710755944252014, -0.7574085593223572, 0.812835156917572, -0.40168431401252747, 1.4287680387496948, 0.4149185121059418, -1.1574804782867432, 1.5680955648422241, -0.3433648943901062, 0.5004593729972839, -0.6773838400840759, -0.577808141708374, -0.8103072643280029, 0.3619224727153778, 1.9217817783355713, -0.3094520568847656, 1.5422967672348022, -0.37968990206718445, -1.5725539922714233, -1.558637261390686, 0.8676848411560059, 0.42759597301483154, -0.7931643724441528, 0.131556436419487, -0.39624321460723877, 0.1937481313943863, -0.08944709599018097, 1.1905044317245483, 1.2249011993408203, 0.6935131549835205, -0.39119982719421387, -0.7751064300537109, 0.1732018142938614, 0.012808963656425476, -0.7521888017654419, -1.7986814975738525, -0.3842453956604004, 0.13212379813194275, 0.5785107612609863, -1.158503532409668, 1.7991565465927124, 0.8590870499610901, 1.8859566450119019, 1.002004623413086, -0.30189892649650574, 1.5333677530288696, 0.023549314588308334, 1.9461007118225098, -0.4735981225967407, 0.6512563228607178, -0.3854621946811676, -1.2336804866790771, 0.9034735560417175, -0.28870365023612976, -2.0547571182250977, -0.7962789535522461, -0.7697466015815735, -0.16516970098018646, -0.7294837236404419, 0.886326014995575, -0.34380853176116943, -1.4512205123901367, 0.20814074575901031, -0.6696523427963257, 0.19862942397594452, -1.2741414308547974, 0.3808765411376953, 0.7342886328697205, -0.7363244891166687, 0.1694800853729248, -0.24899904429912567, -1.2077776193618774, -0.4755576252937317, 0.28076326847076416, 1.9153610467910767, -0.8417083024978638, 0.9010179042816162, 1.0864940881729126, -0.7110734581947327, -0.0034849820658564568, 0.34399929642677307, -0.3160933554172516, 0.8596565127372742, -1.1074658632278442, -0.4207642078399658, 1.3077430725097656, -0.16625285148620605, -0.641715407371521, 1.4426815509796143, 0.756196141242981, -1.053297996520996, -0.15137265622615814, -0.13656628131866455, -0.8675522804260254, 0.13634942471981049, -1.57480788230896, -0.05521884560585022, 0.43404489755630493, -1.547036051750183, -0.43390709161758423, -0.17436064779758453, 1.4023727178573608, -0.23458750545978546, 1.4800605773925781, -0.37289634346961975, -0.22738434374332428, -0.3028635084629059, -0.3174799680709839, 0.2095751017332077, -0.2200547605752945, -0.6491820216178894, 0.23268309235572815, -0.6702775955200195, 0.375453919172287, 1.3910090923309326, 0.2488221377134323, -0.038926512002944946, 0.5231646299362183, 1.2457369565963745, 0.25567370653152466, 0.030969735234975815, -0.9136618971824646, -1.6046656370162964, 2.0458717346191406, -1.4958999156951904, 2.06943941116333, 0.6834925413131714, 0.0069383736699819565, -1.608917236328125, -1.8375440835952759, 1.3764647245407104, 1.1402784585952759, 2.247730016708374, 0.6235377192497253, 0.33558738231658936, -0.8460420966148376, -0.5767374634742737, 0.3848757743835449, -1.1181855201721191, -0.7195176482200623, 0.15479762852191925, 2.3547158241271973, 1.6947124004364014, -0.42287471890449524, -0.24736939370632172, -0.9865981340408325, 1.400109052658081, -0.28843170404434204, 0.24649004638195038, 1.9876548051834106, -0.24920733273029327, -1.1756372451782227, 1.2387573719024658, -2.394787311553955, 0.1573447287082672, 2.0224609375, 0.315018892288208, 0.07226262986660004, -1.4253486394882202, -0.5231319069862366, -0.2736166715621948, -0.3607955873012543, -1.216192603111267, 0.5371671319007874, -0.23074211180210114, -0.6927024126052856, -1.3711934089660645, 0.2569124698638916, -1.1115645170211792, -1.668128252029419, 0.31687411665916443, 1.8786330223083496, 1.988204836845398, -0.69269198179245, 1.5772533416748047, -0.38769468665122986, 0.1905984878540039, 1.3122682571411133, 1.2611069679260254, 3.12131667137146, 1.8555294275283813, -1.3245524168014526, 0.6022118926048279, -0.13115587830543518, -0.5591539144515991, 1.2138607501983643, -1.1905437707901, 1.2593889236450195, -0.09822414815425873, -1.1455180644989014, -1.3372271060943604, 0.8583493828773499, 0.42915669083595276, 0.07796740531921387, -0.548351526260376, 1.1250840425491333, 0.18418164551258087, 1.2759371995925903, 0.5268210768699646, -0.32836243510246277, 0.6084334850311279, -0.351060688495636, -0.47890937328338623, 1.5307015180587769, 0.23575997352600098, -1.3043373823165894, -2.3063530921936035, -0.17948909103870392, -0.7900683283805847, 0.12403085827827454, -0.5482776165008545, -0.9667628407478333, 1.6880583763122559, 0.38776421546936035, -1.2963950634002686, -0.2583014667034149, -0.327629953622818, -0.5450563430786133, 2.7431135177612305, -1.3445717096328735, -0.1956825852394104, -0.9836553335189819, -0.6443952918052673, 1.7305755615234375, -1.198807954788208, -0.2503419518470764, -1.0440709590911865, -0.5295724272727966, -1.2580763101577759, -0.6095312833786011, 0.008311973884701729, -0.9152007699012756, 0.8014413118362427, 0.2795470654964447, -1.2762466669082642, -0.4513743817806244, -0.8711307048797607, 0.8962822556495667, -0.19745956361293793, 0.25605371594429016, 1.832646131515503, 0.43485477566719055, -0.44292932748794556, 0.7945663928985596, 1.1294050216674805, 0.6797256469726562, -0.46851658821105957, 0.3479529619216919, -0.6005941033363342, 0.23832979798316956, -1.3526945114135742, 0.31125280261039734, -2.906970977783203, 0.5621263384819031, -0.07433769106864929, 0.042975060641765594, -0.1213606745004654, -1.3892630338668823, 1.0935134887695312, 2.5380735397338867, -1.1423523426055908, 0.42182275652885437, 0.31166303157806396, 1.1682490110397339, -1.6593115329742432, 0.300104558467865, -0.4121945798397064, 2.2099781036376953, 0.2415512651205063, 1.2881338596343994, -0.40857547521591187, -2.3500828742980957, 0.5521061420440674, -1.3032594919204712, -1.2257159948349, 0.9190804362297058, -0.8710643649101257, -0.028400596231222153, -1.4239511489868164, -0.3141288161277771, -0.8312286734580994, -1.2262144088745117, 0.8432484865188599, 0.07873296737670898, 0.42970988154411316, -0.6329579949378967, 0.34843122959136963, -2.1247942447662354, -1.3049333095550537, -0.22939005494117737, -1.001977801322937, 0.385995477437973, -0.3163274824619293, 0.6455811858177185, -0.1765492558479309, 0.010295605286955833, 0.41291093826293945, 1.5819406509399414, 3.3485267162323, 0.2832649350166321, 0.3783930242061615, -0.19501076638698578, -0.8469026684761047, 1.3797800540924072, 0.8814888000488281, -0.25335991382598877, -0.493581086397171, -0.9977751970291138, 1.1890556812286377, 1.8669288158416748, 0.9413605332374573, -0.030999546870589256, -0.7502956986427307, -0.821061909198761, -0.08938813209533691, 0.10092110931873322, 0.46411803364753723, 0.7642181515693665, 0.1261778473854065, 0.03596721589565277, 1.2790075540542603, 1.0797431468963623, -0.5760790109634399, 0.4105677604675293, -0.8085184693336487, -0.40850770473480225, 0.5494565963745117, 0.24964500963687897, -0.05456293001770973, 0.29936909675598145, -0.8663462996482849, -0.2428118735551834, -0.37739449739456177, -0.8988333344459534, -0.7350634336471558, -0.5184652209281921, -0.35056787729263306, 1.6613188982009888, 0.06127270683646202, -0.5336478352546692, -0.07262903451919556, -0.7276883721351624, -0.09853328764438629, -1.022806167602539, 0.24633915722370148, -0.08561021089553833, -0.17827102541923523, -0.061609648168087006, 1.707826852798462, -0.9156409502029419, -1.9218631982803345, 0.24410764873027802, 0.2396382838487625, -0.38768601417541504, 0.25480276346206665, 1.746870756149292, 0.38511282205581665, 1.3886128664016724, 1.3662614822387695, 0.9969450831413269, -0.645812451839447, -1.3184194564819336, 0.6745132803916931, 0.9465322494506836, -1.5355112552642822, 0.8039671182632446, 0.0849003940820694, -0.3921850323677063, 0.6281320452690125, 1.2587190866470337, 0.4888727068901062, -1.9646512269973755, 0.7759453654289246, -0.9605268239974976, 0.746765673160553, 0.7657947540283203, 0.7252268195152283, 0.21054469048976898, 0.8222787976264954, -1.0976223945617676, -1.204756736755371, -0.7850092053413391, -0.7279574275016785, 1.8773466348648071, -0.2535865902900696, 0.5055012702941895, -0.08850802481174469, -1.371449589729309, -0.11782735586166382, 0.7429468035697937, 0.3332177400588989, -0.4535541832447052, 0.8116533160209656, -0.7057275772094727, -1.041345477104187, -1.4152863025665283, -0.4917793869972229, -1.1246623992919922, -0.99574875831604, 1.0442949533462524, 0.8232020139694214, 0.25415730476379395, 1.829456090927124, 0.7233151793479919, 0.279649943113327, -2.5836687088012695, 0.9433097243309021, 0.2876405119895935, -0.14743299782276154, 0.8383288979530334, 0.3582487106323242, 0.982930064201355, 0.006524683907628059, 0.5676191449165344, -2.5443379878997803, 2.365588903427124, -0.2690974473953247, 0.6566994786262512, 0.011285394430160522, -0.2642589807510376, 1.1593610048294067, 0.5331864356994629, 0.5204401016235352, -1.1665520668029785, 0.6542639136314392, -0.640739917755127, 1.1837620735168457, 0.8619745373725891, -0.8968778848648071, -0.05408986285328865, 1.3557652235031128, 0.3973071575164795, -0.5597604513168335, -0.925731360912323, -1.051223874092102, 0.9377820491790771, 1.6198660135269165, -0.02849685586988926, -0.10148404538631439, 0.9241992831230164, 0.7516489624977112, -1.2061642408370972, 0.18736067414283752, -0.788750410079956, -0.8914969563484192, 1.6308724880218506, 2.032785654067993, -0.18318621814250946, -0.25709670782089233, -0.8569730520248413, -1.0871143341064453, 0.7753118276596069, -0.05635981261730194, 0.028542865067720413, 0.5774613618850708, -0.5996421575546265, 1.1032207012176514, 0.9601135849952698, 0.9007373452186584, 0.3060333728790283, 0.2852049469947815, 0.37315866351127625, -0.2464493364095688, -1.0958002805709839, -0.18381322920322418, -1.1469420194625854, -2.707581043243408, 0.4626927077770233, -0.26877954602241516, -1.361173152923584, 0.05520721897482872, -1.0381797552108765, 0.8272994160652161, -0.5843064188957214, -1.1365289688110352, -1.472244381904602, 0.15495875477790833, -0.0411011166870594, 0.9086416959762573, -1.5699528455734253, -0.034286826848983765, 1.260879635810852, 0.8291539549827576, -0.6631078720092773, 0.9105858206748962, 0.2197389155626297, 1.118652105331421, 0.9431316256523132, -0.3559093177318573, 0.590371310710907, 0.06178518757224083, -1.3401987552642822, 0.5753587484359741, 1.1547973155975342, 0.09902006387710571, 1.574053406715393, -0.4533062279224396, -0.008923018351197243, 0.3784995973110199, -0.6409304738044739, -0.5206130146980286, -0.6193419098854065, 0.6872878670692444, 0.06367436051368713, -0.8613591194152832, 0.1325446367263794, -0.03831816464662552, -0.18775276839733124, 0.14974340796470642, -1.5959938764572144, -0.14309753477573395, -0.2709561884403229, -0.5573756694793701, -1.2088432312011719, -0.14793753623962402, 1.3466672897338867, -0.6769154071807861, -0.23922286927700043, 0.561570942401886, 0.3422653377056122, 0.4922211170196533, 0.6227403879165649, -0.6418130397796631, -0.308597207069397, -0.24394680559635162, -0.3664782643318176, 0.3957836329936981, 1.4003363847732544, -0.05346288904547691, -0.8308601379394531, 0.7066364884376526, -0.2615257799625397, -0.010583200491964817, 1.9051207304000854, 0.116147980093956, -0.8246882557868958, 0.32861167192459106, -0.6562187671661377, 1.9571142196655273, 1.731321930885315, 1.2295292615890503, -0.08676791191101074, -1.0896236896514893, 0.6939656734466553, -0.43047937750816345, -0.4328266382217407, 0.9201694130897522, 0.40085482597351074, -0.18446792662143707, -1.3502492904663086, 0.7345297932624817, 1.299226999282837, -0.738640546798706, -0.8127685785293579, 0.06762722134590149, -0.7389979362487793, 0.9587382674217224, 0.7000894546508789, 0.37189796566963196, 0.31629034876823425, 1.6238293647766113, 0.7772900462150574, -0.4087682068347931, 0.5966006517410278, 0.4820043444633484, -0.11231987178325653, -2.1181323528289795, -1.1767687797546387, 0.3979135751724243, -0.4960252642631531, -1.6230759620666504, 1.4111803770065308, -1.1359646320343018, -0.9769671559333801, 0.5508459210395813, 0.08379150927066803, 1.505881905555725, 0.333888977766037, 1.6261132955551147, 2.0800297260284424, 0.8116061687469482, 0.3282150328159332, 1.3166989088058472, -0.160939022898674, -0.5407868027687073, 1.8067290782928467, -0.455354243516922, 0.41719144582748413, 1.1420108079910278, -0.22987982630729675, -1.058494210243225, -0.8245846033096313, -1.2962615489959717, -0.7054427266120911, 1.1766999959945679, 0.06360900402069092, -1.1164244413375854, 0.34073972702026367, 1.601580262184143, 0.1184823215007782, -0.27714604139328003, 0.6831987500190735, 0.3971933424472809, -0.8508147597312927, -0.0654650330543518, -0.982576310634613, 0.47261038422584534, -0.18531017005443573, -0.3652106523513794, 0.39529743790626526, 0.4155362546443939, 1.3139948844909668, 0.04276575520634651, 0.1419696807861328, 1.0438343286514282, -1.4573140144348145, 1.4188119173049927, -0.7066336274147034, 0.2971581518650055, -2.3327574729919434, 1.4135698080062866, -0.8851917386054993, 1.9231808185577393, -2.5808699131011963, 0.4574623703956604, -0.580116331577301, -0.4900909662246704, 0.40086600184440613, -0.3961509168148041, 0.1715417504310608, -0.13753314316272736, -1.231687068939209, -0.10486055910587311, -0.6896757483482361, 0.686441957950592, 1.0816740989685059, 1.4039114713668823, -1.111865758895874, -0.32212957739830017, -1.721067190170288, -0.12303751707077026, -0.5174378752708435, 0.3680884838104248, -1.9423308372497559, -0.08965009450912476, -1.9703000783920288, -2.282456159591675, -1.2874516248703003, -0.7335343360900879, 1.0238252878189087, 0.14949540793895721, -0.7974438667297363, 1.1472681760787964, -0.4070594012737274, -1.8456932306289673, 1.0756791830062866, -2.0957608222961426 ]
https://github.com/huggingface/datasets/issues/5536
Failure to hash function when using .map()
Hi ! `enc` is not hashable: ```python import tiktoken from datasets.fingerprint import Hasher enc = tiktoken.get_encoding("gpt2") Hasher.hash(enc) # raises TypeError: cannot pickle 'builtins.CoreBPE' object ``` It happens because it's not picklable, and because of that it's not possible to cache the result of `map`, hence the warning message. You can find more details about caching here: https://huggingface.co/docs/datasets/about_cache You can also provide your own unique hash in `map` if you want, with the `new_fingerprint` argument. Or disable caching using ```python import datasets datasets.disable_caching() ```
### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0
298
83
Failure to hash function when using .map() ### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0 Hi ! `enc` is not hashable: ```python import tiktoken from datasets.fingerprint import Hasher enc = tiktoken.get_encoding("gpt2") Hasher.hash(enc) # raises TypeError: cannot pickle 'builtins.CoreBPE' object ``` It happens because it's not picklable, and because of that it's not possible to cache the result of `map`, hence the warning message. You can find more details about caching here: https://huggingface.co/docs/datasets/about_cache You can also provide your own unique hash in `map` if you want, with the `new_fingerprint` argument. Or disable caching using ```python import datasets datasets.disable_caching() ```
[ -1.2845170497894287, -0.9991153478622437, -0.6881342530250549, 1.4902421236038208, -0.19394367933273315, -1.1103838682174683, 0.09438752382993698, -1.0431798696517944, 1.6962690353393555, -0.7956609725952148, 0.2443753033876419, -1.6626079082489014, 0.030678048729896545, -0.5379955172538757, -0.7329552173614502, -0.8173632621765137, -0.35747262835502625, -0.770473837852478, 1.1635987758636475, 2.572683811187744, 1.1885358095169067, -1.3944854736328125, 2.763873338699341, 0.7072710394859314, -0.21088559925556183, -1.0065703392028809, 0.5421687364578247, 0.03815007209777832, -1.3725143671035767, -0.3950720727443695, -0.9460664987564087, -0.03970906510949135, -0.5234684348106384, -0.51421719789505, 0.04627947136759758, 0.3670652508735657, -0.26241764426231384, -0.5617343187332153, -0.4913013279438019, -0.8148660063743591, 0.46770238876342773, -0.4024547040462494, 0.8291811347007751, -0.3190056085586548, 1.8435455560684204, -0.5512043833732605, 0.4594000279903412, 0.6635547876358032, 1.2755506038665771, 0.20391666889190674, -0.0564422681927681, 0.4024018943309784, 0.37629541754722595, 0.03460507094860077, 0.5358701944351196, 1.143250584602356, 0.6326015591621399, 0.40178966522216797, 0.7521575093269348, -2.2185120582580566, 1.3134039640426636, -1.0383830070495605, 0.27205464243888855, 1.3049346208572388, -0.9610762596130371, 0.40591028332710266, -1.7672715187072754, -0.055910639464855194, 0.5720711350440979, -2.2060484886169434, 0.24131138622760773, -1.2808338403701782, -0.486935019493103, 1.0689787864685059, 0.373222678899765, -1.2882325649261475, 0.0960797443985939, -0.4949648380279541, 1.0470808744430542, 0.38715043663978577, 1.1220641136169434, -1.6996448040008545, -0.06889649480581284, -0.3418612480163574, 0.12039292603731155, -1.3280054330825806, -1.5460872650146484, 0.5351336598396301, 0.6557233929634094, 0.5473671555519104, -0.11816320568323135, 1.029685139656067, -1.0544092655181885, 0.73399817943573, -1.0285521745681763, -1.7769654989242554, -1.3865902423858643, -2.3328354358673096, -2.225939989089966, 0.7409822344779968, -0.39463263750076294, -0.5426137447357178, 2.0256850719451904, -1.0412800312042236, -1.7700047492980957, 1.155068039894104, 0.22334562242031097, -0.030577797442674637, 2.40059757232666, 0.2284134030342102, -0.757836103439331, 0.47010499238967896, -0.8039333820343018, 0.7430697679519653, -0.37279388308525085, 1.425870418548584, 0.37833091616630554, -0.9992753863334656, 1.5425432920455933, -0.3277260661125183, 0.5681910514831543, -0.6402841806411743, -0.5067679286003113, -0.7322273850440979, 0.2351306527853012, 2.0004541873931885, -0.32454001903533936, 1.560282588005066, -0.37265169620513916, -1.6006968021392822, -1.5711557865142822, 0.8124859929084778, 0.5304607152938843, -0.7454198598861694, 0.14894668757915497, -0.3633609712123871, 0.11811109632253647, -0.0166771300137043, 1.1102834939956665, 1.3020846843719482, 0.7181321978569031, -0.2691427767276764, -0.8659945130348206, 0.19592127203941345, -0.11330477893352509, -0.7420316934585571, -1.7834744453430176, -0.2976536452770233, 0.04098818078637123, 0.6919549703598022, -1.2863637208938599, 1.6221898794174194, 0.9670244455337524, 1.9366977214813232, 1.0461598634719849, -0.3161863386631012, 1.4887233972549438, 0.10934123396873474, 1.7819428443908691, -0.4506711959838867, 0.7261431217193604, -0.34740373492240906, -1.1383720636367798, 0.7881531119346619, -0.344745934009552, -2.0506725311279297, -0.7680654525756836, -0.7731388211250305, -0.2052740454673767, -0.7681853771209717, 0.9064669013023376, -0.29396018385887146, -1.454154372215271, 0.2450972944498062, -0.7987168431282043, 0.17216818034648895, -1.1832430362701416, 0.2598976790904999, 0.7626355290412903, -0.6182529926300049, 0.10968948900699615, -0.2653106451034546, -1.2765538692474365, -0.44077858328819275, 0.32282355427742004, 1.8359200954437256, -0.8157406449317932, 0.9250560402870178, 1.0353946685791016, -0.7172545790672302, -0.03593473508954048, 0.29579049348831177, -0.2817687690258026, 0.8608896732330322, -1.0464264154434204, -0.4289233088493347, 1.1877024173736572, -0.23140689730644226, -0.5805060267448425, 1.4464013576507568, 0.6164828538894653, -1.0272784233093262, -0.2204815149307251, -0.11953606456518173, -0.890108585357666, 0.029142316430807114, -1.6736316680908203, -0.18465358018875122, 0.4056921601295471, -1.6274975538253784, -0.4722374677658081, -0.2449895292520523, 1.3251460790634155, -0.06887563318014145, 1.4196271896362305, -0.3490101099014282, -0.17123112082481384, -0.3199754059314728, -0.37389424443244934, 0.1899976283311844, -0.2128012329339981, -0.6123570203781128, 0.2542242705821991, -0.8180590867996216, 0.3250499367713928, 1.494659185409546, 0.3572378158569336, 0.003237844444811344, 0.5400899052619934, 1.0099079608917236, 0.40302330255508423, -0.11582640558481216, -0.7909019589424133, -1.652055263519287, 2.0376548767089844, -1.4599624872207642, 2.0226054191589355, 0.7506808042526245, -0.010890558362007141, -1.8403300046920776, -1.9500294923782349, 1.341046929359436, 1.1000449657440186, 2.355564594268799, 0.6031903028488159, 0.4332197606563568, -0.8019313216209412, -0.6758161783218384, 0.2863239347934723, -0.9682818055152893, -0.8343079090118408, 0.15435048937797546, 2.3747270107269287, 1.7127666473388672, -0.4192136228084564, -0.1485549807548523, -1.0036921501159668, 1.408677339553833, -0.1115458756685257, 0.22320793569087982, 1.9380048513412476, -0.198871910572052, -1.0548906326293945, 1.2485862970352173, -2.3415653705596924, 0.17134442925453186, 1.9516584873199463, 0.2484302669763565, 0.13264870643615723, -1.4258941411972046, -0.6783959269523621, -0.2555217742919922, -0.339787095785141, -1.197772741317749, 0.550446629524231, -0.23727865517139435, -0.8542211055755615, -1.4960039854049683, 0.09613943845033646, -1.1291180849075317, -1.6513779163360596, 0.30307143926620483, 1.890688180923462, 2.069263219833374, -0.7775102257728577, 1.6017868518829346, -0.2725791037082672, 0.13096560537815094, 1.242288589477539, 1.1636698246002197, 3.084613084793091, 1.87809419631958, -1.296431303024292, 0.6461933255195618, -0.09293157607316971, -0.400560587644577, 1.0942397117614746, -1.2082420587539673, 1.3181284666061401, -0.09309163689613342, -1.1445868015289307, -1.2016489505767822, 0.9348404407501221, 0.4892085790634155, 0.021565910428762436, -0.395279198884964, 1.2601673603057861, 0.02754019945859909, 1.374061107635498, 0.5133007168769836, -0.28737908601760864, 0.622255802154541, -0.43932512402534485, -0.48034951090812683, 1.5203531980514526, 0.20607000589370728, -1.3928461074829102, -2.246617078781128, -0.22713589668273926, -0.8103584051132202, 0.10514960438013077, -0.6058155298233032, -0.9806324243545532, 1.612510085105896, 0.39176297187805176, -1.185340166091919, -0.22640825808048248, -0.3560419976711273, -0.5794275999069214, 2.6694393157958984, -1.4053215980529785, -0.2127247154712677, -1.0079282522201538, -0.6084185242652893, 1.547988772392273, -1.2125996351242065, -0.2543684244155884, -0.9957746267318726, -0.5758546590805054, -1.27444589138031, -0.5736655592918396, 0.0359596349298954, -0.9731876850128174, 0.8646477460861206, 0.2025986909866333, -1.134492039680481, -0.3502398133277893, -0.8795850276947021, 0.9088684916496277, -0.07011738419532776, 0.16830448806285858, 1.85204017162323, 0.3216591775417328, -0.3647423982620239, 0.807311475276947, 1.172714114189148, 0.6449740529060364, -0.6062479019165039, 0.22712934017181396, -0.639930784702301, 0.3789425492286682, -1.290051817893982, 0.2684467136859894, -2.875300884246826, 0.614151656627655, -0.07628834992647171, 0.010488108731806278, 0.019591491669416428, -1.299708366394043, 1.111854076385498, 2.627899408340454, -1.1825557947158813, 0.5358009338378906, 0.34959346055984497, 1.15321946144104, -1.5517231225967407, 0.34743738174438477, -0.43842241168022156, 2.1434969902038574, 0.2631629705429077, 1.2081341743469238, -0.49720725417137146, -2.2827889919281006, 0.6392720341682434, -1.2976114749908447, -1.1421962976455688, 0.7073342800140381, -0.8533182144165039, 0.09846395999193192, -1.4388833045959473, -0.22831597924232483, -0.8318367600440979, -1.2115538120269775, 0.578650176525116, 0.19699540734291077, 0.43697577714920044, -0.5859933495521545, 0.38672351837158203, -2.1994526386260986, -1.335323452949524, -0.2704642117023468, -0.9797951579093933, 0.4397284686565399, -0.38996389508247375, 0.7156767845153809, -0.1658298373222351, 0.005046689882874489, 0.3280266225337982, 1.346123456954956, 3.382704019546509, 0.14518482983112335, 0.2581139802932739, -0.22762779891490936, -0.9778087139129639, 1.46036696434021, 0.9198733568191528, -0.20615291595458984, -0.590640664100647, -1.0663658380508423, 1.2081401348114014, 1.957749366760254, 1.0051157474517822, -0.003519891295582056, -0.8038860559463501, -0.75272136926651, 0.006466916762292385, 0.17063087224960327, 0.4795314073562622, 0.9300599694252014, 0.0672391727566719, 0.1170070543885231, 1.5203442573547363, 1.1772762537002563, -0.44131577014923096, 0.3914846181869507, -0.8251569271087646, -0.4617258310317993, 0.489290326833725, 0.2962450087070465, -0.06306006759405136, 0.32399091124534607, -1.0160846710205078, -0.2068694531917572, -0.3260399103164673, -0.9691734313964844, -0.6811463236808777, -0.3470593988895416, -0.338388592004776, 1.61281418800354, 0.1624559909105301, -0.4980536699295044, -0.1305290311574936, -0.7335997223854065, -0.029802773147821426, -1.046351671218872, 0.3319688141345978, -0.13022452592849731, -0.09900785982608795, -0.12212153524160385, 1.7723139524459839, -0.8946122527122498, -2.0616424083709717, 0.2500562369823456, 0.19375081360340118, -0.2657277286052704, 0.15236796438694, 1.6494925022125244, 0.6224383115768433, 1.4659862518310547, 1.3401461839675903, 0.8664724230766296, -0.6557574272155762, -1.33924400806427, 0.6234579086303711, 0.971057116985321, -1.3981966972351074, 0.7047151327133179, -0.0031902450136840343, -0.5140818953514099, 0.6132999062538147, 1.3626153469085693, 0.5342864990234375, -1.9317572116851807, 0.8468946218490601, -0.9652289152145386, 0.7729880213737488, 0.7544220685958862, 0.7443348169326782, 0.1495094895362854, 0.7933911681175232, -1.2622331380844116, -1.0958747863769531, -0.7379010319709778, -0.6782533526420593, 1.971923828125, -0.2642325162887573, 0.5482422113418579, -0.18008048832416534, -1.3206161260604858, -0.060283154249191284, 0.649450421333313, 0.29526233673095703, -0.421969473361969, 0.7806281447410583, -0.6190975308418274, -1.1544890403747559, -1.348866581916809, -0.5065156817436218, -1.0138565301895142, -0.9351701736450195, 1.0417900085449219, 0.7777507305145264, 0.3232601284980774, 1.889807939529419, 0.5996465086936951, 0.24477271735668182, -2.6388025283813477, 0.8742037415504456, 0.30051523447036743, -0.07317353785037994, 0.8859518766403198, 0.30622541904449463, 0.9869942665100098, -0.029323473572731018, 0.5233301520347595, -2.3814005851745605, 2.319906711578369, -0.2364620864391327, 0.7339100241661072, -0.0015172017738223076, -0.041725605726242065, 1.0776220560073853, 0.5927723050117493, 0.5871370434761047, -1.028855323791504, 0.727250874042511, -0.6208949685096741, 1.2698651552200317, 0.8510880470275879, -0.8151915669441223, -0.06919439136981964, 1.2899645566940308, 0.4119134545326233, -0.5437900424003601, -0.911243736743927, -0.9891388416290283, 0.9745917916297913, 1.798465371131897, -0.08033749461174011, -0.0046001155860722065, 0.8028666973114014, 0.6032975912094116, -1.402032732963562, 0.0021757567301392555, -0.7005435228347778, -0.6962669491767883, 1.6488780975341797, 2.1232147216796875, -0.11353404819965363, -0.23941916227340698, -0.7070693373680115, -1.26962149143219, 0.7533320188522339, -0.006977555342018604, 0.1706976443529129, 0.6810410022735596, -0.6033825874328613, 1.105955958366394, 0.8921880125999451, 0.9444599151611328, 0.16234230995178223, 0.23745480179786682, 0.30641311407089233, -0.2729972004890442, -1.169853925704956, -0.23136258125305176, -1.0079450607299805, -2.573854446411133, 0.46826037764549255, -0.15532119572162628, -1.47133469581604, 0.06345412880182266, -0.9149385094642639, 0.9468619227409363, -0.5361071228981018, -1.095002293586731, -1.5262401103973389, 0.1819712370634079, -0.09052587300539017, 0.9008408188819885, -1.5922009944915771, -0.11380665004253387, 1.282631516456604, 0.9887643456459045, -0.6158443093299866, 1.0957156419754028, 0.26020893454551697, 1.0357879400253296, 0.8408938646316528, -0.3207201063632965, 0.5648661255836487, 0.06729584187269211, -1.2884604930877686, 0.397728830575943, 1.2004754543304443, 0.19775108993053436, 1.4261486530303955, -0.5901548862457275, -0.01648993045091629, 0.41803157329559326, -0.5413452982902527, -0.45590102672576904, -0.5255909562110901, 0.6532562971115112, 0.058066774159669876, -0.880106508731842, -0.09109000116586685, -0.03293571621179581, -0.22208654880523682, 0.2009730190038681, -1.5735557079315186, -0.16979216039180756, -0.40310317277908325, -0.6274859309196472, -1.2347698211669922, -0.0675651803612709, 1.3982434272766113, -0.870071291923523, -0.24480438232421875, 0.4354555308818817, 0.3716360032558441, 0.5625802874565125, 0.6805213093757629, -0.7108864188194275, -0.331358402967453, -0.17569513618946075, -0.3387037515640259, 0.3266071677207947, 1.4086647033691406, -0.09726548194885254, -1.031423807144165, 0.703558623790741, -0.3277459740638733, 0.15504209697246552, 1.9154722690582275, 0.07276752591133118, -0.8387578725814819, 0.20969809591770172, -0.7731471657752991, 1.9281198978424072, 1.6186221837997437, 1.390963077545166, -0.1539490967988968, -0.9678298830986023, 0.6544755101203918, -0.30358609557151794, -0.382762610912323, 0.8811730742454529, 0.4978656768798828, -0.24741514027118683, -1.3579553365707397, 0.6804091930389404, 1.199414610862732, -0.8961400985717773, -0.8047796487808228, 0.14616145193576813, -0.774753212928772, 1.109368085861206, 0.7306815385818481, 0.34435832500457764, 0.28819626569747925, 1.603472113609314, 0.7631949186325073, -0.5202207565307617, 0.4983755946159363, 0.4971264600753784, -0.17173898220062256, -2.081791400909424, -1.0534571409225464, 0.3657108247280121, -0.5535762906074524, -1.6172289848327637, 1.3743230104446411, -1.1585060358047485, -0.913074254989624, 0.5263493061065674, 0.08260613679885864, 1.393432855606079, 0.3884144127368927, 1.610457420349121, 2.0618486404418945, 0.9088230133056641, 0.3443164825439453, 1.2835482358932495, -0.2176710069179535, -0.5132394433021545, 1.771304726600647, -0.45516839623451233, 0.5098786950111389, 1.1047875881195068, -0.2910546064376831, -0.9986775517463684, -0.7598428726196289, -1.27825129032135, -0.6913324594497681, 1.135154366493225, 0.10996219515800476, -1.1566424369812012, 0.2495228797197342, 1.5728671550750732, 0.11700966209173203, -0.2869669795036316, 0.6088889837265015, 0.39802005887031555, -0.811621367931366, -0.08731478452682495, -0.9249608516693115, 0.45751088857650757, -0.26795637607574463, -0.37673550844192505, 0.2661513090133667, 0.43369773030281067, 1.327394962310791, -0.007548895664513111, 0.1439954787492752, 1.2114839553833008, -1.3937650918960571, 1.4926091432571411, -0.7192221283912659, 0.3117595314979553, -2.354998826980591, 1.3342927694320679, -0.8239026069641113, 1.9501957893371582, -2.7133452892303467, 0.5027664303779602, -0.5800451040267944, -0.45604208111763, 0.2701336443424225, -0.28719010949134827, 0.1570531278848648, -0.10287226736545563, -1.1598730087280273, -0.1250884234905243, -0.6552006602287292, 0.5840662717819214, 1.1481587886810303, 1.3369240760803223, -1.078991413116455, -0.23985464870929718, -1.7339547872543335, -0.2068272829055786, -0.819338321685791, 0.3295172154903412, -1.9643630981445312, -0.1983523964881897, -1.8764570951461792, -2.39424991607666, -1.2632960081100464, -0.8089044094085693, 1.1663460731506348, 0.06877478212118149, -0.8556923270225525, 1.2291778326034546, -0.37462854385375977, -1.8543720245361328, 1.1399974822998047, -2.1506874561309814 ]
https://github.com/huggingface/datasets/issues/5536
Failure to hash function when using .map()
@lhoestq Thank you for the explanation and advice. Will relay all of this to the repo where this (non)issue arose. Great job with huggingface!
### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0
298
24
Failure to hash function when using .map() ### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0 @lhoestq Thank you for the explanation and advice. Will relay all of this to the repo where this (non)issue arose. Great job with huggingface!
[ -1.2881124019622803, -1.003926396369934, -0.6919583678245544, 1.4989726543426514, -0.18968906998634338, -1.1030694246292114, 0.09339943528175354, -1.042127251625061, 1.690084457397461, -0.7929410934448242, 0.23975349962711334, -1.664184331893921, 0.024867696687579155, -0.5398193597793579, -0.7331407070159912, -0.8130448460578918, -0.35813090205192566, -0.7698228359222412, 1.163767695426941, 2.5717668533325195, 1.1921814680099487, -1.3929888010025024, 2.767477035522461, 0.7113366723060608, -0.21512611210346222, -1.001404047012329, 0.5434237122535706, 0.039995238184928894, -1.3732811212539673, -0.3957660496234894, -0.9494122266769409, -0.034003451466560364, -0.5217057466506958, -0.5092758536338806, 0.048556216061115265, 0.361996591091156, -0.2620391845703125, -0.5567042231559753, -0.4976826310157776, -0.8155201077461243, 0.4707947075366974, -0.3976952135562897, 0.8267569541931152, -0.308700293302536, 1.8474094867706299, -0.5526723265647888, 0.4598860442638397, 0.6609726548194885, 1.2747077941894531, 0.20399154722690582, -0.05068501830101013, 0.40474554896354675, 0.3767766058444977, 0.036842264235019684, 0.5372543334960938, 1.149430513381958, 0.632655143737793, 0.40117591619491577, 0.7576536536216736, -2.217067241668701, 1.3189982175827026, -1.0350515842437744, 0.27023810148239136, 1.3009397983551025, -0.9651910662651062, 0.4071960151195526, -1.7595891952514648, -0.05601368099451065, 0.5703672170639038, -2.205782651901245, 0.23854172229766846, -1.278721570968628, -0.4883720874786377, 1.061730980873108, 0.36983323097229004, -1.2831172943115234, 0.09764162451028824, -0.5022989511489868, 1.0455970764160156, 0.38756263256073, 1.1247453689575195, -1.70526123046875, -0.06599856913089752, -0.3436029851436615, 0.11792271584272385, -1.3302209377288818, -1.5467771291732788, 0.5360320806503296, 0.6539573669433594, 0.550588846206665, -0.12172091752290726, 1.0259650945663452, -1.054296612739563, 0.7317904233932495, -1.0267221927642822, -1.7725154161453247, -1.3877472877502441, -2.337498664855957, -2.2266457080841064, 0.7425901889801025, -0.39477548003196716, -0.5456637740135193, 2.0230600833892822, -1.0377339124679565, -1.770465612411499, 1.1534446477890015, 0.22533835470676422, -0.031193358823657036, 2.4075636863708496, 0.23084460198879242, -0.7562945485115051, 0.4715217351913452, -0.8042297959327698, 0.7397000789642334, -0.37054643034935, 1.43032705783844, 0.3791320025920868, -0.9931932091712952, 1.5428478717803955, -0.32668536901474, 0.565191388130188, -0.6397608518600464, -0.5072139501571655, -0.731233537197113, 0.23261071741580963, 2.0008904933929443, -0.32688450813293457, 1.5573279857635498, -0.3711017072200775, -1.6022907495498657, -1.576688289642334, 0.8157998919487, 0.5259625911712646, -0.7382788062095642, 0.1536148488521576, -0.37040016055107117, 0.11158627271652222, -0.014634065330028534, 1.1081146001815796, 1.3031995296478271, 0.7154979109764099, -0.27173808217048645, -0.8680177927017212, 0.1907852292060852, -0.11716029793024063, -0.7374411821365356, -1.7839813232421875, -0.29741498827934265, 0.04491790384054184, 0.6946967244148254, -1.2888492345809937, 1.6146191358566284, 0.9688206911087036, 1.934631586074829, 1.0487737655639648, -0.3124406039714813, 1.4899711608886719, 0.10676052421331406, 1.7790545225143433, -0.4513898491859436, 0.7221116423606873, -0.35354724526405334, -1.138269066810608, 0.7883335947990417, -0.3460274636745453, -2.0436666011810303, -0.7703351378440857, -0.7754403948783875, -0.21064257621765137, -0.773880660533905, 0.9100755453109741, -0.2957439124584198, -1.453869342803955, 0.24822571873664856, -0.802212655544281, 0.17380715906620026, -1.1832497119903564, 0.2603297531604767, 0.7617194652557373, -0.6210159659385681, 0.11255721002817154, -0.26255378127098083, -1.2796366214752197, -0.4359496533870697, 0.32216787338256836, 1.8369852304458618, -0.8154872059822083, 0.9265248775482178, 1.0349124670028687, -0.7153446674346924, -0.03338000923395157, 0.29825517535209656, -0.28070583939552307, 0.8629088997840881, -1.0409207344055176, -0.426360547542572, 1.1906102895736694, -0.2341981679201126, -0.5807778239250183, 1.4460293054580688, 0.6217465996742249, -1.0274344682693481, -0.22370465099811554, -0.11599231511354446, -0.8892568349838257, 0.02743355743587017, -1.6651716232299805, -0.18757905066013336, 0.39928609132766724, -1.6284409761428833, -0.47355154156684875, -0.24969761073589325, 1.3249558210372925, -0.06906309723854065, 1.422277569770813, -0.34613466262817383, -0.1724184900522232, -0.3144378960132599, -0.3711157441139221, 0.18856772780418396, -0.20831122994422913, -0.6108578443527222, 0.2561190128326416, -0.8213690519332886, 0.32849907875061035, 1.4957003593444824, 0.36435359716415405, 0.005356215871870518, 0.5461125373840332, 1.0098425149917603, 0.41141727566719055, -0.11544755101203918, -0.7915024757385254, -1.6556212902069092, 2.0380306243896484, -1.459371566772461, 2.0177435874938965, 0.7515743374824524, -0.017942283302545547, -1.8436322212219238, -1.9466423988342285, 1.338193655014038, 1.1021798849105835, 2.359003782272339, 0.6047184467315674, 0.43211498856544495, -0.802477240562439, -0.680290699005127, 0.28982675075531006, -0.9727929830551147, -0.8361327648162842, 0.15646860003471375, 2.376182794570923, 1.716400384902954, -0.4217506945133209, -0.1475013941526413, -1.002217173576355, 1.4014447927474976, -0.1117054745554924, 0.2192322164773941, 1.9366652965545654, -0.2013029307126999, -1.0545051097869873, 1.2459535598754883, -2.3424060344696045, 0.16909219324588776, 1.945807933807373, 0.2548140287399292, 0.1328684240579605, -1.4273974895477295, -0.6825501322746277, -0.2575497329235077, -0.34281405806541443, -1.1954997777938843, 0.5487605929374695, -0.23369020223617554, -0.8574912548065186, -1.4973455667495728, 0.09751293063163757, -1.1278631687164307, -1.650567889213562, 0.3022237718105316, 1.8900806903839111, 2.0748846530914307, -0.7806705236434937, 1.5990818738937378, -0.26292508840560913, 0.13583078980445862, 1.2400002479553223, 1.1651629209518433, 3.0803062915802, 1.8758397102355957, -1.2956786155700684, 0.6490607261657715, -0.0929657444357872, -0.40792936086654663, 1.0909640789031982, -1.2097340822219849, 1.3183534145355225, -0.0932084396481514, -1.1426364183425903, -1.2079116106033325, 0.9400023221969604, 0.4911592900753021, 0.016694769263267517, -0.39318084716796875, 1.2583423852920532, 0.027735931798815727, 1.3740277290344238, 0.5174362063407898, -0.2863650918006897, 0.619461178779602, -0.440310537815094, -0.47996559739112854, 1.5194706916809082, 0.20810669660568237, -1.39525306224823, -2.2387328147888184, -0.22463680803775787, -0.8100912570953369, 0.09655968844890594, -0.6078743934631348, -0.9829699397087097, 1.603624701499939, 0.39284852147102356, -1.1844112873077393, -0.22401022911071777, -0.35590171813964844, -0.5808244347572327, 2.665091037750244, -1.4068800210952759, -0.21363024413585663, -1.0022826194763184, -0.6091334223747253, 1.5440137386322021, -1.2123628854751587, -0.2570090591907501, -0.999357283115387, -0.5772948861122131, -1.2731976509094238, -0.5769186019897461, 0.032782599329948425, -0.9745150208473206, 0.8592051863670349, 0.20234550535678864, -1.1269716024398804, -0.35105979442596436, -0.8771430253982544, 0.914980947971344, -0.07218238711357117, 0.16567182540893555, 1.851792812347412, 0.3222231864929199, -0.367269903421402, 0.8095908164978027, 1.1737561225891113, 0.6466375589370728, -0.6051770448684692, 0.21865104138851166, -0.6442280411720276, 0.38001424074172974, -1.2881447076797485, 0.26971665024757385, -2.874335527420044, 0.6103478074073792, -0.07612936198711395, 0.008675450459122658, 0.0180986151099205, -1.3006608486175537, 1.1158283948898315, 2.625603675842285, -1.1815236806869507, 0.536519467830658, 0.3506271243095398, 1.150036334991455, -1.5496970415115356, 0.34991514682769775, -0.44128626585006714, 2.143686294555664, 0.2668653726577759, 1.2070200443267822, -0.4982571005821228, -2.2846171855926514, 0.6374043822288513, -1.2995227575302124, -1.1401231288909912, 0.7027869820594788, -0.8521337509155273, 0.0998244434595108, -1.4427530765533447, -0.22738733887672424, -0.8304077982902527, -1.2178153991699219, 0.5749619007110596, 0.197496235370636, 0.44276320934295654, -0.5814134478569031, 0.3904832899570465, -2.2013516426086426, -1.3310517072677612, -0.2678981423377991, -0.9791203737258911, 0.44751596450805664, -0.39485475420951843, 0.7164317965507507, -0.1737864762544632, 0.0018264707177877426, 0.3307751417160034, 1.3448354005813599, 3.390040636062622, 0.14626574516296387, 0.2626000940799713, -0.22431203722953796, -0.9740317463874817, 1.4590660333633423, 0.9255328178405762, -0.2144482284784317, -0.5877431631088257, -1.066646933555603, 1.2107409238815308, 1.958516240119934, 1.004034161567688, -0.0033013601787388325, -0.7986849546432495, -0.7553662657737732, 0.010465091094374657, 0.1750917285680771, 0.4736805856227875, 0.9297512173652649, 0.0652623325586319, 0.11535303294658661, 1.5223010778427124, 1.1803545951843262, -0.44482699036598206, 0.39323529601097107, -0.8248812556266785, -0.4567069709300995, 0.4898369014263153, 0.29446807503700256, -0.06728317588567734, 0.3234272003173828, -1.0173887014389038, -0.21176257729530334, -0.32814720273017883, -0.9696219563484192, -0.6852675676345825, -0.3435845971107483, -0.33905184268951416, 1.6142162084579468, 0.16511240601539612, -0.5031266808509827, -0.13421303033828735, -0.7358848452568054, -0.038055889308452606, -1.0500653982162476, 0.3328738808631897, -0.12500233948230743, -0.0984034389257431, -0.12504327297210693, 1.7755637168884277, -0.8986251950263977, -2.067413568496704, 0.2538526654243469, 0.19471406936645508, -0.2647581994533539, 0.1510065197944641, 1.6509782075881958, 0.6229569911956787, 1.471925139427185, 1.3358287811279297, 0.8672413229942322, -0.6535202860832214, -1.3389285802841187, 0.6249885559082031, 0.9689601063728333, -1.3960620164871216, 0.701911985874176, -0.006640042178332806, -0.5115622878074646, 0.6103422045707703, 1.36025071144104, 0.5290465950965881, -1.931610345840454, 0.84688800573349, -0.9650604128837585, 0.7701402902603149, 0.7516964673995972, 0.7487279772758484, 0.15129444003105164, 0.7881485223770142, -1.2621129751205444, -1.097172737121582, -0.7397571802139282, -0.6831839680671692, 1.9765567779541016, -0.26322484016418457, 0.5478306412696838, -0.18122488260269165, -1.3234691619873047, -0.052121274173259735, 0.6528233885765076, 0.2889990508556366, -0.4217134118080139, 0.7803813219070435, -0.624593198299408, -1.1610885858535767, -1.3490720987319946, -0.5048841834068298, -1.0144070386886597, -0.9368277192115784, 1.0457813739776611, 0.772750973701477, 0.3189312219619751, 1.8918951749801636, 0.5925694108009338, 0.24726656079292297, -2.639742612838745, 0.8758844137191772, 0.2963630259037018, -0.06886175274848938, 0.8893908858299255, 0.30544665455818176, 0.9845812916755676, -0.025150030851364136, 0.5208479762077332, -2.382467746734619, 2.313873052597046, -0.23002482950687408, 0.733101487159729, -0.005914250388741493, -0.0399802029132843, 1.0758469104766846, 0.5955569744110107, 0.5901539921760559, -1.031485676765442, 0.726372241973877, -0.61686772108078, 1.2661675214767456, 0.852031946182251, -0.8124915957450867, -0.06487956643104553, 1.2914912700653076, 0.4194148778915405, -0.5362586379051208, -0.9093567728996277, -0.9879541397094727, 0.9729456901550293, 1.79581618309021, -0.08016329258680344, -0.0026816418394446373, 0.7989647388458252, 0.6022017002105713, -1.405842661857605, 0.001822473481297493, -0.6987324953079224, -0.69114750623703, 1.6474599838256836, 2.126995325088501, -0.117503821849823, -0.23546254634857178, -0.7079395651817322, -1.2749637365341187, 0.7548872232437134, -0.0076019251719117165, 0.17431104183197021, 0.6801108717918396, -0.6045350432395935, 1.1066421270370483, 0.8892483711242676, 0.9438647627830505, 0.16249504685401917, 0.23716408014297485, 0.30919185280799866, -0.2707109749317169, -1.1695098876953125, -0.2342764139175415, -1.0068435668945312, -2.56938099861145, 0.468565434217453, -0.1543186604976654, -1.4709218740463257, 0.06471320241689682, -0.9146981835365295, 0.9513202905654907, -0.5324342846870422, -1.0925886631011963, -1.5264350175857544, 0.18222002685070038, -0.09727270901203156, 0.9006400108337402, -1.5920544862747192, -0.11744549125432968, 1.2875158786773682, 0.990405261516571, -0.614691972732544, 1.1018855571746826, 0.25798702239990234, 1.0359972715377808, 0.8407631516456604, -0.3155139088630676, 0.5645745992660522, 0.06617776304483414, -1.287573218345642, 0.3972066640853882, 1.1987839937210083, 0.19714392721652985, 1.425911545753479, -0.5916014909744263, -0.019067976623773575, 0.42379656434059143, -0.5434783101081848, -0.45397186279296875, -0.5210983753204346, 0.6515535116195679, 0.05912758409976959, -0.8752322793006897, -0.0940188616514206, -0.03231767565011978, -0.22619301080703735, 0.19665715098381042, -1.5680532455444336, -0.1660662144422531, -0.40374255180358887, -0.6262826919555664, -1.2396187782287598, -0.06553450971841812, 1.3964626789093018, -0.8714050054550171, -0.2428099811077118, 0.4313187003135681, 0.3721592426300049, 0.5605936050415039, 0.6858987212181091, -0.7127267122268677, -0.326421320438385, -0.17186641693115234, -0.3363630473613739, 0.33120959997177124, 1.41036057472229, -0.09562183916568756, -1.0361789464950562, 0.7051851153373718, -0.325888454914093, 0.15277117490768433, 1.9169938564300537, 0.07205961644649506, -0.8352182507514954, 0.2022211253643036, -0.7710729241371155, 1.9339015483856201, 1.618006944656372, 1.3896657228469849, -0.1538289338350296, -0.9711304903030396, 0.6526433229446411, -0.30123117566108704, -0.38295862078666687, 0.8786957263946533, 0.49544546008110046, -0.2489621341228485, -1.3596364259719849, 0.6753427386283875, 1.2009137868881226, -0.8926119804382324, -0.7949572801589966, 0.13922378420829773, -0.7778180241584778, 1.1092232465744019, 0.727300763130188, 0.3432382643222809, 0.2788578271865845, 1.6081081628799438, 0.7563108801841736, -0.5247928500175476, 0.5000749826431274, 0.497004896402359, -0.17138178646564484, -2.081639289855957, -1.0510281324386597, 0.3672267496585846, -0.5511903762817383, -1.614864706993103, 1.3709514141082764, -1.160844087600708, -0.9118173122406006, 0.5264437794685364, 0.08509845286607742, 1.3935675621032715, 0.3844769597053528, 1.613667607307434, 2.0662643909454346, 0.905121922492981, 0.34189555048942566, 1.2840789556503296, -0.21889010071754456, -0.5126858949661255, 1.7664611339569092, -0.45525285601615906, 0.5128548741340637, 1.1061341762542725, -0.2956940829753876, -0.9939149618148804, -0.7614221572875977, -1.2750076055526733, -0.6871116161346436, 1.1327790021896362, 0.10740018635988235, -1.1519683599472046, 0.24730634689331055, 1.5718270540237427, 0.1210947260260582, -0.2887296974658966, 0.6060099005699158, 0.3988903760910034, -0.814207136631012, -0.08560925722122192, -0.9304015040397644, 0.4590149521827698, -0.26795142889022827, -0.37712952494621277, 0.2649036943912506, 0.4291015565395355, 1.3252533674240112, -0.010959569364786148, 0.14866910874843597, 1.2191622257232666, -1.392364263534546, 1.4956419467926025, -0.7218307852745056, 0.30761271715164185, -2.354314088821411, 1.334627628326416, -0.823846161365509, 1.9551562070846558, -2.7154078483581543, 0.5018858313560486, -0.5786778330802917, -0.4551480710506439, 0.27090784907341003, -0.28513890504837036, 0.15825802087783813, -0.10467793792486191, -1.1545592546463013, -0.12733888626098633, -0.6544339656829834, 0.5804515480995178, 1.1482653617858887, 1.3383985757827759, -1.0755524635314941, -0.23701682686805725, -1.7313839197158813, -0.20930896699428558, -0.8252119421958923, 0.3285382390022278, -1.9573657512664795, -0.2013552337884903, -1.8762530088424683, -2.3916704654693604, -1.2621586322784424, -0.806449830532074, 1.16383695602417, 0.0694916620850563, -0.8534702062606812, 1.2291840314865112, -0.38040822744369507, -1.859934687614441, 1.1386754512786865, -2.1524980068206787 ]
https://github.com/huggingface/datasets/issues/5536
Failure to hash function when using .map()
Just a heads up that when I'm trying to use TikToken along with the a given Dataset `.map()` method, I am still met with the following error : ``` File "/opt/conda/lib/python3.8/site-packages/dill/_dill.py", line 388, in save StockPickler.save(self, obj, save_persistent_id) File "/opt/conda/lib/python3.8/pickle.py", line 578, in save rv = reduce(self.proto) TypeError: cannot pickle 'builtins.CoreBPE' object ``` My current environment is running datasets v2.10.0.
### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0
298
60
Failure to hash function when using .map() ### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0 Just a heads up that when I'm trying to use TikToken along with the a given Dataset `.map()` method, I am still met with the following error : ``` File "/opt/conda/lib/python3.8/site-packages/dill/_dill.py", line 388, in save StockPickler.save(self, obj, save_persistent_id) File "/opt/conda/lib/python3.8/pickle.py", line 578, in save rv = reduce(self.proto) TypeError: cannot pickle 'builtins.CoreBPE' object ``` My current environment is running datasets v2.10.0.
[ -1.2856485843658447, -1.0056039094924927, -0.6918731331825256, 1.4934698343276978, -0.1911541372537613, -1.1113144159317017, 0.0905895009636879, -1.047580599784851, 1.6914012432098389, -0.7979883551597595, 0.24175648391246796, -1.662598729133606, 0.026182375848293304, -0.5417219400405884, -0.7358071208000183, -0.8169742226600647, -0.3603329360485077, -0.7760962843894958, 1.1612130403518677, 2.5721564292907715, 1.193332552909851, -1.39274263381958, 2.7651991844177246, 0.7146621942520142, -0.21330559253692627, -1.005184292793274, 0.542972207069397, 0.037528395652770996, -1.3754225969314575, -0.3959790766239166, -0.9440702795982361, -0.032118454575538635, -0.5195454955101013, -0.5089457035064697, 0.04425912722945213, 0.361886203289032, -0.2662509083747864, -0.556553304195404, -0.4982808232307434, -0.8166502118110657, 0.4679831266403198, -0.40279248356819153, 0.8271067142486572, -0.3139207661151886, 1.8489328622817993, -0.5526883006095886, 0.45685526728630066, 0.6588912010192871, 1.2786924839019775, 0.20395833253860474, -0.05305209755897522, 0.4003341794013977, 0.3748234212398529, 0.03572535887360573, 0.5369593501091003, 1.143791913986206, 0.6337815523147583, 0.40184590220451355, 0.7545530796051025, -2.2150216102600098, 1.3169231414794922, -1.032020092010498, 0.27220943570137024, 1.3031587600708008, -0.9609487056732178, 0.4095730185508728, -1.7650434970855713, -0.0566236637532711, 0.573050856590271, -2.207184314727783, 0.24339105188846588, -1.2796837091445923, -0.48606783151626587, 1.0589145421981812, 0.3717339336872101, -1.2868402004241943, 0.09724142402410507, -0.5018829703330994, 1.0483527183532715, 0.3856310546398163, 1.1216813325881958, -1.70625638961792, -0.06849762052297592, -0.33942776918411255, 0.11575964093208313, -1.3293993473052979, -1.5436474084854126, 0.537423312664032, 0.6563528180122375, 0.550441324710846, -0.11740892380475998, 1.0276862382888794, -1.054951786994934, 0.730172336101532, -1.0244265794754028, -1.7725239992141724, -1.384374976158142, -2.337013006210327, -2.2249715328216553, 0.745215892791748, -0.3920159339904785, -0.5461503863334656, 2.0223073959350586, -1.040572166442871, -1.7710058689117432, 1.1561217308044434, 0.22276052832603455, -0.03195362910628319, 2.407132148742676, 0.22767774760723114, -0.7612785696983337, 0.47689297795295715, -0.8008821606636047, 0.7422761917114258, -0.3771537244319916, 1.429614543914795, 0.3767475187778473, -0.9958130121231079, 1.5461821556091309, -0.33316054940223694, 0.567786693572998, -0.6408789753913879, -0.5047552585601807, -0.7351250648498535, 0.23189181089401245, 2.004849910736084, -0.3246346116065979, 1.5580559968948364, -0.3708413243293762, -1.601409673690796, -1.5729731321334839, 0.8153005242347717, 0.5259522199630737, -0.7449929118156433, 0.14951938390731812, -0.3676237165927887, 0.1098809540271759, -0.013368366286158562, 1.1084363460540771, 1.304753065109253, 0.7123571038246155, -0.2700589895248413, -0.870797336101532, 0.19440075755119324, -0.11891068518161774, -0.7406298518180847, -1.7854223251342773, -0.2960289418697357, 0.04934343323111534, 0.6865745782852173, -1.2854543924331665, 1.6202523708343506, 0.9718550443649292, 1.9413708448410034, 1.04951012134552, -0.3137604296207428, 1.4846516847610474, 0.10624386370182037, 1.7768770456314087, -0.4519525468349457, 0.7294849157333374, -0.3404971659183502, -1.1337629556655884, 0.7857509851455688, -0.34315362572669983, -2.0466489791870117, -0.7683069705963135, -0.7678560614585876, -0.20533636212348938, -0.7683922052383423, 0.9132643342018127, -0.292886883020401, -1.448328971862793, 0.24852706491947174, -0.8070876598358154, 0.17436222732067108, -1.1823235750198364, 0.25657543540000916, 0.761440098285675, -0.6149808764457703, 0.10882479697465897, -0.2622579038143158, -1.281343698501587, -0.4340885579586029, 0.32448408007621765, 1.834775686264038, -0.8173782825469971, 0.9212535619735718, 1.034380316734314, -0.7097600102424622, -0.037340275943279266, 0.2999187111854553, -0.2818143665790558, 0.8636950850486755, -1.0387290716171265, -0.4244949221611023, 1.1932003498077393, -0.23173795640468597, -0.577778160572052, 1.4452427625656128, 0.6182783842086792, -1.023026704788208, -0.21962015330791473, -0.12142938375473022, -0.8895906209945679, 0.029050301760435104, -1.674278736114502, -0.18157126009464264, 0.4003986120223999, -1.6279454231262207, -0.4738997519016266, -0.2511746287345886, 1.3175303936004639, -0.06715724617242813, 1.420331358909607, -0.3521699905395508, -0.16971488296985626, -0.3156816363334656, -0.37519732117652893, 0.18905362486839294, -0.21004170179367065, -0.6107627749443054, 0.2536414861679077, -0.821992814540863, 0.33091261982917786, 1.4932607412338257, 0.36075639724731445, 0.006934811361134052, 0.540991485118866, 1.0076969861984253, 0.40468278527259827, -0.1191805750131607, -0.7834810018539429, -1.652746558189392, 2.04288649559021, -1.4607577323913574, 2.0188090801239014, 0.75575852394104, -0.011031480506062508, -1.8447611331939697, -1.9486558437347412, 1.3351976871490479, 1.1032588481903076, 2.3537306785583496, 0.6031394004821777, 0.4249151349067688, -0.8042139410972595, -0.6816612482070923, 0.2857467234134674, -0.9741259217262268, -0.8366787433624268, 0.15248531103134155, 2.3691768646240234, 1.7193284034729004, -0.41715502738952637, -0.14825361967086792, -1.0052884817123413, 1.402897596359253, -0.11721768230199814, 0.2150675356388092, 1.938934564590454, -0.19846150279045105, -1.0543755292892456, 1.2494175434112549, -2.3423287868499756, 0.17086532711982727, 1.9481492042541504, 0.25271525979042053, 0.13155993819236755, -1.4273895025253296, -0.6837902665138245, -0.25887200236320496, -0.3272669017314911, -1.1970269680023193, 0.5499444007873535, -0.24402518570423126, -0.8579131364822388, -1.4965472221374512, 0.09757791459560394, -1.126190185546875, -1.6482869386672974, 0.30392324924468994, 1.885403037071228, 2.0745506286621094, -0.7782576680183411, 1.5996730327606201, -0.2660158574581146, 0.12950828671455383, 1.237907886505127, 1.163977026939392, 3.08622670173645, 1.872591495513916, -1.2936581373214722, 0.641364336013794, -0.09330423921346664, -0.403006374835968, 1.0933254957199097, -1.2105412483215332, 1.3206740617752075, -0.09925173223018646, -1.1443732976913452, -1.2024012804031372, 0.9382318258285522, 0.494140088558197, 0.024183224886655807, -0.3983408808708191, 1.2609360218048096, 0.022534940391778946, 1.3738014698028564, 0.5184025764465332, -0.2889259159564972, 0.6187524199485779, -0.4343777894973755, -0.484866738319397, 1.5153098106384277, 0.20697122812271118, -1.3928683996200562, -2.243957042694092, -0.2273341417312622, -0.8113831877708435, 0.09555090963840485, -0.6065905690193176, -0.9832571148872375, 1.610940933227539, 0.39123672246932983, -1.1917160749435425, -0.22879837453365326, -0.35345226526260376, -0.5808766484260559, 2.6697216033935547, -1.4040385484695435, -0.21319040656089783, -1.00791597366333, -0.603961169719696, 1.5480533838272095, -1.2119793891906738, -0.258539617061615, -1.0014030933380127, -0.5737188458442688, -1.2760080099105835, -0.5754087567329407, 0.0319543294608593, -0.9725857973098755, 0.8590035438537598, 0.2027033269405365, -1.1291011571884155, -0.3493072986602783, -0.8824352025985718, 0.9141106605529785, -0.07296952605247498, 0.1620619297027588, 1.8501206636428833, 0.3233431577682495, -0.3625560402870178, 0.8134536743164062, 1.17239248752594, 0.6460163593292236, -0.6105341911315918, 0.21832232177257538, -0.6401945948600769, 0.38042953610420227, -1.2928144931793213, 0.27017417550086975, -2.8736839294433594, 0.6136035323143005, -0.07127605378627777, 0.015800349414348602, 0.020029019564390182, -1.2962148189544678, 1.11355459690094, 2.6311824321746826, -1.183189868927002, 0.5362580418586731, 0.3425114154815674, 1.1513395309448242, -1.55516517162323, 0.34553322196006775, -0.4405348002910614, 2.1453795433044434, 0.26164695620536804, 1.2078033685684204, -0.49853459000587463, -2.2821059226989746, 0.6412800550460815, -1.30082106590271, -1.1411176919937134, 0.7046321034431458, -0.852813720703125, 0.09483878314495087, -1.440148115158081, -0.22425642609596252, -0.8291733860969543, -1.2139337062835693, 0.5755786895751953, 0.19813357293605804, 0.43925878405570984, -0.5790411233901978, 0.38434645533561707, -2.201915979385376, -1.332688808441162, -0.2724696397781372, -0.9824098944664001, 0.4466693699359894, -0.3894506096839905, 0.7109829187393188, -0.16791336238384247, -0.0005797222256660461, 0.32827043533325195, 1.3445171117782593, 3.3868489265441895, 0.1494070142507553, 0.2596927285194397, -0.21940314769744873, -0.9794653654098511, 1.4551018476486206, 0.9203193187713623, -0.21092434227466583, -0.5924673080444336, -1.058386206626892, 1.2117528915405273, 1.9567457437515259, 1.003867745399475, -0.001062699593603611, -0.8036383986473083, -0.7541111707687378, 0.009313707239925861, 0.17526854574680328, 0.47721216082572937, 0.9317021369934082, 0.06660415977239609, 0.11542153358459473, 1.5236892700195312, 1.1782863140106201, -0.44246408343315125, 0.3939497470855713, -0.8253142237663269, -0.4616791605949402, 0.48965367674827576, 0.29418596625328064, -0.0645846575498581, 0.3282369077205658, -1.0192688703536987, -0.2065061330795288, -0.3293571174144745, -0.9684670567512512, -0.6827020049095154, -0.3468587100505829, -0.3366771340370178, 1.6119667291641235, 0.16832804679870605, -0.49834561347961426, -0.1316806972026825, -0.7328754663467407, -0.035101596266031265, -1.043097734451294, 0.33711397647857666, -0.12345486879348755, -0.09985017776489258, -0.12122323364019394, 1.776010513305664, -0.8937699794769287, -2.0672287940979004, 0.25076019763946533, 0.1885812133550644, -0.26305440068244934, 0.14779840409755707, 1.6464521884918213, 0.6192009449005127, 1.471118450164795, 1.336755394935608, 0.8672064542770386, -0.6602299213409424, -1.3390069007873535, 0.6235861778259277, 0.9714177846908569, -1.396583080291748, 0.7095653414726257, -0.0035646255128085613, -0.5166845917701721, 0.614311158657074, 1.3651354312896729, 0.5308641791343689, -1.9316210746765137, 0.8438006043434143, -0.9708471894264221, 0.7733875513076782, 0.7531249523162842, 0.7456747889518738, 0.14985595643520355, 0.7877259850502014, -1.263092279434204, -1.0946855545043945, -0.7428116798400879, -0.6842334866523743, 1.9683119058609009, -0.2641776204109192, 0.5479190349578857, -0.17940741777420044, -1.3229104280471802, -0.0580902025103569, 0.6549224853515625, 0.2934384047985077, -0.4176490008831024, 0.782820999622345, -0.6260830760002136, -1.1611448526382446, -1.3512767553329468, -0.5009811520576477, -1.0113147497177124, -0.9320654273033142, 1.040234923362732, 0.7777773141860962, 0.31404823064804077, 1.888146162033081, 0.5986231565475464, 0.24366633594036102, -2.641065835952759, 0.8782265782356262, 0.29348886013031006, -0.0664215236902237, 0.8904094696044922, 0.3003315031528473, 0.9778081178665161, -0.023929454386234283, 0.5195797085762024, -2.3809926509857178, 2.309990406036377, -0.23386037349700928, 0.7362462282180786, -0.007812706753611565, -0.043710630387067795, 1.0748790502548218, 0.5916935205459595, 0.5912854671478271, -1.0290614366531372, 0.7298261523246765, -0.6133742332458496, 1.2677805423736572, 0.8569811582565308, -0.8169608116149902, -0.06260009109973907, 1.2892162799835205, 0.41380739212036133, -0.5394964218139648, -0.9154845476150513, -0.9848482012748718, 0.9739831686019897, 1.7993556261062622, -0.0816183090209961, -0.005296941846609116, 0.8007760047912598, 0.5973504781723022, -1.4064773321151733, -0.001626372803002596, -0.6975054740905762, -0.6928749680519104, 1.6508115530014038, 2.1242516040802, -0.11072763800621033, -0.23482009768486023, -0.7071961760520935, -1.2751375436782837, 0.7527111768722534, -0.007454428821802139, 0.1698356419801712, 0.6812905669212341, -0.6036247611045837, 1.1083645820617676, 0.893287181854248, 0.9452307224273682, 0.16045887768268585, 0.23739783465862274, 0.31677132844924927, -0.2720434069633484, -1.1699713468551636, -0.2322038859128952, -1.0095781087875366, -2.570072889328003, 0.46800562739372253, -0.15763479471206665, -1.4807991981506348, 0.06860687583684921, -0.9138326644897461, 0.9534949064254761, -0.534751832485199, -1.087644338607788, -1.525294542312622, 0.1882278025150299, -0.092095285654068, 0.8961833119392395, -1.5864392518997192, -0.11121424287557602, 1.2878860235214233, 0.9908043146133423, -0.6127851009368896, 1.0997633934020996, 0.25625309348106384, 1.0370604991912842, 0.8407396078109741, -0.3172554075717926, 0.5645384788513184, 0.07005937397480011, -1.2897504568099976, 0.3944551944732666, 1.1978859901428223, 0.200301855802536, 1.422375202178955, -0.5888820886611938, -0.020553147420287132, 0.4196886420249939, -0.5429198741912842, -0.45140522718429565, -0.5170792937278748, 0.6541669368743896, 0.0614912323653698, -0.876530110836029, -0.09819084405899048, -0.03507499769330025, -0.2256646752357483, 0.20196250081062317, -1.5705771446228027, -0.1728663146495819, -0.40503087639808655, -0.6247182488441467, -1.2350225448608398, -0.07087396085262299, 1.4025957584381104, -0.8693941831588745, -0.243726447224617, 0.4342120289802551, 0.37462058663368225, 0.5707351565361023, 0.6878086924552917, -0.7119734287261963, -0.32222139835357666, -0.17330285906791687, -0.3347560465335846, 0.3259396553039551, 1.4091565608978271, -0.09596490114927292, -1.0285224914550781, 0.7107391953468323, -0.334322988986969, 0.15197765827178955, 1.9144641160964966, 0.07739899307489395, -0.8355705142021179, 0.2049453854560852, -0.7728754281997681, 1.9304711818695068, 1.615466833114624, 1.3890905380249023, -0.14878489077091217, -0.9693323373794556, 0.6571247577667236, -0.2981613874435425, -0.382070392370224, 0.8779157996177673, 0.4994656443595886, -0.24732336401939392, -1.3601559400558472, 0.6775816679000854, 1.2000362873077393, -0.8957228660583496, -0.8008330464363098, 0.1375323385000229, -0.7779231667518616, 1.1077601909637451, 0.7302718162536621, 0.34819042682647705, 0.285069078207016, 1.6106072664260864, 0.7537663578987122, -0.5229060053825378, 0.49495381116867065, 0.4980553388595581, -0.18000932037830353, -2.0843756198883057, -1.0530879497528076, 0.3620532751083374, -0.5491228699684143, -1.6117098331451416, 1.3674291372299194, -1.161266803741455, -0.9106531143188477, 0.522219717502594, 0.08528230339288712, 1.3915528059005737, 0.38944751024246216, 1.6055182218551636, 2.0641682147979736, 0.9096537828445435, 0.34219518303871155, 1.2843228578567505, -0.21978043019771576, -0.5084384679794312, 1.7698707580566406, -0.45202696323394775, 0.5177642107009888, 1.1024740934371948, -0.29426679015159607, -0.9977068305015564, -0.7558920979499817, -1.2697949409484863, -0.6858402490615845, 1.1397427320480347, 0.10859070718288422, -1.1513752937316895, 0.25055715441703796, 1.570946455001831, 0.1222110390663147, -0.2881684899330139, 0.6045758724212646, 0.4014921486377716, -0.8170945644378662, -0.08280645310878754, -0.9305655360221863, 0.4564375579357147, -0.26217392086982727, -0.3721299171447754, 0.26586049795150757, 0.42975080013275146, 1.3233522176742554, -0.005624612793326378, 0.1479671746492386, 1.2131142616271973, -1.3910069465637207, 1.4947497844696045, -0.7191826701164246, 0.30802997946739197, -2.3568546772003174, 1.3392771482467651, -0.8238213062286377, 1.9525169134140015, -2.7136104106903076, 0.503720223903656, -0.5783746838569641, -0.45821094512939453, 0.27167385816574097, -0.2865343987941742, 0.15762685239315033, -0.10661684721708298, -1.1583999395370483, -0.11609421670436859, -0.6549314856529236, 0.576373279094696, 1.1484745740890503, 1.3367823362350464, -1.0754122734069824, -0.2374556064605713, -1.7348226308822632, -0.20793747901916504, -0.8325035572052002, 0.3247194290161133, -1.961546778678894, -0.19465674459934235, -1.875476598739624, -2.3964040279388428, -1.2601370811462402, -0.8115643262863159, 1.1621897220611572, 0.07234510034322739, -0.8523756265640259, 1.231356143951416, -0.38031551241874695, -1.8605929613113403, 1.142370581626892, -2.1520113945007324 ]
https://github.com/huggingface/datasets/issues/5536
Failure to hash function when using .map()
@lhoestq @edhenry I am on datasets version `'2.12.0'. I see the same `TypeError: cannot pickle 'builtins.CoreBPE' object` that others are seeing.
### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0
298
21
Failure to hash function when using .map() ### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0 @lhoestq @edhenry I am on datasets version `'2.12.0'. I see the same `TypeError: cannot pickle 'builtins.CoreBPE' object` that others are seeing.
[ -1.2881124019622803, -1.003926396369934, -0.6919583678245544, 1.4989726543426514, -0.18968906998634338, -1.1030694246292114, 0.09339943528175354, -1.042127251625061, 1.690084457397461, -0.7929410934448242, 0.23975349962711334, -1.664184331893921, 0.024867696687579155, -0.5398193597793579, -0.7331407070159912, -0.8130448460578918, -0.35813090205192566, -0.7698228359222412, 1.163767695426941, 2.5717668533325195, 1.1921814680099487, -1.3929888010025024, 2.767477035522461, 0.7113366723060608, -0.21512611210346222, -1.001404047012329, 0.5434237122535706, 0.039995238184928894, -1.3732811212539673, -0.3957660496234894, -0.9494122266769409, -0.034003451466560364, -0.5217057466506958, -0.5092758536338806, 0.048556216061115265, 0.361996591091156, -0.2620391845703125, -0.5567042231559753, -0.4976826310157776, -0.8155201077461243, 0.4707947075366974, -0.3976952135562897, 0.8267569541931152, -0.308700293302536, 1.8474094867706299, -0.5526723265647888, 0.4598860442638397, 0.6609726548194885, 1.2747077941894531, 0.20399154722690582, -0.05068501830101013, 0.40474554896354675, 0.3767766058444977, 0.036842264235019684, 0.5372543334960938, 1.149430513381958, 0.632655143737793, 0.40117591619491577, 0.7576536536216736, -2.217067241668701, 1.3189982175827026, -1.0350515842437744, 0.27023810148239136, 1.3009397983551025, -0.9651910662651062, 0.4071960151195526, -1.7595891952514648, -0.05601368099451065, 0.5703672170639038, -2.205782651901245, 0.23854172229766846, -1.278721570968628, -0.4883720874786377, 1.061730980873108, 0.36983323097229004, -1.2831172943115234, 0.09764162451028824, -0.5022989511489868, 1.0455970764160156, 0.38756263256073, 1.1247453689575195, -1.70526123046875, -0.06599856913089752, -0.3436029851436615, 0.11792271584272385, -1.3302209377288818, -1.5467771291732788, 0.5360320806503296, 0.6539573669433594, 0.550588846206665, -0.12172091752290726, 1.0259650945663452, -1.054296612739563, 0.7317904233932495, -1.0267221927642822, -1.7725154161453247, -1.3877472877502441, -2.337498664855957, -2.2266457080841064, 0.7425901889801025, -0.39477548003196716, -0.5456637740135193, 2.0230600833892822, -1.0377339124679565, -1.770465612411499, 1.1534446477890015, 0.22533835470676422, -0.031193358823657036, 2.4075636863708496, 0.23084460198879242, -0.7562945485115051, 0.4715217351913452, -0.8042297959327698, 0.7397000789642334, -0.37054643034935, 1.43032705783844, 0.3791320025920868, -0.9931932091712952, 1.5428478717803955, -0.32668536901474, 0.565191388130188, -0.6397608518600464, -0.5072139501571655, -0.731233537197113, 0.23261071741580963, 2.0008904933929443, -0.32688450813293457, 1.5573279857635498, -0.3711017072200775, -1.6022907495498657, -1.576688289642334, 0.8157998919487, 0.5259625911712646, -0.7382788062095642, 0.1536148488521576, -0.37040016055107117, 0.11158627271652222, -0.014634065330028534, 1.1081146001815796, 1.3031995296478271, 0.7154979109764099, -0.27173808217048645, -0.8680177927017212, 0.1907852292060852, -0.11716029793024063, -0.7374411821365356, -1.7839813232421875, -0.29741498827934265, 0.04491790384054184, 0.6946967244148254, -1.2888492345809937, 1.6146191358566284, 0.9688206911087036, 1.934631586074829, 1.0487737655639648, -0.3124406039714813, 1.4899711608886719, 0.10676052421331406, 1.7790545225143433, -0.4513898491859436, 0.7221116423606873, -0.35354724526405334, -1.138269066810608, 0.7883335947990417, -0.3460274636745453, -2.0436666011810303, -0.7703351378440857, -0.7754403948783875, -0.21064257621765137, -0.773880660533905, 0.9100755453109741, -0.2957439124584198, -1.453869342803955, 0.24822571873664856, -0.802212655544281, 0.17380715906620026, -1.1832497119903564, 0.2603297531604767, 0.7617194652557373, -0.6210159659385681, 0.11255721002817154, -0.26255378127098083, -1.2796366214752197, -0.4359496533870697, 0.32216787338256836, 1.8369852304458618, -0.8154872059822083, 0.9265248775482178, 1.0349124670028687, -0.7153446674346924, -0.03338000923395157, 0.29825517535209656, -0.28070583939552307, 0.8629088997840881, -1.0409207344055176, -0.426360547542572, 1.1906102895736694, -0.2341981679201126, -0.5807778239250183, 1.4460293054580688, 0.6217465996742249, -1.0274344682693481, -0.22370465099811554, -0.11599231511354446, -0.8892568349838257, 0.02743355743587017, -1.6651716232299805, -0.18757905066013336, 0.39928609132766724, -1.6284409761428833, -0.47355154156684875, -0.24969761073589325, 1.3249558210372925, -0.06906309723854065, 1.422277569770813, -0.34613466262817383, -0.1724184900522232, -0.3144378960132599, -0.3711157441139221, 0.18856772780418396, -0.20831122994422913, -0.6108578443527222, 0.2561190128326416, -0.8213690519332886, 0.32849907875061035, 1.4957003593444824, 0.36435359716415405, 0.005356215871870518, 0.5461125373840332, 1.0098425149917603, 0.41141727566719055, -0.11544755101203918, -0.7915024757385254, -1.6556212902069092, 2.0380306243896484, -1.459371566772461, 2.0177435874938965, 0.7515743374824524, -0.017942283302545547, -1.8436322212219238, -1.9466423988342285, 1.338193655014038, 1.1021798849105835, 2.359003782272339, 0.6047184467315674, 0.43211498856544495, -0.802477240562439, -0.680290699005127, 0.28982675075531006, -0.9727929830551147, -0.8361327648162842, 0.15646860003471375, 2.376182794570923, 1.716400384902954, -0.4217506945133209, -0.1475013941526413, -1.002217173576355, 1.4014447927474976, -0.1117054745554924, 0.2192322164773941, 1.9366652965545654, -0.2013029307126999, -1.0545051097869873, 1.2459535598754883, -2.3424060344696045, 0.16909219324588776, 1.945807933807373, 0.2548140287399292, 0.1328684240579605, -1.4273974895477295, -0.6825501322746277, -0.2575497329235077, -0.34281405806541443, -1.1954997777938843, 0.5487605929374695, -0.23369020223617554, -0.8574912548065186, -1.4973455667495728, 0.09751293063163757, -1.1278631687164307, -1.650567889213562, 0.3022237718105316, 1.8900806903839111, 2.0748846530914307, -0.7806705236434937, 1.5990818738937378, -0.26292508840560913, 0.13583078980445862, 1.2400002479553223, 1.1651629209518433, 3.0803062915802, 1.8758397102355957, -1.2956786155700684, 0.6490607261657715, -0.0929657444357872, -0.40792936086654663, 1.0909640789031982, -1.2097340822219849, 1.3183534145355225, -0.0932084396481514, -1.1426364183425903, -1.2079116106033325, 0.9400023221969604, 0.4911592900753021, 0.016694769263267517, -0.39318084716796875, 1.2583423852920532, 0.027735931798815727, 1.3740277290344238, 0.5174362063407898, -0.2863650918006897, 0.619461178779602, -0.440310537815094, -0.47996559739112854, 1.5194706916809082, 0.20810669660568237, -1.39525306224823, -2.2387328147888184, -0.22463680803775787, -0.8100912570953369, 0.09655968844890594, -0.6078743934631348, -0.9829699397087097, 1.603624701499939, 0.39284852147102356, -1.1844112873077393, -0.22401022911071777, -0.35590171813964844, -0.5808244347572327, 2.665091037750244, -1.4068800210952759, -0.21363024413585663, -1.0022826194763184, -0.6091334223747253, 1.5440137386322021, -1.2123628854751587, -0.2570090591907501, -0.999357283115387, -0.5772948861122131, -1.2731976509094238, -0.5769186019897461, 0.032782599329948425, -0.9745150208473206, 0.8592051863670349, 0.20234550535678864, -1.1269716024398804, -0.35105979442596436, -0.8771430253982544, 0.914980947971344, -0.07218238711357117, 0.16567182540893555, 1.851792812347412, 0.3222231864929199, -0.367269903421402, 0.8095908164978027, 1.1737561225891113, 0.6466375589370728, -0.6051770448684692, 0.21865104138851166, -0.6442280411720276, 0.38001424074172974, -1.2881447076797485, 0.26971665024757385, -2.874335527420044, 0.6103478074073792, -0.07612936198711395, 0.008675450459122658, 0.0180986151099205, -1.3006608486175537, 1.1158283948898315, 2.625603675842285, -1.1815236806869507, 0.536519467830658, 0.3506271243095398, 1.150036334991455, -1.5496970415115356, 0.34991514682769775, -0.44128626585006714, 2.143686294555664, 0.2668653726577759, 1.2070200443267822, -0.4982571005821228, -2.2846171855926514, 0.6374043822288513, -1.2995227575302124, -1.1401231288909912, 0.7027869820594788, -0.8521337509155273, 0.0998244434595108, -1.4427530765533447, -0.22738733887672424, -0.8304077982902527, -1.2178153991699219, 0.5749619007110596, 0.197496235370636, 0.44276320934295654, -0.5814134478569031, 0.3904832899570465, -2.2013516426086426, -1.3310517072677612, -0.2678981423377991, -0.9791203737258911, 0.44751596450805664, -0.39485475420951843, 0.7164317965507507, -0.1737864762544632, 0.0018264707177877426, 0.3307751417160034, 1.3448354005813599, 3.390040636062622, 0.14626574516296387, 0.2626000940799713, -0.22431203722953796, -0.9740317463874817, 1.4590660333633423, 0.9255328178405762, -0.2144482284784317, -0.5877431631088257, -1.066646933555603, 1.2107409238815308, 1.958516240119934, 1.004034161567688, -0.0033013601787388325, -0.7986849546432495, -0.7553662657737732, 0.010465091094374657, 0.1750917285680771, 0.4736805856227875, 0.9297512173652649, 0.0652623325586319, 0.11535303294658661, 1.5223010778427124, 1.1803545951843262, -0.44482699036598206, 0.39323529601097107, -0.8248812556266785, -0.4567069709300995, 0.4898369014263153, 0.29446807503700256, -0.06728317588567734, 0.3234272003173828, -1.0173887014389038, -0.21176257729530334, -0.32814720273017883, -0.9696219563484192, -0.6852675676345825, -0.3435845971107483, -0.33905184268951416, 1.6142162084579468, 0.16511240601539612, -0.5031266808509827, -0.13421303033828735, -0.7358848452568054, -0.038055889308452606, -1.0500653982162476, 0.3328738808631897, -0.12500233948230743, -0.0984034389257431, -0.12504327297210693, 1.7755637168884277, -0.8986251950263977, -2.067413568496704, 0.2538526654243469, 0.19471406936645508, -0.2647581994533539, 0.1510065197944641, 1.6509782075881958, 0.6229569911956787, 1.471925139427185, 1.3358287811279297, 0.8672413229942322, -0.6535202860832214, -1.3389285802841187, 0.6249885559082031, 0.9689601063728333, -1.3960620164871216, 0.701911985874176, -0.006640042178332806, -0.5115622878074646, 0.6103422045707703, 1.36025071144104, 0.5290465950965881, -1.931610345840454, 0.84688800573349, -0.9650604128837585, 0.7701402902603149, 0.7516964673995972, 0.7487279772758484, 0.15129444003105164, 0.7881485223770142, -1.2621129751205444, -1.097172737121582, -0.7397571802139282, -0.6831839680671692, 1.9765567779541016, -0.26322484016418457, 0.5478306412696838, -0.18122488260269165, -1.3234691619873047, -0.052121274173259735, 0.6528233885765076, 0.2889990508556366, -0.4217134118080139, 0.7803813219070435, -0.624593198299408, -1.1610885858535767, -1.3490720987319946, -0.5048841834068298, -1.0144070386886597, -0.9368277192115784, 1.0457813739776611, 0.772750973701477, 0.3189312219619751, 1.8918951749801636, 0.5925694108009338, 0.24726656079292297, -2.639742612838745, 0.8758844137191772, 0.2963630259037018, -0.06886175274848938, 0.8893908858299255, 0.30544665455818176, 0.9845812916755676, -0.025150030851364136, 0.5208479762077332, -2.382467746734619, 2.313873052597046, -0.23002482950687408, 0.733101487159729, -0.005914250388741493, -0.0399802029132843, 1.0758469104766846, 0.5955569744110107, 0.5901539921760559, -1.031485676765442, 0.726372241973877, -0.61686772108078, 1.2661675214767456, 0.852031946182251, -0.8124915957450867, -0.06487956643104553, 1.2914912700653076, 0.4194148778915405, -0.5362586379051208, -0.9093567728996277, -0.9879541397094727, 0.9729456901550293, 1.79581618309021, -0.08016329258680344, -0.0026816418394446373, 0.7989647388458252, 0.6022017002105713, -1.405842661857605, 0.001822473481297493, -0.6987324953079224, -0.69114750623703, 1.6474599838256836, 2.126995325088501, -0.117503821849823, -0.23546254634857178, -0.7079395651817322, -1.2749637365341187, 0.7548872232437134, -0.0076019251719117165, 0.17431104183197021, 0.6801108717918396, -0.6045350432395935, 1.1066421270370483, 0.8892483711242676, 0.9438647627830505, 0.16249504685401917, 0.23716408014297485, 0.30919185280799866, -0.2707109749317169, -1.1695098876953125, -0.2342764139175415, -1.0068435668945312, -2.56938099861145, 0.468565434217453, -0.1543186604976654, -1.4709218740463257, 0.06471320241689682, -0.9146981835365295, 0.9513202905654907, -0.5324342846870422, -1.0925886631011963, -1.5264350175857544, 0.18222002685070038, -0.09727270901203156, 0.9006400108337402, -1.5920544862747192, -0.11744549125432968, 1.2875158786773682, 0.990405261516571, -0.614691972732544, 1.1018855571746826, 0.25798702239990234, 1.0359972715377808, 0.8407631516456604, -0.3155139088630676, 0.5645745992660522, 0.06617776304483414, -1.287573218345642, 0.3972066640853882, 1.1987839937210083, 0.19714392721652985, 1.425911545753479, -0.5916014909744263, -0.019067976623773575, 0.42379656434059143, -0.5434783101081848, -0.45397186279296875, -0.5210983753204346, 0.6515535116195679, 0.05912758409976959, -0.8752322793006897, -0.0940188616514206, -0.03231767565011978, -0.22619301080703735, 0.19665715098381042, -1.5680532455444336, -0.1660662144422531, -0.40374255180358887, -0.6262826919555664, -1.2396187782287598, -0.06553450971841812, 1.3964626789093018, -0.8714050054550171, -0.2428099811077118, 0.4313187003135681, 0.3721592426300049, 0.5605936050415039, 0.6858987212181091, -0.7127267122268677, -0.326421320438385, -0.17186641693115234, -0.3363630473613739, 0.33120959997177124, 1.41036057472229, -0.09562183916568756, -1.0361789464950562, 0.7051851153373718, -0.325888454914093, 0.15277117490768433, 1.9169938564300537, 0.07205961644649506, -0.8352182507514954, 0.2022211253643036, -0.7710729241371155, 1.9339015483856201, 1.618006944656372, 1.3896657228469849, -0.1538289338350296, -0.9711304903030396, 0.6526433229446411, -0.30123117566108704, -0.38295862078666687, 0.8786957263946533, 0.49544546008110046, -0.2489621341228485, -1.3596364259719849, 0.6753427386283875, 1.2009137868881226, -0.8926119804382324, -0.7949572801589966, 0.13922378420829773, -0.7778180241584778, 1.1092232465744019, 0.727300763130188, 0.3432382643222809, 0.2788578271865845, 1.6081081628799438, 0.7563108801841736, -0.5247928500175476, 0.5000749826431274, 0.497004896402359, -0.17138178646564484, -2.081639289855957, -1.0510281324386597, 0.3672267496585846, -0.5511903762817383, -1.614864706993103, 1.3709514141082764, -1.160844087600708, -0.9118173122406006, 0.5264437794685364, 0.08509845286607742, 1.3935675621032715, 0.3844769597053528, 1.613667607307434, 2.0662643909454346, 0.905121922492981, 0.34189555048942566, 1.2840789556503296, -0.21889010071754456, -0.5126858949661255, 1.7664611339569092, -0.45525285601615906, 0.5128548741340637, 1.1061341762542725, -0.2956940829753876, -0.9939149618148804, -0.7614221572875977, -1.2750076055526733, -0.6871116161346436, 1.1327790021896362, 0.10740018635988235, -1.1519683599472046, 0.24730634689331055, 1.5718270540237427, 0.1210947260260582, -0.2887296974658966, 0.6060099005699158, 0.3988903760910034, -0.814207136631012, -0.08560925722122192, -0.9304015040397644, 0.4590149521827698, -0.26795142889022827, -0.37712952494621277, 0.2649036943912506, 0.4291015565395355, 1.3252533674240112, -0.010959569364786148, 0.14866910874843597, 1.2191622257232666, -1.392364263534546, 1.4956419467926025, -0.7218307852745056, 0.30761271715164185, -2.354314088821411, 1.334627628326416, -0.823846161365509, 1.9551562070846558, -2.7154078483581543, 0.5018858313560486, -0.5786778330802917, -0.4551480710506439, 0.27090784907341003, -0.28513890504837036, 0.15825802087783813, -0.10467793792486191, -1.1545592546463013, -0.12733888626098633, -0.6544339656829834, 0.5804515480995178, 1.1482653617858887, 1.3383985757827759, -1.0755524635314941, -0.23701682686805725, -1.7313839197158813, -0.20930896699428558, -0.8252119421958923, 0.3285382390022278, -1.9573657512664795, -0.2013552337884903, -1.8762530088424683, -2.3916704654693604, -1.2621586322784424, -0.806449830532074, 1.16383695602417, 0.0694916620850563, -0.8534702062606812, 1.2291840314865112, -0.38040822744369507, -1.859934687614441, 1.1386754512786865, -2.1524980068206787 ]
https://github.com/huggingface/datasets/issues/5536
Failure to hash function when using .map()
I am able to reproduce this on datasets 2.14.2. The `datasets.disable_caching()` doesn't work around it. @lhoestq - you might want to reopen this issue. Because of this issue folks won't be able run Karpathy's NanoGPT :(.
### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0
298
36
Failure to hash function when using .map() ### Describe the bug _Parameter 'function'=<function process at 0x7f1ec4388af0> of the transform datasets.arrow_dataset.Dataset.\_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed._ This issue with `.map()` happens for me consistently, as also described in closed issue #4506 Dataset indices can be individually serialized using dill and pickle without any errors. I'm using tiktoken to encode in the function passed to map(). Similarly, indices can be individually encoded without error. ### Steps to reproduce the bug ```py from datasets import load_dataset import tiktoken dataset = load_dataset("stas/openwebtext-10k") enc = tiktoken.get_encoding("gpt2") tokenized = dataset.map( process, remove_columns=['text'], desc="tokenizing the OWT splits", ) def process(example): ids = enc.encode(example['text']) ids.append(enc.eot_token) out = {'ids': ids, 'len': len(ids)} return out ``` ### Expected behavior Should encode simple text objects. ### Environment info Python versions tried: both 3.8 and 3.10.10 `PYTHONUTF8=1` as env variable Datasets tried: - stas/openwebtext-10k - rotten_tomatoes - local text file OS: Ubuntu Linux 20.04 Package versions: - torch 1.13.1 - dill 0.3.4 (if using 0.3.6 - same issue) - datasets 2.9.0 - tiktoken 0.2.0 I am able to reproduce this on datasets 2.14.2. The `datasets.disable_caching()` doesn't work around it. @lhoestq - you might want to reopen this issue. Because of this issue folks won't be able run Karpathy's NanoGPT :(.
[ -1.287795066833496, -1.004431128501892, -0.6955685019493103, 1.4929314851760864, -0.19046670198440552, -1.1076983213424683, 0.0928802639245987, -1.0458276271820068, 1.6926813125610352, -0.7969526648521423, 0.2435372918844223, -1.659211277961731, 0.030743863433599472, -0.5391830205917358, -0.7340918779373169, -0.8183786273002625, -0.35969868302345276, -0.7704979181289673, 1.1607989072799683, 2.5746941566467285, 1.1906511783599854, -1.398949146270752, 2.763314962387085, 0.7099236845970154, -0.21180680394172668, -1.009976863861084, 0.5435425639152527, 0.044119082391262054, -1.3700922727584839, -0.398756742477417, -0.9441578388214111, -0.03279222175478935, -0.5239579081535339, -0.5107524394989014, 0.046125609427690506, 0.365351140499115, -0.26345276832580566, -0.5590859651565552, -0.49528440833091736, -0.8126267790794373, 0.4706813097000122, -0.40355777740478516, 0.8291535377502441, -0.3151637613773346, 1.84321928024292, -0.5492035746574402, 0.45862409472465515, 0.6645519137382507, 1.2772239446640015, 0.20263533294200897, -0.05351514741778374, 0.40482568740844727, 0.37704816460609436, 0.03709099441766739, 0.5340314507484436, 1.1446170806884766, 0.6305780410766602, 0.4012204706668854, 0.7532051801681519, -2.2134902477264404, 1.3213049173355103, -1.0309096574783325, 0.27265480160713196, 1.2973138093948364, -0.9615457057952881, 0.4101247787475586, -1.765758991241455, -0.06047375127673149, 0.5732832551002502, -2.2081634998321533, 0.23863042891025543, -1.2779163122177124, -0.48950082063674927, 1.0654569864273071, 0.3695327639579773, -1.286514163017273, 0.09747738391160965, -0.5011556148529053, 1.046343207359314, 0.39138662815093994, 1.1266034841537476, -1.6942211389541626, -0.06489469110965729, -0.3434274196624756, 0.11672404408454895, -1.329750657081604, -1.5490914583206177, 0.5343120694160461, 0.6555377244949341, 0.5495797395706177, -0.11595045775175095, 1.0259935855865479, -1.0566519498825073, 0.7330141663551331, -1.0223956108093262, -1.7764203548431396, -1.3873757123947144, -2.3408281803131104, -2.227633237838745, 0.744353711605072, -0.39400768280029297, -0.5423323512077332, 2.0252370834350586, -1.0457152128219604, -1.7719570398330688, 1.1547337770462036, 0.2209671288728714, -0.031247682869434357, 2.4052300453186035, 0.22495342791080475, -0.7572181820869446, 0.4723814129829407, -0.7994802594184875, 0.7433828115463257, -0.3745434582233429, 1.4291417598724365, 0.37851855158805847, -0.995492160320282, 1.5457097291946411, -0.3244677186012268, 0.5688563585281372, -0.6400640606880188, -0.5031497478485107, -0.7337759137153625, 0.2385970652103424, 2.000757932662964, -0.3270762264728546, 1.5615577697753906, -0.37059885263442993, -1.6004003286361694, -1.5753443241119385, 0.81451815366745, 0.5320532321929932, -0.7419561147689819, 0.1526457965373993, -0.3684302568435669, 0.10901706665754318, -0.011766706593334675, 1.1086903810501099, 1.3070385456085205, 0.7108311057090759, -0.2696630656719208, -0.8716375827789307, 0.19823269546031952, -0.11531495302915573, -0.738863468170166, -1.7866088151931763, -0.29807713627815247, 0.04587940871715546, 0.6901077628135681, -1.2862281799316406, 1.616835594177246, 0.9709603190422058, 1.935348391532898, 1.0518321990966797, -0.3132821321487427, 1.4875348806381226, 0.10616859793663025, 1.776948094367981, -0.4457022249698639, 0.7251873016357422, -0.3429168164730072, -1.1386873722076416, 0.789408802986145, -0.3469617962837219, -2.0521469116210938, -0.7709718942642212, -0.769176721572876, -0.20814864337444305, -0.7691503763198853, 0.911873459815979, -0.29267609119415283, -1.4503885507583618, 0.24528346955776215, -0.8008997440338135, 0.16993166506290436, -1.1842437982559204, 0.2573681175708771, 0.757387101650238, -0.6238629817962646, 0.11126123368740082, -0.2696473002433777, -1.276045799255371, -0.43591028451919556, 0.32646751403808594, 1.8327380418777466, -0.8158494830131531, 0.9253649115562439, 1.0374867916107178, -0.7119400501251221, -0.029594607651233673, 0.30032211542129517, -0.2847128212451935, 0.8629451394081116, -1.044336199760437, -0.4293885827064514, 1.1873493194580078, -0.2333052009344101, -0.5749820470809937, 1.4418479204177856, 0.6180941462516785, -1.0223513841629028, -0.2196529060602188, -0.11777288466691971, -0.889946699142456, 0.028466705232858658, -1.6681287288665771, -0.18743519484996796, 0.3982865810394287, -1.6302685737609863, -0.4753982722759247, -0.25237518548965454, 1.3187849521636963, -0.0705607533454895, 1.423900842666626, -0.34680861234664917, -0.17443551123142242, -0.30939579010009766, -0.37298810482025146, 0.19175782799720764, -0.20584134757518768, -0.6148977875709534, 0.25494393706321716, -0.8250338435173035, 0.32587921619415283, 1.4950438737869263, 0.3594076335430145, 0.003840937279164791, 0.5438292622566223, 1.009495496749878, 0.404964804649353, -0.12012950330972672, -0.7895136475563049, -1.6538128852844238, 2.037402391433716, -1.4595887660980225, 2.019890308380127, 0.7546557188034058, -0.01419246755540371, -1.8450169563293457, -1.9415212869644165, 1.3427482843399048, 1.0985937118530273, 2.3598499298095703, 0.611884593963623, 0.4268072843551636, -0.8042371869087219, -0.6824727654457092, 0.28939059376716614, -0.9713423252105713, -0.837683916091919, 0.14791002869606018, 2.3712291717529297, 1.714266300201416, -0.4207228422164917, -0.1460524946451187, -1.0030934810638428, 1.4033701419830322, -0.11520916223526001, 0.21857650578022003, 1.9398170709609985, -0.1985253542661667, -1.0547688007354736, 1.2512125968933105, -2.3433938026428223, 0.17384576797485352, 1.946647047996521, 0.25000232458114624, 0.1287040412425995, -1.430202603340149, -0.6758224964141846, -0.2564231753349304, -0.3348705470561981, -1.1959987878799438, 0.5464340448379517, -0.23607586324214935, -0.8587202429771423, -1.4968210458755493, 0.09407872706651688, -1.1321918964385986, -1.6473873853683472, 0.30515405535697937, 1.8899554014205933, 2.074908494949341, -0.7746084332466125, 1.6016734838485718, -0.2662891149520874, 0.12880362570285797, 1.236938238143921, 1.1613191366195679, 3.0834054946899414, 1.871753454208374, -1.3011796474456787, 0.6456812620162964, -0.09086143970489502, -0.4039846658706665, 1.0905159711837769, -1.2044665813446045, 1.3201829195022583, -0.09996876865625381, -1.142800211906433, -1.2022349834442139, 0.9425477385520935, 0.4945162832736969, 0.021726787090301514, -0.39918917417526245, 1.2604506015777588, 0.02357175201177597, 1.3679641485214233, 0.513849139213562, -0.2892081141471863, 0.6240605711936951, -0.4376528859138489, -0.4831499755382538, 1.5165570974349976, 0.20209039747714996, -1.3998613357543945, -2.244352102279663, -0.22683481872081757, -0.8086615204811096, 0.09750013798475266, -0.6088427305221558, -0.9852901697158813, 1.6072911024093628, 0.39135435223579407, -1.1808199882507324, -0.23110239207744598, -0.3565416932106018, -0.5846080780029297, 2.6684277057647705, -1.3972772359848022, -0.21598751842975616, -1.0026484727859497, -0.6053949594497681, 1.5411962270736694, -1.2121055126190186, -0.2529875934123993, -0.9980759620666504, -0.575485110282898, -1.2726941108703613, -0.5798901915550232, 0.036943309009075165, -0.9751171469688416, 0.8611742854118347, 0.20232418179512024, -1.1280757188796997, -0.3470028042793274, -0.8777166604995728, 0.9120094776153564, -0.07322912663221359, 0.16702517867088318, 1.8466947078704834, 0.32075372338294983, -0.36177992820739746, 0.8142346143722534, 1.1704498529434204, 0.6465771794319153, -0.6028316617012024, 0.21821604669094086, -0.6394553184509277, 0.37562480568885803, -1.287176489830017, 0.27455395460128784, -2.874540328979492, 0.6149453520774841, -0.07329858094453812, 0.01571105420589447, 0.017605643719434738, -1.2981483936309814, 1.1097705364227295, 2.6330406665802, -1.1847097873687744, 0.5396686792373657, 0.3487197756767273, 1.1487358808517456, -1.554627537727356, 0.3491418957710266, -0.4409325420856476, 2.1456313133239746, 0.2654375433921814, 1.2069745063781738, -0.5005864500999451, -2.280660629272461, 0.6415303349494934, -1.2955948114395142, -1.140315294265747, 0.7017093896865845, -0.8552758693695068, 0.09536771476268768, -1.4403786659240723, -0.22661928832530975, -0.8318766951560974, -1.2083326578140259, 0.573885440826416, 0.1965130865573883, 0.4427530765533447, -0.5835239887237549, 0.38388901948928833, -2.2028987407684326, -1.3347551822662354, -0.27036574482917786, -0.9829328656196594, 0.44229063391685486, -0.3931170701980591, 0.7133461236953735, -0.16419032216072083, -0.00024173874408006668, 0.32259461283683777, 1.3455287218093872, 3.3873462677001953, 0.14335177838802338, 0.2601062059402466, -0.22050650417804718, -0.9728484749794006, 1.4602789878845215, 0.9164990782737732, -0.20697344839572906, -0.5929420590400696, -1.0613189935684204, 1.2108951807022095, 1.959637999534607, 1.0038435459136963, 0.0005465364083647728, -0.8060644865036011, -0.7522304058074951, 0.006470556370913982, 0.175343319773674, 0.4809315800666809, 0.9320294857025146, 0.060967817902565, 0.1125749945640564, 1.5269907712936401, 1.1813050508499146, -0.44308510422706604, 0.39700376987457275, -0.8267322182655334, -0.45499351620674133, 0.4862450659275055, 0.29190364480018616, -0.06004565209150314, 0.3265073299407959, -1.0183706283569336, -0.20632410049438477, -0.3297405242919922, -0.9692785739898682, -0.6869361400604248, -0.3448253571987152, -0.3369356691837311, 1.616921305656433, 0.16441386938095093, -0.4968567490577698, -0.13154064118862152, -0.734920084476471, -0.03875835984945297, -1.0424906015396118, 0.3313237130641937, -0.12355844676494598, -0.0981876328587532, -0.12232168763875961, 1.7746753692626953, -0.899717390537262, -2.0717670917510986, 0.25300124287605286, 0.1903320848941803, -0.2665557861328125, 0.15381976962089539, 1.6507774591445923, 0.6235158443450928, 1.4660861492156982, 1.3367409706115723, 0.8673356175422668, -0.6579819917678833, -1.3306699991226196, 0.6197881102561951, 0.976671040058136, -1.3974624872207642, 0.7045895457267761, -0.002495135646313429, -0.5153588652610779, 0.6153691411018372, 1.3661770820617676, 0.5296851992607117, -1.9356913566589355, 0.8472116589546204, -0.9627230763435364, 0.7702080011367798, 0.7460576295852661, 0.7441324591636658, 0.15081369876861572, 0.7941964268684387, -1.2624744176864624, -1.0938224792480469, -0.7482698559761047, -0.6804407835006714, 1.9768904447555542, -0.26273947954177856, 0.5475230813026428, -0.1835864633321762, -1.3252309560775757, -0.05614156275987625, 0.6517288088798523, 0.2968836724758148, -0.4172919988632202, 0.7809260487556458, -0.621857225894928, -1.156383752822876, -1.3522974252700806, -0.501627504825592, -1.0128364562988281, -0.9352052807807922, 1.0430985689163208, 0.7725555896759033, 0.31452620029449463, 1.8879507780075073, 0.5943178534507751, 0.24193809926509857, -2.6426033973693848, 0.8768370151519775, 0.29810887575149536, -0.06909661740064621, 0.8905085921287537, 0.304146945476532, 0.9864242672920227, -0.024280115962028503, 0.5252713561058044, -2.3803577423095703, 2.310328483581543, -0.23088319599628448, 0.7369527816772461, -0.0032230806536972523, -0.043457407504320145, 1.076640248298645, 0.5901418924331665, 0.5924577713012695, -1.0317963361740112, 0.7244588732719421, -0.6157013177871704, 1.2702317237854004, 0.8608787655830383, -0.8139182329177856, -0.06063724309206009, 1.2894961833953857, 0.41117045283317566, -0.5331666469573975, -0.9122530221939087, -0.9837894439697266, 0.973609447479248, 1.8010245561599731, -0.08079665154218674, -0.0030365833081305027, 0.7982619404792786, 0.598743200302124, -1.4077411890029907, 0.0019731614738702774, -0.7012163996696472, -0.6907672882080078, 1.6473336219787598, 2.1233904361724854, -0.11596917361021042, -0.23785026371479034, -0.7073448300361633, -1.2735275030136108, 0.750827431678772, -0.010308214463293552, 0.17091020941734314, 0.681957483291626, -0.6001406908035278, 1.1082087755203247, 0.891162633895874, 0.9462668895721436, 0.15566563606262207, 0.2363850325345993, 0.31436967849731445, -0.27246522903442383, -1.1636111736297607, -0.23746047914028168, -1.0062726736068726, -2.564737319946289, 0.47076186537742615, -0.15426695346832275, -1.4763436317443848, 0.05969016253948212, -0.9148702621459961, 0.9534406661987305, -0.5331175923347473, -1.088034749031067, -1.5294266939163208, 0.1820143610239029, -0.09414156526327133, 0.8980651497840881, -1.590591549873352, -0.12090262025594711, 1.2861881256103516, 0.9888269901275635, -0.6128760576248169, 1.0993951559066772, 0.2583063840866089, 1.0337705612182617, 0.8357670903205872, -0.32542091608047485, 0.5634477138519287, 0.06799418479204178, -1.2883615493774414, 0.39981135725975037, 1.1981428861618042, 0.2001192569732666, 1.4184699058532715, -0.5904186367988586, -0.02204718440771103, 0.4207609295845032, -0.5438506007194519, -0.45634925365448, -0.5187996029853821, 0.6541304588317871, 0.0518735833466053, -0.879692792892456, -0.09083620458841324, -0.03513393923640251, -0.22569890320301056, 0.20521561801433563, -1.5693867206573486, -0.16929008066654205, -0.39966830611228943, -0.6259089708328247, -1.2369990348815918, -0.06374772638082504, 1.399394154548645, -0.8711211085319519, -0.24405859410762787, 0.4338475465774536, 0.3757908344268799, 0.5661337375640869, 0.67830890417099, -0.7145127654075623, -0.3263844847679138, -0.17307698726654053, -0.3394462466239929, 0.3283771872520447, 1.4053066968917847, -0.09917835891246796, -1.0360981225967407, 0.7038781642913818, -0.3334302008152008, 0.15674610435962677, 1.9136028289794922, 0.07340829819440842, -0.8352409601211548, 0.208999365568161, -0.7702124118804932, 1.9297174215316772, 1.6174803972244263, 1.3911786079406738, -0.15306106209754944, -0.9641616344451904, 0.6532566547393799, -0.3014530539512634, -0.3826312720775604, 0.8782283663749695, 0.500140905380249, -0.24527965486049652, -1.3654837608337402, 0.681178092956543, 1.2030514478683472, -0.8985077142715454, -0.8043646812438965, 0.1364753246307373, -0.7815763354301453, 1.1073241233825684, 0.7278879284858704, 0.34919747710227966, 0.28063341975212097, 1.610366940498352, 0.754828155040741, -0.5238223075866699, 0.49814972281455994, 0.49783071875572205, -0.178320050239563, -2.079402446746826, -1.0500661134719849, 0.3632797598838806, -0.5502604246139526, -1.6149884462356567, 1.3714579343795776, -1.162600040435791, -0.9141577482223511, 0.5239892601966858, 0.08807433396577835, 1.3923407793045044, 0.3865821361541748, 1.6094621419906616, 2.0630531311035156, 0.9098973274230957, 0.3464091718196869, 1.2821924686431885, -0.21890926361083984, -0.5058894157409668, 1.7717143297195435, -0.4486044943332672, 0.5128878355026245, 1.1080456972122192, -0.2932782769203186, -0.9963881373405457, -0.7587286233901978, -1.2712867259979248, -0.6866944432258606, 1.1382149457931519, 0.11120011657476425, -1.1514248847961426, 0.2471921592950821, 1.5748910903930664, 0.12423935532569885, -0.2913760840892792, 0.6031340956687927, 0.40319177508354187, -0.8160883188247681, -0.08521154522895813, -0.9290828108787537, 0.45732954144477844, -0.27120450139045715, -0.37400102615356445, 0.26914483308792114, 0.433451384305954, 1.3244109153747559, -0.01305234245955944, 0.14547939598560333, 1.2182618379592896, -1.3908166885375977, 1.4927853345870972, -0.7210858464241028, 0.3084309995174408, -2.3548669815063477, 1.334911823272705, -0.8208624124526978, 1.9526335000991821, -2.714259147644043, 0.50324946641922, -0.5863857269287109, -0.45457392930984497, 0.270071804523468, -0.2839059829711914, 0.15426501631736755, -0.10350391268730164, -1.1563403606414795, -0.12678463757038116, -0.6549087762832642, 0.5768647193908691, 1.1569379568099976, 1.333709955215454, -1.0750805139541626, -0.23363661766052246, -1.7318201065063477, -0.21148031949996948, -0.8296657204627991, 0.33032679557800293, -1.9610015153884888, -0.20151753723621368, -1.8722798824310303, -2.39530348777771, -1.260904312133789, -0.8089686036109924, 1.166166067123413, 0.07130347937345505, -0.8574440479278564, 1.2349368333816528, -0.37725797295570374, -1.8552875518798828, 1.1460065841674805, -2.151590585708618 ]
https://github.com/huggingface/datasets/issues/5534
map() breaks at certain dataset size when using Array3D
Hi! This code works for me locally or in Colab. What's the output of `python -c "import pyarrow as pa; print(pa.__version__)"` when you run it inside your environment?
### Describe the bug `map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with the following exception: ``` Traceback (most recent call last): File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3255, in _map_single writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2815, in map return self._map_single( File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 546, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 513, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/fingerprint.py", line 480, in wrapper out = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3259, in _map_single writer.finalize() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array ``` ### Steps to reproduce the bug 1. put following dataset loading script into: debug/debug.py ```python import datasets import numpy as np class DEBUG(datasets.GeneratorBasedBuilder): """DEBUG dataset.""" def _info(self): return datasets.DatasetInfo( features=datasets.Features( { "id": datasets.Value("uint8"), "img_data": datasets.Array3D(shape=(3, 224, 224), dtype="uint8"), }, ), supervised_keys=None, ) def _split_generators(self, dl_manager): return [datasets.SplitGenerator(name=datasets.Split.TRAIN)] def _generate_examples(self): for i in range(149): image_np = np.zeros(shape=(3, 224, 224), dtype=np.int8).tolist() yield f"id_{i}", {"id": i, "img_data": image_np} ``` 2. try the following code: ```python import datasets def add_dummy_col(ex): ex["dummy"] = "test" return ex ds = datasets.load_dataset(path="debug", split="train") # works ds_filtered_works = ds.filter(lambda example: example["id"] < 95) print(f"filtered result size: {len(ds_filtered_works)}") # output: # filtered result size: 95 ds_mapped_works = ds_filtered_works.map(add_dummy_col) # fails ds_filtered_error = ds.filter(lambda example: example["id"] < 96) print(f"filtered result size: {len(ds_filtered_error)}") # output: # filtered result size: 96 ds_mapped_error = ds_filtered_error.map(add_dummy_col) ``` ### Expected behavior The example code does not fail. ### Environment info Python 3.9.16 (main, Jan 11 2023, 16:05:54); [GCC 11.2.0] :: Anaconda, Inc. on linux datasets 2.9.0
299
28
map() breaks at certain dataset size when using Array3D ### Describe the bug `map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with the following exception: ``` Traceback (most recent call last): File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3255, in _map_single writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2815, in map return self._map_single( File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 546, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 513, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/fingerprint.py", line 480, in wrapper out = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3259, in _map_single writer.finalize() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array ``` ### Steps to reproduce the bug 1. put following dataset loading script into: debug/debug.py ```python import datasets import numpy as np class DEBUG(datasets.GeneratorBasedBuilder): """DEBUG dataset.""" def _info(self): return datasets.DatasetInfo( features=datasets.Features( { "id": datasets.Value("uint8"), "img_data": datasets.Array3D(shape=(3, 224, 224), dtype="uint8"), }, ), supervised_keys=None, ) def _split_generators(self, dl_manager): return [datasets.SplitGenerator(name=datasets.Split.TRAIN)] def _generate_examples(self): for i in range(149): image_np = np.zeros(shape=(3, 224, 224), dtype=np.int8).tolist() yield f"id_{i}", {"id": i, "img_data": image_np} ``` 2. try the following code: ```python import datasets def add_dummy_col(ex): ex["dummy"] = "test" return ex ds = datasets.load_dataset(path="debug", split="train") # works ds_filtered_works = ds.filter(lambda example: example["id"] < 95) print(f"filtered result size: {len(ds_filtered_works)}") # output: # filtered result size: 95 ds_mapped_works = ds_filtered_works.map(add_dummy_col) # fails ds_filtered_error = ds.filter(lambda example: example["id"] < 96) print(f"filtered result size: {len(ds_filtered_error)}") # output: # filtered result size: 96 ds_mapped_error = ds_filtered_error.map(add_dummy_col) ``` ### Expected behavior The example code does not fail. ### Environment info Python 3.9.16 (main, Jan 11 2023, 16:05:54); [GCC 11.2.0] :: Anaconda, Inc. on linux datasets 2.9.0 Hi! This code works for me locally or in Colab. What's the output of `python -c "import pyarrow as pa; print(pa.__version__)"` when you run it inside your environment?
[ -1.1591157913208008, -0.9008998870849609, -0.7034623622894287, 1.430408239364624, -0.04434133321046829, -1.2292879819869995, 0.06118039786815643, -0.9924614429473877, 1.5379427671432495, -0.7380186319351196, 0.145754873752594, -1.6440602540969849, -0.13232824206352234, -0.47561711072921753, -0.70253586769104, -0.8644505143165588, -0.36204391717910767, -0.9808539748191833, 1.0884032249450684, 2.479282855987549, 1.3362845182418823, -1.351141333580017, 2.773242235183716, 0.6420072913169861, -0.29121115803718567, -1.0571337938308716, 0.5317605137825012, -0.024784615263342857, -1.1390573978424072, -0.5512076020240784, -1.0095717906951904, 0.005455993115901947, -0.591373085975647, -0.39847230911254883, 0.04803461208939552, 0.4663581848144531, -0.31198540329933167, -0.2424384355545044, -0.6400864124298096, -0.7111229300498962, 0.600098729133606, -0.26270708441734314, 0.937283456325531, -0.27240368723869324, 1.7891663312911987, -0.654510498046875, 0.3874455988407135, 0.7191295623779297, 1.2672063112258911, 0.18692177534103394, 0.05425897240638733, 0.31070277094841003, 0.2965894937515259, -0.006663262844085693, 0.6220493316650391, 1.2896032333374023, 0.6046794056892395, 0.5735752582550049, 0.6859328150749207, -2.1729485988616943, 1.3566980361938477, -0.894598662853241, 0.23870311677455902, 1.2478574514389038, -0.7809005975723267, 0.3355468809604645, -1.749491810798645, -0.0762162134051323, 0.5887339115142822, -2.293274164199829, 0.25460147857666016, -1.2659286260604858, -0.502733051776886, 0.917771577835083, 0.3463350236415863, -1.2153050899505615, 0.26003921031951904, -0.5012379288673401, 1.139033317565918, 0.5209417939186096, 1.1112258434295654, -1.64187753200531, 0.007524495013058186, -0.05376411974430084, 0.034749824553728104, -1.2429016828536987, -1.6979918479919434, 0.5451148748397827, 0.5498356223106384, 0.7532906532287598, -0.0518365316092968, 0.9903117418289185, -1.064098834991455, 0.8091232776641846, -0.893734872341156, -1.490139365196228, -1.4279416799545288, -2.3440847396850586, -2.27675461769104, 0.8050599098205566, -0.5715847611427307, -0.5344060659408569, 2.012165069580078, -1.0475579500198364, -1.8089599609375, 1.1417744159698486, 0.25991636514663696, 0.10404274612665176, 2.3516359329223633, 0.2596126198768616, -0.7795324921607971, 0.553550660610199, -0.693419873714447, 0.887268602848053, -0.2585931122303009, 1.2775051593780518, 0.4954056143760681, -1.0036190748214722, 1.6537047624588013, -0.4171160161495209, 0.5767518877983093, -0.6601144075393677, -0.5808941125869751, -0.8899624347686768, 0.28902825713157654, 1.9173133373260498, -0.37744125723838806, 1.55809485912323, -0.23697058856487274, -1.5656906366348267, -1.535739779472351, 0.7794238924980164, 0.47772419452667236, -0.9775636792182922, 0.08084659278392792, -0.544951856136322, 0.15701685845851898, 0.1559186428785324, 1.1531982421875, 1.259663701057434, 0.6408380270004272, -0.24317511916160583, -0.8457480072975159, 0.2514761984348297, -0.2381143867969513, -0.577200710773468, -1.9119774103164673, -0.4140152335166931, 0.2512417435646057, 0.5840224027633667, -1.3063961267471313, 1.7645580768585205, 0.8672252893447876, 2.0400054454803467, 1.0467281341552734, -0.3984474837779999, 1.4620708227157593, 0.00522803608328104, 1.885959267616272, -0.3938913941383362, 0.6081300973892212, -0.29307207465171814, -1.2511125802993774, 0.8730668425559998, -0.4952419400215149, -1.9573289155960083, -0.8042017221450806, -0.6778618097305298, -0.14667603373527527, -0.7224912047386169, 0.8477903604507446, -0.35536524653434753, -1.4888542890548706, 0.06170681118965149, -0.6749725937843323, 0.23084799945354462, -1.2951380014419556, 0.1495744287967682, 0.7327039837837219, -0.8041208386421204, -0.0223141610622406, -0.300010621547699, -1.3690142631530762, -0.5113864541053772, 0.347522497177124, 2.0225539207458496, -0.6325966715812683, 0.961393415927887, 0.9783067107200623, -0.7306203246116638, 0.18514396250247955, 0.265054851770401, -0.33918291330337524, 0.832752525806427, -1.1682583093643188, -0.4216312766075134, 1.1940152645111084, -0.23311854898929596, -0.7923514246940613, 1.2475682497024536, 0.7789933085441589, -1.1353667974472046, -0.27256840467453003, -0.21786123514175415, -0.9454203248023987, 0.003947760909795761, -1.5160634517669678, -0.2514619529247284, 0.36913615465164185, -1.4669489860534668, -0.33676326274871826, -0.1822427362203598, 1.3367716073989868, -0.27904289960861206, 1.453174114227295, -0.41607466340065, -0.16018448770046234, -0.32431846857070923, -0.5485987663269043, 0.20397575199604034, -0.1639540046453476, -0.6135600209236145, 0.24684906005859375, -0.8896204233169556, 0.23561473190784454, 1.5453938245773315, 0.3987581133842468, 0.07973215728998184, 0.4981386065483093, 1.179441213607788, 0.4307827055454254, -0.11214926838874817, -0.8358535766601562, -1.6027072668075562, 1.9763983488082886, -1.3996672630310059, 1.9103660583496094, 0.7938192486763, -0.060547422617673874, -1.8172281980514526, -1.8036770820617676, 1.2007029056549072, 1.1746134757995605, 2.400970697402954, 0.5377909541130066, 0.46084651350975037, -0.7179105877876282, -0.7443933486938477, 0.3551441431045532, -1.0815095901489258, -0.6899859309196472, 0.18219925463199615, 2.346318483352661, 1.7710365056991577, -0.5252870917320251, -0.31248629093170166, -0.8281787037849426, 1.1840453147888184, -0.27648109197616577, 0.2167910486459732, 2.030853033065796, -0.23795358836650848, -1.0507649183273315, 1.3461253643035889, -2.408097743988037, 0.24816036224365234, 2.035306692123413, 0.2928431034088135, 0.15441368520259857, -1.5045653581619263, -0.6796117424964905, -0.20769748091697693, -0.4219292402267456, -1.260849952697754, 0.6287760734558105, -0.30820369720458984, -0.9225107431411743, -1.3984581232070923, -0.0272732712328434, -1.137294054031372, -1.7652597427368164, 0.3553786277770996, 2.0012824535369873, 2.186213493347168, -0.775763988494873, 1.3984665870666504, -0.19450289011001587, 0.010355637408792973, 1.208983302116394, 1.3655567169189453, 3.118734836578369, 1.8613853454589844, -1.264322280883789, 0.667319118976593, -0.14864948391914368, -0.5017473101615906, 1.1605671644210815, -1.1751298904418945, 1.0560494661331177, -0.22152405977249146, -1.312246322631836, -1.2420070171356201, 1.0638734102249146, 0.4158543050289154, -0.019507160410284996, -0.4785696268081665, 1.3229206800460815, 0.08454781025648117, 1.3329243659973145, 0.6137505173683167, -0.445179283618927, 0.4681079089641571, -0.3689941167831421, -0.6094357967376709, 1.6759544610977173, 0.12752056121826172, -1.565859317779541, -2.2809510231018066, -0.1326213926076889, -0.9342612624168396, -0.021833065897226334, -0.6239423751831055, -0.9737192988395691, 1.5639750957489014, 0.39804887771606445, -1.2240943908691406, -0.2958470284938812, -0.25459715723991394, -0.51790851354599, 2.6473896503448486, -1.197560429573059, -0.1769033521413803, -0.8827052116394043, -0.553266167640686, 1.6071652173995972, -1.2190788984298706, -0.2842027246952057, -0.9435564875602722, -0.7364997267723083, -1.3093870878219604, -0.41678959131240845, -0.011213148012757301, -0.9538820385932922, 0.6838399767875671, 0.17652682960033417, -1.0629098415374756, -0.21918262541294098, -0.909038782119751, 1.0286864042282104, -0.08524955064058304, 0.2228517085313797, 1.894533634185791, 0.3190634548664093, -0.3988383710384369, 0.7921507954597473, 1.260271430015564, 0.5914639830589294, -0.6474045515060425, -0.05784887447953224, -0.6693639159202576, 0.2936825752258301, -1.4790581464767456, 0.2419830858707428, -2.9992082118988037, 0.7928749918937683, -0.1772950142621994, -0.17282620072364807, -0.05838201940059662, -1.2840485572814941, 1.0574119091033936, 2.612715244293213, -1.137253761291504, 0.42048823833465576, 0.4740833342075348, 1.1662064790725708, -1.6361788511276245, 0.3342535197734833, -0.5385686159133911, 2.043802499771118, 0.1844712644815445, 1.2441266775131226, -0.4783157408237457, -2.192376136779785, 0.6309388279914856, -1.1828696727752686, -1.0004703998565674, 0.8432398438453674, -0.8352165222167969, 0.2538303732872009, -1.3978736400604248, -0.17587023973464966, -0.9331491589546204, -1.2300727367401123, 0.7021098732948303, 0.15922603011131287, 0.41423746943473816, -0.3676445484161377, 0.3975129723548889, -2.186579942703247, -1.3534818887710571, -0.1624881476163864, -1.072988748550415, 0.5852934122085571, -0.46109822392463684, 0.5825247764587402, -0.08906952291727066, 0.12871599197387695, 0.2965245246887207, 1.453885555267334, 3.417691469192505, 0.2123485952615738, 0.17986983060836792, -0.0823979452252388, -1.0039913654327393, 1.3776825666427612, 0.8445104360580444, -0.18596458435058594, -0.6375381350517273, -0.9478405117988586, 1.3584175109863281, 1.9784178733825684, 1.0888373851776123, 0.17832699418067932, -0.9318943023681641, -0.7522197961807251, 0.012440509162843227, 0.15327490866184235, 0.5233893990516663, 0.9624620079994202, -0.010148166678845882, 0.03885822743177414, 1.4296289682388306, 1.1486049890518188, -0.25983718037605286, 0.46166181564331055, -0.9892730712890625, -0.3994614779949188, 0.3526463806629181, 0.1817825585603714, 0.15476910769939423, 0.4520285427570343, -1.0511977672576904, -0.2452908605337143, -0.2557295560836792, -0.8800588846206665, -0.8141133785247803, -0.2875642776489258, -0.4039016664028168, 1.563306450843811, 0.07704587280750275, -0.5117228627204895, 0.08931504189968109, -0.662939727306366, -0.2071123570203781, -1.0230648517608643, 0.16818228363990784, -0.031010862439870834, -0.17220647633075714, -0.19616834819316864, 1.6132664680480957, -0.88111412525177, -2.135310411453247, 0.13677167892456055, 0.24168643355369568, -0.3108614385128021, 0.1343318223953247, 1.7013262510299683, 0.46175262331962585, 1.3825029134750366, 1.2944204807281494, 0.9599154591560364, -0.5758139491081238, -1.165867567062378, 0.69247967004776, 0.8942485451698303, -1.3432210683822632, 0.892200231552124, -0.294434517621994, -0.4971793293952942, 0.6576709151268005, 1.32243013381958, 0.510417640209198, -1.9405461549758911, 0.9447410106658936, -0.9467811584472656, 0.7437581419944763, 0.712877631187439, 0.7734461426734924, 0.26102402806282043, 0.9113645553588867, -1.2170723676681519, -1.152281403541565, -0.6469143629074097, -0.61380934715271, 1.889464020729065, -0.2675565481185913, 0.5417134761810303, -0.19286948442459106, -1.2502026557922363, -0.14107702672481537, 0.7833341360092163, 0.32284116744995117, -0.4162733554840088, 0.9120097160339355, -0.6262351274490356, -0.9420740604400635, -1.301857829093933, -0.38953545689582825, -1.051506757736206, -0.883074164390564, 0.9807361364364624, 0.7954184412956238, 0.4379722774028778, 1.8735110759735107, 0.6122285723686218, 0.38005974888801575, -2.651911735534668, 0.9122395515441895, 0.2945062220096588, -0.06361407786607742, 0.8776012659072876, 0.30184003710746765, 1.1177663803100586, -0.04226382076740265, 0.6358778476715088, -2.343322992324829, 2.197923421859741, -0.21497629582881927, 0.6264815926551819, 0.05270633101463318, -0.20254644751548767, 1.1430624723434448, 0.614005446434021, 0.6170158386230469, -1.1711091995239258, 0.7545002698898315, -0.5436062812805176, 1.0830037593841553, 0.9591867923736572, -0.9448575973510742, 0.17123842239379883, 1.3980391025543213, 0.3684051036834717, -0.48463794589042664, -0.9405528903007507, -0.8593454360961914, 1.014630675315857, 1.6515624523162842, -0.059972286224365234, 0.04154255613684654, 0.8178929686546326, 0.5938518643379211, -1.2115254402160645, 0.07914313673973083, -0.634760320186615, -0.7193760871887207, 1.681723952293396, 2.0443248748779297, -0.14492608606815338, -0.16926036775112152, -0.6334310173988342, -1.3460239171981812, 0.8396376371383667, -0.11783891916275024, 0.07237154245376587, 0.66815584897995, -0.6912481188774109, 1.0836273431777954, 0.656740128993988, 1.0263910293579102, 0.036799948662519455, 0.28329792618751526, 0.37037497758865356, -0.3529050946235657, -1.2033839225769043, -0.37977057695388794, -1.1219170093536377, -2.5729012489318848, 0.2669640779495239, -0.25691261887550354, -1.5338313579559326, 0.12822619080543518, -1.01703679561615, 0.8403965830802917, -0.6117051839828491, -1.082162618637085, -1.4840278625488281, 0.3813866674900055, -0.2217608094215393, 0.9158959984779358, -1.7207584381103516, -0.26622605323791504, 1.2598698139190674, 0.9172124862670898, -0.6354280710220337, 0.9570044279098511, 0.215931236743927, 0.9187373518943787, 0.7854558229446411, -0.437411367893219, 0.62442547082901, 0.050500109791755676, -1.3561238050460815, 0.3804701268672943, 1.1955763101577759, 0.19297802448272705, 1.3845933675765991, -0.4282490015029907, 0.04658603295683861, 0.4211413860321045, -0.6993402242660522, -0.5014797449111938, -0.3892587423324585, 0.6751924157142639, -0.006673043593764305, -0.9982205033302307, -0.22526352107524872, -0.12385972589254379, -0.2712614834308624, 0.2054820954799652, -1.5219314098358154, -0.2859763503074646, -0.3127690255641937, -0.46406394243240356, -1.3292253017425537, 0.016242556273937225, 1.3099780082702637, -0.8672903180122375, -0.20745320618152618, 0.42226502299308777, 0.4799172878265381, 0.5399631857872009, 0.5798429250717163, -0.8236731290817261, -0.2975069284439087, -0.3229382038116455, -0.23786374926567078, 0.32673993706703186, 1.2263386249542236, -0.007758165709674358, -0.9116072058677673, 0.7022837400436401, -0.33685892820358276, 0.1676851361989975, 1.9524961709976196, 0.02057521417737007, -0.7366952300071716, 0.35849201679229736, -0.7303107976913452, 1.7904698848724365, 1.704192042350769, 1.264649510383606, -0.04547804594039917, -0.7118319869041443, 0.5565488934516907, -0.18733938038349152, -0.3177742063999176, 0.9851906299591064, 0.4636327624320984, -0.23876598477363586, -1.524693250656128, 0.6286052465438843, 1.2435014247894287, -0.7397429347038269, -0.7007569074630737, -0.012744665145874023, -0.9383206367492676, 1.27828049659729, 0.5049572587013245, 0.3140304982662201, 0.21410778164863586, 1.5240486860275269, 0.7734904885292053, -0.4910743236541748, 0.4491470456123352, 0.5401512980461121, -0.18126873672008514, -2.209498643875122, -1.0243756771087646, 0.26312971115112305, -0.3160753846168518, -1.5839475393295288, 1.362778902053833, -1.0995066165924072, -1.0421738624572754, 0.5974215269088745, 0.08516526222229004, 1.220557451248169, 0.2708446979522705, 1.6537772417068481, 2.1718361377716064, 0.855880856513977, 0.32696905732154846, 1.2086681127548218, -0.06620597839355469, -0.3799053430557251, 1.773706078529358, -0.33109086751937866, 0.555896520614624, 0.9754528403282166, -0.4047805368900299, -1.133151650428772, -0.8178862929344177, -1.161098837852478, -0.6071522235870361, 1.1117985248565674, 0.14590154588222504, -1.1108694076538086, 0.13236132264137268, 1.5801331996917725, 0.22936829924583435, -0.19215324521064758, 0.6538901925086975, 0.45276594161987305, -0.6767485737800598, -0.06518957763910294, -0.7723245024681091, 0.5339006185531616, -0.15483267605304718, -0.297659307718277, 0.21821865439414978, 0.46076661348342896, 1.256497859954834, -0.0994827151298523, 0.07956928014755249, 1.0992270708084106, -1.5281541347503662, 1.624229073524475, -0.6523758172988892, 0.3805919289588928, -2.4279110431671143, 1.4107435941696167, -0.7071152329444885, 1.9327198266983032, -2.4998223781585693, 0.4577278792858124, -0.5632228255271912, -0.5933891534805298, 0.30906790494918823, -0.43398818373680115, 0.1001373752951622, -0.18511182069778442, -0.8679696917533875, -0.03835166618227959, -0.6905163526535034, 0.6369485855102539, 1.2624009847640991, 1.3778256177902222, -1.0923329591751099, -0.29459309577941895, -1.7422988414764404, -0.1532425880432129, -0.7228118777275085, 0.26422712206840515, -1.9536043405532837, -0.17133356630802155, -1.9740716218948364, -2.3692054748535156, -1.3227121829986572, -0.8604776263237, 1.0639785528182983, 0.23024813830852509, -1.007517695426941, 1.3221280574798584, -0.3675985634326935, -1.7764116525650024, 1.191825270652771, -2.2311792373657227 ]
https://github.com/huggingface/datasets/issues/5534
map() breaks at certain dataset size when using Array3D
Thanks for looking into this! The output of `python -c "import pyarrow as pa; print(pa.__version__)"` is: ``` 11.0.0 ``` I did the following to setup the environment: ``` conda create -n datasets_debug python=3.9 conda activate datasets_debug pip install datasets==2.9.0 ``` I just tested this on another machine (Ubuntu 18.04.6 LTS) with the same result as mentioned in the issue description.
### Describe the bug `map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with the following exception: ``` Traceback (most recent call last): File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3255, in _map_single writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2815, in map return self._map_single( File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 546, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 513, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/fingerprint.py", line 480, in wrapper out = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3259, in _map_single writer.finalize() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array ``` ### Steps to reproduce the bug 1. put following dataset loading script into: debug/debug.py ```python import datasets import numpy as np class DEBUG(datasets.GeneratorBasedBuilder): """DEBUG dataset.""" def _info(self): return datasets.DatasetInfo( features=datasets.Features( { "id": datasets.Value("uint8"), "img_data": datasets.Array3D(shape=(3, 224, 224), dtype="uint8"), }, ), supervised_keys=None, ) def _split_generators(self, dl_manager): return [datasets.SplitGenerator(name=datasets.Split.TRAIN)] def _generate_examples(self): for i in range(149): image_np = np.zeros(shape=(3, 224, 224), dtype=np.int8).tolist() yield f"id_{i}", {"id": i, "img_data": image_np} ``` 2. try the following code: ```python import datasets def add_dummy_col(ex): ex["dummy"] = "test" return ex ds = datasets.load_dataset(path="debug", split="train") # works ds_filtered_works = ds.filter(lambda example: example["id"] < 95) print(f"filtered result size: {len(ds_filtered_works)}") # output: # filtered result size: 95 ds_mapped_works = ds_filtered_works.map(add_dummy_col) # fails ds_filtered_error = ds.filter(lambda example: example["id"] < 96) print(f"filtered result size: {len(ds_filtered_error)}") # output: # filtered result size: 96 ds_mapped_error = ds_filtered_error.map(add_dummy_col) ``` ### Expected behavior The example code does not fail. ### Environment info Python 3.9.16 (main, Jan 11 2023, 16:05:54); [GCC 11.2.0] :: Anaconda, Inc. on linux datasets 2.9.0
299
60
map() breaks at certain dataset size when using Array3D ### Describe the bug `map()` magically breaks when using a `Array3D` feature and mapping it. I created a very simple dummy dataset (see below). When filtering it down to 95 elements I can apply map, but it breaks when filtering it down to just 96 entries with the following exception: ``` Traceback (most recent call last): File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3255, in _map_single writer.finalize() # close_stream=bool(buf_writer is None)) # We only close if we are writing in a file File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 2815, in map return self._map_single( File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 546, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 513, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/fingerprint.py", line 480, in wrapper out = func(self, *args, **kwargs) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3259, in _map_single writer.finalize() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 581, in finalize self.write_examples_on_file() File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/arrow_writer.py", line 440, in write_examples_on_file batch_examples[col] = array_concat(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1931, in array_concat return _concat_arrays(arrays) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1901, in _concat_arrays return array_type.wrap_array(_concat_arrays([array.storage for array in arrays])) File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1922, in _concat_arrays _concat_arrays([array.values for array in arrays]), File "/home/arbi01/miniconda3/envs/tmp9/lib/python3.9/site-packages/datasets/table.py", line 1920, in _concat_arrays return pa.ListArray.from_arrays( File "pyarrow/array.pxi", line 1997, in pyarrow.lib.ListArray.from_arrays File "pyarrow/array.pxi", line 1527, in pyarrow.lib.Array.validate File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Negative offsets in list array ``` ### Steps to reproduce the bug 1. put following dataset loading script into: debug/debug.py ```python import datasets import numpy as np class DEBUG(datasets.GeneratorBasedBuilder): """DEBUG dataset.""" def _info(self): return datasets.DatasetInfo( features=datasets.Features( { "id": datasets.Value("uint8"), "img_data": datasets.Array3D(shape=(3, 224, 224), dtype="uint8"), }, ), supervised_keys=None, ) def _split_generators(self, dl_manager): return [datasets.SplitGenerator(name=datasets.Split.TRAIN)] def _generate_examples(self): for i in range(149): image_np = np.zeros(shape=(3, 224, 224), dtype=np.int8).tolist() yield f"id_{i}", {"id": i, "img_data": image_np} ``` 2. try the following code: ```python import datasets def add_dummy_col(ex): ex["dummy"] = "test" return ex ds = datasets.load_dataset(path="debug", split="train") # works ds_filtered_works = ds.filter(lambda example: example["id"] < 95) print(f"filtered result size: {len(ds_filtered_works)}") # output: # filtered result size: 95 ds_mapped_works = ds_filtered_works.map(add_dummy_col) # fails ds_filtered_error = ds.filter(lambda example: example["id"] < 96) print(f"filtered result size: {len(ds_filtered_error)}") # output: # filtered result size: 96 ds_mapped_error = ds_filtered_error.map(add_dummy_col) ``` ### Expected behavior The example code does not fail. ### Environment info Python 3.9.16 (main, Jan 11 2023, 16:05:54); [GCC 11.2.0] :: Anaconda, Inc. on linux datasets 2.9.0 Thanks for looking into this! The output of `python -c "import pyarrow as pa; print(pa.__version__)"` is: ``` 11.0.0 ``` I did the following to setup the environment: ``` conda create -n datasets_debug python=3.9 conda activate datasets_debug pip install datasets==2.9.0 ``` I just tested this on another machine (Ubuntu 18.04.6 LTS) with the same result as mentioned in the issue description.
[ -1.1591157913208008, -0.9008998870849609, -0.7034623622894287, 1.430408239364624, -0.04434133321046829, -1.2292879819869995, 0.06118039786815643, -0.9924614429473877, 1.5379427671432495, -0.7380186319351196, 0.145754873752594, -1.6440602540969849, -0.13232824206352234, -0.47561711072921753, -0.70253586769104, -0.8644505143165588, -0.36204391717910767, -0.9808539748191833, 1.0884032249450684, 2.479282855987549, 1.3362845182418823, -1.351141333580017, 2.773242235183716, 0.6420072913169861, -0.29121115803718567, -1.0571337938308716, 0.5317605137825012, -0.024784615263342857, -1.1390573978424072, -0.5512076020240784, -1.0095717906951904, 0.005455993115901947, -0.591373085975647, -0.39847230911254883, 0.04803461208939552, 0.4663581848144531, -0.31198540329933167, -0.2424384355545044, -0.6400864124298096, -0.7111229300498962, 0.600098729133606, -0.26270708441734314, 0.937283456325531, -0.27240368723869324, 1.7891663312911987, -0.654510498046875, 0.3874455988407135, 0.7191295623779297, 1.2672063112258911, 0.18692177534103394, 0.05425897240638733, 0.31070277094841003, 0.2965894937515259, -0.006663262844085693, 0.6220493316650391, 1.2896032333374023, 0.6046794056892395, 0.5735752582550049, 0.6859328150749207, -2.1729485988616943, 1.3566980361938477, -0.894598662853241, 0.23870311677455902, 1.2478574514389038, -0.7809005975723267, 0.3355468809604645, -1.749491810798645, -0.0762162134051323, 0.5887339115142822, -2.293274164199829, 0.25460147857666016, -1.2659286260604858, -0.502733051776886, 0.917771577835083, 0.3463350236415863, -1.2153050899505615, 0.26003921031951904, -0.5012379288673401, 1.139033317565918, 0.5209417939186096, 1.1112258434295654, -1.64187753200531, 0.007524495013058186, -0.05376411974430084, 0.034749824553728104, -1.2429016828536987, -1.6979918479919434, 0.5451148748397827, 0.5498356223106384, 0.7532906532287598, -0.0518365316092968, 0.9903117418289185, -1.064098834991455, 0.8091232776641846, -0.893734872341156, -1.490139365196228, -1.4279416799545288, -2.3440847396850586, -2.27675461769104, 0.8050599098205566, -0.5715847611427307, -0.5344060659408569, 2.012165069580078, -1.0475579500198364, -1.8089599609375, 1.1417744159698486, 0.25991636514663696, 0.10404274612665176, 2.3516359329223633, 0.2596126198768616, -0.7795324921607971, 0.553550660610199, -0.693419873714447, 0.887268602848053, -0.2585931122303009, 1.2775051593780518, 0.4954056143760681, -1.0036190748214722, 1.6537047624588013, -0.4171160161495209, 0.5767518877983093, -0.6601144075393677, -0.5808941125869751, -0.8899624347686768, 0.28902825713157654, 1.9173133373260498, -0.37744125723838806, 1.55809485912323, -0.23697058856487274, -1.5656906366348267, -1.535739779472351, 0.7794238924980164, 0.47772419452667236, -0.9775636792182922, 0.08084659278392792, -0.544951856136322, 0.15701685845851898, 0.1559186428785324, 1.1531982421875, 1.259663701057434, 0.6408380270004272, -0.24317511916160583, -0.8457480072975159, 0.2514761984348297, -0.2381143867969513, -0.577200710773468, -1.9119774103164673, -0.4140152335166931, 0.2512417435646057, 0.5840224027633667, -1.3063961267471313, 1.7645580768585205, 0.8672252893447876, 2.0400054454803467, 1.0467281341552734, -0.3984474837779999, 1.4620708227157593, 0.00522803608328104, 1.885959267616272, -0.3938913941383362, 0.6081300973892212, -0.29307207465171814, -1.2511125802993774, 0.8730668425559998, -0.4952419400215149, -1.9573289155960083, -0.8042017221450806, -0.6778618097305298, -0.14667603373527527, -0.7224912047386169, 0.8477903604507446, -0.35536524653434753, -1.4888542890548706, 0.06170681118965149, -0.6749725937843323, 0.23084799945354462, -1.2951380014419556, 0.1495744287967682, 0.7327039837837219, -0.8041208386421204, -0.0223141610622406, -0.300010621547699, -1.3690142631530762, -0.5113864541053772, 0.347522497177124, 2.0225539207458496, -0.6325966715812683, 0.961393415927887, 0.9783067107200623, -0.7306203246116638, 0.18514396250247955, 0.265054851770401, -0.33918291330337524, 0.832752525806427, -1.1682583093643188, -0.4216312766075134, 1.1940152645111084, -0.23311854898929596, -0.7923514246940613, 1.2475682497024536, 0.7789933085441589, -1.1353667974472046, -0.27256840467453003, -0.21786123514175415, -0.9454203248023987, 0.003947760909795761, -1.5160634517669678, -0.2514619529247284, 0.36913615465164185, -1.4669489860534668, -0.33676326274871826, -0.1822427362203598, 1.3367716073989868, -0.27904289960861206, 1.453174114227295, -0.41607466340065, -0.16018448770046234, -0.32431846857070923, -0.5485987663269043, 0.20397575199604034, -0.1639540046453476, -0.6135600209236145, 0.24684906005859375, -0.8896204233169556, 0.23561473190784454, 1.5453938245773315, 0.3987581133842468, 0.07973215728998184, 0.4981386065483093, 1.179441213607788, 0.4307827055454254, -0.11214926838874817, -0.8358535766601562, -1.6027072668075562, 1.9763983488082886, -1.3996672630310059, 1.9103660583496094, 0.7938192486763, -0.060547422617673874, -1.8172281980514526, -1.8036770820617676, 1.2007029056549072, 1.1746134757995605, 2.400970697402954, 0.5377909541130066, 0.46084651350975037, -0.7179105877876282, -0.7443933486938477, 0.3551441431045532, -1.0815095901489258, -0.6899859309196472, 0.18219925463199615, 2.346318483352661, 1.7710365056991577, -0.5252870917320251, -0.31248629093170166, -0.8281787037849426, 1.1840453147888184, -0.27648109197616577, 0.2167910486459732, 2.030853033065796, -0.23795358836650848, -1.0507649183273315, 1.3461253643035889, -2.408097743988037, 0.24816036224365234, 2.035306692123413, 0.2928431034088135, 0.15441368520259857, -1.5045653581619263, -0.6796117424964905, -0.20769748091697693, -0.4219292402267456, -1.260849952697754, 0.6287760734558105, -0.30820369720458984, -0.9225107431411743, -1.3984581232070923, -0.0272732712328434, -1.137294054031372, -1.7652597427368164, 0.3553786277770996, 2.0012824535369873, 2.186213493347168, -0.775763988494873, 1.3984665870666504, -0.19450289011001587, 0.010355637408792973, 1.208983302116394, 1.3655567169189453, 3.118734836578369, 1.8613853454589844, -1.264322280883789, 0.667319118976593, -0.14864948391914368, -0.5017473101615906, 1.1605671644210815, -1.1751298904418945, 1.0560494661331177, -0.22152405977249146, -1.312246322631836, -1.2420070171356201, 1.0638734102249146, 0.4158543050289154, -0.019507160410284996, -0.4785696268081665, 1.3229206800460815, 0.08454781025648117, 1.3329243659973145, 0.6137505173683167, -0.445179283618927, 0.4681079089641571, -0.3689941167831421, -0.6094357967376709, 1.6759544610977173, 0.12752056121826172, -1.565859317779541, -2.2809510231018066, -0.1326213926076889, -0.9342612624168396, -0.021833065897226334, -0.6239423751831055, -0.9737192988395691, 1.5639750957489014, 0.39804887771606445, -1.2240943908691406, -0.2958470284938812, -0.25459715723991394, -0.51790851354599, 2.6473896503448486, -1.197560429573059, -0.1769033521413803, -0.8827052116394043, -0.553266167640686, 1.6071652173995972, -1.2190788984298706, -0.2842027246952057, -0.9435564875602722, -0.7364997267723083, -1.3093870878219604, -0.41678959131240845, -0.011213148012757301, -0.9538820385932922, 0.6838399767875671, 0.17652682960033417, -1.0629098415374756, -0.21918262541294098, -0.909038782119751, 1.0286864042282104, -0.08524955064058304, 0.2228517085313797, 1.894533634185791, 0.3190634548664093, -0.3988383710384369, 0.7921507954597473, 1.260271430015564, 0.5914639830589294, -0.6474045515060425, -0.05784887447953224, -0.6693639159202576, 0.2936825752258301, -1.4790581464767456, 0.2419830858707428, -2.9992082118988037, 0.7928749918937683, -0.1772950142621994, -0.17282620072364807, -0.05838201940059662, -1.2840485572814941, 1.0574119091033936, 2.612715244293213, -1.137253761291504, 0.42048823833465576, 0.4740833342075348, 1.1662064790725708, -1.6361788511276245, 0.3342535197734833, -0.5385686159133911, 2.043802499771118, 0.1844712644815445, 1.2441266775131226, -0.4783157408237457, -2.192376136779785, 0.6309388279914856, -1.1828696727752686, -1.0004703998565674, 0.8432398438453674, -0.8352165222167969, 0.2538303732872009, -1.3978736400604248, -0.17587023973464966, -0.9331491589546204, -1.2300727367401123, 0.7021098732948303, 0.15922603011131287, 0.41423746943473816, -0.3676445484161377, 0.3975129723548889, -2.186579942703247, -1.3534818887710571, -0.1624881476163864, -1.072988748550415, 0.5852934122085571, -0.46109822392463684, 0.5825247764587402, -0.08906952291727066, 0.12871599197387695, 0.2965245246887207, 1.453885555267334, 3.417691469192505, 0.2123485952615738, 0.17986983060836792, -0.0823979452252388, -1.0039913654327393, 1.3776825666427612, 0.8445104360580444, -0.18596458435058594, -0.6375381350517273, -0.9478405117988586, 1.3584175109863281, 1.9784178733825684, 1.0888373851776123, 0.17832699418067932, -0.9318943023681641, -0.7522197961807251, 0.012440509162843227, 0.15327490866184235, 0.5233893990516663, 0.9624620079994202, -0.010148166678845882, 0.03885822743177414, 1.4296289682388306, 1.1486049890518188, -0.25983718037605286, 0.46166181564331055, -0.9892730712890625, -0.3994614779949188, 0.3526463806629181, 0.1817825585603714, 0.15476910769939423, 0.4520285427570343, -1.0511977672576904, -0.2452908605337143, -0.2557295560836792, -0.8800588846206665, -0.8141133785247803, -0.2875642776489258, -0.4039016664028168, 1.563306450843811, 0.07704587280750275, -0.5117228627204895, 0.08931504189968109, -0.662939727306366, -0.2071123570203781, -1.0230648517608643, 0.16818228363990784, -0.031010862439870834, -0.17220647633075714, -0.19616834819316864, 1.6132664680480957, -0.88111412525177, -2.135310411453247, 0.13677167892456055, 0.24168643355369568, -0.3108614385128021, 0.1343318223953247, 1.7013262510299683, 0.46175262331962585, 1.3825029134750366, 1.2944204807281494, 0.9599154591560364, -0.5758139491081238, -1.165867567062378, 0.69247967004776, 0.8942485451698303, -1.3432210683822632, 0.892200231552124, -0.294434517621994, -0.4971793293952942, 0.6576709151268005, 1.32243013381958, 0.510417640209198, -1.9405461549758911, 0.9447410106658936, -0.9467811584472656, 0.7437581419944763, 0.712877631187439, 0.7734461426734924, 0.26102402806282043, 0.9113645553588867, -1.2170723676681519, -1.152281403541565, -0.6469143629074097, -0.61380934715271, 1.889464020729065, -0.2675565481185913, 0.5417134761810303, -0.19286948442459106, -1.2502026557922363, -0.14107702672481537, 0.7833341360092163, 0.32284116744995117, -0.4162733554840088, 0.9120097160339355, -0.6262351274490356, -0.9420740604400635, -1.301857829093933, -0.38953545689582825, -1.051506757736206, -0.883074164390564, 0.9807361364364624, 0.7954184412956238, 0.4379722774028778, 1.8735110759735107, 0.6122285723686218, 0.38005974888801575, -2.651911735534668, 0.9122395515441895, 0.2945062220096588, -0.06361407786607742, 0.8776012659072876, 0.30184003710746765, 1.1177663803100586, -0.04226382076740265, 0.6358778476715088, -2.343322992324829, 2.197923421859741, -0.21497629582881927, 0.6264815926551819, 0.05270633101463318, -0.20254644751548767, 1.1430624723434448, 0.614005446434021, 0.6170158386230469, -1.1711091995239258, 0.7545002698898315, -0.5436062812805176, 1.0830037593841553, 0.9591867923736572, -0.9448575973510742, 0.17123842239379883, 1.3980391025543213, 0.3684051036834717, -0.48463794589042664, -0.9405528903007507, -0.8593454360961914, 1.014630675315857, 1.6515624523162842, -0.059972286224365234, 0.04154255613684654, 0.8178929686546326, 0.5938518643379211, -1.2115254402160645, 0.07914313673973083, -0.634760320186615, -0.7193760871887207, 1.681723952293396, 2.0443248748779297, -0.14492608606815338, -0.16926036775112152, -0.6334310173988342, -1.3460239171981812, 0.8396376371383667, -0.11783891916275024, 0.07237154245376587, 0.66815584897995, -0.6912481188774109, 1.0836273431777954, 0.656740128993988, 1.0263910293579102, 0.036799948662519455, 0.28329792618751526, 0.37037497758865356, -0.3529050946235657, -1.2033839225769043, -0.37977057695388794, -1.1219170093536377, -2.5729012489318848, 0.2669640779495239, -0.25691261887550354, -1.5338313579559326, 0.12822619080543518, -1.01703679561615, 0.8403965830802917, -0.6117051839828491, -1.082162618637085, -1.4840278625488281, 0.3813866674900055, -0.2217608094215393, 0.9158959984779358, -1.7207584381103516, -0.26622605323791504, 1.2598698139190674, 0.9172124862670898, -0.6354280710220337, 0.9570044279098511, 0.215931236743927, 0.9187373518943787, 0.7854558229446411, -0.437411367893219, 0.62442547082901, 0.050500109791755676, -1.3561238050460815, 0.3804701268672943, 1.1955763101577759, 0.19297802448272705, 1.3845933675765991, -0.4282490015029907, 0.04658603295683861, 0.4211413860321045, -0.6993402242660522, -0.5014797449111938, -0.3892587423324585, 0.6751924157142639, -0.006673043593764305, -0.9982205033302307, -0.22526352107524872, -0.12385972589254379, -0.2712614834308624, 0.2054820954799652, -1.5219314098358154, -0.2859763503074646, -0.3127690255641937, -0.46406394243240356, -1.3292253017425537, 0.016242556273937225, 1.3099780082702637, -0.8672903180122375, -0.20745320618152618, 0.42226502299308777, 0.4799172878265381, 0.5399631857872009, 0.5798429250717163, -0.8236731290817261, -0.2975069284439087, -0.3229382038116455, -0.23786374926567078, 0.32673993706703186, 1.2263386249542236, -0.007758165709674358, -0.9116072058677673, 0.7022837400436401, -0.33685892820358276, 0.1676851361989975, 1.9524961709976196, 0.02057521417737007, -0.7366952300071716, 0.35849201679229736, -0.7303107976913452, 1.7904698848724365, 1.704192042350769, 1.264649510383606, -0.04547804594039917, -0.7118319869041443, 0.5565488934516907, -0.18733938038349152, -0.3177742063999176, 0.9851906299591064, 0.4636327624320984, -0.23876598477363586, -1.524693250656128, 0.6286052465438843, 1.2435014247894287, -0.7397429347038269, -0.7007569074630737, -0.012744665145874023, -0.9383206367492676, 1.27828049659729, 0.5049572587013245, 0.3140304982662201, 0.21410778164863586, 1.5240486860275269, 0.7734904885292053, -0.4910743236541748, 0.4491470456123352, 0.5401512980461121, -0.18126873672008514, -2.209498643875122, -1.0243756771087646, 0.26312971115112305, -0.3160753846168518, -1.5839475393295288, 1.362778902053833, -1.0995066165924072, -1.0421738624572754, 0.5974215269088745, 0.08516526222229004, 1.220557451248169, 0.2708446979522705, 1.6537772417068481, 2.1718361377716064, 0.855880856513977, 0.32696905732154846, 1.2086681127548218, -0.06620597839355469, -0.3799053430557251, 1.773706078529358, -0.33109086751937866, 0.555896520614624, 0.9754528403282166, -0.4047805368900299, -1.133151650428772, -0.8178862929344177, -1.161098837852478, -0.6071522235870361, 1.1117985248565674, 0.14590154588222504, -1.1108694076538086, 0.13236132264137268, 1.5801331996917725, 0.22936829924583435, -0.19215324521064758, 0.6538901925086975, 0.45276594161987305, -0.6767485737800598, -0.06518957763910294, -0.7723245024681091, 0.5339006185531616, -0.15483267605304718, -0.297659307718277, 0.21821865439414978, 0.46076661348342896, 1.256497859954834, -0.0994827151298523, 0.07956928014755249, 1.0992270708084106, -1.5281541347503662, 1.624229073524475, -0.6523758172988892, 0.3805919289588928, -2.4279110431671143, 1.4107435941696167, -0.7071152329444885, 1.9327198266983032, -2.4998223781585693, 0.4577278792858124, -0.5632228255271912, -0.5933891534805298, 0.30906790494918823, -0.43398818373680115, 0.1001373752951622, -0.18511182069778442, -0.8679696917533875, -0.03835166618227959, -0.6905163526535034, 0.6369485855102539, 1.2624009847640991, 1.3778256177902222, -1.0923329591751099, -0.29459309577941895, -1.7422988414764404, -0.1532425880432129, -0.7228118777275085, 0.26422712206840515, -1.9536043405532837, -0.17133356630802155, -1.9740716218948364, -2.3692054748535156, -1.3227121829986572, -0.8604776263237, 1.0639785528182983, 0.23024813830852509, -1.007517695426941, 1.3221280574798584, -0.3675985634326935, -1.7764116525650024, 1.191825270652771, -2.2311792373657227 ]
https://github.com/huggingface/datasets/issues/5532
train_test_split in arrow_dataset does not ensure to keep single classes in test set
Hi! You can get this behavior by specifying `stratify_by_column="label"` in `train_test_split`. This is the full example: ```python import numpy as np from datasets import Dataset, ClassLabel data = [ {'label': 0, 'text': "example1"}, {'label': 1, 'text': "example2"}, {'label': 1, 'text': "example3"}, {'label': 1, 'text': "example4"}, {'label': 0, 'text': "example5"}, {'label': 1, 'text': "example6"}, {'label': 2, 'text': "example7"}, {'label': 2, 'text': "example8"} ] for _ in range(10): data_set = Dataset.from_list(data) data_set = data_set.cast_column("label", ClassLabel(num_classes=3)) data_set = data_set.train_test_split(test_size=0.5, stratify_by_column="label") unique_labels_train = np.unique(data_set["train"][:]["label"]) unique_labels_test = np.unique(data_set["test"][:]["label"]) assert len(unique_labels_train) >= len(unique_labels_test) ```
### Describe the bug When I have a dataset with very few (e.g. 1) examples per class and I call the train_test_split function on it, sometimes the single class will be in the test set. thus will never be considered for training. ### Steps to reproduce the bug ``` import numpy as np from datasets import Dataset data = [ {'label': 0, 'text': "example1"}, {'label': 1, 'text': "example2"}, {'label': 1, 'text': "example3"}, {'label': 1, 'text': "example4"}, {'label': 0, 'text': "example5"}, {'label': 1, 'text': "example6"}, {'label': 2, 'text': "example7"}, {'label': 2, 'text': "example8"} ] for _ in range(10): data_set = Dataset.from_list(data) data_set = data_set.train_test_split(test_size=0.5) data_set["train"] unique_labels_train = np.unique(data_set["train"][:]["label"]) unique_labels_test = np.unique(data_set["test"][:]["label"]) assert len(unique_labels_train) >= len(unique_labels_test) ``` ### Expected behavior I expect to have every available class at least once in my training set. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - PyArrow version: 11.0.0 - Pandas version: 1.3.5
300
88
train_test_split in arrow_dataset does not ensure to keep single classes in test set ### Describe the bug When I have a dataset with very few (e.g. 1) examples per class and I call the train_test_split function on it, sometimes the single class will be in the test set. thus will never be considered for training. ### Steps to reproduce the bug ``` import numpy as np from datasets import Dataset data = [ {'label': 0, 'text': "example1"}, {'label': 1, 'text': "example2"}, {'label': 1, 'text': "example3"}, {'label': 1, 'text': "example4"}, {'label': 0, 'text': "example5"}, {'label': 1, 'text': "example6"}, {'label': 2, 'text': "example7"}, {'label': 2, 'text': "example8"} ] for _ in range(10): data_set = Dataset.from_list(data) data_set = data_set.train_test_split(test_size=0.5) data_set["train"] unique_labels_train = np.unique(data_set["train"][:]["label"]) unique_labels_test = np.unique(data_set["test"][:]["label"]) assert len(unique_labels_train) >= len(unique_labels_test) ``` ### Expected behavior I expect to have every available class at least once in my training set. ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - PyArrow version: 11.0.0 - Pandas version: 1.3.5 Hi! You can get this behavior by specifying `stratify_by_column="label"` in `train_test_split`. This is the full example: ```python import numpy as np from datasets import Dataset, ClassLabel data = [ {'label': 0, 'text': "example1"}, {'label': 1, 'text': "example2"}, {'label': 1, 'text': "example3"}, {'label': 1, 'text': "example4"}, {'label': 0, 'text': "example5"}, {'label': 1, 'text': "example6"}, {'label': 2, 'text': "example7"}, {'label': 2, 'text': "example8"} ] for _ in range(10): data_set = Dataset.from_list(data) data_set = data_set.cast_column("label", ClassLabel(num_classes=3)) data_set = data_set.train_test_split(test_size=0.5, stratify_by_column="label") unique_labels_train = np.unique(data_set["train"][:]["label"]) unique_labels_test = np.unique(data_set["test"][:]["label"]) assert len(unique_labels_train) >= len(unique_labels_test) ```
[ -1.209433674812317, -0.9766694903373718, -0.7226002812385559, 1.6408116817474365, -0.22698737680912018, -1.1188631057739258, 0.1228037104010582, -1.078384280204773, 1.5326387882232666, -0.7326000332832336, 0.2807154655456543, -1.626745343208313, -0.02218104898929596, -0.5965240597724915, -0.6185471415519714, -0.8573942184448242, -0.39170923829078674, -0.6623109579086304, 1.1083526611328125, 2.356455087661743, 1.202925205230713, -1.434543251991272, 2.6693649291992188, 0.7000265717506409, -0.11348023265600204, -1.012018084526062, 0.5628037452697754, -0.04102581366896629, -1.2670546770095825, -0.3112167418003082, -0.9600587487220764, -0.09578752517700195, -0.6090716123580933, -0.44617676734924316, -0.03708065673708916, 0.5128455758094788, -0.33566632866859436, -0.5031148791313171, -0.5402496457099915, -0.8416177034378052, 0.44225868582725525, -0.4379473626613617, 0.9195801615715027, -0.33946582674980164, 1.7537015676498413, -0.548082709312439, 0.39546412229537964, 0.7369565367698669, 1.2741310596466064, 0.1479424387216568, 0.10283555835485458, 0.42737922072410583, 0.4141520857810974, -0.08191418647766113, 0.5730599164962769, 1.1383203268051147, 0.613487720489502, 0.40069788694381714, 0.8430100083351135, -2.2966508865356445, 1.2176247835159302, -1.0699167251586914, 0.286812961101532, 1.3182730674743652, -0.9107614755630493, 0.4185132086277008, -1.7210733890533447, 0.0224123727530241, 0.6549634337425232, -2.1039628982543945, 0.36376193165779114, -1.2546323537826538, -0.5214559435844421, 0.9629017114639282, 0.3848896920681, -1.1308941841125488, 0.045874565839767456, -0.4605933427810669, 1.0232994556427002, 0.35565677285194397, 0.974310576915741, -1.679762840270996, -0.023020640015602112, -0.26661619544029236, 0.1371850222349167, -1.33381187915802, -1.5689456462860107, 0.5298834443092346, 0.6472389101982117, 0.5673782229423523, -0.07770583778619766, 1.0545198917388916, -1.1651387214660645, 0.711453378200531, -1.1344046592712402, -1.7348995208740234, -1.4239522218704224, -2.306081771850586, -2.11234450340271, 0.6105282306671143, -0.4821031987667084, -0.4949833154678345, 2.0484085083007812, -0.9447503089904785, -1.7186185121536255, 1.28903329372406, 0.2984943985939026, 0.07952719926834106, 2.400156021118164, 0.14105017483234406, -0.7736440300941467, 0.5935948491096497, -0.881298840045929, 0.7126659750938416, -0.3392162322998047, 1.268428087234497, 0.3322388827800751, -0.8839049339294434, 1.6321529150009155, -0.4003943204879761, 0.6455506682395935, -0.6188408732414246, -0.4755038619041443, -0.661923885345459, 0.2055695801973343, 1.9165823459625244, -0.24018257856369019, 1.4158246517181396, -0.31226709485054016, -1.5864734649658203, -1.5684839487075806, 0.8699770569801331, 0.41461852192878723, -0.8136546015739441, 0.06993316113948822, -0.3398660123348236, 0.24039000272750854, -0.2306034415960312, 1.1717584133148193, 1.285705327987671, 0.7200833559036255, -0.3441614508628845, -0.9181233048439026, 0.1535387635231018, -0.060276441276073456, -0.7447575330734253, -1.7456088066101074, -0.3234151005744934, 0.15587174892425537, 0.6337141990661621, -1.197728157043457, 1.7453269958496094, 0.9189264178276062, 1.855599045753479, 0.9604829549789429, -0.38990190625190735, 1.5119436979293823, 0.13976983726024628, 1.7653119564056396, -0.5405882000923157, 0.5829915404319763, -0.4417330026626587, -1.2114983797073364, 0.8742278218269348, -0.2499120980501175, -1.9550124406814575, -0.7902408242225647, -0.8257536292076111, -0.16573122143745422, -0.7769319415092468, 0.9272539615631104, -0.40034136176109314, -1.4465794563293457, 0.26711612939834595, -0.7926777005195618, 0.17913146317005157, -1.134297490119934, 0.28503870964050293, 0.6843699216842651, -0.6023164987564087, 0.12323345988988876, -0.24973437190055847, -1.2442634105682373, -0.45069098472595215, 0.43930336833000183, 1.88993239402771, -0.7634382843971252, 0.7743257284164429, 1.012685775756836, -0.6383277177810669, 0.0393388494849205, 0.18278080224990845, -0.2581169605255127, 0.793898344039917, -0.9980528354644775, -0.6224461793899536, 1.1913931369781494, -0.21176014840602875, -0.729070782661438, 1.4810264110565186, 0.745908796787262, -0.994933545589447, -0.36322301626205444, -0.150617316365242, -0.7953317165374756, 0.05066496133804321, -1.6207233667373657, -0.015703272074460983, 0.45014122128486633, -1.5932564735412598, -0.4520171880722046, -0.263035386800766, 1.2912230491638184, -0.15170465409755707, 1.385068416595459, -0.3619225323200226, -0.1738457828760147, -0.28458771109580994, -0.45414865016937256, 0.22789350152015686, -0.2574900984764099, -0.6150984764099121, 0.07677675783634186, -0.873593807220459, 0.31313133239746094, 1.410704493522644, 0.3106490969657898, 0.09020688384771347, 0.49226701259613037, 1.1276178359985352, 0.5136282444000244, 0.02578139491379261, -0.9188156723976135, -1.4225629568099976, 1.965876817703247, -1.508865475654602, 2.07802677154541, 0.6657793521881104, -0.04175252467393875, -1.8512009382247925, -1.9631006717681885, 1.3132866621017456, 1.1495530605316162, 2.292708158493042, 0.5317226648330688, 0.4728846848011017, -0.9226537346839905, -0.6841806173324585, 0.21829061210155487, -0.9708378314971924, -0.7042784094810486, 0.20699773728847504, 2.4158854484558105, 1.7299995422363281, -0.3651340901851654, -0.22150249779224396, -0.9606777429580688, 1.5833317041397095, -0.21000348031520844, 0.4063628613948822, 1.998715877532959, -0.22084681689739227, -1.0104470252990723, 1.3148994445800781, -2.4327235221862793, 0.17708668112754822, 2.0458731651306152, 0.2889745831489563, 0.15696239471435547, -1.3040077686309814, -0.7262616753578186, -0.3391440212726593, -0.38297924399375916, -1.2818955183029175, 0.5342485904693604, -0.21859461069107056, -0.8018968105316162, -1.4124425649642944, 0.20362891256809235, -1.1125861406326294, -1.6023000478744507, 0.18095596134662628, 1.9113740921020508, 2.1296629905700684, -0.8706335425376892, 1.6172517538070679, -0.26585379242897034, 0.20186670124530792, 1.2458680868148804, 1.302718997001648, 3.035688877105713, 1.8931608200073242, -1.2356761693954468, 0.639371395111084, -0.14306364953517914, -0.4196903109550476, 1.151924729347229, -1.2856407165527344, 1.2188825607299805, -0.12064540386199951, -1.1749355792999268, -1.1684763431549072, 0.9572166204452515, 0.44084811210632324, -0.043108679354190826, -0.4630746841430664, 1.2101060152053833, 0.04120788723230362, 1.3766522407531738, 0.6047289967536926, -0.24938683211803436, 0.5769029855728149, -0.4155716300010681, -0.5043889880180359, 1.5105737447738647, 0.09484178572893143, -1.4403032064437866, -2.280341625213623, -0.21283003687858582, -0.8329304456710815, 0.0213287603110075, -0.5767982602119446, -1.0653390884399414, 1.6866202354431152, 0.23902952671051025, -1.2303546667099, -0.23105308413505554, -0.3688325583934784, -0.5456240177154541, 2.7347848415374756, -1.3223611116409302, -0.29498589038848877, -0.9348790645599365, -0.6305564641952515, 1.748037338256836, -1.1393765211105347, -0.2181253880262375, -1.0815860033035278, -0.44063800573349, -1.3078478574752808, -0.5552093386650085, 0.03434067219495773, -0.9715198278427124, 0.9617922902107239, 0.24970176815986633, -1.1838845014572144, -0.37410253286361694, -0.9595054388046265, 0.9225816130638123, -0.18937844038009644, 0.206289142370224, 1.9136980772018433, 0.33429139852523804, -0.2825548052787781, 0.8161956667900085, 1.1169424057006836, 0.6997470259666443, -0.6369455456733704, 0.2016650289297104, -0.5672538876533508, 0.44481536746025085, -1.2712793350219727, 0.22957494854927063, -2.849630832672119, 0.6480705142021179, 0.013319199904799461, -0.0810382217168808, -0.023305416107177734, -1.3671454191207886, 1.111141562461853, 2.601999282836914, -1.202196717262268, 0.530378520488739, 0.28988099098205566, 1.1960766315460205, -1.6870951652526855, 0.2871312201023102, -0.4514211416244507, 2.1147022247314453, 0.08668264746665955, 1.2262284755706787, -0.4287239909172058, -2.4088876247406006, 0.6307234168052673, -1.3128997087478638, -1.1947659254074097, 0.7422475814819336, -0.9016420245170593, 0.2529001832008362, -1.5144745111465454, -0.2860903739929199, -0.9447851181030273, -1.1623821258544922, 0.5484328269958496, 0.17573238909244537, 0.4174495041370392, -0.5611646175384521, 0.32127052545547485, -2.22214937210083, -1.4395740032196045, -0.2672143280506134, -0.8895765542984009, 0.5699793100357056, -0.47605565190315247, 0.7367035150527954, -0.14179091155529022, 0.015121718868613243, 0.27311500906944275, 1.4516371488571167, 3.439610481262207, 0.2099294513463974, 0.2536585032939911, -0.2091391384601593, -0.9659002423286438, 1.503104329109192, 0.9327934384346008, -0.13529959321022034, -0.45567429065704346, -1.0704240798950195, 1.2272284030914307, 1.9981396198272705, 0.9428728818893433, -0.06712428480386734, -0.7943376302719116, -0.731535792350769, -0.09091730415821075, 0.13502247631549835, 0.5229671597480774, 0.8756498694419861, 0.09814140945672989, 0.004511584527790546, 1.466916799545288, 1.1714922189712524, -0.3365999460220337, 0.249731183052063, -0.9141778945922852, -0.4862332344055176, 0.5513390302658081, 0.22210370004177094, -0.058680713176727295, 0.3378502428531647, -1.0202494859695435, -0.2495245784521103, -0.40778109431266785, -0.8162984251976013, -0.6650094985961914, -0.3605651557445526, -0.3337935507297516, 1.5960602760314941, 0.26393410563468933, -0.5969876646995544, -0.016978656873106956, -0.7149153351783752, -0.05431639403104782, -1.1109427213668823, 0.26303791999816895, -0.24395054578781128, -0.13042138516902924, -0.23425665497779846, 1.7851381301879883, -0.9270155429840088, -2.0494887828826904, 0.140642449259758, 0.3242483139038086, -0.18427219986915588, 0.26125800609588623, 1.6823714971542358, 0.5813973546028137, 1.4817694425582886, 1.3549470901489258, 0.9501693248748779, -0.6610170602798462, -1.290412425994873, 0.5774736404418945, 1.0085983276367188, -1.396186351776123, 0.7603715062141418, -0.021371975541114807, -0.5039588212966919, 0.569324254989624, 1.2442831993103027, 0.4904412031173706, -2.0166001319885254, 0.8045264482498169, -1.0666910409927368, 0.864266574382782, 0.8583322167396545, 0.7199506163597107, 0.1821257323026657, 0.7957464456558228, -1.1011711359024048, -1.057382583618164, -0.7387799620628357, -0.7378836870193481, 1.9484034776687622, -0.4928646981716156, 0.6307773590087891, -0.23336203396320343, -1.312054991722107, -0.0729808658361435, 0.6502296924591064, 0.3291565179824829, -0.45859718322753906, 0.8203809857368469, -0.678520143032074, -1.0771921873092651, -1.2133301496505737, -0.4696970582008362, -1.0237053632736206, -1.0555660724639893, 0.9839520454406738, 0.7449516654014587, 0.35634270310401917, 1.8714450597763062, 0.7487626075744629, 0.19242320954799652, -2.5172600746154785, 0.9216899275779724, 0.326987087726593, -0.09642195701599121, 0.7228914499282837, 0.3150550127029419, 1.0342062711715698, -0.036766473203897476, 0.5670263171195984, -2.4223594665527344, 2.3129193782806396, -0.13239499926567078, 0.739528477191925, -0.07652889937162399, -0.11659659445285797, 1.0184621810913086, 0.4988570213317871, 0.5354239344596863, -0.9260801076889038, 0.640413224697113, -0.5592666268348694, 1.299503207206726, 0.830118715763092, -0.7441880702972412, -0.008260687813162804, 1.3703023195266724, 0.4711681008338928, -0.6669695377349854, -1.013063669204712, -0.879149854183197, 0.9368859529495239, 1.7309638261795044, -0.1236332580447197, -0.07518232613801956, 0.8292331695556641, 0.5986196398735046, -1.279555082321167, -0.05716836452484131, -0.6820923686027527, -0.6376433968544006, 1.7011017799377441, 2.0947813987731934, -0.2815965414047241, -0.14318609237670898, -0.6624651551246643, -1.3127493858337402, 0.7430840134620667, 0.0197092704474926, 0.06332796812057495, 0.6280820369720459, -0.5999991297721863, 1.0126988887786865, 0.661608099937439, 0.9298832416534424, 0.17446541786193848, 0.27709949016571045, 0.36171549558639526, -0.3949403762817383, -1.2032549381256104, -0.2558791935443878, -1.0818252563476562, -2.4754207134246826, 0.4028349816799164, -0.10125067830085754, -1.299425482749939, 0.009460901841521263, -0.9773898720741272, 1.1341532468795776, -0.5428867936134338, -1.0699344873428345, -1.4949461221694946, 0.20115524530410767, 0.021308111026883125, 0.9078343510627747, -1.6128389835357666, -0.18069560825824738, 1.2506258487701416, 0.9916577935218811, -0.8068599104881287, 0.9673953652381897, 0.23419073224067688, 1.1419202089309692, 0.7835492491722107, -0.2928961217403412, 0.5732356905937195, -0.06823010742664337, -1.3524165153503418, 0.4541436731815338, 1.1852610111236572, 0.1330392062664032, 1.522719144821167, -0.4532932937145233, -0.03933722525835037, 0.3645015358924866, -0.5925273895263672, -0.49328526854515076, -0.448731392621994, 0.6046525239944458, 0.04195486754179001, -0.9171959161758423, -0.05268552154302597, 0.03491974622011185, -0.3050841689109802, 0.19539977610111237, -1.434253454208374, -0.11340242624282837, -0.3925274908542633, -0.6482971906661987, -1.2668405771255493, 0.020016271620988846, 1.348838210105896, -0.7139568328857422, -0.21807676553726196, 0.5079355239868164, 0.23974010348320007, 0.5154904127120972, 0.6528648138046265, -0.7506853342056274, -0.32728952169418335, -0.19589115679264069, -0.2854773998260498, 0.394698828458786, 1.3980056047439575, -0.07479869574308395, -1.0393738746643066, 0.7032273411750793, -0.34382757544517517, 0.08546225726604462, 1.948832392692566, -0.02566661313176155, -0.7919730544090271, 0.29748907685279846, -0.7810949683189392, 1.9815987348556519, 1.6576604843139648, 1.3141316175460815, -0.28196853399276733, -0.9039865732192993, 0.7519140243530273, -0.44930747151374817, -0.4151538014411926, 0.7416630387306213, 0.3147158622741699, -0.2565133273601532, -1.3823574781417847, 0.7817218899726868, 1.1934040784835815, -0.8303754329681396, -0.7745059728622437, 0.29438185691833496, -0.7599713802337646, 1.1348735094070435, 0.6503841876983643, 0.41940414905548096, 0.34818869829177856, 1.7255327701568604, 0.8741298317909241, -0.4483869671821594, 0.5099740028381348, 0.6385849714279175, -0.18576018512248993, -2.0580105781555176, -1.2439738512039185, 0.32659170031547546, -0.5995108485221863, -1.687483549118042, 1.4319851398468018, -1.1697033643722534, -0.9828048348426819, 0.6065233945846558, 0.01986050233244896, 1.341199517250061, 0.3729546368122101, 1.4623304605484009, 1.959945559501648, 0.828457772731781, 0.5497927665710449, 1.2517812252044678, -0.22435125708580017, -0.46233585476875305, 1.8316999673843384, -0.4712713062763214, 0.5169201493263245, 1.1639817953109741, -0.22942863404750824, -1.0890023708343506, -0.7069639563560486, -1.2394427061080933, -0.7188272476196289, 1.1973259449005127, 0.0678698793053627, -1.1375850439071655, 0.29665234684944153, 1.600048303604126, 0.05450133979320526, -0.4251788556575775, 0.7029674649238586, 0.4020923376083374, -0.9554046988487244, -0.06043735891580582, -0.8583030104637146, 0.5612488389015198, -0.2621752917766571, -0.25423088669776917, 0.3534291088581085, 0.43356361985206604, 1.4545698165893555, -0.015419336035847664, 0.2321772277355194, 1.0393295288085938, -1.4225188493728638, 1.5102688074111938, -0.7553026676177979, 0.28304556012153625, -2.3638882637023926, 1.2937893867492676, -0.7961766123771667, 2.0452847480773926, -2.734010696411133, 0.4540838897228241, -0.5671988725662231, -0.49292707443237305, 0.20207396149635315, -0.3283556401729584, 0.06621784716844559, -0.03961601108312607, -1.1213375329971313, 0.04017387330532074, -0.6388239860534668, 0.6110455989837646, 1.1293450593948364, 1.3607261180877686, -1.1173330545425415, -0.27494072914123535, -1.7260425090789795, -0.15458180010318756, -0.8541773557662964, 0.3046121895313263, -2.0745127201080322, -0.2655492424964905, -1.884903073310852, -2.318007707595825, -1.1821410655975342, -0.8030250668525696, 1.1324609518051147, 0.09298253059387207, -0.8311179876327515, 1.3180067539215088, -0.2757977247238159, -1.7916384935379028, 1.2211211919784546, -2.1110739707946777 ]
https://github.com/huggingface/datasets/issues/5525
TypeError: Couldn't cast array of type string to null
Thanks for reporting, @TJ-Solergibert. We cannot access your Colab notebook: `There was an error loading this notebook. Ensure that the file is accessible and try again.` Could you please make it publicly accessible?
### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5
301
33
TypeError: Couldn't cast array of type string to null ### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5 Thanks for reporting, @TJ-Solergibert. We cannot access your Colab notebook: `There was an error loading this notebook. Ensure that the file is accessible and try again.` Could you please make it publicly accessible?
[ -1.2064826488494873, -0.9189274311065674, -0.7242937088012695, 1.4140011072158813, -0.16993944346904755, -1.2470320463180542, 0.10708995163440704, -1.0634067058563232, 1.6294629573822021, -0.7314059138298035, 0.2997436225414276, -1.6280189752578735, 0.07319454848766327, -0.5316691398620605, -0.7166661620140076, -0.840090811252594, -0.41156625747680664, -0.7737880349159241, 1.081563115119934, 2.5314791202545166, 1.1854294538497925, -1.4528168439865112, 2.7261860370635986, 0.626704752445221, -0.2220171093940735, -1.0334885120391846, 0.5586228370666504, -0.025628769770264626, -1.4097249507904053, -0.42979806661605835, -0.9562393426895142, -0.05945407599210739, -0.5827503800392151, -0.4684196710586548, 0.07390046119689941, 0.3281833529472351, -0.198974147439003, -0.4279957115650177, -0.5562883019447327, -0.7474882006645203, 0.43386581540107727, -0.35057228803634644, 0.9061488509178162, -0.31341394782066345, 1.8216136693954468, -0.5656200051307678, 0.47261732816696167, 0.7403810024261475, 1.3414125442504883, 0.20255833864212036, -0.022166870534420013, 0.2785365581512451, 0.41023439168930054, -0.00796324759721756, 0.5038596391677856, 1.1302872896194458, 0.671928882598877, 0.4514864981174469, 0.6967011094093323, -2.157294750213623, 1.3337411880493164, -0.9418336749076843, 0.3100432753562927, 1.3995392322540283, -0.9497741460800171, 0.3866322338581085, -1.8257445096969604, -0.055890750139951706, 0.551125168800354, -2.302626132965088, 0.19739265739917755, -1.2623553276062012, -0.571777880191803, 0.9686354398727417, 0.3232744634151459, -1.1930873394012451, 0.07888597249984741, -0.49764931201934814, 0.9838269948959351, 0.4416366517543793, 1.1475681066513062, -1.6147702932357788, -0.06031011790037155, -0.2676565945148468, 0.15301275253295898, -1.2926636934280396, -1.5212695598602295, 0.5740447044372559, 0.7208974957466125, 0.4482439458370209, -0.01729462295770645, 0.9761275053024292, -1.010184645652771, 0.8490889668464661, -0.9073366522789001, -1.7020341157913208, -1.5082321166992188, -2.3098487854003906, -2.285194158554077, 0.7532840967178345, -0.4486704468727112, -0.40789204835891724, 2.0609312057495117, -1.0817315578460693, -1.7198913097381592, 1.179760456085205, 0.22467023134231567, -0.05063961073756218, 2.413189649581909, 0.20200341939926147, -0.7297560572624207, 0.45682233572006226, -0.766491711139679, 0.8016857504844666, -0.45328643918037415, 1.2430473566055298, 0.3850112855434418, -1.0004093647003174, 1.5593819618225098, -0.3844514787197113, 0.5394997596740723, -0.6476919054985046, -0.44974905252456665, -0.7294968366622925, 0.2990933656692505, 1.934890866279602, -0.3211618661880493, 1.57985258102417, -0.3536476492881775, -1.579772710800171, -1.510041356086731, 0.8364006876945496, 0.5660471320152283, -0.8174986839294434, 0.16047854721546173, -0.32536086440086365, 0.06925901770591736, -0.015827907249331474, 1.0564860105514526, 1.312841534614563, 0.704845666885376, -0.2883642911911011, -0.8692852258682251, 0.18614830076694489, -0.1058037132024765, -0.7322840094566345, -1.7805695533752441, -0.38932004570961, 0.14994701743125916, 0.6262706518173218, -1.2920314073562622, 1.7374156713485718, 0.9021965861320496, 1.9695943593978882, 1.0291770696640015, -0.4103844165802002, 1.543657660484314, 0.05660249665379524, 1.8283103704452515, -0.4854509234428406, 0.6790310740470886, -0.39301708340644836, -1.1991307735443115, 0.8091164827346802, -0.3522728979587555, -2.047581434249878, -0.6022056341171265, -0.8055959939956665, -0.194158136844635, -0.7400912046432495, 0.9191432595252991, -0.2696923613548279, -1.3673362731933594, 0.2164570391178131, -0.7568238377571106, 0.10522302985191345, -1.2499696016311646, 0.3008008897304535, 0.7425081133842468, -0.6458553671836853, 0.05442654713988304, -0.2621268332004547, -1.2614871263504028, -0.43233522772789, 0.3303215801715851, 1.8121927976608276, -0.741732656955719, 0.9248652458190918, 1.00205397605896, -0.6546762585639954, 0.023977596312761307, 0.3717903792858124, -0.3636133074760437, 0.9155974388122559, -1.071539282798767, -0.45061975717544556, 1.118525505065918, -0.24919019639492035, -0.5451115369796753, 1.4160984754562378, 0.6765632033348083, -1.0392173528671265, -0.2533203065395355, -0.140953928232193, -0.8814660906791687, 0.056349482387304306, -1.685321569442749, -0.16732920706272125, 0.2814067304134369, -1.6041806936264038, -0.4764825999736786, -0.11581975221633911, 1.3039367198944092, -0.07284252345561981, 1.4762544631958008, -0.36394572257995605, -0.14111943542957306, -0.4303175210952759, -0.4547225832939148, 0.18807585537433624, -0.23694580793380737, -0.5530935525894165, 0.2832331359386444, -0.8327776193618774, 0.29217684268951416, 1.4682698249816895, 0.2891600430011749, 0.07378500699996948, 0.5029501914978027, 1.0083250999450684, 0.43924978375434875, -0.11148498952388763, -0.8914489150047302, -1.5733492374420166, 2.08596134185791, -1.4639275074005127, 2.0655479431152344, 0.9188693165779114, -0.06590261310338974, -1.8116155862808228, -1.8977806568145752, 1.3213906288146973, 1.1149245500564575, 2.3407986164093018, 0.5084308385848999, 0.4276596009731293, -0.8386525511741638, -0.6358882784843445, 0.37367334961891174, -0.9794812798500061, -0.7952980995178223, 0.09141121804714203, 2.3670666217803955, 1.7298370599746704, -0.39840567111968994, -0.21680258214473724, -1.0174462795257568, 1.3464818000793457, -0.10960900783538818, 0.24475404620170593, 1.9340136051177979, -0.23348872363567352, -1.0363690853118896, 1.25851309299469, -2.3508124351501465, 0.22302182018756866, 1.994858980178833, 0.2499731183052063, 0.10494494438171387, -1.4014253616333008, -0.6522437334060669, -0.2657300531864166, -0.3596164286136627, -1.188962697982788, 0.5370283722877502, -0.2333051860332489, -0.8563972115516663, -1.44149649143219, 0.0879417210817337, -1.2205711603164673, -1.706362009048462, 0.24957609176635742, 1.9029011726379395, 2.0774693489074707, -0.8044805526733398, 1.42855966091156, -0.32230034470558167, 0.09697063267230988, 1.1785938739776611, 1.1547949314117432, 3.1547863483428955, 1.9673866033554077, -1.3211549520492554, 0.6545513868331909, -0.1077718585729599, -0.41843149065971375, 1.0579077005386353, -1.1363695859909058, 1.252600073814392, -0.17523479461669922, -1.198598861694336, -1.140873670578003, 1.026800274848938, 0.5089576840400696, -0.009403657168149948, -0.5008028149604797, 1.2543132305145264, 0.1422317773103714, 1.345314860343933, 0.5263231992721558, -0.33218055963516235, 0.5814900398254395, -0.3354872167110443, -0.5071052312850952, 1.6053221225738525, 0.1579374372959137, -1.4690312147140503, -2.3118040561676025, -0.22824037075042725, -0.8418119549751282, 0.016932589933276176, -0.6544350981712341, -0.976709246635437, 1.5937596559524536, 0.4311339259147644, -1.2269840240478516, -0.3181144893169403, -0.4049175977706909, -0.6052993535995483, 2.6524622440338135, -1.4663820266723633, -0.20198775827884674, -0.9500134587287903, -0.5403783321380615, 1.546844720840454, -1.2502834796905518, -0.2616197466850281, -1.0278751850128174, -0.5409480929374695, -1.2140254974365234, -0.5248239636421204, -0.01027345284819603, -0.8534460663795471, 0.7761956453323364, 0.12877735495567322, -1.1366723775863647, -0.31172797083854675, -0.8686589002609253, 0.8929299116134644, -0.08153036236763, 0.15991970896720886, 1.8859314918518066, 0.31384557485580444, -0.3457481563091278, 0.7352746725082397, 1.1620838642120361, 0.6472179889678955, -0.6154339909553528, 0.1867941915988922, -0.6199253797531128, 0.32793381810188293, -1.2834185361862183, 0.27731049060821533, -2.8492579460144043, 0.6403761506080627, -0.017764542251825333, -0.03972171992063522, -0.00796489417552948, -1.25532865524292, 1.0849462747573853, 2.5366756916046143, -1.1466498374938965, 0.5159275531768799, 0.35276252031326294, 1.1671525239944458, -1.6063992977142334, 0.31977421045303345, -0.4012552797794342, 2.118408441543579, 0.23451097309589386, 1.204934000968933, -0.5099663734436035, -2.3372960090637207, 0.5848149657249451, -1.217393159866333, -1.095610499382019, 0.7770936489105225, -0.8156926035881042, 0.04710831120610237, -1.43180251121521, -0.20719918608665466, -0.82158362865448, -1.2627220153808594, 0.6064059734344482, 0.12160935997962952, 0.5181117653846741, -0.6240962743759155, 0.3083176910877228, -2.191028356552124, -1.413387656211853, -0.20952560007572174, -0.9598876237869263, 0.4540419280529022, -0.40197357535362244, 0.7671192288398743, -0.12882447242736816, 0.03964795544743538, 0.2763849198818207, 1.3428211212158203, 3.4001240730285645, 0.18615387380123138, 0.3175264000892639, -0.2273261398077011, -0.9547107219696045, 1.4278613328933716, 0.9721924066543579, -0.18893273174762726, -0.6151393055915833, -0.986440122127533, 1.2851073741912842, 2.0064499378204346, 1.0309641361236572, 0.07646718621253967, -0.8206656575202942, -0.8163207769393921, -0.03001304529607296, 0.17325136065483093, 0.48428502678871155, 0.9571118354797363, 0.01274924911558628, 0.1589062511920929, 1.4867767095565796, 1.2668465375900269, -0.3849075138568878, 0.40528586506843567, -0.8460554480552673, -0.47764506936073303, 0.4399561882019043, 0.3719539940357208, 0.019596509635448456, 0.3871281147003174, -1.050658941268921, -0.23236405849456787, -0.3785174787044525, -0.9630987048149109, -0.6830088496208191, -0.36092180013656616, -0.32970768213272095, 1.6567646265029907, 0.12055724859237671, -0.4689699113368988, -0.03631066903471947, -0.7377476096153259, -0.10263703763484955, -1.0218498706817627, 0.2884540259838104, -0.08808732032775879, -0.029692640528082848, -0.0688556581735611, 1.8268592357635498, -0.8775319457054138, -2.1018924713134766, 0.2773279845714569, 0.18730734288692474, -0.3153020441532135, 0.1279185265302658, 1.7060335874557495, 0.5227479338645935, 1.3598757982254028, 1.4183229207992554, 0.9493477940559387, -0.6382102370262146, -1.3003205060958862, 0.7312371730804443, 1.0228147506713867, -1.4829070568084717, 0.7594959735870361, -0.11702191829681396, -0.5550186038017273, 0.692959725856781, 1.2893880605697632, 0.47720131278038025, -2.074021100997925, 0.8202539086341858, -0.9533306956291199, 0.815619170665741, 0.7297071218490601, 0.7720622420310974, 0.22114989161491394, 0.7905065417289734, -1.2730547189712524, -1.0967906713485718, -0.6983134150505066, -0.6869490146636963, 1.9923665523529053, -0.27320152521133423, 0.4820537269115448, -0.19589008390903473, -1.329689621925354, -0.14452745020389557, 0.6636043190956116, 0.31866368651390076, -0.42914992570877075, 0.8072984218597412, -0.7033553123474121, -1.1164170503616333, -1.3777353763580322, -0.4729609787464142, -1.0067678689956665, -0.9494995474815369, 1.019142508506775, 0.8367965817451477, 0.3831239938735962, 1.876139760017395, 0.5955665111541748, 0.21024610102176666, -2.6807057857513428, 0.9453166127204895, 0.2913898527622223, -0.08941982686519623, 0.9406613707542419, 0.24582260847091675, 1.0511598587036133, 0.022265158593654633, 0.5325273871421814, -2.4069151878356934, 2.30527400970459, -0.20373740792274475, 0.7694661617279053, 0.0028766151517629623, -0.09082713723182678, 1.1263586282730103, 0.6133241653442383, 0.6039421558380127, -1.0715429782867432, 0.7484169602394104, -0.5595564842224121, 1.178586483001709, 0.8909516930580139, -0.833932101726532, -0.022284649312496185, 1.2801061868667603, 0.43981772661209106, -0.5500218868255615, -0.9169597029685974, -0.9597451686859131, 0.9130001068115234, 1.870712161064148, 0.015765046700835228, 0.06669220328330994, 0.8139455914497375, 0.6297126412391663, -1.301984190940857, 0.049408208578825, -0.7317147850990295, -0.7826243042945862, 1.5854816436767578, 2.046271800994873, -0.08253856003284454, -0.15238168835639954, -0.6177942752838135, -1.3249531984329224, 0.713923990726471, -0.08272416889667511, 0.19037026166915894, 0.6807527542114258, -0.6352591514587402, 1.1369359493255615, 0.8336157202720642, 0.9736645817756653, 0.162462055683136, 0.13198673725128174, 0.31207871437072754, -0.2636782228946686, -1.1932308673858643, -0.3397507071495056, -1.0651440620422363, -2.497375249862671, 0.5028820037841797, -0.2047100067138672, -1.4599403142929077, 0.02242063358426094, -0.989467203617096, 0.8589890003204346, -0.5672449469566345, -1.070241093635559, -1.5154922008514404, 0.1904413104057312, -0.1812528371810913, 0.8618140816688538, -1.6226661205291748, -0.1306317299604416, 1.2644935846328735, 0.9479933381080627, -0.5759748220443726, 1.045301914215088, 0.2390689104795456, 1.0152336359024048, 0.8419032692909241, -0.342933714389801, 0.46362558007240295, 0.21188116073608398, -1.3531858921051025, 0.4251921474933624, 1.1886838674545288, 0.1730801910161972, 1.4571707248687744, -0.5902438163757324, 0.061108749359846115, 0.4114317297935486, -0.43518227338790894, -0.45506417751312256, -0.5956807732582092, 0.6998549699783325, 0.029785417020320892, -0.9619534015655518, -0.015227132476866245, -0.18114925920963287, -0.21575111150741577, 0.14989174902439117, -1.5340821743011475, -0.14132530987262726, -0.4300469160079956, -0.612056314945221, -1.2995587587356567, -0.013561815023422241, 1.3963310718536377, -0.7946202158927917, -0.195717915892601, 0.49664992094039917, 0.40932247042655945, 0.521648108959198, 0.6910561919212341, -0.637847900390625, -0.343877375125885, -0.1847730576992035, -0.3700973391532898, 0.36703282594680786, 1.3134040832519531, -0.10790769755840302, -0.9793568253517151, 0.6405271887779236, -0.40828216075897217, 0.09769943356513977, 1.9777445793151855, 0.11438141763210297, -0.8091909885406494, 0.3426537811756134, -0.7196179628372192, 1.9374216794967651, 1.6590934991836548, 1.3411504030227661, -0.14245647192001343, -0.9309825301170349, 0.691687285900116, -0.24884124100208282, -0.33762961626052856, 0.913541316986084, 0.459381639957428, -0.24013552069664001, -1.4418559074401855, 0.5865388512611389, 1.207436442375183, -0.9088522791862488, -0.7634387612342834, 0.0853690505027771, -0.8102178573608398, 1.1254141330718994, 0.704328715801239, 0.40226125717163086, 0.20410355925559998, 1.6445486545562744, 0.8105366230010986, -0.5685667991638184, 0.5342946648597717, 0.481080561876297, -0.1880808025598526, -2.068052291870117, -1.0753346681594849, 0.36192652583122253, -0.4810675084590912, -1.604857325553894, 1.4154220819473267, -1.2110971212387085, -0.9522743225097656, 0.5266264081001282, 0.011673236265778542, 1.3291460275650024, 0.3128810226917267, 1.6525813341140747, 2.0704126358032227, 0.9377515912055969, 0.3565869629383087, 1.2712758779525757, -0.15753640234470367, -0.36971983313560486, 1.8146069049835205, -0.4622665345668793, 0.47909849882125854, 1.1032419204711914, -0.4504288136959076, -1.0579382181167603, -0.7473702430725098, -1.1441904306411743, -0.6741424798965454, 1.2164677381515503, 0.05428130552172661, -1.1023012399673462, 0.26927536725997925, 1.535311222076416, 0.10574738681316376, -0.29539191722869873, 0.591090738773346, 0.43813711404800415, -0.7751448750495911, -0.08868008852005005, -0.9051269888877869, 0.4568600356578827, -0.2158156782388687, -0.4143851101398468, 0.30388420820236206, 0.4485779404640198, 1.278358817100525, 0.005394251085817814, 0.06871788203716278, 1.2792872190475464, -1.4575101137161255, 1.4623092412948608, -0.6821848154067993, 0.267234742641449, -2.334562301635742, 1.3567090034484863, -0.7114542126655579, 1.9532861709594727, -2.6333062648773193, 0.4398776888847351, -0.5969768166542053, -0.5054420232772827, 0.31963613629341125, -0.2874462306499481, 0.16582895815372467, -0.17217090725898743, -1.0721819400787354, -0.12026596069335938, -0.7483190298080444, 0.6068869233131409, 1.1470698118209839, 1.3500182628631592, -1.086609959602356, -0.23896300792694092, -1.6842724084854126, -0.15921428799629211, -0.6949644088745117, 0.2823667824268341, -1.978675127029419, -0.17819547653198242, -1.9814075231552124, -2.348574161529541, -1.3796300888061523, -0.8353163599967957, 1.1368812322616577, 0.19342048466205597, -0.917538583278656, 1.129226803779602, -0.3464314639568329, -1.7763736248016357, 1.0902833938598633, -2.1467998027801514 ]
https://github.com/huggingface/datasets/issues/5525
TypeError: Couldn't cast array of type string to null
I swear it's public, I've checked the settings and I've been able to open it in incognito mode. Notebook: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?usp=sharing Anyway, this is the code to reproduce the error: ```python3 from datasets import ClassLabel from datasets import load_dataset europarl_ds = load_dataset("tj-solergibert/Europarl-ST") source_lang = "nl" languages = list(europarl_ds["train"][0]["transcriptions"].keys()) ClassLabels = ClassLabel(num_classes = len(languages), names = languages) def map_label2id(example): example['dest_lang'] = ClassLabels.str2int(example['dest_lang']) return example def unfold_transcriptions(example): for lang in languages: example[lang] = example["transcriptions"][lang] return example def unroll(batch, src_lang, dest_langs): source_t, dest_t, dest_l = [], [], [] for lang in dest_langs: source_t += batch[src_lang] dest_t += batch[lang] dest_l += [lang] return_dict = {"source_text": source_t, "dest_text": dest_t, "dest_lang": dest_l} return return_dict def preprocess_split(ds_split, src_lang): dest_langs = [x for x in languages if x != src_lang] ds_split = ds_split.map(unroll, fn_kwargs= {"src_lang": src_lang, "dest_langs": dest_langs}, batched = True, batch_size = 1, remove_columns= list(languages)) ds_split = ds_split.filter(lambda x: x["source_text"] != None and x["dest_text"] != None) # Remove incomplete translations ds_split = ds_split.filter(lambda x: x["source_text"] != "None" and x["dest_text"] != "None") ds_split = ds_split.map(map_label2id) ds_split = ds_split.cast_column("dest_lang", ClassLabels) return ds_split def reset_cortas(example): for lang in languages: if isinstance(example[lang], str): if example[lang].isnumeric () or len(example[lang]) <= 5: example[lang] = "None" return example def clean_dataset(dataset): # Remove columns dataset = dataset.remove_columns(["original_speech", "original_language", "audio_path", "segment_start", "segment_end"]) # Unfold dataset = dataset.map(unfold_transcriptions, remove_columns = ["transcriptions"]) dataset = dataset.map(reset_cortas) return dataset processed_europarl = clean_dataset(europarl_ds["test"]) new_train_ds = preprocess_split(processed_europarl, 'nl') ```
### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5
301
226
TypeError: Couldn't cast array of type string to null ### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5 I swear it's public, I've checked the settings and I've been able to open it in incognito mode. Notebook: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?usp=sharing Anyway, this is the code to reproduce the error: ```python3 from datasets import ClassLabel from datasets import load_dataset europarl_ds = load_dataset("tj-solergibert/Europarl-ST") source_lang = "nl" languages = list(europarl_ds["train"][0]["transcriptions"].keys()) ClassLabels = ClassLabel(num_classes = len(languages), names = languages) def map_label2id(example): example['dest_lang'] = ClassLabels.str2int(example['dest_lang']) return example def unfold_transcriptions(example): for lang in languages: example[lang] = example["transcriptions"][lang] return example def unroll(batch, src_lang, dest_langs): source_t, dest_t, dest_l = [], [], [] for lang in dest_langs: source_t += batch[src_lang] dest_t += batch[lang] dest_l += [lang] return_dict = {"source_text": source_t, "dest_text": dest_t, "dest_lang": dest_l} return return_dict def preprocess_split(ds_split, src_lang): dest_langs = [x for x in languages if x != src_lang] ds_split = ds_split.map(unroll, fn_kwargs= {"src_lang": src_lang, "dest_langs": dest_langs}, batched = True, batch_size = 1, remove_columns= list(languages)) ds_split = ds_split.filter(lambda x: x["source_text"] != None and x["dest_text"] != None) # Remove incomplete translations ds_split = ds_split.filter(lambda x: x["source_text"] != "None" and x["dest_text"] != "None") ds_split = ds_split.map(map_label2id) ds_split = ds_split.cast_column("dest_lang", ClassLabels) return ds_split def reset_cortas(example): for lang in languages: if isinstance(example[lang], str): if example[lang].isnumeric () or len(example[lang]) <= 5: example[lang] = "None" return example def clean_dataset(dataset): # Remove columns dataset = dataset.remove_columns(["original_speech", "original_language", "audio_path", "segment_start", "segment_end"]) # Unfold dataset = dataset.map(unfold_transcriptions, remove_columns = ["transcriptions"]) dataset = dataset.map(reset_cortas) return dataset processed_europarl = clean_dataset(europarl_ds["test"]) new_train_ds = preprocess_split(processed_europarl, 'nl') ```
[ -1.2144064903259277, -0.9434266686439514, -0.7320006489753723, 1.4167879819869995, -0.18503841757774353, -1.2450969219207764, 0.12323015183210373, -1.05970299243927, 1.626576542854309, -0.7105931639671326, 0.28908371925354004, -1.6303064823150635, 0.06679137051105499, -0.5276129245758057, -0.7326440811157227, -0.8349220156669617, -0.4099969267845154, -0.7990682125091553, 1.0686440467834473, 2.520580530166626, 1.1692779064178467, -1.4355107545852661, 2.747035503387451, 0.6494593620300293, -0.2128327339887619, -1.0497294664382935, 0.5452103018760681, -0.03983129560947418, -1.373048186302185, -0.4406241476535797, -0.9520531296730042, -0.05680965632200241, -0.5920190215110779, -0.4709590971469879, 0.07063744962215424, 0.34692132472991943, -0.18969260156154633, -0.3954314887523651, -0.570176899433136, -0.7255982756614685, 0.4401141405105591, -0.37793877720832825, 0.909038782119751, -0.31509318947792053, 1.809264898300171, -0.5364921689033508, 0.486136794090271, 0.7643553018569946, 1.3481230735778809, 0.1691768765449524, -0.02322394773364067, 0.2777356207370758, 0.417608380317688, 0.0005849730223417282, 0.49958622455596924, 1.1776865720748901, 0.6513441801071167, 0.4182887673377991, 0.6909278035163879, -2.1551895141601562, 1.3339945077896118, -0.9189231991767883, 0.33648186922073364, 1.398538589477539, -0.9488562345504761, 0.37762847542762756, -1.8298993110656738, -0.036723777651786804, 0.5726950168609619, -2.2954647541046143, 0.20999015867710114, -1.2743372917175293, -0.5679429769515991, 0.9601548910140991, 0.3255854547023773, -1.1833250522613525, 0.10145828872919083, -0.5080055594444275, 0.9872605800628662, 0.45875266194343567, 1.1587913036346436, -1.611616611480713, -0.060454629361629486, -0.25831568241119385, 0.16984789073467255, -1.2891610860824585, -1.5476932525634766, 0.571389377117157, 0.7112593650817871, 0.46771514415740967, -0.036465369164943695, 0.9817112684249878, -1.041000485420227, 0.8562978506088257, -0.9046740531921387, -1.6989471912384033, -1.4936699867248535, -2.3367605209350586, -2.259948492050171, 0.744319498538971, -0.44510987401008606, -0.4004746377468109, 2.0566000938415527, -1.0935463905334473, -1.7143890857696533, 1.1783252954483032, 0.2407241314649582, -0.017198560759425163, 2.408414602279663, 0.2154737412929535, -0.7278909087181091, 0.45599791407585144, -0.7770017981529236, 0.7931274771690369, -0.44008904695510864, 1.2363810539245605, 0.4070855975151062, -0.9705186486244202, 1.5368659496307373, -0.38809776306152344, 0.5479196310043335, -0.6542404890060425, -0.4427873194217682, -0.7432060837745667, 0.2912333011627197, 1.9271700382232666, -0.3271932601928711, 1.5707266330718994, -0.36229047179222107, -1.5659117698669434, -1.518130898475647, 0.8346264362335205, 0.5684058666229248, -0.8052456378936768, 0.15731315314769745, -0.37735289335250854, 0.08776043355464935, -0.033628132194280624, 1.0690202713012695, 1.312957525253296, 0.7055091261863708, -0.2839640974998474, -0.8720096945762634, 0.18205691874027252, -0.10922568291425705, -0.7077971696853638, -1.8199241161346436, -0.36767181754112244, 0.1859845519065857, 0.6422302722930908, -1.2741410732269287, 1.7279958724975586, 0.9096146821975708, 1.9667954444885254, 1.0200093984603882, -0.4085868299007416, 1.5360866785049438, 0.06871891021728516, 1.8232885599136353, -0.4991782605648041, 0.6609150171279907, -0.3741762042045593, -1.18193519115448, 0.8283951878547668, -0.36049413681030273, -2.051449775695801, -0.5931912064552307, -0.819633424282074, -0.19108884036540985, -0.7378316521644592, 0.9135524034500122, -0.2814446687698364, -1.3748886585235596, 0.21595145761966705, -0.7681766748428345, 0.102114237844944, -1.2203726768493652, 0.2800869345664978, 0.7396929264068604, -0.6329770088195801, 0.03596063703298569, -0.26083889603614807, -1.2505156993865967, -0.42934003472328186, 0.3475593030452728, 1.8054848909378052, -0.7316133379936218, 0.9256367087364197, 1.0149394273757935, -0.6482208967208862, 0.020861295983195305, 0.3832649886608124, -0.3471606373786926, 0.8989487290382385, -1.094866156578064, -0.44885915517807007, 1.10340416431427, -0.24690407514572144, -0.5761311054229736, 1.424845576286316, 0.7007089853286743, -1.049679160118103, -0.25863009691238403, -0.14363525807857513, -0.8702200055122375, 0.0544501394033432, -1.6665918827056885, -0.1823347955942154, 0.28282007575035095, -1.6158170700073242, -0.49463731050491333, -0.15029004216194153, 1.3205091953277588, -0.0774320662021637, 1.4846861362457275, -0.3515836298465729, -0.13156183063983917, -0.4107627868652344, -0.4722333252429962, 0.2012595534324646, -0.24480044841766357, -0.5700545310974121, 0.2607623338699341, -0.8310050368309021, 0.2934207618236542, 1.466470718383789, 0.3141244649887085, 0.08045347034931183, 0.5195830464363098, 1.0217739343643188, 0.41772472858428955, -0.08546215295791626, -0.9075071811676025, -1.5870447158813477, 2.0538032054901123, -1.483986496925354, 2.0552151203155518, 0.9211354851722717, -0.05973131209611893, -1.8064595460891724, -1.8676568269729614, 1.32114577293396, 1.1133434772491455, 2.3441004753112793, 0.5104466676712036, 0.42845064401626587, -0.8425713777542114, -0.6381353139877319, 0.3689548671245575, -0.9643577337265015, -0.7878607511520386, 0.09318557381629944, 2.368741035461426, 1.7685613632202148, -0.41367045044898987, -0.2470064014196396, -1.0068639516830444, 1.3670682907104492, -0.11657075583934784, 0.25230109691619873, 1.9740684032440186, -0.2130320817232132, -1.0014084577560425, 1.2615257501602173, -2.346881628036499, 0.23518778383731842, 1.992432951927185, 0.24594886600971222, 0.09293341636657715, -1.4336142539978027, -0.6337578892707825, -0.2797795236110687, -0.3907255530357361, -1.2150988578796387, 0.5371401309967041, -0.27940335869789124, -0.8568918108940125, -1.4611276388168335, 0.07176142185926437, -1.2084203958511353, -1.7066304683685303, 0.24224965274333954, 1.885608434677124, 2.0870516300201416, -0.7991194725036621, 1.448203682899475, -0.3515405058860779, 0.10443267971277237, 1.1735299825668335, 1.1881617307662964, 3.1480674743652344, 1.970007300376892, -1.3236967325210571, 0.6511972546577454, -0.1417471170425415, -0.4082909822463989, 1.0403680801391602, -1.131828784942627, 1.2385165691375732, -0.16240034997463226, -1.1837258338928223, -1.11292564868927, 1.058356761932373, 0.5174930095672607, -0.013861682265996933, -0.500734806060791, 1.2603371143341064, 0.11365043371915817, 1.3647981882095337, 0.5594215393066406, -0.3436942398548126, 0.5768259167671204, -0.34185391664505005, -0.49579519033432007, 1.60664701461792, 0.13138888776302338, -1.4968394041061401, -2.3267300128936768, -0.23522943258285522, -0.850432276725769, 0.012653037905693054, -0.6459307670593262, -0.9999487996101379, 1.5871227979660034, 0.41521504521369934, -1.199285864830017, -0.3193798065185547, -0.3938615322113037, -0.582383394241333, 2.6409804821014404, -1.439820647239685, -0.20949047803878784, -0.9421799182891846, -0.5180143713951111, 1.5460025072097778, -1.2528682947158813, -0.23883499205112457, -1.054578185081482, -0.5538767576217651, -1.2013750076293945, -0.5260439515113831, -0.024792877957224846, -0.8493204116821289, 0.7903352975845337, 0.13800323009490967, -1.1379997730255127, -0.28554868698120117, -0.8651480674743652, 0.8945494294166565, -0.09034156054258347, 0.1642189472913742, 1.8743633031845093, 0.3204282224178314, -0.3715447187423706, 0.7354146838188171, 1.1564947366714478, 0.6307103037834167, -0.6161003708839417, 0.14896263182163239, -0.6271744966506958, 0.2939537465572357, -1.2857540845870972, 0.26798126101493835, -2.858234167098999, 0.6564332842826843, -0.028867749497294426, -0.03104936145246029, -0.02063487283885479, -1.2563292980194092, 1.0801461935043335, 2.544855833053589, -1.1549328565597534, 0.5143296718597412, 0.3427577614784241, 1.1703202724456787, -1.6155916452407837, 0.3025940954685211, -0.4070679545402527, 2.0955734252929688, 0.24393247067928314, 1.2184765338897705, -0.50063556432724, -2.3307394981384277, 0.5748538970947266, -1.2069422006607056, -1.074500560760498, 0.7722323536872864, -0.8236809968948364, 0.06748533993959427, -1.451974868774414, -0.18861030042171478, -0.8495966196060181, -1.2298578023910522, 0.62298983335495, 0.12000950425863266, 0.5156986117362976, -0.6472530961036682, 0.3214353024959564, -2.1930668354034424, -1.4184128046035767, -0.19402606785297394, -0.9312002658843994, 0.477079302072525, -0.3840346932411194, 0.7575730085372925, -0.10787053406238556, 0.030854439362883568, 0.26821276545524597, 1.3619327545166016, 3.388917922973633, 0.17784570157527924, 0.31291523575782776, -0.2236158698797226, -0.9608069658279419, 1.427011251449585, 0.9844768047332764, -0.1461828351020813, -0.6113918423652649, -0.9910328984260559, 1.2836989164352417, 2.017117738723755, 1.047534704208374, 0.06037095934152603, -0.8447321653366089, -0.7963501214981079, -0.02527882531285286, 0.15302763879299164, 0.5211144685745239, 0.9696923494338989, -0.03541673347353935, 0.14337287843227386, 1.5032117366790771, 1.2581677436828613, -0.3961274027824402, 0.4044663608074188, -0.8563200235366821, -0.46269872784614563, 0.43116405606269836, 0.35496458411216736, 0.009989084675908089, 0.4176913797855377, -1.0770617723464966, -0.23140889406204224, -0.3670387268066406, -0.9571152925491333, -0.6869314312934875, -0.36750930547714233, -0.33138731122016907, 1.6439522504806519, 0.1455138921737671, -0.4380618631839752, -0.028887975960969925, -0.7585021257400513, -0.10272815078496933, -1.0422743558883667, 0.2736699879169464, -0.11144669353961945, -0.022167470306158066, -0.09005068242549896, 1.7791199684143066, -0.8656589388847351, -2.1010642051696777, 0.2587437331676483, 0.20374222099781036, -0.31109583377838135, 0.16391386091709137, 1.7279318571090698, 0.5405097007751465, 1.3388663530349731, 1.3939906358718872, 0.9664326906204224, -0.6154151558876038, -1.2890201807022095, 0.7209001779556274, 1.0190653800964355, -1.4630486965179443, 0.7716537117958069, -0.12402574717998505, -0.5706343650817871, 0.7341964244842529, 1.2999414205551147, 0.4774487614631653, -2.082634210586548, 0.8468539714813232, -0.9749775528907776, 0.8055741190910339, 0.7125669717788696, 0.7768008708953857, 0.24281732738018036, 0.8185925483703613, -1.2737457752227783, -1.107125997543335, -0.7312620282173157, -0.6889764666557312, 1.9743294715881348, -0.25690770149230957, 0.473228394985199, -0.1917891800403595, -1.3114078044891357, -0.16156005859375, 0.6754266619682312, 0.3194407820701599, -0.4087246358394623, 0.795810341835022, -0.7139496207237244, -1.128016471862793, -1.3598477840423584, -0.45118966698646545, -0.9821611642837524, -0.9807106256484985, 1.0109727382659912, 0.8205944299697876, 0.4187871813774109, 1.8760093450546265, 0.6168206334114075, 0.19811254739761353, -2.6418254375457764, 0.9371006488800049, 0.32623550295829773, -0.09402763098478317, 0.934398353099823, 0.24596981704235077, 1.0818274021148682, 0.02628345601260662, 0.5499542951583862, -2.4171969890594482, 2.248772144317627, -0.20360371470451355, 0.7626087665557861, -0.014994163997471333, -0.11821997910737991, 1.1170356273651123, 0.6055004000663757, 0.5960047245025635, -1.0787415504455566, 0.7387538552284241, -0.5763320922851562, 1.1746655702590942, 0.9034739136695862, -0.8223049640655518, -0.022578135132789612, 1.2984174489974976, 0.4228667914867401, -0.5607585310935974, -0.9085198640823364, -0.968923032283783, 0.8891400098800659, 1.8704584836959839, -0.006260093301534653, 0.07751960307359695, 0.8055347204208374, 0.6350765228271484, -1.3062607049942017, 0.02925722487270832, -0.738396942615509, -0.7601383924484253, 1.6219515800476074, 2.0565996170043945, -0.11161747574806213, -0.14420530200004578, -0.6284886002540588, -1.3177282810211182, 0.6931517124176025, -0.08879941701889038, 0.18155209720134735, 0.6866767406463623, -0.6123669743537903, 1.1147300004959106, 0.8015716671943665, 0.9986204504966736, 0.13586047291755676, 0.13879252970218658, 0.337443083524704, -0.28775662183761597, -1.1640467643737793, -0.3581008017063141, -1.0854164361953735, -2.4855716228485107, 0.4826783835887909, -0.21014843881130219, -1.4730130434036255, 0.006960019469261169, -0.9731824398040771, 0.8735185265541077, -0.5490882396697998, -1.0412819385528564, -1.5026452541351318, 0.1948072612285614, -0.17636889219284058, 0.8584545254707336, -1.613281011581421, -0.14314039051532745, 1.2816569805145264, 0.9365563988685608, -0.563174843788147, 1.042659044265747, 0.28190720081329346, 1.0146605968475342, 0.8151503801345825, -0.3735550045967102, 0.47087666392326355, 0.2099645435810089, -1.3593981266021729, 0.455364465713501, 1.1931943893432617, 0.179563507437706, 1.450023889541626, -0.5601329207420349, 0.05556107312440872, 0.412462055683136, -0.46924638748168945, -0.4640029966831207, -0.5493989586830139, 0.6902960538864136, 0.014557670801877975, -0.9766131043434143, 0.00024290289729833603, -0.1840672492980957, -0.2206227034330368, 0.14517830312252045, -1.524735689163208, -0.15456914901733398, -0.4156257212162018, -0.6224808096885681, -1.3016027212142944, 0.022546419873833656, 1.3982840776443481, -0.7852547764778137, -0.23057834804058075, 0.47695839405059814, 0.44482311606407166, 0.5178503394126892, 0.6620011925697327, -0.6486068367958069, -0.3573859632015228, -0.19561675190925598, -0.361299067735672, 0.35796087980270386, 1.2988471984863281, -0.12069771438837051, -0.9924294948577881, 0.6403946280479431, -0.4445480704307556, 0.07091572880744934, 1.9421298503875732, 0.10931181907653809, -0.8152288198471069, 0.3413076102733612, -0.7284084558486938, 1.9429807662963867, 1.6592364311218262, 1.3269317150115967, -0.18224523961544037, -0.8912950754165649, 0.6693806052207947, -0.26257070899009705, -0.3466585576534271, 0.9012139439582825, 0.4518929719924927, -0.24646702408790588, -1.4308634996414185, 0.5763587951660156, 1.2298171520233154, -0.9079114198684692, -0.776619017124176, 0.09587106108665466, -0.8001890182495117, 1.1528716087341309, 0.7251584529876709, 0.40640366077423096, 0.21729470789432526, 1.643131971359253, 0.8061794638633728, -0.5952321290969849, 0.5467913150787354, 0.4718506336212158, -0.20259767770767212, -2.0723650455474854, -1.039111614227295, 0.3717671036720276, -0.4583245515823364, -1.6027981042861938, 1.3893648386001587, -1.1976523399353027, -0.9829055666923523, 0.5147351622581482, 0.006334974430501461, 1.30852472782135, 0.32585662603378296, 1.6309043169021606, 2.0710530281066895, 0.9470848441123962, 0.38679370284080505, 1.2896537780761719, -0.17057861387729645, -0.378459095954895, 1.829371452331543, -0.44893157482147217, 0.4804846942424774, 1.113338828086853, -0.45928987860679626, -1.0746015310287476, -0.7520014643669128, -1.147708773612976, -0.637700617313385, 1.2363632917404175, 0.07190009951591492, -1.1183801889419556, 0.2566045820713043, 1.5319318771362305, 0.13975612819194794, -0.3121212422847748, 0.626707911491394, 0.46058839559555054, -0.7720785140991211, -0.10166823118925095, -0.9156507253646851, 0.4608118534088135, -0.2307225465774536, -0.4142448604106903, 0.31842461228370667, 0.46813449263572693, 1.2792000770568848, -0.005244268104434013, 0.06491953134536743, 1.273741364479065, -1.4298113584518433, 1.4790871143341064, -0.6558672189712524, 0.25024858117103577, -2.3449301719665527, 1.3455291986465454, -0.7245075106620789, 1.976137399673462, -2.6224424839019775, 0.4205901324748993, -0.6028895974159241, -0.5081894993782043, 0.3168815076351166, -0.2835403382778168, 0.11537979543209076, -0.14829817414283752, -1.076235294342041, -0.09361041337251663, -0.7480217218399048, 0.6038049459457397, 1.156105637550354, 1.3510297536849976, -1.1013330221176147, -0.20642700791358948, -1.678824543952942, -0.17905868589878082, -0.7529541254043579, 0.28899163007736206, -2.002056837081909, -0.18245218694210052, -1.991385817527771, -2.3327839374542236, -1.3797047138214111, -0.8604519963264465, 1.1360058784484863, 0.22003071010112762, -0.9211135506629944, 1.1362196207046509, -0.3461333215236664, -1.7904586791992188, 1.0929208993911743, -2.1399903297424316 ]
https://github.com/huggingface/datasets/issues/5525
TypeError: Couldn't cast array of type string to null
Thanks, @TJ-Solergibert. I can access your notebook now. Maybe it was just a temporary issue. At first sight, it seems something related to your data: maybe some of the examples do not have all the transcriptions for all the languages. Then, some of them are null when unrolled. And when trying to concatenate with the other rows containing strings, the cast issue is raised (the arrays to be concatenated have different types). Do you think this could be the case?
### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5
301
80
TypeError: Couldn't cast array of type string to null ### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5 Thanks, @TJ-Solergibert. I can access your notebook now. Maybe it was just a temporary issue. At first sight, it seems something related to your data: maybe some of the examples do not have all the transcriptions for all the languages. Then, some of them are null when unrolled. And when trying to concatenate with the other rows containing strings, the cast issue is raised (the arrays to be concatenated have different types). Do you think this could be the case?
[ -1.2202423810958862, -0.9123347401618958, -0.7285102605819702, 1.371557354927063, -0.17458994686603546, -1.2445634603500366, 0.10292567312717438, -1.0948625802993774, 1.637644648551941, -0.72588050365448, 0.28091853857040405, -1.6314622163772583, 0.06916490197181702, -0.546938955783844, -0.7554748058319092, -0.8334910273551941, -0.4088083505630493, -0.7822461128234863, 1.0641355514526367, 2.5414888858795166, 1.1979042291641235, -1.4294854402542114, 2.7266218662261963, 0.6494768261909485, -0.1791243553161621, -1.0284820795059204, 0.5771526098251343, -0.03797585517168045, -1.4100102186203003, -0.45214036107063293, -0.949406087398529, -0.08036606758832932, -0.5777668952941895, -0.47346407175064087, 0.07752715051174164, 0.33439427614212036, -0.19770905375480652, -0.3978704512119293, -0.5692074298858643, -0.7418721318244934, 0.4372963607311249, -0.34945595264434814, 0.9352694749832153, -0.3129039704799652, 1.8257559537887573, -0.5462159514427185, 0.47564154863357544, 0.7570763826370239, 1.35114324092865, 0.1787114441394806, -0.029273495078086853, 0.28566774725914, 0.415438175201416, -0.008949046023190022, 0.49292686581611633, 1.1310023069381714, 0.6710927486419678, 0.4499596059322357, 0.725830078125, -2.144845724105835, 1.340806007385254, -0.9475981593132019, 0.3348417580127716, 1.4072505235671997, -0.9488544464111328, 0.3853679895401001, -1.835307240486145, -0.03300313279032707, 0.5435686707496643, -2.3298439979553223, 0.20540517568588257, -1.2328882217407227, -0.5675210952758789, 0.9924854040145874, 0.30147379636764526, -1.1724597215652466, 0.09936921298503876, -0.5141615271568298, 0.987551748752594, 0.4713250994682312, 1.1483774185180664, -1.6433920860290527, -0.03818478062748909, -0.27207857370376587, 0.17492304742336273, -1.308135986328125, -1.529358983039856, 0.5693151950836182, 0.7267065048217773, 0.45972421765327454, -0.035095684230327606, 0.968436598777771, -1.0169172286987305, 0.8438478112220764, -0.9055294394493103, -1.702858567237854, -1.4944905042648315, -2.301772356033325, -2.274883508682251, 0.7399134039878845, -0.46074581146240234, -0.42584702372550964, 2.0614142417907715, -1.078283667564392, -1.7070592641830444, 1.1518367528915405, 0.21790605783462524, -0.035627227276563644, 2.4333064556121826, 0.20133134722709656, -0.7057958245277405, 0.4744078516960144, -0.7617013454437256, 0.8216239213943481, -0.46523407101631165, 1.249184012413025, 0.3767477869987488, -0.9974980354309082, 1.5842134952545166, -0.41521555185317993, 0.5293891429901123, -0.6612009406089783, -0.4488232731819153, -0.7544973492622375, 0.3245474398136139, 1.9347033500671387, -0.3095567226409912, 1.5663024187088013, -0.3849788308143616, -1.5949102640151978, -1.5275973081588745, 0.8506823182106018, 0.5523568987846375, -0.8080113530158997, 0.158152237534523, -0.33428630232810974, 0.054401855915784836, -0.021481744945049286, 1.052894949913025, 1.3104560375213623, 0.7112100124359131, -0.2579379379749298, -0.8677215576171875, 0.18737612664699554, -0.12059737741947174, -0.7509990334510803, -1.78299081325531, -0.37234601378440857, 0.1529790759086609, 0.6527673602104187, -1.2568049430847168, 1.7675565481185913, 0.9103673100471497, 1.9719321727752686, 1.0245441198349, -0.4223403036594391, 1.5127848386764526, 0.07939888536930084, 1.8254082202911377, -0.4923308789730072, 0.6754835844039917, -0.3913215100765228, -1.188348412513733, 0.8198621273040771, -0.3640235662460327, -2.0407216548919678, -0.5852112174034119, -0.7940793633460999, -0.19586943089962006, -0.7172552943229675, 0.951977014541626, -0.2448226809501648, -1.3262206315994263, 0.21682439744472504, -0.7495044469833374, 0.09550756961107254, -1.2668557167053223, 0.2681991457939148, 0.7728354930877686, -0.6553519368171692, 0.0682162195444107, -0.2644442021846771, -1.2771923542022705, -0.452157586812973, 0.33944952487945557, 1.8209706544876099, -0.7304584980010986, 0.9014783501625061, 0.989982545375824, -0.668386697769165, -0.0207366980612278, 0.38275861740112305, -0.3610284626483917, 0.9000356793403625, -1.072813630104065, -0.45494499802589417, 1.117955207824707, -0.26813873648643494, -0.5292733311653137, 1.4146610498428345, 0.6710911393165588, -1.0461256504058838, -0.24325896799564362, -0.14074189960956573, -0.8862189650535583, 0.08716318011283875, -1.6690254211425781, -0.15604573488235474, 0.28146713972091675, -1.6143007278442383, -0.4939596354961395, -0.13021507859230042, 1.2908493280410767, -0.06987444311380386, 1.4594895839691162, -0.34025904536247253, -0.14545734226703644, -0.43573901057243347, -0.4523261487483978, 0.17603543400764465, -0.24468442797660828, -0.5567392706871033, 0.2666771709918976, -0.8291559815406799, 0.2970493733882904, 1.4527226686477661, 0.28820300102233887, 0.09149511903524399, 0.50807785987854, 1.0065170526504517, 0.42531806230545044, -0.12279114872217178, -0.8883167505264282, -1.5859744548797607, 2.081780195236206, -1.4589177370071411, 2.0433475971221924, 0.8988516330718994, -0.06483986973762512, -1.8442232608795166, -1.8441475629806519, 1.3233834505081177, 1.121291995048523, 2.3483388423919678, 0.525177538394928, 0.41790685057640076, -0.826257586479187, -0.6300556659698486, 0.35789984464645386, -0.9786549806594849, -0.8008561134338379, 0.10098112374544144, 2.351740598678589, 1.76411771774292, -0.4388766884803772, -0.2260374277830124, -1.006773829460144, 1.3399302959442139, -0.1066545695066452, 0.23808753490447998, 1.9207268953323364, -0.22961930930614471, -1.0222516059875488, 1.2595596313476562, -2.3532485961914062, 0.23618432879447937, 1.981037974357605, 0.2477331906557083, 0.1295246034860611, -1.407381534576416, -0.6461966037750244, -0.27290308475494385, -0.37872809171676636, -1.2048941850662231, 0.5523996949195862, -0.2752412259578705, -0.8549225330352783, -1.4543578624725342, 0.10983272641897202, -1.1969629526138306, -1.6999597549438477, 0.26130998134613037, 1.8755698204040527, 2.091968297958374, -0.7957483530044556, 1.440372347831726, -0.28909632563591003, 0.10911914706230164, 1.1840546131134033, 1.176889181137085, 3.1496798992156982, 1.9793689250946045, -1.293520450592041, 0.6417468786239624, -0.13470721244812012, -0.410037100315094, 1.0494496822357178, -1.1451336145401, 1.2690201997756958, -0.14886526763439178, -1.2126269340515137, -1.1167267560958862, 1.025251865386963, 0.5010011792182922, 0.006518584676086903, -0.48557838797569275, 1.265295147895813, 0.10112317651510239, 1.3558310270309448, 0.5597800016403198, -0.3354552090167999, 0.569919228553772, -0.33677059412002563, -0.5210228562355042, 1.5938146114349365, 0.14458343386650085, -1.490949034690857, -2.2999439239501953, -0.24702614545822144, -0.8222615718841553, 0.020599819719791412, -0.6603742241859436, -0.9735713005065918, 1.5915213823318481, 0.4194929599761963, -1.209024429321289, -0.33113402128219604, -0.4165908694267273, -0.6222575306892395, 2.6447527408599854, -1.4656745195388794, -0.23269613087177277, -0.9553577303886414, -0.5237709283828735, 1.55219304561615, -1.2787041664123535, -0.25841978192329407, -1.046980619430542, -0.5607745051383972, -1.2113428115844727, -0.5333907008171082, -0.012414280325174332, -0.8315509557723999, 0.8079721331596375, 0.14463302493095398, -1.1196253299713135, -0.31215566396713257, -0.9040274024009705, 0.8533843159675598, -0.09331218898296356, 0.15714114904403687, 1.890829086303711, 0.3257472515106201, -0.35893672704696655, 0.7280171513557434, 1.172382116317749, 0.631534218788147, -0.6051715612411499, 0.16659890115261078, -0.616890549659729, 0.30507537722587585, -1.2764244079589844, 0.29023444652557373, -2.82778263092041, 0.6612271070480347, -0.018577758222818375, -0.025319326668977737, -0.011509785428643227, -1.2562263011932373, 1.0827159881591797, 2.547508955001831, -1.167459487915039, 0.5253956913948059, 0.3418605923652649, 1.1655627489089966, -1.5995066165924072, 0.3140707314014435, -0.3889628052711487, 2.099846363067627, 0.22020520269870758, 1.2000954151153564, -0.5032122731208801, -2.348134994506836, 0.5815889835357666, -1.1937733888626099, -1.08158278465271, 0.760680615901947, -0.8035330772399902, 0.042468536645174026, -1.4399663209915161, -0.17130857706069946, -0.8592512607574463, -1.252683401107788, 0.6323211789131165, 0.11693815886974335, 0.5298178791999817, -0.6125704050064087, 0.31761348247528076, -2.1929242610931396, -1.4025267362594604, -0.22310972213745117, -0.9373583793640137, 0.46534061431884766, -0.3684066832065582, 0.7493878602981567, -0.12533026933670044, 0.021256927400827408, 0.2928527891635895, 1.3529292345046997, 3.4024922847747803, 0.16711387038230896, 0.33743682503700256, -0.2393893003463745, -0.9669070243835449, 1.426239013671875, 0.9957566261291504, -0.16718333959579468, -0.628197968006134, -0.9734647870063782, 1.2625162601470947, 2.0020227432250977, 1.0412412881851196, 0.06419467180967331, -0.8404068946838379, -0.7929310202598572, -0.011484412476420403, 0.16453874111175537, 0.4890502691268921, 0.9772081971168518, 0.006859445013105869, 0.14074008166790009, 1.4898133277893066, 1.280843734741211, -0.3792637586593628, 0.39399129152297974, -0.8165798187255859, -0.46515408158302307, 0.4428972005844116, 0.3874295651912689, 0.00883380975574255, 0.3917156457901001, -1.048153281211853, -0.21493366360664368, -0.3774019777774811, -0.9830200672149658, -0.6711035370826721, -0.36922943592071533, -0.32713422179222107, 1.659095287322998, 0.1328468769788742, -0.4684242904186249, -0.0184469074010849, -0.7599736452102661, -0.10364740341901779, -1.0278730392456055, 0.2877732813358307, -0.09558853507041931, -0.05057122930884361, -0.08006513118743896, 1.8080507516860962, -0.8858084082603455, -2.1093740463256836, 0.27595242857933044, 0.1825263947248459, -0.31268784403800964, 0.15047508478164673, 1.6870973110198975, 0.5087518095970154, 1.3798846006393433, 1.409999966621399, 0.9469380378723145, -0.6495981216430664, -1.3058568239212036, 0.7436628341674805, 1.005652666091919, -1.509897232055664, 0.7570512890815735, -0.09755899757146835, -0.5633924007415771, 0.7281614542007446, 1.2900694608688354, 0.45173346996307373, -2.065565586090088, 0.8362007141113281, -0.9599314332008362, 0.8337241411209106, 0.7015576362609863, 0.7487303614616394, 0.2317543476819992, 0.808588981628418, -1.2681301832199097, -1.1270785331726074, -0.7128632068634033, -0.6678639650344849, 1.9849474430084229, -0.27717605233192444, 0.5028643608093262, -0.18878233432769775, -1.3535997867584229, -0.15389208495616913, 0.6595353484153748, 0.311375230550766, -0.4098619818687439, 0.7986683249473572, -0.7129933834075928, -1.1642556190490723, -1.3859386444091797, -0.476549357175827, -1.0125277042388916, -0.9461372494697571, 1.0270105600357056, 0.822179913520813, 0.3415146470069885, 1.8832100629806519, 0.6260054707527161, 0.21266214549541473, -2.668795347213745, 0.9222655892372131, 0.2976592183113098, -0.07970241457223892, 0.9406791925430298, 0.269116073846817, 1.0358275175094604, 0.0316380113363266, 0.5292328596115112, -2.437267303466797, 2.3069770336151123, -0.22826629877090454, 0.7788608074188232, -0.006452795118093491, -0.12571778893470764, 1.1231582164764404, 0.6381599307060242, 0.5936280488967896, -1.0832747220993042, 0.7228252291679382, -0.5568776726722717, 1.1734271049499512, 0.8879608511924744, -0.829120397567749, -0.01863234117627144, 1.2712770700454712, 0.4593256711959839, -0.550226628780365, -0.934799313545227, -0.9797810316085815, 0.9167481660842896, 1.8603572845458984, -0.007901336997747421, 0.058106523007154465, 0.8029571175575256, 0.6388837099075317, -1.3098689317703247, 0.05865732207894325, -0.7350780367851257, -0.7720202803611755, 1.5799036026000977, 2.041616439819336, -0.07038866728544235, -0.12805385887622833, -0.6187993288040161, -1.320655345916748, 0.6963951587677002, -0.05367400497198105, 0.19829918444156647, 0.6647428870201111, -0.6137131452560425, 1.1156302690505981, 0.8269976377487183, 0.9780919551849365, 0.16700012981891632, 0.13925416767597198, 0.3296884596347809, -0.2962692379951477, -1.178713083267212, -0.34579217433929443, -1.0659089088439941, -2.4765360355377197, 0.49990221858024597, -0.2341223657131195, -1.494602084159851, 0.03049108386039734, -0.9750557541847229, 0.8639937043190002, -0.543657124042511, -1.061693787574768, -1.5132381916046143, 0.1994486153125763, -0.1853199452161789, 0.8720934987068176, -1.6095776557922363, -0.15087078511714935, 1.2803773880004883, 0.9319638013839722, -0.5742700695991516, 1.053882360458374, 0.251144140958786, 1.0279715061187744, 0.8400794863700867, -0.3660691976547241, 0.4248931407928467, 0.21528683602809906, -1.3772192001342773, 0.42504021525382996, 1.1798927783966064, 0.1627199500799179, 1.433142900466919, -0.5707340836524963, 0.06480330973863602, 0.39828941226005554, -0.4538426399230957, -0.4638780653476715, -0.579177975654602, 0.7014296054840088, 0.0276857390999794, -0.9425444006919861, -0.012476988136768341, -0.1854943484067917, -0.23564177751541138, 0.14241546392440796, -1.537178635597229, -0.15174230933189392, -0.43706217408180237, -0.6088590621948242, -1.2839703559875488, -0.007542927749454975, 1.405360221862793, -0.7855029106140137, -0.20574091374874115, 0.4845924377441406, 0.46243762969970703, 0.49534520506858826, 0.6891920566558838, -0.6542178392410278, -0.3523704707622528, -0.19143135845661163, -0.3767648935317993, 0.34305670857429504, 1.3181813955307007, -0.12051353603601456, -0.9890146255493164, 0.6217889189720154, -0.41727104783058167, 0.07428429275751114, 1.969632625579834, 0.1206119954586029, -0.8179716467857361, 0.34996816515922546, -0.7194801568984985, 1.9502134323120117, 1.6703606843948364, 1.3274073600769043, -0.15524353086948395, -0.8983550071716309, 0.6879188418388367, -0.26260295510292053, -0.31226563453674316, 0.9022703766822815, 0.452583372592926, -0.23925907909870148, -1.4418293237686157, 0.5718528032302856, 1.1998475790023804, -0.8992832899093628, -0.7617395520210266, 0.09130850434303284, -0.7986873388290405, 1.1081918478012085, 0.7520139813423157, 0.41312313079833984, 0.22425024211406708, 1.6436282396316528, 0.806102991104126, -0.5783339142799377, 0.5514846444129944, 0.4635036587715149, -0.20898738503456116, -2.0639071464538574, -1.070315957069397, 0.35373619198799133, -0.47171157598495483, -1.5878428220748901, 1.4069671630859375, -1.1934047937393188, -0.9533934593200684, 0.5063502788543701, 0.01098881009966135, 1.3117549419403076, 0.3474425673484802, 1.6277474164962769, 2.0569052696228027, 0.9131870865821838, 0.3587988317012787, 1.2781940698623657, -0.12889496982097626, -0.37314745783805847, 1.8365559577941895, -0.4545038044452667, 0.5021677613258362, 1.1326428651809692, -0.43688997626304626, -1.0621676445007324, -0.7751127481460571, -1.1343103647232056, -0.6623795628547668, 1.2392306327819824, 0.037661127746105194, -1.095741868019104, 0.26676318049430847, 1.53907310962677, 0.11232969909906387, -0.306000679731369, 0.5865257382392883, 0.43735072016716003, -0.7765061259269714, -0.10651183128356934, -0.8915189504623413, 0.4722519516944885, -0.2393067330121994, -0.42688727378845215, 0.32188576459884644, 0.45536690950393677, 1.2882485389709473, 0.01369995716959238, 0.0871441513299942, 1.257383108139038, -1.4344117641448975, 1.4539542198181152, -0.6812705993652344, 0.24674879014492035, -2.3097355365753174, 1.3652992248535156, -0.6896359324455261, 1.983642578125, -2.624906301498413, 0.41992563009262085, -0.5941091179847717, -0.517577588558197, 0.3342200517654419, -0.2905706763267517, 0.1527251899242401, -0.16901639103889465, -1.0771712064743042, -0.10220956057310104, -0.7364668250083923, 0.6016190052032471, 1.1566548347473145, 1.3596563339233398, -1.0558440685272217, -0.24794812500476837, -1.6913800239562988, -0.1578482836484909, -0.7110334634780884, 0.2960098683834076, -1.973862648010254, -0.19922176003456116, -1.9672482013702393, -2.346248149871826, -1.4059078693389893, -0.8533466458320618, 1.1756246089935303, 0.2141479104757309, -0.9078314304351807, 1.1475166082382202, -0.37142276763916016, -1.784835696220398, 1.060362458229065, -2.1552748680114746 ]
https://github.com/huggingface/datasets/issues/5525
TypeError: Couldn't cast array of type string to null
See, in this example, "nl" and "ro" transcripts are null: ```python >>> europarl_ds["test"][:1] {'original_speech': ['− Señor Presidente, en primer lugar, quisiera felicitar al señor Seeber por el trabajo realizado, porque en su informe se recogen muchas de las preocupaciones manifestadas en esta'], 'original_language': ['es'], 'audio_path': ['es/audios/en.20081008.24.3-238.m4a'], 'segment_start': [0.6200000047683716], 'segment_end': [11.319999694824219], 'transcriptions': [{'de': '− Herr Präsident! Zunächst möchte ich Richard Seeber zu der von ihm geleisteten Arbeit gratulieren, denn sein Bericht greift viele der in diesem Haus zum Ausdruck gebrachten Anliegen', 'en': '− Mr President, firstly I would like to congratulate Mr Seeber on the work he has done, because his report picks up many of the concerns expressed in this', 'es': '− Señor Presidente, en primer lugar, quisiera felicitar al señor Seeber por el trabajo realizado, porque en su informe se recogen muchas de las preocupaciones manifestadas en esta', 'fr': '− Monsieur le Président, je voudrais tout d ’ abord féliciter M. Seeber pour le travail qu ’ il a effectué, parce que son rapport reprend beaucoup des inquiétudes exprimées au sein de cette', 'it': "− Signor Presidente, mi congratulo innanzi tutto con l'onorevole Seeber per il lavoro svolto, perché la sua relazione accoglie molti dei timori espressi da quest'Aula", 'nl': None, 'pl': '− Panie przewodniczący! Po pierwsze chciałabym pogratulować panu posłowi Seeberowi wykonanej pracy, ponieważ jego sprawozdanie podejmuje szereg podnoszonych w tej Izbie', 'pt': '− Senhor Presidente, começo por felicitar o senhor deputado Seeber pelo trabalho que desenvolveu em torno deste relatório, que retoma muitas das preocupações expressas nesta', 'ro': None}]} ``` ```python >>> processed_europarl[0] {'de': '− Herr Präsident! Zunächst möchte ich Richard Seeber zu der von ihm geleisteten Arbeit gratulieren, denn sein Bericht greift viele der in diesem Haus zum Ausdruck gebrachten Anliegen', 'en': '− Mr President, firstly I would like to congratulate Mr Seeber on the work he has done, because his report picks up many of the concerns expressed in this', 'es': '− Señor Presidente, en primer lugar, quisiera felicitar al señor Seeber por el trabajo realizado, porque en su informe se recogen muchas de las preocupaciones manifestadas en esta', 'fr': '− Monsieur le Président, je voudrais tout d ’ abord féliciter M. Seeber pour le travail qu ’ il a effectué, parce que son rapport reprend beaucoup des inquiétudes exprimées au sein de cette', 'it': "− Signor Presidente, mi congratulo innanzi tutto con l'onorevole Seeber per il lavoro svolto, perché la sua relazione accoglie molti dei timori espressi da quest'Aula", 'nl': None, 'pl': '− Panie przewodniczący! Po pierwsze chciałabym pogratulować panu posłowi Seeberowi wykonanej pracy, ponieważ jego sprawozdanie podejmuje szereg podnoszonych w tej Izbie', 'pt': '− Senhor Presidente, começo por felicitar o senhor deputado Seeber pelo trabalho que desenvolveu em torno deste relatório, que retoma muitas das preocupações expressas nesta', 'ro': None} ```
### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5
301
458
TypeError: Couldn't cast array of type string to null ### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5 See, in this example, "nl" and "ro" transcripts are null: ```python >>> europarl_ds["test"][:1] {'original_speech': ['− Señor Presidente, en primer lugar, quisiera felicitar al señor Seeber por el trabajo realizado, porque en su informe se recogen muchas de las preocupaciones manifestadas en esta'], 'original_language': ['es'], 'audio_path': ['es/audios/en.20081008.24.3-238.m4a'], 'segment_start': [0.6200000047683716], 'segment_end': [11.319999694824219], 'transcriptions': [{'de': '− Herr Präsident! Zunächst möchte ich Richard Seeber zu der von ihm geleisteten Arbeit gratulieren, denn sein Bericht greift viele der in diesem Haus zum Ausdruck gebrachten Anliegen', 'en': '− Mr President, firstly I would like to congratulate Mr Seeber on the work he has done, because his report picks up many of the concerns expressed in this', 'es': '− Señor Presidente, en primer lugar, quisiera felicitar al señor Seeber por el trabajo realizado, porque en su informe se recogen muchas de las preocupaciones manifestadas en esta', 'fr': '− Monsieur le Président, je voudrais tout d ’ abord féliciter M. Seeber pour le travail qu ’ il a effectué, parce que son rapport reprend beaucoup des inquiétudes exprimées au sein de cette', 'it': "− Signor Presidente, mi congratulo innanzi tutto con l'onorevole Seeber per il lavoro svolto, perché la sua relazione accoglie molti dei timori espressi da quest'Aula", 'nl': None, 'pl': '− Panie przewodniczący! Po pierwsze chciałabym pogratulować panu posłowi Seeberowi wykonanej pracy, ponieważ jego sprawozdanie podejmuje szereg podnoszonych w tej Izbie', 'pt': '− Senhor Presidente, começo por felicitar o senhor deputado Seeber pelo trabalho que desenvolveu em torno deste relatório, que retoma muitas das preocupações expressas nesta', 'ro': None}]} ``` ```python >>> processed_europarl[0] {'de': '− Herr Präsident! Zunächst möchte ich Richard Seeber zu der von ihm geleisteten Arbeit gratulieren, denn sein Bericht greift viele der in diesem Haus zum Ausdruck gebrachten Anliegen', 'en': '− Mr President, firstly I would like to congratulate Mr Seeber on the work he has done, because his report picks up many of the concerns expressed in this', 'es': '− Señor Presidente, en primer lugar, quisiera felicitar al señor Seeber por el trabajo realizado, porque en su informe se recogen muchas de las preocupaciones manifestadas en esta', 'fr': '− Monsieur le Président, je voudrais tout d ’ abord féliciter M. Seeber pour le travail qu ’ il a effectué, parce que son rapport reprend beaucoup des inquiétudes exprimées au sein de cette', 'it': "− Signor Presidente, mi congratulo innanzi tutto con l'onorevole Seeber per il lavoro svolto, perché la sua relazione accoglie molti dei timori espressi da quest'Aula", 'nl': None, 'pl': '− Panie przewodniczący! Po pierwsze chciałabym pogratulować panu posłowi Seeberowi wykonanej pracy, ponieważ jego sprawozdanie podejmuje szereg podnoszonych w tej Izbie', 'pt': '− Senhor Presidente, começo por felicitar o senhor deputado Seeber pelo trabalho que desenvolveu em torno deste relatório, que retoma muitas das preocupações expressas nesta', 'ro': None} ```
[ -1.1871079206466675, -0.9079514145851135, -0.7566453218460083, 1.4227498769760132, -0.1958572268486023, -1.2150317430496216, 0.12482152879238129, -1.1152719259262085, 1.6279278993606567, -0.7159287333488464, 0.2852400541305542, -1.6237934827804565, 0.07571223378181458, -0.5769699811935425, -0.713799774646759, -0.8331477642059326, -0.39583930373191833, -0.7819347381591797, 1.0744810104370117, 2.5313501358032227, 1.209803819656372, -1.429421067237854, 2.7303199768066406, 0.6549988389015198, -0.21038803458213806, -1.0156407356262207, 0.5647730827331543, -0.0404570996761322, -1.3727830648422241, -0.4284498393535614, -0.9382930994033813, -0.07250724732875824, -0.567837119102478, -0.46253108978271484, 0.04062482342123985, 0.3597046136856079, -0.21052134037017822, -0.4160219132900238, -0.5731403231620789, -0.7507728934288025, 0.43041715025901794, -0.364359050989151, 0.9312477707862854, -0.3090474307537079, 1.8118736743927002, -0.5720562934875488, 0.4689446687698364, 0.7582120299339294, 1.3245058059692383, 0.17696735262870789, -0.02778755873441696, 0.28116875886917114, 0.3732908070087433, -0.0308059211820364, 0.5190405249595642, 1.152406930923462, 0.6610856056213379, 0.4404662847518921, 0.7341073155403137, -2.1622626781463623, 1.3145198822021484, -0.9790371656417847, 0.32222095131874084, 1.3877110481262207, -0.9235526323318481, 0.38658246397972107, -1.8378252983093262, -0.01420632191002369, 0.5663019418716431, -2.316843271255493, 0.22642990946769714, -1.241923213005066, -0.582668662071228, 0.943229079246521, 0.3321593999862671, -1.1855460405349731, 0.09697601199150085, -0.4755040109157562, 0.9958049654960632, 0.46141570806503296, 1.144311785697937, -1.635223388671875, -0.04329657554626465, -0.2464754432439804, 0.1692633032798767, -1.308542013168335, -1.5080863237380981, 0.5853132605552673, 0.6963164806365967, 0.4712885022163391, -0.01139485090970993, 0.9888798594474792, -1.0202038288116455, 0.8284333348274231, -0.9302845001220703, -1.6916276216506958, -1.4762836694717407, -2.3159005641937256, -2.243420124053955, 0.7342946529388428, -0.4734991490840912, -0.4419974088668823, 2.0612950325012207, -1.0368692874908447, -1.7120437622070312, 1.177093505859375, 0.2718053460121155, -0.005477532744407654, 2.456322431564331, 0.20966319739818573, -0.7294325232505798, 0.49100378155708313, -0.7861934900283813, 0.8075600862503052, -0.4279206395149231, 1.2439597845077515, 0.36894679069519043, -0.9945023655891418, 1.5672794580459595, -0.38189756870269775, 0.5704306960105896, -0.6541171669960022, -0.4649612307548523, -0.723579466342926, 0.30298304557800293, 1.916782259941101, -0.3195733428001404, 1.5678892135620117, -0.3604939579963684, -1.5801026821136475, -1.5287879705429077, 0.867841362953186, 0.5459789037704468, -0.8211525678634644, 0.15772061049938202, -0.35182496905326843, 0.08038322627544403, -0.05778135731816292, 1.0762028694152832, 1.326858639717102, 0.6887770295143127, -0.29952725768089294, -0.8346178531646729, 0.1697230339050293, -0.10505448281764984, -0.7557299137115479, -1.7853717803955078, -0.357534795999527, 0.15766437351703644, 0.6215132474899292, -1.2897619009017944, 1.7424383163452148, 0.8908462524414062, 1.9762978553771973, 1.0207085609436035, -0.42209815979003906, 1.5160969495773315, 0.06822696328163147, 1.8085310459136963, -0.5302290320396423, 0.6596755981445312, -0.39239048957824707, -1.1795657873153687, 0.8504453301429749, -0.35814639925956726, -2.0446794033050537, -0.6399854421615601, -0.7904701828956604, -0.20911306142807007, -0.729475200176239, 0.9151151776313782, -0.26876431703567505, -1.3603434562683105, 0.2154105007648468, -0.7628805041313171, 0.09780445694923401, -1.2462824583053589, 0.28472816944122314, 0.7484039664268494, -0.6474004983901978, 0.05237732455134392, -0.26207083463668823, -1.2679704427719116, -0.44170132279396057, 0.32826778292655945, 1.8284025192260742, -0.7219250798225403, 0.8864296674728394, 1.0230128765106201, -0.666791558265686, 0.004946105182170868, 0.3497074246406555, -0.33152350783348083, 0.9068650007247925, -1.0549018383026123, -0.49384087324142456, 1.1116176843643188, -0.22004079818725586, -0.5571591258049011, 1.4247876405715942, 0.6697609424591064, -1.0513330698013306, -0.267487496137619, -0.15919454395771027, -0.8738058805465698, 0.057497214525938034, -1.6599526405334473, -0.13352736830711365, 0.3059464693069458, -1.6114823818206787, -0.46597227454185486, -0.1407032161951065, 1.2877528667449951, -0.10947310924530029, 1.4598122835159302, -0.3436339795589447, -0.1173764318227768, -0.4037785530090332, -0.475385844707489, 0.17568062245845795, -0.24074074625968933, -0.576530933380127, 0.2451210618019104, -0.8130438327789307, 0.3050110638141632, 1.4552854299545288, 0.29406189918518066, 0.08783505856990814, 0.4840475022792816, 1.0095570087432861, 0.42771974205970764, -0.08966103196144104, -0.8860956430435181, -1.5376386642456055, 2.066720485687256, -1.4869707822799683, 2.0644707679748535, 0.9158059358596802, -0.050470635294914246, -1.7981793880462646, -1.918863296508789, 1.3328680992126465, 1.1473240852355957, 2.312882423400879, 0.5293130874633789, 0.42459791898727417, -0.8451575636863708, -0.6550760269165039, 0.3489024341106415, -0.9613901972770691, -0.7592447400093079, 0.10925902426242828, 2.3746984004974365, 1.7234288454055786, -0.42243191599845886, -0.23397959768772125, -0.9918336868286133, 1.3652170896530151, -0.10969263315200806, 0.2452223300933838, 1.9684749841690063, -0.23111304640769958, -1.0195627212524414, 1.2669447660446167, -2.3608953952789307, 0.2038908302783966, 1.9914727210998535, 0.24739578366279602, 0.14543002843856812, -1.4079530239105225, -0.6573175191879272, -0.28980204463005066, -0.3777145743370056, -1.1940816640853882, 0.5535166263580322, -0.2362179011106491, -0.8433323502540588, -1.4730699062347412, 0.10607795417308807, -1.2029023170471191, -1.677667260169983, 0.25002145767211914, 1.9080896377563477, 2.115342140197754, -0.8191310167312622, 1.44788658618927, -0.3541094660758972, 0.06362852454185486, 1.1524765491485596, 1.1985340118408203, 3.1397504806518555, 1.9366874694824219, -1.3034799098968506, 0.6247445940971375, -0.14439652860164642, -0.43634915351867676, 1.066551923751831, -1.1588200330734253, 1.2443625926971436, -0.16228969395160675, -1.1955772638320923, -1.1648820638656616, 0.9967809319496155, 0.47906777262687683, 0.017081333324313164, -0.4929436147212982, 1.2452934980392456, 0.10091939568519592, 1.3685349225997925, 0.5786889791488647, -0.32221361994743347, 0.5623359680175781, -0.35394391417503357, -0.49345874786376953, 1.593250036239624, 0.13657204806804657, -1.4734742641448975, -2.305335760116577, -0.21549947559833527, -0.8518064022064209, 0.02593875303864479, -0.6483330130577087, -1.0261294841766357, 1.6059409379959106, 0.39700666069984436, -1.2098349332809448, -0.3173108994960785, -0.3923717737197876, -0.585183322429657, 2.6579296588897705, -1.47270667552948, -0.21451500058174133, -0.9506634473800659, -0.5427168607711792, 1.574088454246521, -1.2425785064697266, -0.21805857121944427, -1.0489866733551025, -0.5196627378463745, -1.2338166236877441, -0.522835373878479, 0.004721151664853096, -0.8662670254707336, 0.8142745494842529, 0.17260777950286865, -1.1471219062805176, -0.31393226981163025, -0.8690088391304016, 0.8981937766075134, -0.13741262257099152, 0.17796848714351654, 1.8836257457733154, 0.32120341062545776, -0.35524311661720276, 0.7645782828330994, 1.1863030195236206, 0.6324329376220703, -0.6271520853042603, 0.159394770860672, -0.6234264373779297, 0.35164645314216614, -1.2971194982528687, 0.2650260329246521, -2.84844970703125, 0.6417626738548279, -0.002780292183160782, -0.02654876746237278, 0.0016329549252986908, -1.2777806520462036, 1.0861014127731323, 2.5744800567626953, -1.1515593528747559, 0.5273985862731934, 0.3447417616844177, 1.1859155893325806, -1.615925669670105, 0.3005630373954773, -0.397098571062088, 2.1137125492095947, 0.23359492421150208, 1.2176740169525146, -0.48817887902259827, -2.3645126819610596, 0.5854260325431824, -1.2333364486694336, -1.098262071609497, 0.7567616105079651, -0.8331723809242249, 0.07209651172161102, -1.4657981395721436, -0.1920289397239685, -0.8516895174980164, -1.2423492670059204, 0.6223381161689758, 0.12185463309288025, 0.5010791420936584, -0.6217470169067383, 0.335349977016449, -2.2016608715057373, -1.4421448707580566, -0.19775176048278809, -0.9285745024681091, 0.4954339563846588, -0.383987694978714, 0.763688862323761, -0.11573271453380585, 0.0028411811217665672, 0.2780294418334961, 1.3721295595169067, 3.4169416427612305, 0.19138725101947784, 0.31089136004447937, -0.24552065134048462, -0.979337751865387, 1.44599449634552, 0.9519773721694946, -0.14821673929691315, -0.6000556945800781, -0.9824126958847046, 1.288594365119934, 2.0278289318084717, 1.036529779434204, 0.022067980840802193, -0.8440648317337036, -0.7762084007263184, -0.02953461743891239, 0.19087864458560944, 0.48496580123901367, 0.9448603391647339, -0.012981431558728218, 0.1382913738489151, 1.480913519859314, 1.27346670627594, -0.3996652066707611, 0.3947867751121521, -0.8561082482337952, -0.49278944730758667, 0.47860392928123474, 0.3483884632587433, 0.006102384999394417, 0.4051482379436493, -1.0517388582229614, -0.24191132187843323, -0.3648241460323334, -0.9336931705474854, -0.6639997959136963, -0.35335850715637207, -0.33161047101020813, 1.6275862455368042, 0.1282065063714981, -0.46206972002983093, 0.0016743000596761703, -0.7427866458892822, -0.09221100807189941, -1.0713859796524048, 0.25678861141204834, -0.12025168538093567, -0.057176344096660614, -0.11624546349048615, 1.797328233718872, -0.8771056532859802, -2.066279172897339, 0.237839013338089, 0.22419670224189758, -0.30434808135032654, 0.15391729772090912, 1.6933064460754395, 0.5085355639457703, 1.3900504112243652, 1.3998162746429443, 0.9592995643615723, -0.6676704287528992, -1.3086376190185547, 0.7001334428787231, 1.025030493736267, -1.4550912380218506, 0.7653056979179382, -0.11457796394824982, -0.5594778060913086, 0.6678392291069031, 1.3146713972091675, 0.5023762583732605, -2.064579963684082, 0.8304402232170105, -0.9779862761497498, 0.8211222290992737, 0.7368685007095337, 0.763242244720459, 0.2525208592414856, 0.8166211247444153, -1.2545393705368042, -1.099043369293213, -0.7277150750160217, -0.6752142906188965, 1.9671080112457275, -0.2972188889980316, 0.5083863139152527, -0.2124774158000946, -1.3138341903686523, -0.14740720391273499, 0.6756727695465088, 0.35677292943000793, -0.43044519424438477, 0.787814736366272, -0.7056320309638977, -1.1185230016708374, -1.3570557832717896, -0.4631054401397705, -0.9971216320991516, -0.9606380462646484, 1.0389347076416016, 0.8177794218063354, 0.39381253719329834, 1.8662326335906982, 0.6179124116897583, 0.21282052993774414, -2.632473945617676, 0.9328904151916504, 0.32118090987205505, -0.10502712428569794, 0.8865525126457214, 0.30016300082206726, 1.068138599395752, 0.033667728304862976, 0.5407931804656982, -2.408118724822998, 2.2917487621307373, -0.16799834370613098, 0.7719665765762329, 0.005562671460211277, -0.11579371988773346, 1.092889428138733, 0.6009528636932373, 0.5556046366691589, -1.068843960762024, 0.6953365802764893, -0.5384203791618347, 1.1759042739868164, 0.8815832138061523, -0.8130776882171631, -0.004133477341383696, 1.2819280624389648, 0.4264003336429596, -0.5907573699951172, -0.9310968518257141, -0.9109744429588318, 0.9106424450874329, 1.825095772743225, -0.012429991737008095, 0.058766741305589676, 0.8090730309486389, 0.6161398887634277, -1.3030288219451904, 0.026764582842588425, -0.7337256669998169, -0.7821333408355713, 1.6050446033477783, 2.0404906272888184, -0.13182786107063293, -0.12688606977462769, -0.6248134970664978, -1.3204244375228882, 0.7454556822776794, -0.07190902531147003, 0.20467609167099, 0.6584108471870422, -0.6012065410614014, 1.1155203580856323, 0.8039383292198181, 0.9955167174339294, 0.14548948407173157, 0.1860753893852234, 0.3477433919906616, -0.3080936670303345, -1.152659296989441, -0.34071001410484314, -1.0911881923675537, -2.515888214111328, 0.49291500449180603, -0.23143929243087769, -1.447641372680664, -0.006035170517861843, -0.9412078261375427, 0.9005184769630432, -0.5659899711608887, -1.041500210762024, -1.510209083557129, 0.2132841944694519, -0.15842311084270477, 0.8738555312156677, -1.6126787662506104, -0.15285533666610718, 1.2695603370666504, 0.9411885142326355, -0.6123106479644775, 1.0464030504226685, 0.24111425876617432, 1.033413052558899, 0.8262485861778259, -0.341872900724411, 0.48148831725120544, 0.16979441046714783, -1.3664305210113525, 0.41436702013015747, 1.2059000730514526, 0.1511591225862503, 1.448142409324646, -0.5522015690803528, 0.03676413744688034, 0.40197843313217163, -0.4331485629081726, -0.46866467595100403, -0.5486853122711182, 0.6750081181526184, 0.04642513766884804, -0.9762185215950012, -0.044103432446718216, -0.14783605933189392, -0.24510261416435242, 0.14571532607078552, -1.5135160684585571, -0.14506632089614868, -0.4615170657634735, -0.5989457368850708, -1.3031734228134155, -0.01451958529651165, 1.402451515197754, -0.7607697248458862, -0.19806040823459625, 0.45374858379364014, 0.43643856048583984, 0.5051721930503845, 0.6838963627815247, -0.6707090735435486, -0.3576696217060089, -0.20751649141311646, -0.3685016632080078, 0.3493988513946533, 1.3294317722320557, -0.09906472265720367, -0.9985538721084595, 0.6188919544219971, -0.41462451219558716, 0.0529915876686573, 1.9752534627914429, 0.1021011471748352, -0.8111713528633118, 0.3394031822681427, -0.7356834411621094, 1.938682198524475, 1.6635290384292603, 1.3380566835403442, -0.16651208698749542, -0.9237509965896606, 0.7250606417655945, -0.27418947219848633, -0.33207958936691284, 0.8848345875740051, 0.41511979699134827, -0.2574738562107086, -1.4804754257202148, 0.5995672345161438, 1.2193973064422607, -0.9185160398483276, -0.7668974995613098, 0.1066034585237503, -0.8005691170692444, 1.1205217838287354, 0.7040557265281677, 0.3974588215351105, 0.238922119140625, 1.644235372543335, 0.8077412247657776, -0.5895498991012573, 0.523361086845398, 0.4950691759586334, -0.20511440932750702, -2.0615944862365723, -1.1001602411270142, 0.3463546335697174, -0.4627898931503296, -1.5904897451400757, 1.4210776090621948, -1.2043055295944214, -0.9523298144340515, 0.5195612907409668, -0.008257614448666573, 1.2987568378448486, 0.29901978373527527, 1.6172237396240234, 2.0741665363311768, 0.9008628129959106, 0.376882404088974, 1.267825961112976, -0.19744274020195007, -0.3838370740413666, 1.8187488317489624, -0.4505956172943115, 0.48769116401672363, 1.123273253440857, -0.436159610748291, -1.0861103534698486, -0.7609809041023254, -1.1720178127288818, -0.6963561177253723, 1.2477540969848633, 0.06635750830173492, -1.100113034248352, 0.271681547164917, 1.5703327655792236, 0.1129937618970871, -0.3537823259830475, 0.6081273555755615, 0.4830719828605652, -0.8096879124641418, -0.10482943058013916, -0.9043102860450745, 0.4699684977531433, -0.20036998391151428, -0.3807736933231354, 0.30552995204925537, 0.45540663599967957, 1.2736377716064453, -0.001003781333565712, 0.08359774947166443, 1.2059203386306763, -1.435748815536499, 1.468686819076538, -0.6839064955711365, 0.2701877951622009, -2.328368902206421, 1.3467042446136475, -0.6947634220123291, 1.9839825630187988, -2.6190929412841797, 0.44825518131256104, -0.5707213878631592, -0.4701525568962097, 0.29200729727745056, -0.28411367535591125, 0.14988747239112854, -0.14940433204174042, -1.0746759176254272, -0.08720111846923828, -0.7310397624969482, 0.6236728429794312, 1.1443253755569458, 1.344896912574768, -1.0826367139816284, -0.2345094382762909, -1.6595091819763184, -0.17011091113090515, -0.7278704643249512, 0.24771538376808167, -1.9773564338684082, -0.18860790133476257, -1.9592734575271606, -2.331547975540161, -1.3715406656265259, -0.8377236723899841, 1.164292335510254, 0.195669025182724, -0.9198902249336243, 1.1802436113357544, -0.34718719124794006, -1.8072023391723633, 1.1304610967636108, -2.110353469848633 ]
https://github.com/huggingface/datasets/issues/5525
TypeError: Couldn't cast array of type string to null
You can fix this issue by forcing the cast of None to str by hand: - If you replace this line: ```python source_t += batch[src_lang] ``` - With this line (because the batch size is 1): ```python source_t += [str(batch[src_lang][0])] ``` - Or with this line (if the batch size were larger than 1): ```python source_t += [str(text) for text in batch[src_lang]] ```
### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5
301
63
TypeError: Couldn't cast array of type string to null ### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5 You can fix this issue by forcing the cast of None to str by hand: - If you replace this line: ```python source_t += batch[src_lang] ``` - With this line (because the batch size is 1): ```python source_t += [str(batch[src_lang][0])] ``` - Or with this line (if the batch size were larger than 1): ```python source_t += [str(text) for text in batch[src_lang]] ```
[ -1.2086602449417114, -0.8798791766166687, -0.7430040240287781, 1.4533145427703857, -0.15194453299045563, -1.268919825553894, 0.1398562639951706, -1.0587161779403687, 1.6720575094223022, -0.7352105379104614, 0.3331708610057831, -1.6114805936813354, 0.10264565795660019, -0.5713539123535156, -0.742850661277771, -0.834823489189148, -0.3906087875366211, -0.7350805401802063, 1.0711272954940796, 2.4958646297454834, 1.2170658111572266, -1.4427525997161865, 2.7399916648864746, 0.6650083661079407, -0.21774743497371674, -0.9968357682228088, 0.5308302044868469, -0.03955284506082535, -1.388492465019226, -0.4357960522174835, -0.9188543558120728, -0.08041474968194962, -0.5654686093330383, -0.5076109766960144, 0.03161867707967758, 0.3929630219936371, -0.2104143500328064, -0.44196149706840515, -0.5679325461387634, -0.7632177472114563, 0.42001965641975403, -0.34786808490753174, 0.8924591541290283, -0.31235986948013306, 1.83916175365448, -0.5852859020233154, 0.4493337571620941, 0.7457119226455688, 1.3432897329330444, 0.1508246809244156, -0.03584317862987518, 0.2978839874267578, 0.3816104531288147, -0.005114633124321699, 0.5332255959510803, 1.1737421751022339, 0.6924975514411926, 0.4681835174560547, 0.7278784513473511, -2.1681363582611084, 1.3260676860809326, -0.9822660088539124, 0.3324120342731476, 1.3613206148147583, -0.9888647794723511, 0.36545825004577637, -1.8238179683685303, -0.04101084917783737, 0.5381385087966919, -2.3174233436584473, 0.23530110716819763, -1.259209394454956, -0.5635823607444763, 0.965759813785553, 0.3176034688949585, -1.1999897956848145, 0.08321850001811981, -0.474295973777771, 1.0250542163848877, 0.4313642382621765, 1.135037899017334, -1.6101329326629639, -0.01119624450802803, -0.26987364888191223, 0.19237691164016724, -1.2901099920272827, -1.5210485458374023, 0.5733798146247864, 0.73209148645401, 0.44763627648353577, -0.06273972988128662, 1.017672061920166, -1.0113441944122314, 0.827163815498352, -0.9329230785369873, -1.7148606777191162, -1.517919659614563, -2.3164901733398438, -2.238715171813965, 0.719862163066864, -0.4442012310028076, -0.4524862468242645, 2.07827091217041, -1.0838686227798462, -1.728929877281189, 1.1543474197387695, 0.24818295240402222, -0.036902107298374176, 2.3838868141174316, 0.19171327352523804, -0.7484963536262512, 0.45776209235191345, -0.7873882055282593, 0.8086864352226257, -0.43844351172447205, 1.2388721704483032, 0.38215145468711853, -1.0254114866256714, 1.5630449056625366, -0.3776879608631134, 0.5729352235794067, -0.6960992813110352, -0.4441162943840027, -0.7239600419998169, 0.30779099464416504, 1.9398994445800781, -0.33782777190208435, 1.5518730878829956, -0.3471876084804535, -1.5337703227996826, -1.505384087562561, 0.8596502542495728, 0.5648109912872314, -0.7710604071617126, 0.16841556131839752, -0.339199423789978, 0.08591938763856888, -0.04768902808427811, 1.0973377227783203, 1.2920485734939575, 0.6917042136192322, -0.30290475487709045, -0.8532081246376038, 0.18179264664649963, -0.06330031901597977, -0.7249908447265625, -1.7954598665237427, -0.35194024443626404, 0.16192133724689484, 0.6197431683540344, -1.2472113370895386, 1.7658215761184692, 0.8515107035636902, 1.9649015665054321, 1.0404441356658936, -0.397645503282547, 1.5597548484802246, 0.06088566780090332, 1.8360151052474976, -0.4798339605331421, 0.67832350730896, -0.38474592566490173, -1.1930632591247559, 0.8238268494606018, -0.3361138105392456, -2.054858684539795, -0.5851591229438782, -0.7952331304550171, -0.15813636779785156, -0.7462476491928101, 0.9356977939605713, -0.2760922312736511, -1.3779429197311401, 0.20439501106739044, -0.7687879800796509, 0.10063546150922775, -1.2507942914962769, 0.28984490036964417, 0.7364488840103149, -0.6265307664871216, 0.06749670207500458, -0.2694205045700073, -1.244330644607544, -0.44444891810417175, 0.3412875831127167, 1.7985867261886597, -0.7356916069984436, 0.9044374823570251, 1.0485599040985107, -0.6493663191795349, -0.03440272808074951, 0.37654128670692444, -0.34750595688819885, 0.9385842084884644, -1.0600500106811523, -0.5038098692893982, 1.105689525604248, -0.20037142932415009, -0.5778214335441589, 1.4445629119873047, 0.6853629350662231, -1.0314111709594727, -0.24945352971553802, -0.13905054330825806, -0.8947135806083679, 0.07379338890314102, -1.6682687997817993, -0.15898968279361725, 0.338519811630249, -1.6053160429000854, -0.4681205749511719, -0.12631553411483765, 1.299930453300476, -0.10843855887651443, 1.4850223064422607, -0.336521178483963, -0.1330181509256363, -0.41834571957588196, -0.4320751428604126, 0.16705626249313354, -0.2050526738166809, -0.605186402797699, 0.24329933524131775, -0.7978103160858154, 0.30931735038757324, 1.4418938159942627, 0.25859078764915466, 0.08977673947811127, 0.5260430574417114, 1.055586814880371, 0.398469477891922, -0.10285589843988419, -0.8959153294563293, -1.5781455039978027, 2.0339221954345703, -1.451714038848877, 2.0679476261138916, 0.9278224110603333, -0.032814498990774155, -1.8071967363357544, -1.8846831321716309, 1.3709639310836792, 1.1362601518630981, 2.319749355316162, 0.5343860983848572, 0.4180838167667389, -0.8534376621246338, -0.6288232803344727, 0.35180455446243286, -0.9750933051109314, -0.7833038568496704, 0.10172789543867111, 2.3685944080352783, 1.7792952060699463, -0.38087061047554016, -0.2143314927816391, -1.0175695419311523, 1.362246036529541, -0.12197142094373703, 0.2530589699745178, 1.9250987768173218, -0.22121866047382355, -1.0006662607192993, 1.252055287361145, -2.3688645362854004, 0.21588435769081116, 2.0034127235412598, 0.23480458557605743, 0.1105206087231636, -1.392027497291565, -0.6234497427940369, -0.2707059979438782, -0.3758700489997864, -1.2252260446548462, 0.5397430062294006, -0.2528926134109497, -0.8308134078979492, -1.4212150573730469, 0.11873531341552734, -1.1786435842514038, -1.6958469152450562, 0.26621484756469727, 1.8900001049041748, 2.0553674697875977, -0.7762096524238586, 1.4785411357879639, -0.36978334188461304, 0.14188118278980255, 1.1838995218276978, 1.1854395866394043, 3.1536033153533936, 1.968382716178894, -1.336809515953064, 0.6274017095565796, -0.11283611506223679, -0.43166983127593994, 1.087896466255188, -1.1563835144042969, 1.2501661777496338, -0.15942050516605377, -1.217769980430603, -1.1640336513519287, 1.0102735757827759, 0.5300203561782837, -0.0050511909648776054, -0.5012626647949219, 1.243849277496338, 0.11359098553657532, 1.3648734092712402, 0.5746876001358032, -0.33254122734069824, 0.5745612978935242, -0.3228575587272644, -0.4791465699672699, 1.5938053131103516, 0.10883805900812149, -1.435030221939087, -2.3034868240356445, -0.17280228435993195, -0.8432109355926514, 0.04456612467765808, -0.6803234219551086, -0.9979586005210876, 1.6366039514541626, 0.41131383180618286, -1.2112247943878174, -0.2891746461391449, -0.4062283933162689, -0.6110020279884338, 2.6494803428649902, -1.4489812850952148, -0.23083661496639252, -1.0010370016098022, -0.5515542030334473, 1.5600985288619995, -1.2490090131759644, -0.25999295711517334, -1.0183130502700806, -0.5038740634918213, -1.2078120708465576, -0.5479211807250977, -0.03803323209285736, -0.8429228663444519, 0.8204245567321777, 0.10837746411561966, -1.188921570777893, -0.3374810814857483, -0.860392153263092, 0.8816455006599426, -0.1372268944978714, 0.15274810791015625, 1.873199701309204, 0.31227171421051025, -0.3773669898509979, 0.7681586146354675, 1.158403992652893, 0.6404064893722534, -0.5997268557548523, 0.23318950831890106, -0.6032831072807312, 0.31886032223701477, -1.2963659763336182, 0.29551270604133606, -2.846895456314087, 0.6572063565254211, 0.011447476223111153, 0.015018580481410027, -0.018861260265111923, -1.2791063785552979, 1.0511854887008667, 2.561290740966797, -1.1569486856460571, 0.4942688047885895, 0.3472033441066742, 1.1620659828186035, -1.6064101457595825, 0.2856866121292114, -0.41196000576019287, 2.097510576248169, 0.2032788097858429, 1.2395174503326416, -0.46845942735671997, -2.344430923461914, 0.5698590278625488, -1.2191580533981323, -1.1048030853271484, 0.8007063269615173, -0.8172290325164795, 0.06623905897140503, -1.4018648862838745, -0.22272853553295135, -0.878084123134613, -1.2303613424301147, 0.6284934878349304, 0.13476936519145966, 0.4971959888935089, -0.6660197377204895, 0.294662207365036, -2.177826166152954, -1.3752962350845337, -0.19061321020126343, -0.9437378644943237, 0.45600566267967224, -0.38560107350349426, 0.7303993701934814, -0.12006938457489014, 0.013685129582881927, 0.2691151201725006, 1.3808778524398804, 3.380733013153076, 0.18957923352718353, 0.34848570823669434, -0.2420308142900467, -0.9435763359069824, 1.4296542406082153, 0.9502196907997131, -0.16822469234466553, -0.5864219069480896, -0.9968543648719788, 1.2876758575439453, 1.9735161066055298, 1.0378073453903198, 0.05227728933095932, -0.8555504083633423, -0.8368567228317261, -0.03687958046793938, 0.16587288677692413, 0.4666529893875122, 0.9422227144241333, 0.027800431475043297, 0.14887766540050507, 1.4426411390304565, 1.248084306716919, -0.39486730098724365, 0.41112327575683594, -0.854586124420166, -0.4648595154285431, 0.4612107276916504, 0.3961562216281891, 0.012714153155684471, 0.36729785799980164, -1.0566006898880005, -0.26423507928848267, -0.3733285963535309, -0.9190548062324524, -0.6689545512199402, -0.34226804971694946, -0.3250332474708557, 1.6450949907302856, 0.10813749581575394, -0.475273996591568, -0.030959874391555786, -0.7474982738494873, -0.10172104835510254, -1.0258753299713135, 0.2842220067977905, -0.12423824518918991, -0.038129549473524094, -0.08751478046178818, 1.7745534181594849, -0.8871180415153503, -2.0994420051574707, 0.27740734815597534, 0.18827474117279053, -0.32471945881843567, 0.15765728056430817, 1.7011091709136963, 0.5310289263725281, 1.3528850078582764, 1.4223847389221191, 0.9374048709869385, -0.6682379245758057, -1.30280601978302, 0.7123615741729736, 1.0415691137313843, -1.483253002166748, 0.7595254182815552, -0.0896056666970253, -0.5623743534088135, 0.6958903670310974, 1.3165926933288574, 0.4859526753425598, -2.110546827316284, 0.796772837638855, -0.9720816612243652, 0.8058199286460876, 0.74265456199646, 0.7460681796073914, 0.25399041175842285, 0.8282580375671387, -1.2668354511260986, -1.110069751739502, -0.697754979133606, -0.6904515027999878, 1.9545068740844727, -0.28919732570648193, 0.510089635848999, -0.1960635930299759, -1.3692352771759033, -0.14002373814582825, 0.6406121253967285, 0.3139999210834503, -0.4522782266139984, 0.7910468578338623, -0.7112799882888794, -1.1189558506011963, -1.3641718626022339, -0.4801217019557953, -0.9931442141532898, -0.96092689037323, 1.012840986251831, 0.843846321105957, 0.3599358797073364, 1.8790104389190674, 0.6310436129570007, 0.17345987260341644, -2.6424052715301514, 0.92467200756073, 0.32637548446655273, -0.08403743803501129, 0.8904555439949036, 0.30749836564064026, 1.0371543169021606, 0.020499465987086296, 0.5463941097259521, -2.425997495651245, 2.297456979751587, -0.2075110673904419, 0.760114312171936, -0.019212815910577774, -0.14558883011341095, 1.1044719219207764, 0.5929057002067566, 0.5849308967590332, -1.0537229776382446, 0.7045975923538208, -0.5752772688865662, 1.218790054321289, 0.8752683401107788, -0.8077617287635803, -0.041959814727306366, 1.2917232513427734, 0.4260603189468384, -0.5510844588279724, -0.9099445939064026, -0.962432861328125, 0.9086744785308838, 1.8400613069534302, 0.03558473289012909, 0.06332329660654068, 0.8247191309928894, 0.6597205400466919, -1.2851639986038208, 0.041488051414489746, -0.7396522760391235, -0.7890307903289795, 1.6044700145721436, 2.0450544357299805, -0.13758587837219238, -0.1264287233352661, -0.6729151606559753, -1.2955652475357056, 0.7180842757225037, -0.0887461006641388, 0.1387142539024353, 0.6913663148880005, -0.6186606287956238, 1.1121853590011597, 0.8312339186668396, 0.9521865844726562, 0.17328722774982452, 0.16359806060791016, 0.3339918851852417, -0.29415661096572876, -1.1960042715072632, -0.3420902490615845, -1.0887365341186523, -2.5128560066223145, 0.4731358289718628, -0.2208389937877655, -1.4458427429199219, 0.020583312958478928, -0.9885709881782532, 0.8555464744567871, -0.5553815364837646, -1.0638833045959473, -1.4843807220458984, 0.20792430639266968, -0.12371359765529633, 0.8494682908058167, -1.591746211051941, -0.11295700818300247, 1.2689732313156128, 0.944353461265564, -0.596229076385498, 1.032852292060852, 0.23400849103927612, 1.045130729675293, 0.8883086442947388, -0.3604751527309418, 0.457438200712204, 0.17629900574684143, -1.3595553636550903, 0.4597124755382538, 1.1860499382019043, 0.14500659704208374, 1.4986814260482788, -0.5472913384437561, 0.03361261636018753, 0.40192198753356934, -0.4498462975025177, -0.4677242040634155, -0.6163786053657532, 0.6972612142562866, 0.018888292834162712, -0.9473603367805481, 0.004092119634151459, -0.1401696503162384, -0.22562839090824127, 0.1378939002752304, -1.5406829118728638, -0.11697812378406525, -0.4090617895126343, -0.6664577126502991, -1.288267970085144, -0.006179651245474815, 1.3816684484481812, -0.7680754661560059, -0.22295567393302917, 0.4738132059574127, 0.41461798548698425, 0.517894446849823, 0.6826181411743164, -0.6495876908302307, -0.3677431046962738, -0.19591638445854187, -0.37294113636016846, 0.38675230741500854, 1.3230793476104736, -0.10759113729000092, -0.9623584151268005, 0.626759946346283, -0.4347725808620453, 0.06340391933917999, 1.9817677736282349, 0.14263832569122314, -0.80739825963974, 0.36479946970939636, -0.7340466380119324, 1.928853988647461, 1.682050347328186, 1.3215399980545044, -0.15737377107143402, -0.9211897850036621, 0.696429431438446, -0.29742300510406494, -0.3590221405029297, 0.8875883221626282, 0.40573227405548096, -0.23868796229362488, -1.4344825744628906, 0.6121375560760498, 1.2323554754257202, -0.8978503942489624, -0.8130851984024048, 0.09388680756092072, -0.7887946367263794, 1.1161795854568481, 0.7104145884513855, 0.36821630597114563, 0.25418514013290405, 1.6252635717391968, 0.8137147426605225, -0.5706591010093689, 0.5573809146881104, 0.4694986641407013, -0.19785675406455994, -2.1005876064300537, -1.0893309116363525, 0.3682469427585602, -0.48456382751464844, -1.6285648345947266, 1.4102065563201904, -1.2153712511062622, -0.9682124257087708, 0.5226235389709473, 0.024744251742959023, 1.2899229526519775, 0.302102267742157, 1.635839581489563, 2.0605523586273193, 0.8738692998886108, 0.3737650513648987, 1.2645988464355469, -0.19179411232471466, -0.4000624120235443, 1.8115217685699463, -0.4962483048439026, 0.5071108341217041, 1.1045095920562744, -0.4334191083908081, -1.0945316553115845, -0.7716789245605469, -1.2011319398880005, -0.7079045176506042, 1.2286540269851685, 0.04790579527616501, -1.0924266576766968, 0.27695152163505554, 1.5168334245681763, 0.1120448186993599, -0.31345292925834656, 0.6207271218299866, 0.43149709701538086, -0.7897292971611023, -0.08940869569778442, -0.8904126286506653, 0.4801918566226959, -0.2135179340839386, -0.39187490940093994, 0.32556772232055664, 0.48714950680732727, 1.2583650350570679, 0.031918033957481384, 0.06476030498743057, 1.245383381843567, -1.4492783546447754, 1.4520176649093628, -0.6865805387496948, 0.28983861207962036, -2.359060764312744, 1.368538737297058, -0.7214346528053284, 1.9604637622833252, -2.6457645893096924, 0.44828495383262634, -0.5794665813446045, -0.48109227418899536, 0.3083738088607788, -0.2530125081539154, 0.13684087991714478, -0.15541662275791168, -1.0871529579162598, -0.08223766088485718, -0.744868814945221, 0.5977602601051331, 1.1474443674087524, 1.3464086055755615, -1.0805175304412842, -0.20242609083652496, -1.6839478015899658, -0.14225253462791443, -0.7020942568778992, 0.2880896329879761, -1.997711181640625, -0.1947016417980194, -1.9719053506851196, -2.368530035018921, -1.3387857675552368, -0.8344603776931763, 1.1356234550476074, 0.2056073099374771, -0.9008311033248901, 1.1337158679962158, -0.3676062226295471, -1.7954825162887573, 1.0687689781188965, -2.1013376712799072 ]
https://github.com/huggingface/datasets/issues/5525
TypeError: Couldn't cast array of type string to null
Problem solved! Thanks @albertvillanova, now I have even increased the batch size and it's crazy fast :rocket: !
### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5
301
18
TypeError: Couldn't cast array of type string to null ### Describe the bug Processing a dataset I alredy uploaded to the Hub (https://huggingface.co/datasets/tj-solergibert/Europarl-ST) I found that for some splits and some languages (test split, source_lang = "nl") after applying a map function I get the mentioned error. I alredy tried reseting the shorter strings (reset_cortas function). It only happends with NL, PL, RO and PT. It does not make sense since when processing the other languages I also use the corpus of those that fail and it does not cause any errors. I suspect that the error may be in this direction: We use cast_array_to_feature to support casting to custom types like Audio and Image # Also, when trying type "string", we don't want to convert integers or floats to "string". # We only do it if trying_type is False - since this is what the user asks for. ### Steps to reproduce the bug Here I link a colab notebook to reproduce the error: https://colab.research.google.com/drive/1JCrS7FlGfu_kFqChMrwKZ_bpabnIMqbP?authuser=1#scrollTo=FBAvlhMxIzpA ### Expected behavior Data processing does not fail. A correct example can be seen here: https://huggingface.co/datasets/tj-solergibert/Europarl-ST-processed-mt-en ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.10.147+-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 9.0.0 - Pandas version: 1.3.5 Problem solved! Thanks @albertvillanova, now I have even increased the batch size and it's crazy fast :rocket: !
[ -1.2123744487762451, -0.9240867495536804, -0.741775393486023, 1.4224097728729248, -0.15492932498455048, -1.2488129138946533, 0.10072925686836243, -1.0697872638702393, 1.6257985830307007, -0.7128981351852417, 0.30589401721954346, -1.6207425594329834, 0.06911633908748627, -0.5360549688339233, -0.7129559516906738, -0.8464720249176025, -0.41175368428230286, -0.7683249115943909, 1.087058663368225, 2.5426712036132812, 1.1830837726593018, -1.4631469249725342, 2.7243969440460205, 0.6327571868896484, -0.19369709491729736, -1.0236839056015015, 0.5645996332168579, -0.026564396917819977, -1.3990634679794312, -0.4328412413597107, -0.9410215020179749, -0.07250213623046875, -0.5879483222961426, -0.4837256073951721, 0.05953117087483406, 0.34434783458709717, -0.18834428489208221, -0.4121297299861908, -0.5653085708618164, -0.7372961044311523, 0.43754881620407104, -0.3482249081134796, 0.9053075313568115, -0.32843416929244995, 1.8172112703323364, -0.5435400605201721, 0.4867691397666931, 0.758139431476593, 1.3399693965911865, 0.1677393764257431, -0.04652364179491997, 0.2980205714702606, 0.4011242687702179, -0.029742788523435593, 0.4941663146018982, 1.1499747037887573, 0.6573454141616821, 0.4393320083618164, 0.6987355947494507, -2.1499929428100586, 1.340025782585144, -0.9736800789833069, 0.3252538740634918, 1.4239250421524048, -0.9647537469863892, 0.3740927577018738, -1.8131614923477173, -0.06602047383785248, 0.5386748313903809, -2.2970056533813477, 0.19522280991077423, -1.2485178709030151, -0.5700075626373291, 0.9737613201141357, 0.3183293044567108, -1.2110497951507568, 0.07479602843523026, -0.4994252026081085, 0.9877820611000061, 0.4482938051223755, 1.1633132696151733, -1.6544979810714722, -0.04639950022101402, -0.276212602853775, 0.15475323796272278, -1.2960355281829834, -1.5245845317840576, 0.5631059408187866, 0.7064290046691895, 0.44682759046554565, -0.020086035132408142, 0.9609235525131226, -1.020211100578308, 0.8586315512657166, -0.9114173054695129, -1.6969112157821655, -1.50787353515625, -2.338275194168091, -2.27571702003479, 0.724703848361969, -0.4641139507293701, -0.4070506989955902, 2.060033082962036, -1.0787131786346436, -1.7109676599502563, 1.167766809463501, 0.24426738917827606, -0.037565384060144424, 2.4186277389526367, 0.21613709628582, -0.7266595363616943, 0.4685564935207367, -0.7829443216323853, 0.812932550907135, -0.42946213483810425, 1.2480218410491943, 0.39180412888526917, -0.9924443364143372, 1.5682584047317505, -0.3828965723514557, 0.5494359731674194, -0.6490010023117065, -0.43958234786987305, -0.7516613602638245, 0.3125079572200775, 1.92154061794281, -0.31685635447502136, 1.570495843887329, -0.3590439558029175, -1.5652679204940796, -1.5090322494506836, 0.8501280546188354, 0.5485837459564209, -0.8110032677650452, 0.16972431540489197, -0.32603010535240173, 0.05667150393128395, -0.012937800958752632, 1.0637315511703491, 1.3097397089004517, 0.6977736949920654, -0.3049911856651306, -0.8825039267539978, 0.17783445119857788, -0.11517884582281113, -0.7234756946563721, -1.7809823751449585, -0.3933357000350952, 0.15511064231395721, 0.641960859298706, -1.2842438220977783, 1.7576847076416016, 0.9124010801315308, 1.9710990190505981, 1.0301527976989746, -0.4184906780719757, 1.5289307832717896, 0.07421983033418655, 1.8518844842910767, -0.4812922775745392, 0.6877598166465759, -0.3836621344089508, -1.1913970708847046, 0.8300802111625671, -0.37466755509376526, -2.03928542137146, -0.6250827312469482, -0.8300327658653259, -0.21280832588672638, -0.7362653017044067, 0.9354315400123596, -0.2613697350025177, -1.3617452383041382, 0.22654511034488678, -0.7507886290550232, 0.1106949970126152, -1.238761067390442, 0.2854679524898529, 0.7501282095909119, -0.6347401738166809, 0.05338780954480171, -0.25419431924819946, -1.2537147998809814, -0.43481260538101196, 0.3407815396785736, 1.809967041015625, -0.7296831607818604, 0.9410974383354187, 1.0108152627944946, -0.6617465019226074, 0.011057059280574322, 0.3643563687801361, -0.3459094166755676, 0.95570307970047, -1.0819560289382935, -0.4525568187236786, 1.1072505712509155, -0.2572793662548065, -0.5602394938468933, 1.431126356124878, 0.6621724367141724, -1.038119912147522, -0.2589767277240753, -0.1533622443675995, -0.8840203881263733, 0.05978376045823097, -1.6717349290847778, -0.15239699184894562, 0.28873512148857117, -1.615540862083435, -0.4707043170928955, -0.13205310702323914, 1.3037930727005005, -0.07861491292715073, 1.4718244075775146, -0.3740849196910858, -0.14855989813804626, -0.44894683361053467, -0.4545798599720001, 0.21240827441215515, -0.23551681637763977, -0.56333988904953, 0.26652026176452637, -0.8280513286590576, 0.2963700294494629, 1.4704715013504028, 0.3067529499530792, 0.0979464203119278, 0.5002958178520203, 1.0041310787200928, 0.4286031126976013, -0.11552796512842178, -0.8857772350311279, -1.5826970338821411, 2.1032791137695312, -1.4583609104156494, 2.0332462787628174, 0.9029091000556946, -0.06490353494882584, -1.8369190692901611, -1.872410774230957, 1.3533724546432495, 1.1331082582473755, 2.321157455444336, 0.5238544344902039, 0.4390673041343689, -0.8506689071655273, -0.6334723830223083, 0.35315096378326416, -0.9664993286132812, -0.7874894738197327, 0.10853815823793411, 2.3631503582000732, 1.7437236309051514, -0.4117443561553955, -0.21785928308963776, -1.0100595951080322, 1.3667755126953125, -0.10515530407428741, 0.2500145137310028, 1.9467434883117676, -0.23361092805862427, -1.0192071199417114, 1.2591347694396973, -2.342094659805298, 0.21392066776752472, 1.9930546283721924, 0.27217239141464233, 0.12095291912555695, -1.4075071811676025, -0.6434488892555237, -0.27219539880752563, -0.3851204514503479, -1.1835259199142456, 0.5440473556518555, -0.2451017051935196, -0.8585262298583984, -1.4547340869903564, 0.09590741991996765, -1.2028523683547974, -1.7215555906295776, 0.24489735066890717, 1.8682409524917603, 2.081239700317383, -0.8001428246498108, 1.445692539215088, -0.3184428811073303, 0.1212393194437027, 1.175159215927124, 1.1621813774108887, 3.1381845474243164, 1.9711246490478516, -1.316636085510254, 0.6474379301071167, -0.10461338609457016, -0.42558762431144714, 1.0560319423675537, -1.1544816493988037, 1.2711398601531982, -0.16738882660865784, -1.2036484479904175, -1.1273969411849976, 1.0312145948410034, 0.49910956621170044, 0.01778733730316162, -0.5227721333503723, 1.26287841796875, 0.12107867002487183, 1.3335020542144775, 0.5437973141670227, -0.3371654748916626, 0.5679424405097961, -0.3723330497741699, -0.5130794644355774, 1.5957673788070679, 0.13834980130195618, -1.4973410367965698, -2.307887554168701, -0.2404576539993286, -0.8498317003250122, 0.0019183512777090073, -0.6614066362380981, -0.9757956862449646, 1.581275224685669, 0.4303378462791443, -1.2094824314117432, -0.3402927815914154, -0.41194620728492737, -0.6177272200584412, 2.657984733581543, -1.4515224695205688, -0.2035745084285736, -0.9393396377563477, -0.5351755619049072, 1.5367710590362549, -1.2574702501296997, -0.25357434153556824, -1.0459297895431519, -0.5497928857803345, -1.2115626335144043, -0.5359309911727905, -0.026908844709396362, -0.8516771197319031, 0.7707884907722473, 0.11496733874082565, -1.138266921043396, -0.29078149795532227, -0.8673607707023621, 0.8606945872306824, -0.11024242639541626, 0.17454101145267487, 1.854669451713562, 0.31145504117012024, -0.33688437938690186, 0.740095317363739, 1.1844110488891602, 0.6520348191261292, -0.6247075200080872, 0.17283405363559723, -0.6246801614761353, 0.30816197395324707, -1.249621868133545, 0.28553104400634766, -2.845407247543335, 0.6374940872192383, -0.03326490521430969, -0.0380668118596077, -0.013694548979401588, -1.249808669090271, 1.0931764841079712, 2.5309393405914307, -1.1617014408111572, 0.534808337688446, 0.33989381790161133, 1.1586579084396362, -1.6053656339645386, 0.322130411863327, -0.4112028181552887, 2.124145269393921, 0.23102480173110962, 1.2034721374511719, -0.5068166255950928, -2.3159875869750977, 0.588144838809967, -1.2104721069335938, -1.0886847972869873, 0.7522561550140381, -0.8072116374969482, 0.06877052783966064, -1.430576205253601, -0.18352888524532318, -0.8344362378120422, -1.2453805208206177, 0.6076838970184326, 0.10468585044145584, 0.5071634650230408, -0.6073691248893738, 0.31999239325523376, -2.2036499977111816, -1.4238208532333374, -0.19227401912212372, -0.9578826427459717, 0.46094346046447754, -0.4014236032962799, 0.763123095035553, -0.11909061670303345, 0.052026744931936264, 0.26871922612190247, 1.3451600074768066, 3.4104995727539062, 0.20061726868152618, 0.3410834074020386, -0.21463292837142944, -0.9681416153907776, 1.4590355157852173, 0.9824674725532532, -0.1788216382265091, -0.6025084257125854, -0.997016966342926, 1.2912436723709106, 2.0081799030303955, 1.0494683980941772, 0.05329645052552223, -0.8255809545516968, -0.7974802255630493, -0.019921453669667244, 0.15350419282913208, 0.4885905385017395, 0.9537280201911926, 0.012920239008963108, 0.16235361993312836, 1.497380018234253, 1.259103536605835, -0.39444679021835327, 0.39663735032081604, -0.8351073861122131, -0.460248738527298, 0.44503194093704224, 0.37797409296035767, 0.030357874929904938, 0.4092652499675751, -1.0506491661071777, -0.25715893507003784, -0.36792218685150146, -0.9610913395881653, -0.6712256073951721, -0.3640165627002716, -0.33985698223114014, 1.6554791927337646, 0.1306944191455841, -0.4657805562019348, -0.023954316973686218, -0.7498475313186646, -0.08845347166061401, -1.0529649257659912, 0.28624436259269714, -0.097004733979702, -0.033152010291814804, -0.10649838298559189, 1.8246275186538696, -0.889376699924469, -2.134361982345581, 0.26612821221351624, 0.20911473035812378, -0.33250516653060913, 0.1435568779706955, 1.6909352540969849, 0.515405535697937, 1.3681344985961914, 1.41367506980896, 0.9462170004844666, -0.6509137153625488, -1.2902699708938599, 0.7267438769340515, 1.0149452686309814, -1.4807045459747314, 0.7444857954978943, -0.10184802860021591, -0.5714288949966431, 0.7166562676429749, 1.2813489437103271, 0.4701140522956848, -2.0701751708984375, 0.8258615136146545, -0.9442726969718933, 0.8416149616241455, 0.7110732793807983, 0.7693669199943542, 0.2320738285779953, 0.7965866327285767, -1.2820502519607544, -1.0864770412445068, -0.7297971248626709, -0.6821120381355286, 1.969942569732666, -0.28504228591918945, 0.484952837228775, -0.20557701587677002, -1.315151333808899, -0.13486319780349731, 0.6709996461868286, 0.30873119831085205, -0.4179374575614929, 0.8059961199760437, -0.6975455284118652, -1.1452124118804932, -1.389318823814392, -0.4649393558502197, -1.0028254985809326, -0.9507044553756714, 1.0253610610961914, 0.7926771640777588, 0.37271443009376526, 1.8729997873306274, 0.6142241954803467, 0.19670936465263367, -2.648686647415161, 0.9412556290626526, 0.2953086197376251, -0.07104817777872086, 0.9404351115226746, 0.2770419418811798, 1.0655267238616943, 0.017327822744846344, 0.5229676365852356, -2.4078664779663086, 2.291069746017456, -0.2072536051273346, 0.7643333673477173, -0.007218175567686558, -0.12940287590026855, 1.1103427410125732, 0.6275418996810913, 0.5922430753707886, -1.085068941116333, 0.7381215691566467, -0.572076141834259, 1.1650177240371704, 0.8679384589195251, -0.8289709091186523, -0.019146885722875595, 1.2827130556106567, 0.4495668113231659, -0.5444185733795166, -0.9239981770515442, -0.9434496164321899, 0.9372183680534363, 1.8457679748535156, -0.005546539556235075, 0.06463665515184402, 0.8035414814949036, 0.6204414367675781, -1.3149470090866089, 0.057751115411520004, -0.7213695645332336, -0.761888325214386, 1.5974992513656616, 2.044983386993408, -0.0780058354139328, -0.12909141182899475, -0.6255908608436584, -1.343374252319336, 0.708458423614502, -0.08343368023633957, 0.19012391567230225, 0.6562426090240479, -0.6128201484680176, 1.1247962713241577, 0.8294624090194702, 0.9754289388656616, 0.13766604661941528, 0.12379124760627747, 0.30693721771240234, -0.2680721580982208, -1.1945244073867798, -0.3411000370979309, -1.0697804689407349, -2.494128942489624, 0.49435222148895264, -0.2326687127351761, -1.475340485572815, 0.014742960222065449, -0.9612951278686523, 0.8793193697929382, -0.5476789474487305, -1.0636271238327026, -1.536314845085144, 0.19324824213981628, -0.17823444306850433, 0.8704190850257874, -1.594516396522522, -0.15568888187408447, 1.2784149646759033, 0.9251835346221924, -0.599920392036438, 1.0636496543884277, 0.23754900693893433, 1.005063533782959, 0.83370041847229, -0.36320874094963074, 0.4813843369483948, 0.2357795089483261, -1.3803777694702148, 0.42912277579307556, 1.2015317678451538, 0.19056829810142517, 1.4469141960144043, -0.5736030340194702, 0.06806200742721558, 0.4109521210193634, -0.4333171248435974, -0.4579342305660248, -0.5879555344581604, 0.692771852016449, 0.020683102309703827, -0.9599087834358215, 0.008369640447199345, -0.17388518154621124, -0.22545196115970612, 0.15056923031806946, -1.530574083328247, -0.1609461009502411, -0.4317981004714966, -0.6177781820297241, -1.3000346422195435, -0.003028404898941517, 1.4049006700515747, -0.7787010073661804, -0.19107581675052643, 0.49712151288986206, 0.43770918250083923, 0.5076674222946167, 0.6946538686752319, -0.6257486939430237, -0.3378283679485321, -0.2000660002231598, -0.3552107810974121, 0.37189534306526184, 1.2939540147781372, -0.11363918334245682, -0.9866547584533691, 0.6426149606704712, -0.4069755971431732, 0.07689359039068222, 1.9764827489852905, 0.11567936092615128, -0.8065478801727295, 0.3662106394767761, -0.7129731178283691, 1.9526128768920898, 1.6634331941604614, 1.327595829963684, -0.16290561854839325, -0.9213522672653198, 0.6898975372314453, -0.2487216591835022, -0.32285964488983154, 0.923263669013977, 0.44718554615974426, -0.248244971036911, -1.436649203300476, 0.576880156993866, 1.2169578075408936, -0.9132331609725952, -0.7908592820167542, 0.10432209819555283, -0.8025352358818054, 1.1364375352859497, 0.7168633937835693, 0.41520625352859497, 0.2117307484149933, 1.6424992084503174, 0.8057669401168823, -0.5804067850112915, 0.547327995300293, 0.49155324697494507, -0.20813526213169098, -2.0508792400360107, -1.0647703409194946, 0.35662415623664856, -0.5171651244163513, -1.5778567790985107, 1.394619107246399, -1.194785475730896, -0.9602033495903015, 0.5346819758415222, 0.008267750032246113, 1.3324660062789917, 0.3169097602367401, 1.6337976455688477, 2.0649335384368896, 0.9196194410324097, 0.363505095243454, 1.2719379663467407, -0.1550462245941162, -0.37302371859550476, 1.8258411884307861, -0.4573849141597748, 0.48369258642196655, 1.1262832880020142, -0.4602452218532562, -1.0705945491790771, -0.7663869857788086, -1.1545835733413696, -0.6714224815368652, 1.2238519191741943, 0.063736692070961, -1.1095128059387207, 0.2613547742366791, 1.5210999250411987, 0.12595301866531372, -0.32025888562202454, 0.5748544931411743, 0.43647104501724243, -0.7837631106376648, -0.09039068967103958, -0.926719069480896, 0.465558797121048, -0.2228156179189682, -0.4202342927455902, 0.3128643333911896, 0.4470078945159912, 1.2582882642745972, 0.004855782724916935, 0.09993352741003036, 1.2690922021865845, -1.444973111152649, 1.4697411060333252, -0.6873992681503296, 0.2555314302444458, -2.3047587871551514, 1.345694899559021, -0.6934305429458618, 1.9754265546798706, -2.6312615871429443, 0.41732800006866455, -0.5985659956932068, -0.5078439116477966, 0.3287096321582794, -0.28580600023269653, 0.14507097005844116, -0.17859067022800446, -1.0602511167526245, -0.12826254963874817, -0.734693169593811, 0.5960589647293091, 1.160420536994934, 1.3346885442733765, -1.0748310089111328, -0.230550616979599, -1.6763052940368652, -0.14715954661369324, -0.685873806476593, 0.301535964012146, -1.98317289352417, -0.16731703281402588, -1.972265362739563, -2.35093355178833, -1.3638174533843994, -0.8437801599502563, 1.164450764656067, 0.20499052107334137, -0.9171109795570374, 1.1347260475158691, -0.35196757316589355, -1.7655220031738281, 1.076744794845581, -2.155127763748169 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
Hi! This behavior stems from these lines: https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L45-L46 I agree we should preserve the original type whenever possible and downcast explicitly with a warning. @lhoestq Do you remember why we need this "default dtype" logic in our formatters?
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
38
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. Hi! This behavior stems from these lines: https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L45-L46 I agree we should preserve the original type whenever possible and downcast explicitly with a warning. @lhoestq Do you remember why we need this "default dtype" logic in our formatters?
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
I was also wondering why the default type logic is needed. Me just deleting it is probably too naive of a solution.
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
22
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. I was also wondering why the default type logic is needed. Me just deleting it is probably too naive of a solution.
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
Hmm I think the idea was to end up with the usual default precision for deep learning models - no matter how the data was stored or where it comes from. For example in NLP we store tokens using an optimized low precision to save disk space, but when we set the format to `torch` we actually need to get `int64`. Although the need for a default for integers also comes from numpy not returning the same integer precision depending on your machine. Finally I guess we added a default for floats as well for consistency. I'm a bit embarrassed by this though, as a user I'd have expected to get the same precision indeed as well and get a zero copy view.
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
123
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. Hmm I think the idea was to end up with the usual default precision for deep learning models - no matter how the data was stored or where it comes from. For example in NLP we store tokens using an optimized low precision to save disk space, but when we set the format to `torch` we actually need to get `int64`. Although the need for a default for integers also comes from numpy not returning the same integer precision depending on your machine. Finally I guess we added a default for floats as well for consistency. I'm a bit embarrassed by this though, as a user I'd have expected to get the same precision indeed as well and get a zero copy view.
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
Unfortunately removing it for integers is a breaking change for most `transformers` + `datasets` users for NLP (which is a common case). Removing it for floats is a breaking change for `transformers` + `datasets` for ASR as well. And it also is a breaking change for the other users relying on this behavior. Therefore I think that the only short term solution is for the user to provide `dtype=` manually and document better this behavior. We could also extend `dtype` to accept a value that means "return the same dtype as the underlying storage" and make it easier to do zero copy.
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
102
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. Unfortunately removing it for integers is a breaking change for most `transformers` + `datasets` users for NLP (which is a common case). Removing it for floats is a breaking change for `transformers` + `datasets` for ASR as well. And it also is a breaking change for the other users relying on this behavior. Therefore I think that the only short term solution is for the user to provide `dtype=` manually and document better this behavior. We could also extend `dtype` to accept a value that means "return the same dtype as the underlying storage" and make it easier to do zero copy.
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
@lhoestq It should be fine to remove this conversion in Datasets 3.0, no? For now, we can warn the user (with a log message) about the future change when the default type is changed.
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
34
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. @lhoestq It should be fine to remove this conversion in Datasets 3.0, no? For now, we can warn the user (with a log message) about the future change when the default type is changed.
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
Let's see with the transformers team if it sounds reasonable ? We'd have to fix multiple example scripts though. If it's not ok we can also explore keeping this behavior only for tokens and audio data.
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
36
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. Let's see with the transformers team if it sounds reasonable ? We'd have to fix multiple example scripts though. If it's not ok we can also explore keeping this behavior only for tokens and audio data.
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
IMO being coupled with Transformers can lead to unexpected behavior when one tries to use our lib without pairing it with Transformers, so I think it's still important to "fix" this, even if it means we will need to update Transformers' example scripts afterward.
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
44
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. IMO being coupled with Transformers can lead to unexpected behavior when one tries to use our lib without pairing it with Transformers, so I think it's still important to "fix" this, even if it means we will need to update Transformers' example scripts afterward.
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5517
`with_format("numpy")` silently downcasts float64 to float32 features
For others that run into the same issue: A temporary workaround for me is this: ```python def numpy_transform(batch): return {key: np.asarray(val) for key, val in batch.items()} dataset = dataset.with_transform(numpy_transform) ```
### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array.
302
30
`with_format("numpy")` silently downcasts float64 to float32 features ### Describe the bug When I create a dataset with a `float64` feature, then apply numpy formatting the returned numpy arrays are silently downcasted to `float32`. ### Steps to reproduce the bug ```python import datasets dataset = datasets.Dataset.from_dict({'a': [1.0, 2.0, 3.0]}).with_format("numpy") print("feature dtype:", dataset.features['a'].dtype) print("array dtype:", dataset['a'].dtype) ``` output: ``` feature dtype: float64 array dtype: float32 ``` ### Expected behavior ``` feature dtype: float64 array dtype: float64 ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-135-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.4.4 ### Suggested Fix Changing [the `_tensorize` function of the numpy formatter](https://github.com/huggingface/datasets/blob/b065547654efa0ec633cf373ac1512884c68b2e1/src/datasets/formatting/np_formatter.py#L32) to ```python def _tensorize(self, value): if isinstance(value, (str, bytes, type(None))): return value elif isinstance(value, (np.character, np.ndarray)) and np.issubdtype(value.dtype, np.character): return value elif isinstance(value, np.number): return value return np.asarray(value, **self.np_array_kwargs) ``` fixes this particular issue for me. Not sure if this would break other tests. This should also avoid unnecessary copying of the array. For others that run into the same issue: A temporary workaround for me is this: ```python def numpy_transform(batch): return {key: np.asarray(val) for key, val in batch.items()} dataset = dataset.with_transform(numpy_transform) ```
[ -1.213478684425354, -0.9068505167961121, -0.7341683506965637, 1.5133947134017944, -0.2038259506225586, -1.2343934774398804, 0.2003604620695114, -1.0582244396209717, 1.7293082475662231, -0.7044316530227661, 0.34583938121795654, -1.7139561176300049, 0.08779007941484451, -0.6016902923583984, -0.7501767873764038, -0.838899552822113, -0.48692992329597473, -0.7325053811073303, 1.0452759265899658, 2.4494667053222656, 1.2338950634002686, -1.3117159605026245, 2.64473295211792, 0.7352403998374939, -0.22967590391635895, -0.9584744572639465, 0.4349835216999054, -0.038017887622117996, -1.360960602760315, -0.4335915744304657, -0.9072163105010986, -0.14873972535133362, -0.4981008768081665, -0.6704375743865967, 0.00007554236799478531, 0.41965451836586, -0.27752652764320374, -0.45105665922164917, -0.5224464535713196, -0.7954235076904297, 0.4434885084629059, -0.3405279815196991, 0.8509964346885681, -0.293168306350708, 1.7556133270263672, -0.605563759803772, 0.4741305112838745, 0.7064191699028015, 1.365408182144165, 0.17661355435848236, -0.054007407277822495, 0.4187135696411133, 0.4428691267967224, 0.02747097983956337, 0.5307058691978455, 1.1696393489837646, 0.696447491645813, 0.42040663957595825, 0.7626556158065796, -2.2648873329162598, 1.2679588794708252, -1.0405058860778809, 0.33564794063568115, 1.3501191139221191, -0.9584797024726868, 0.28922995924949646, -1.738687515258789, -0.04564730077981949, 0.5270679593086243, -2.173875570297241, 0.3328236937522888, -1.3234193325042725, -0.47875556349754333, 1.1261636018753052, 0.4203854203224182, -1.248753547668457, 0.08164627104997635, -0.3586741089820862, 0.946459949016571, 0.36561068892478943, 1.1565638780593872, -1.678151249885559, -0.04104217141866684, -0.3475498855113983, 0.1132657378911972, -1.1611300706863403, -1.4663695096969604, 0.5216416120529175, 0.6054906845092773, 0.6026242971420288, -0.15969419479370117, 0.9691234230995178, -1.0076196193695068, 0.700584888458252, -1.0734195709228516, -1.7950090169906616, -1.4120172262191772, -2.255420446395874, -2.239502429962158, 0.7284703850746155, -0.4379991292953491, -0.4837278127670288, 2.1001274585723877, -1.0035209655761719, -1.8447047472000122, 1.15326988697052, 0.33216771483421326, -0.081060990691185, 2.3209285736083984, 0.24909324944019318, -0.6830249428749084, 0.4579222500324249, -0.8204956650733948, 0.7066368460655212, -0.38325971364974976, 1.314772129058838, 0.4441607892513275, -1.0513195991516113, 1.5440099239349365, -0.3596934974193573, 0.6069093346595764, -0.6787207722663879, -0.4358024597167969, -0.6241785883903503, 0.39557597041130066, 1.8715006113052368, -0.3525646924972534, 1.413488745689392, -0.30279532074928284, -1.527472734451294, -1.5451606512069702, 0.8515990972518921, 0.54558265209198, -0.7287400364875793, 0.14617599546909332, -0.3468228578567505, 0.08532996475696564, -0.09234192967414856, 1.1553318500518799, 1.2530064582824707, 0.7241117358207703, -0.34976768493652344, -0.8767593502998352, 0.22992192208766937, 0.04734246805310249, -0.7809398770332336, -1.7288548946380615, -0.3106934726238251, 0.12510313093662262, 0.6495650410652161, -1.2099609375, 1.8070855140686035, 0.8239729404449463, 1.8865174055099487, 1.0266600847244263, -0.4054228365421295, 1.5439114570617676, 0.09708555787801743, 1.9166247844696045, -0.4639948010444641, 0.6875974535942078, -0.33330148458480835, -1.1974126100540161, 0.8585392236709595, -0.3067745268344879, -2.1223039627075195, -0.7337276339530945, -0.7951570749282837, -0.17847603559494019, -0.7992737889289856, 0.9941344857215881, -0.24462774395942688, -1.4297133684158325, 0.2501608431339264, -0.84361332654953, 0.10949406027793884, -1.225943684577942, 0.26199403405189514, 0.7194706797599792, -0.6107695698738098, 0.13556581735610962, -0.22946038842201233, -1.3436046838760376, -0.44045281410217285, 0.33575695753097534, 1.806903600692749, -0.8658230304718018, 0.9668681025505066, 1.0656496286392212, -0.6233898401260376, -0.005130303557962179, 0.3421764075756073, -0.2949759364128113, 0.9392995834350586, -1.0930490493774414, -0.4824100732803345, 1.1543567180633545, -0.12545883655548096, -0.6050094366073608, 1.4489033222198486, 0.7150645852088928, -1.0546067953109741, -0.2005060762166977, -0.13065488636493683, -0.7456780672073364, 0.05198352783918381, -1.6606630086898804, -0.07631075382232666, 0.5185185670852661, -1.5318999290466309, -0.513290286064148, -0.21796700358390808, 1.3517062664031982, -0.07851886004209518, 1.4114634990692139, -0.3164968490600586, -0.1891167312860489, -0.44586363434791565, -0.23937712609767914, 0.15834245085716248, -0.22922976315021515, -0.6387889981269836, 0.2101910412311554, -0.7328181266784668, 0.4423135221004486, 1.4089300632476807, 0.3002326190471649, 0.09228650480508804, 0.5719307065010071, 1.1459487676620483, 0.4058840274810791, -0.06903163343667984, -0.8907437324523926, -1.5748178958892822, 2.05885648727417, -1.4480133056640625, 1.9591187238693237, 0.6998615264892578, 0.018961090594530106, -1.7295188903808594, -1.979150414466858, 1.4023222923278809, 1.1582298278808594, 2.374828338623047, 0.5888110399246216, 0.48128846287727356, -0.8822123408317566, -0.6433701515197754, 0.29840388894081116, -1.0012348890304565, -0.7349913120269775, 0.15311934053897858, 2.475508451461792, 1.7713533639907837, -0.3820357620716095, -0.22659075260162354, -1.0606300830841064, 1.4228488206863403, -0.20872615277767181, 0.15394330024719238, 2.022113800048828, -0.25393638014793396, -1.0643551349639893, 1.2923915386199951, -2.3572492599487305, 0.19426298141479492, 1.9570729732513428, 0.20817193388938904, 0.06856109946966171, -1.3559640645980835, -0.7060655951499939, -0.2694758474826813, -0.5032264590263367, -1.2175662517547607, 0.5284431576728821, -0.1752610057592392, -0.8278623223304749, -1.3857232332229614, 0.17526483535766602, -1.0021148920059204, -1.7206335067749023, 0.20860320329666138, 1.8617663383483887, 2.0013716220855713, -0.7779638171195984, 1.557502269744873, -0.3275946378707886, 0.17912787199020386, 1.3199206590652466, 1.2161072492599487, 3.0664875507354736, 1.930653691291809, -1.318433403968811, 0.6724894642829895, -0.1478724628686905, -0.49463751912117004, 1.12183678150177, -1.2735809087753296, 1.2932034730911255, -0.14805781841278076, -1.2665190696716309, -1.1629728078842163, 0.9495168924331665, 0.48431307077407837, 0.13710759580135345, -0.5138789415359497, 1.1203519105911255, 0.12728026509284973, 1.3115004301071167, 0.610880970954895, -0.24749842286109924, 0.7176113724708557, -0.4238629639148712, -0.41919973492622375, 1.5166151523590088, 0.21761050820350647, -1.4022364616394043, -2.3015682697296143, -0.17255769670009613, -0.9252821207046509, -0.015936776995658875, -0.5906552076339722, -0.9671843647956848, 1.607979416847229, 0.4037560820579529, -1.1834616661071777, -0.2673957347869873, -0.3422400951385498, -0.5498104095458984, 2.782724618911743, -1.3957680463790894, -0.25615194439888, -1.0551633834838867, -0.6312759518623352, 1.6747024059295654, -1.1255135536193848, -0.1756020039319992, -1.0871175527572632, -0.5329058766365051, -1.2636334896087646, -0.5845553874969482, 0.009061628021299839, -0.9162831902503967, 0.8673905730247498, 0.14594347774982452, -1.25343656539917, -0.33056581020355225, -0.916085422039032, 0.8094907402992249, -0.10516174882650375, 0.18868796527385712, 1.8608447313308716, 0.4928053319454193, -0.33767107129096985, 0.7347714900970459, 1.1560405492782593, 0.659515380859375, -0.5879212617874146, 0.273643434047699, -0.6385257244110107, 0.35758936405181885, -1.3199830055236816, 0.25088080763816833, -2.775254964828491, 0.6611828804016113, -0.04202689975500107, 0.015086767263710499, -0.032937757670879364, -1.3690303564071655, 1.1236077547073364, 2.569192409515381, -1.1884053945541382, 0.44024530053138733, 0.29068049788475037, 1.1874879598617554, -1.5396013259887695, 0.23915371298789978, -0.5403618216514587, 2.1475579738616943, 0.1769716590642929, 1.2290233373641968, -0.4209974408149719, -2.2927231788635254, 0.6895885467529297, -1.3493566513061523, -1.1564147472381592, 0.7489839196205139, -0.7725801467895508, 0.08889268338680267, -1.3564049005508423, -0.16769623756408691, -0.771164059638977, -1.1738914251327515, 0.6610537767410278, 0.1066461056470871, 0.435717910528183, -0.6209380030632019, 0.38682883977890015, -2.156294822692871, -1.3594741821289062, -0.19128352403640747, -0.9767140746116638, 0.4373680651187897, -0.31232914328575134, 0.7575849890708923, -0.19630971550941467, -0.03846074640750885, 0.42221909761428833, 1.4151166677474976, 3.3774311542510986, 0.19445981085300446, 0.3969634473323822, -0.2202184945344925, -0.9396413564682007, 1.4169291257858276, 0.9276197552680969, -0.21666379272937775, -0.535712718963623, -1.03114652633667, 1.1950575113296509, 1.927855134010315, 1.066195011138916, 0.013139485381543636, -0.8429950475692749, -0.8067575097084045, -0.0009443480521440506, 0.22577497363090515, 0.4685826897621155, 0.8723171949386597, 0.08683325350284576, 0.04253055900335312, 1.4293698072433472, 1.1172581911087036, -0.4167897701263428, 0.41429010033607483, -0.7714775800704956, -0.48520612716674805, 0.5954073071479797, 0.29054588079452515, 0.04165879637002945, 0.33419516682624817, -1.1136380434036255, -0.2466663271188736, -0.3586824834346771, -0.8850430250167847, -0.8527345061302185, -0.3518608510494232, -0.3938303291797638, 1.6730146408081055, 0.03687756881117821, -0.5342232584953308, -0.0640416070818901, -0.7826433181762695, -0.02477111667394638, -0.9656871557235718, 0.3081696033477783, -0.15924523770809174, -0.08858630806207657, -0.1333576738834381, 1.7001804113388062, -0.9475553631782532, -1.9963475465774536, 0.24711714684963226, 0.17239443957805634, -0.3741164207458496, 0.2533644437789917, 1.6146477460861206, 0.708286702632904, 1.4856126308441162, 1.3131355047225952, 0.9865615367889404, -0.6309692859649658, -1.368058681488037, 0.7055282592773438, 1.0701935291290283, -1.4452760219573975, 0.6809770464897156, 0.06042388454079628, -0.5041541457176208, 0.6018194556236267, 1.3164713382720947, 0.4440668821334839, -2.05031156539917, 0.7571649551391602, -0.9139022827148438, 0.8171600699424744, 0.6272679567337036, 0.7093992829322815, 0.16751253604888916, 0.7276076674461365, -1.3348023891448975, -1.1130152940750122, -0.6889038681983948, -0.6801878213882446, 2.001723289489746, -0.3324388861656189, 0.5557159185409546, -0.24200382828712463, -1.4238650798797607, -0.05651150271296501, 0.6645758748054504, 0.3344227969646454, -0.5899078249931335, 0.7557445764541626, -0.5714011192321777, -1.0663443803787231, -1.3276325464248657, -0.5213570594787598, -0.9982368350028992, -0.9537350535392761, 0.9966925978660583, 0.8084269165992737, 0.29734811186790466, 1.8088430166244507, 0.639812171459198, 0.1405819207429886, -2.6201047897338867, 0.930281400680542, 0.25204962491989136, -0.07450615614652634, 0.7943155765533447, 0.35000845789909363, 1.0029661655426025, -0.04997098073363304, 0.5763931274414062, -2.4142849445343018, 2.3509790897369385, -0.17217367887496948, 0.6769214272499084, 0.025725718587636948, -0.16083396971225739, 1.0914534330368042, 0.5679509043693542, 0.5551978349685669, -1.0203937292099, 0.6224511861801147, -0.6307591795921326, 1.350647211074829, 0.817789614200592, -0.8356373310089111, -0.06759130954742432, 1.323548436164856, 0.5317211151123047, -0.4520091712474823, -0.9819554686546326, -1.0463076829910278, 1.0274207592010498, 1.7653368711471558, -0.09376651793718338, 0.07771716266870499, 0.8054090738296509, 0.6982928514480591, -1.3284400701522827, -0.01003802940249443, -0.8012420535087585, -0.6918354630470276, 1.67275869846344, 2.1094300746917725, -0.23031331598758698, -0.23329955339431763, -0.7673226594924927, -1.2479223012924194, 0.7830403447151184, 0.02828192710876465, 0.11403753608465195, 0.6757146716117859, -0.6226596236228943, 1.1679370403289795, 0.8778107166290283, 0.8710928559303284, 0.2463151067495346, 0.259727418422699, 0.16187407076358795, -0.3826114237308502, -1.244379997253418, -0.2711235582828522, -1.094490885734558, -2.552518367767334, 0.39937692880630493, -0.18013553321361542, -1.3921271562576294, 0.05589529499411583, -1.0443413257598877, 0.8927950859069824, -0.5686201453208923, -1.1071757078170776, -1.472318410873413, 0.2289501279592514, 0.06255637854337692, 0.9690446257591248, -1.5868993997573853, -0.04008952155709267, 1.276356816291809, 0.9671480059623718, -0.7305067181587219, 0.8864492774009705, 0.19628645479679108, 1.0400174856185913, 0.8948418498039246, -0.2765105366706848, 0.5198042988777161, 0.05779558792710304, -1.3644869327545166, 0.46921342611312866, 1.214753270149231, 0.1577119529247284, 1.5712850093841553, -0.6109849810600281, 0.020736772567033768, 0.447339802980423, -0.48821714520454407, -0.47380194067955017, -0.5527707934379578, 0.6294617652893066, 0.04057490825653076, -0.9319374561309814, 0.061873313039541245, 0.06497879326343536, -0.1781778186559677, 0.2202293425798416, -1.4433590173721313, -0.12190380692481995, -0.36618033051490784, -0.678126871585846, -1.1517812013626099, -0.14726382493972778, 1.2742972373962402, -0.7463812232017517, -0.17653317749500275, 0.4886648654937744, 0.20892499387264252, 0.4998053014278412, 0.6650353670120239, -0.6360212564468384, -0.4681399166584015, -0.23017482459545135, -0.3680793046951294, 0.35264140367507935, 1.4092365503311157, -0.056289348751306534, -0.9781624674797058, 0.784199595451355, -0.371017724275589, 0.08000462502241135, 1.8864303827285767, 0.04870620742440224, -0.850132942199707, 0.35541731119155884, -0.7071759104728699, 1.8832294940948486, 1.6568851470947266, 1.2327502965927124, -0.13108685612678528, -1.0107132196426392, 0.6019176840782166, -0.3159463107585907, -0.39045265316963196, 0.9565194845199585, 0.33846116065979004, -0.18947093188762665, -1.3738621473312378, 0.7109281420707703, 1.3477685451507568, -0.9008520841598511, -0.872398316860199, 0.1736290454864502, -0.8404647707939148, 1.124977707862854, 0.7427807450294495, 0.3648513853549957, 0.2624906301498413, 1.605593204498291, 0.7734848856925964, -0.3815258741378784, 0.5731185674667358, 0.4486537575721741, -0.18194396793842316, -2.197530508041382, -1.1161328554153442, 0.28275203704833984, -0.5649064779281616, -1.6146316528320312, 1.2964234352111816, -1.207155704498291, -0.9210072755813599, 0.5658285021781921, 0.1372023969888687, 1.4649757146835327, 0.35602331161499023, 1.5746608972549438, 2.0590968132019043, 0.87632817029953, 0.3391689360141754, 1.2675334215164185, -0.12475059926509857, -0.39190012216567993, 1.7115906476974487, -0.4463025629520416, 0.43785789608955383, 1.0566378831863403, -0.36629435420036316, -1.1471331119537354, -0.8033557534217834, -1.2941665649414062, -0.8241731524467468, 1.1143171787261963, 0.1130327433347702, -1.1103510856628418, 0.2932945787906647, 1.5075429677963257, 0.028577938675880432, -0.28812524676322937, 0.6577316522598267, 0.33685189485549927, -0.8443812727928162, -0.11364446580410004, -0.8843386769294739, 0.4661276638507843, -0.16152779757976532, -0.336820125579834, 0.3826107084751129, 0.4474402070045471, 1.3357491493225098, -0.007042148150503635, 0.10566811263561249, 1.072001338005066, -1.427538275718689, 1.5629477500915527, -0.7030158042907715, 0.3307270109653473, -2.2979090213775635, 1.3512991666793823, -0.7939059734344482, 1.872178316116333, -2.6871979236602783, 0.4179489314556122, -0.49699196219444275, -0.4488445520401001, 0.2394873946905136, -0.2937963604927063, 0.18271103501319885, -0.12559132277965546, -1.1863154172897339, -0.16505630314350128, -0.7054787278175354, 0.590046763420105, 1.1461098194122314, 1.3617773056030273, -1.1017745733261108, -0.29691287875175476, -1.7270797491073608, -0.16656242311000824, -0.7218703031539917, 0.32788413763046265, -1.9296038150787354, -0.19105607271194458, -1.8814616203308105, -2.3798394203186035, -1.2096397876739502, -0.8761327266693115, 1.1540647745132446, 0.10569775104522705, -0.824591338634491, 1.1525440216064453, -0.49604272842407227, -1.8506108522415161, 1.1000218391418457, -2.2682065963745117 ]
https://github.com/huggingface/datasets/issues/5514
Improve inconsistency of `Dataset.map` interface for `load_from_cache_file`
Hi, thanks for noticing this! We can't just remove the cache control as this allows us to control where the arrow files generated by the ops are written (cached on disk if enabled or a temporary directory if disabled). The right way to address this inconsistency would be by having `load_from_cache_file=None` by default everywhere.
### Feature request 1. Replace the `load_from_cache_file` default value to `True`. 2. Remove or alter checks from `is_caching_enabled` logic. ### Motivation I stumbled over an inconsistency in the `Dataset.map` interface. The documentation (and source) states for the parameter `load_from_cache_file`: ``` load_from_cache_file (`bool`, defaults to `True` if caching is enabled): If a cache file storing the current computation from `function` can be identified, use it instead of recomputing. ``` 1. `load_from_cache_file` default value is `None`, while being annotated as `bool` 2. It is inconsistent with other method signatures like `filter`, that have the default value `True` 3. The logic is inconsistent, as the `map` method checks if caching is enabled through `is_caching_enabled`. This logic is not used for other similar methods. ### Your contribution I am not fully aware of the logic behind caching checks. If this is just a inconsistency that historically grew, I would suggest to remove the `is_caching_enabled` logic as the "default" logic. Maybe someone can give insights, if environment variables have a higher priority than local variables or vice versa. If this is clarified, I could adjust the source according to the "Feature request" section of this issue.
303
54
Improve inconsistency of `Dataset.map` interface for `load_from_cache_file` ### Feature request 1. Replace the `load_from_cache_file` default value to `True`. 2. Remove or alter checks from `is_caching_enabled` logic. ### Motivation I stumbled over an inconsistency in the `Dataset.map` interface. The documentation (and source) states for the parameter `load_from_cache_file`: ``` load_from_cache_file (`bool`, defaults to `True` if caching is enabled): If a cache file storing the current computation from `function` can be identified, use it instead of recomputing. ``` 1. `load_from_cache_file` default value is `None`, while being annotated as `bool` 2. It is inconsistent with other method signatures like `filter`, that have the default value `True` 3. The logic is inconsistent, as the `map` method checks if caching is enabled through `is_caching_enabled`. This logic is not used for other similar methods. ### Your contribution I am not fully aware of the logic behind caching checks. If this is just a inconsistency that historically grew, I would suggest to remove the `is_caching_enabled` logic as the "default" logic. Maybe someone can give insights, if environment variables have a higher priority than local variables or vice versa. If this is clarified, I could adjust the source according to the "Feature request" section of this issue. Hi, thanks for noticing this! We can't just remove the cache control as this allows us to control where the arrow files generated by the ops are written (cached on disk if enabled or a temporary directory if disabled). The right way to address this inconsistency would be by having `load_from_cache_file=None` by default everywhere.
[ -1.0274901390075684, -0.8360885381698608, -0.7225093841552734, 1.6265997886657715, -0.13500112295150757, -1.3072118759155273, 0.2360895425081253, -1.1024781465530396, 1.8123488426208496, -0.8158617615699768, 0.4664093255996704, -1.6378223896026611, 0.08813241124153137, -0.6918321847915649, -0.7486792206764221, -0.8560253381729126, -0.33140838146209717, -0.708953320980072, 1.0267412662506104, 2.4378089904785156, 1.2126054763793945, -1.3596917390823364, 2.5450751781463623, 0.6463391780853271, -0.19847524166107178, -0.9633131623268127, 0.45660659670829773, -0.002879919484257698, -1.1460360288619995, -0.5392100214958191, -0.8840373158454895, -0.17607678472995758, -0.6166470050811768, -0.6069121956825256, -0.05358167737722397, 0.45052096247673035, -0.4199983775615692, -0.43464386463165283, -0.5430965423583984, -0.9080542922019958, 0.5237239003181458, -0.39416608214378357, 1.043997883796692, -0.2717488706111908, 1.825261116027832, -0.6219000220298767, 0.43876931071281433, 0.786873996257782, 1.2868475914001465, 0.147614523768425, -0.053213849663734436, 0.34493565559387207, 0.40168634057044983, -0.06548887491226196, 0.5104531049728394, 0.9730207920074463, 0.6237760782241821, 0.65286785364151, 0.7751998901367188, -2.2863211631774902, 1.3190850019454956, -1.1507481336593628, 0.2616959512233734, 1.2543803453445435, -0.9688302874565125, 0.32054978609085083, -1.7041493654251099, 0.026288548484444618, 0.5201902389526367, -2.1909596920013428, 0.28445154428482056, -1.3260304927825928, -0.3431474566459656, 1.0861296653747559, 0.36527392268180847, -1.2805607318878174, 0.10396886616945267, -0.27980461716651917, 0.9782467484474182, 0.37488311529159546, 0.9746257066726685, -1.8218083381652832, -0.09707893431186676, -0.38222363591194153, 0.1494436413049698, -1.2912893295288086, -1.4783352613449097, 0.493467777967453, 0.6782000660896301, 0.4941820204257965, -0.23076356947422028, 1.1002161502838135, -0.9427652359008789, 0.7564527988433838, -1.0781292915344238, -1.7308237552642822, -1.4766727685928345, -2.132272720336914, -2.2605509757995605, 0.7021560072898865, -0.530811607837677, -0.5521580576896667, 2.081281900405884, -1.0054609775543213, -1.7081716060638428, 1.1422039270401, 0.2185179442167282, -0.04773566871881485, 2.2509562969207764, 0.21576136350631714, -0.6738309860229492, 0.38251179456710815, -0.6950882077217102, 0.7546554803848267, -0.39870285987854004, 1.3018779754638672, 0.4326122999191284, -1.230087399482727, 1.5811961889266968, -0.3667951226234436, 0.5774431824684143, -0.7342614531517029, -0.4715770184993744, -0.6874158978462219, 0.33291149139404297, 1.843090295791626, -0.26574572920799255, 1.5211111307144165, -0.36682817339897156, -1.5286082029342651, -1.6741172075271606, 0.8956412076950073, 0.42679232358932495, -0.7284486293792725, 0.1285235434770584, -0.3090619146823883, 0.1724318116903305, -0.2169990837574005, 1.1896135807037354, 1.357224941253662, 0.7348369359970093, -0.3655317425727844, -0.8335185050964355, 0.22503827512264252, -0.04232124239206314, -0.766968846321106, -1.7592377662658691, -0.4417582154273987, 0.16432975232601166, 0.6195914149284363, -1.0412325859069824, 1.8494608402252197, 0.919197142124176, 1.8391544818878174, 1.0362389087677002, -0.3021022081375122, 1.3931365013122559, 0.08281583338975906, 1.9517872333526611, -0.4650680124759674, 0.6329978704452515, -0.3320815861225128, -1.1220934391021729, 0.8360817432403564, -0.2999049723148346, -2.0073211193084717, -0.7457447052001953, -0.7847790718078613, -0.1440272182226181, -0.8053922057151794, 0.9287574291229248, -0.20753905177116394, -1.4048659801483154, 0.1764293760061264, -0.7295756936073303, 0.11832235753536224, -1.1971023082733154, 0.34074148535728455, 0.6620224118232727, -0.682925283908844, 0.2590930461883545, -0.2504393458366394, -1.270245909690857, -0.4751347601413727, 0.37380900979042053, 1.8743692636489868, -0.8048722743988037, 0.9222668409347534, 1.0072988271713257, -0.6835570335388184, -0.07356452941894531, 0.3961128890514374, -0.2947790026664734, 0.8393411040306091, -1.0352816581726074, -0.4212002754211426, 1.2641888856887817, -0.24335578083992004, -0.6503511667251587, 1.4418312311172485, 0.6999789476394653, -0.9843255877494812, -0.0854439064860344, -0.2710823714733124, -0.9022845029830933, 0.06149788200855255, -1.631022572517395, -0.01876872032880783, 0.38244718313217163, -1.49690842628479, -0.4332153797149658, -0.17323815822601318, 1.366438627243042, -0.16783244907855988, 1.3840967416763306, -0.34680482745170593, -0.31149929761886597, -0.2953048050403595, -0.29279160499572754, 0.08169202506542206, -0.24218910932540894, -0.6794784665107727, 0.19244618713855743, -0.6448779106140137, 0.39155980944633484, 1.3603650331497192, 0.14994654059410095, 0.02610836736857891, 0.47023776173591614, 1.1461291313171387, 0.29481106996536255, 0.05618821084499359, -0.950569748878479, -1.4647204875946045, 1.9428256750106812, -1.337465524673462, 2.022887945175171, 0.8350836038589478, -0.0035093603655695915, -1.7586933374404907, -1.817793369293213, 1.377967119216919, 1.1508067846298218, 2.2767581939697266, 0.5683205723762512, 0.3393070697784424, -0.8771305680274963, -0.6022449135780334, 0.324343740940094, -1.0385204553604126, -0.7894957661628723, 0.1650262475013733, 2.46848464012146, 1.7411808967590332, -0.3969419002532959, -0.24372722208499908, -1.0920026302337646, 1.447486162185669, -0.2071543186903, 0.14033988118171692, 2.0206198692321777, -0.21996653079986572, -1.1381726264953613, 1.3036755323410034, -2.340047836303711, 0.19204793870449066, 2.0137672424316406, 0.226440891623497, 0.08507807552814484, -1.4386615753173828, -0.6848905682563782, -0.13951142132282257, -0.3611811101436615, -1.2056772708892822, 0.48553407192230225, -0.2288769632577896, -0.7097935676574707, -1.3174896240234375, 0.25173261761665344, -1.018140196800232, -1.6840094327926636, 0.21771842241287231, 1.8612045049667358, 1.930892825126648, -0.7464829683303833, 1.6489142179489136, -0.321523517370224, 0.2562803328037262, 1.3422267436981201, 1.252695083618164, 3.235550880432129, 2.0114657878875732, -1.3253633975982666, 0.6323143839836121, -0.15061050653457642, -0.4771459400653839, 1.2489030361175537, -1.206655740737915, 1.266941785812378, -0.17092929780483246, -1.139134168624878, -1.3104605674743652, 0.8255353569984436, 0.44408541917800903, 0.045701175928115845, -0.5173850655555725, 1.1623872518539429, 0.13558329641819, 1.2451095581054688, 0.6200200319290161, -0.3571796119213104, 0.7722983360290527, -0.3993135690689087, -0.45978787541389465, 1.5275065898895264, 0.33112576603889465, -1.2153748273849487, -2.2343530654907227, -0.20212265849113464, -0.9242101907730103, 0.045285001397132874, -0.5229787826538086, -0.9236465692520142, 1.6236746311187744, 0.3585682511329651, -1.361024022102356, -0.2913357615470886, -0.3528430461883545, -0.6359504461288452, 2.7168169021606445, -1.3720430135726929, -0.29485562443733215, -1.115383505821228, -0.6964696645736694, 1.700228214263916, -1.2573994398117065, -0.2547512948513031, -1.1269758939743042, -0.4887588322162628, -1.2602505683898926, -0.4995013177394867, 0.020101450383663177, -0.8717688322067261, 0.9106022119522095, 0.24532365798950195, -1.2634539604187012, -0.4666370153427124, -0.7631658911705017, 0.8326744437217712, -0.13160717487335205, 0.2539454996585846, 1.799847960472107, 0.44921398162841797, -0.3729321360588074, 0.686922550201416, 1.0243749618530273, 0.6051092743873596, -0.5438445806503296, 0.3463786542415619, -0.5861592292785645, 0.28684860467910767, -1.3279284238815308, 0.3370250463485718, -2.8471460342407227, 0.569610059261322, -0.15880276262760162, -0.06740789860486984, -0.063435398042202, -1.373417854309082, 1.0546412467956543, 2.6165688037872314, -1.1306368112564087, 0.49135681986808777, 0.29753363132476807, 1.1822829246520996, -1.7157022953033447, 0.31451207399368286, -0.33903032541275024, 2.212766647338867, 0.2054682970046997, 1.266261100769043, -0.3876390755176544, -2.372302532196045, 0.4872467517852783, -1.2386133670806885, -1.2217358350753784, 0.8526466488838196, -0.6951665282249451, -0.006411150097846985, -1.3000938892364502, -0.2715233862400055, -0.7939808964729309, -1.3100286722183228, 0.8250300884246826, 0.12218545377254486, 0.511603593826294, -0.676842987537384, 0.3627833425998688, -2.0956826210021973, -1.3101149797439575, -0.31142789125442505, -0.9697859287261963, 0.3950624167919159, -0.3362555503845215, 0.7135403156280518, -0.3040977120399475, 0.04174855351448059, 0.31539463996887207, 1.576280117034912, 3.4378809928894043, 0.19331884384155273, 0.39964014291763306, -0.2724718153476715, -0.7700285315513611, 1.3652456998825073, 0.8436604142189026, -0.1414218544960022, -0.5309404134750366, -1.1084686517715454, 1.1070449352264404, 2.0272774696350098, 0.8797551989555359, 0.06662601977586746, -0.8231880068778992, -0.7682074904441833, -0.04963464289903641, 0.1274927705526352, 0.5050302147865295, 0.8327519297599792, 0.1931515783071518, -0.015631042420864105, 1.3476039171218872, 1.1255656480789185, -0.3793230354785919, 0.4448166787624359, -0.7529926896095276, -0.3828089237213135, 0.4716506898403168, 0.3959389925003052, 0.0237103458493948, 0.23101359605789185, -0.987777829170227, -0.21315819025039673, -0.4311846196651459, -0.9191126823425293, -0.8505218029022217, -0.508158802986145, -0.277762234210968, 1.679375171661377, 0.10179702192544937, -0.5492082834243774, -0.10072507709264755, -0.6852450370788574, -0.04862233251333237, -0.9788655638694763, 0.21134936809539795, -0.13520000874996185, -0.13817478716373444, 0.015728222206234932, 1.6797362565994263, -0.9492471814155579, -1.9319654703140259, 0.2608635127544403, 0.20934079587459564, -0.29307982325553894, 0.2760225236415863, 1.6181436777114868, 0.524921178817749, 1.453149437904358, 1.3960516452789307, 1.057218313217163, -0.7482655644416809, -1.3413574695587158, 0.6082397103309631, 0.916747510433197, -1.4147814512252808, 0.7489567399024963, 0.07332301884889603, -0.34675028920173645, 0.6015682816505432, 1.318898320198059, 0.4717080295085907, -2.0713067054748535, 0.6874864101409912, -0.9122951030731201, 0.7637666463851929, 0.7801254987716675, 0.6848307847976685, 0.11580602824687958, 0.6829563975334167, -1.173869013786316, -1.2084641456604004, -0.6452559232711792, -0.7315442562103271, 2.036998748779297, -0.3195759952068329, 0.6352810859680176, -0.07464441657066345, -1.4852495193481445, -0.10322905331850052, 0.8425525426864624, 0.5305395722389221, -0.5860386490821838, 0.7344798445701599, -0.6707973480224609, -1.0373060703277588, -1.4191337823867798, -0.47123196721076965, -1.0712741613388062, -1.0065094232559204, 1.0034443140029907, 0.8564029932022095, 0.19463005661964417, 1.850544810295105, 0.7100700736045837, 0.3249841630458832, -2.5676653385162354, 0.947048544883728, 0.36352139711380005, -0.074327252805233, 0.8859950304031372, 0.4080636203289032, 0.8616161346435547, 0.06183767318725586, 0.6814884543418884, -2.516636610031128, 2.421038866043091, -0.19292008876800537, 0.5300105214118958, -0.1411338895559311, -0.38808250427246094, 1.100526213645935, 0.5200318098068237, 0.5160048604011536, -1.075332760810852, 0.6864380240440369, -0.6174478530883789, 1.295596957206726, 0.8172124624252319, -0.8423104882240295, -0.08225053548812866, 1.4072493314743042, 0.44814175367355347, -0.5957856178283691, -0.930161714553833, -1.1246871948242188, 0.8855394124984741, 1.6735352277755737, -0.056488633155822754, -0.17513629794120789, 0.8421162366867065, 0.6783782839775085, -1.258984923362732, 0.22304871678352356, -0.7740619778633118, -0.8454340696334839, 1.605228066444397, 2.053405284881592, -0.16202698647975922, -0.304377943277359, -0.8725389838218689, -1.1571717262268066, 0.8237121105194092, 0.1710345447063446, -0.03518406301736832, 0.558890700340271, -0.6507702469825745, 1.1492936611175537, 0.9183003902435303, 0.8804419040679932, 0.3255283832550049, 0.39984506368637085, 0.3892824053764343, -0.40426355600357056, -1.1989620923995972, -0.25936728715896606, -1.1969382762908936, -2.4743049144744873, 0.4945840537548065, -0.15834344923496246, -1.4994908571243286, 0.004013261757791042, -1.0837085247039795, 0.7792078852653503, -0.5395157933235168, -1.2206447124481201, -1.487097144126892, 0.11593799293041229, -0.09680537134408951, 0.941465437412262, -1.5759847164154053, -0.010382210835814476, 1.163604974746704, 0.8942549824714661, -0.7542694807052612, 0.8703058958053589, 0.07261592149734497, 1.1158698797225952, 0.9855627417564392, -0.40126341581344604, 0.48134687542915344, -0.01853596791625023, -1.3028695583343506, 0.5031735897064209, 1.114330768585205, 0.18821126222610474, 1.5810428857803345, -0.5468180179595947, 0.019304737448692322, 0.41745033860206604, -0.5099177360534668, -0.4587680399417877, -0.6976075768470764, 0.6576297283172607, 0.09144175052642822, -0.7656466364860535, 0.16166166961193085, 0.06397029012441635, -0.19350749254226685, 0.10147280246019363, -1.5385187864303589, -0.05597738176584244, -0.33033376932144165, -0.6139346361160278, -1.1714603900909424, -0.10523273795843124, 1.3271231651306152, -0.5602489709854126, -0.21786507964134216, 0.48619624972343445, 0.3526282012462616, 0.40204134583473206, 0.6054829359054565, -0.6891272068023682, -0.4139014482498169, -0.20342853665351868, -0.3959499001502991, 0.4861331284046173, 1.384865164756775, -0.047999508678913116, -0.947973906993866, 0.78221195936203, -0.3677333891391754, 0.07323907315731049, 1.9022070169448853, 0.14127929508686066, -0.7983471155166626, 0.2990693747997284, -0.6925514936447144, 1.982527732849121, 1.8375972509384155, 1.2302581071853638, 0.018792668357491493, -1.1593188047409058, 0.7332763671875, -0.3895024061203003, -0.4060996472835541, 1.025234580039978, 0.3472781479358673, -0.18027305603027344, -1.3508961200714111, 0.6860422492027283, 1.3214000463485718, -0.7740659117698669, -0.9763748049736023, 0.11761045455932617, -0.8590058088302612, 0.9880468249320984, 0.6652972102165222, 0.4145411252975464, 0.23063501715660095, 1.6528656482696533, 0.7817891836166382, -0.3102959096431732, 0.6993718147277832, 0.4411460757255554, -0.24852661788463593, -2.0731828212738037, -1.299757719039917, 0.35639527440071106, -0.6088117957115173, -1.640600562095642, 1.4676809310913086, -1.2117173671722412, -1.0256339311599731, 0.5425827503204346, 0.043200843036174774, 1.500293493270874, 0.349208801984787, 1.5422180891036987, 2.116337776184082, 0.8338775038719177, 0.41073518991470337, 1.2402663230895996, -0.19263343513011932, -0.6449506282806396, 1.8413468599319458, -0.5245067477226257, 0.4128795862197876, 1.1690514087677002, -0.21922707557678223, -1.1250139474868774, -0.8052878379821777, -1.2160369157791138, -0.718913733959198, 1.1699047088623047, 0.08409786969423294, -1.0360918045043945, 0.3351072371006012, 1.6117323637008667, 0.09661450982093811, -0.3440244793891907, 0.6227495670318604, 0.4244443476200104, -0.8924938440322876, -0.03029750846326351, -0.8792188167572021, 0.5587719678878784, -0.25647351145744324, -0.27218395471572876, 0.4261057674884796, 0.4265732765197754, 1.3142255544662476, -0.09100326150655746, 0.09698870778083801, 1.092063307762146, -1.4748672246932983, 1.5039559602737427, -0.5783507823944092, 0.30834507942199707, -2.367655038833618, 1.3107097148895264, -0.7646814584732056, 1.908785104751587, -2.5827012062072754, 0.38987699151039124, -0.5572401881217957, -0.5933699011802673, 0.475726455450058, -0.2979956567287445, 0.21363063156604767, -0.1852804571390152, -1.1678351163864136, -0.056428827345371246, -0.704659640789032, 0.524664580821991, 1.1328206062316895, 1.3208051919937134, -1.1411348581314087, -0.2568581998348236, -1.7434896230697632, -0.1558074802160263, -0.6436501145362854, 0.39590123295783997, -1.941681981086731, -0.21600353717803955, -1.9148705005645752, -2.2646846771240234, -1.2443194389343262, -0.7667160034179688, 0.9264432787895203, 0.04026678204536438, -0.8277773261070251, 1.1451399326324463, -0.4143252372741699, -1.8613234758377075, 1.1112884283065796, -2.07580828666687 ]
https://github.com/huggingface/datasets/issues/5514
Improve inconsistency of `Dataset.map` interface for `load_from_cache_file`
Hi! Yes, this seems more plausible. I can implement that. One last thing is the type annotation `load_from_cache_file: bool = None`. Which I then would change to `load_from_cache_file: Optional[bool] = None`.
### Feature request 1. Replace the `load_from_cache_file` default value to `True`. 2. Remove or alter checks from `is_caching_enabled` logic. ### Motivation I stumbled over an inconsistency in the `Dataset.map` interface. The documentation (and source) states for the parameter `load_from_cache_file`: ``` load_from_cache_file (`bool`, defaults to `True` if caching is enabled): If a cache file storing the current computation from `function` can be identified, use it instead of recomputing. ``` 1. `load_from_cache_file` default value is `None`, while being annotated as `bool` 2. It is inconsistent with other method signatures like `filter`, that have the default value `True` 3. The logic is inconsistent, as the `map` method checks if caching is enabled through `is_caching_enabled`. This logic is not used for other similar methods. ### Your contribution I am not fully aware of the logic behind caching checks. If this is just a inconsistency that historically grew, I would suggest to remove the `is_caching_enabled` logic as the "default" logic. Maybe someone can give insights, if environment variables have a higher priority than local variables or vice versa. If this is clarified, I could adjust the source according to the "Feature request" section of this issue.
303
31
Improve inconsistency of `Dataset.map` interface for `load_from_cache_file` ### Feature request 1. Replace the `load_from_cache_file` default value to `True`. 2. Remove or alter checks from `is_caching_enabled` logic. ### Motivation I stumbled over an inconsistency in the `Dataset.map` interface. The documentation (and source) states for the parameter `load_from_cache_file`: ``` load_from_cache_file (`bool`, defaults to `True` if caching is enabled): If a cache file storing the current computation from `function` can be identified, use it instead of recomputing. ``` 1. `load_from_cache_file` default value is `None`, while being annotated as `bool` 2. It is inconsistent with other method signatures like `filter`, that have the default value `True` 3. The logic is inconsistent, as the `map` method checks if caching is enabled through `is_caching_enabled`. This logic is not used for other similar methods. ### Your contribution I am not fully aware of the logic behind caching checks. If this is just a inconsistency that historically grew, I would suggest to remove the `is_caching_enabled` logic as the "default" logic. Maybe someone can give insights, if environment variables have a higher priority than local variables or vice versa. If this is clarified, I could adjust the source according to the "Feature request" section of this issue. Hi! Yes, this seems more plausible. I can implement that. One last thing is the type annotation `load_from_cache_file: bool = None`. Which I then would change to `load_from_cache_file: Optional[bool] = None`.
[ -1.0353375673294067, -0.8243843913078308, -0.7398462295532227, 1.6503654718399048, -0.12476044148206711, -1.313510537147522, 0.28688573837280273, -1.0889464616775513, 1.8468552827835083, -0.8350455164909363, 0.4832695722579956, -1.6535820960998535, 0.07189057022333145, -0.7077955603599548, -0.7698767781257629, -0.8432157039642334, -0.34082114696502686, -0.7099485397338867, 1.0611461400985718, 2.40997052192688, 1.2318785190582275, -1.349347710609436, 2.530045509338379, 0.6431940197944641, -0.19770808517932892, -1.0019609928131104, 0.4327854514122009, 0.004223177209496498, -1.1440504789352417, -0.5225675702095032, -0.8786446452140808, -0.18244196474552155, -0.6422764658927917, -0.6094130873680115, -0.053420912474393845, 0.46877557039260864, -0.4581555128097534, -0.45710813999176025, -0.5298002362251282, -0.8992593884468079, 0.49404197931289673, -0.37841296195983887, 1.0299322605133057, -0.269745409488678, 1.857804298400879, -0.6246438026428223, 0.4563180208206177, 0.8379859328269958, 1.300710678100586, 0.158392533659935, -0.02899296022951603, 0.3143983483314514, 0.39920324087142944, -0.06239635497331619, 0.5049430727958679, 0.9920835494995117, 0.624232828617096, 0.6492595076560974, 0.7863876223564148, -2.248831272125244, 1.3037528991699219, -1.1240464448928833, 0.29255056381225586, 1.2610960006713867, -0.9681312441825867, 0.2846519351005554, -1.7064259052276611, 0.03594071790575981, 0.5050113201141357, -2.170480966567993, 0.314569354057312, -1.3211249113082886, -0.37382352352142334, 1.0962321758270264, 0.39011722803115845, -1.2800832986831665, 0.07513674348592758, -0.26783567667007446, 0.9697515964508057, 0.3432203531265259, 0.9855167865753174, -1.8170087337493896, -0.09537323564291, -0.3942101001739502, 0.15471024811267853, -1.24921452999115, -1.438353419303894, 0.46536511182785034, 0.6684914827346802, 0.504538357257843, -0.246506929397583, 1.09123957157135, -0.9547306299209595, 0.7551853060722351, -1.0610160827636719, -1.7366801500320435, -1.4746038913726807, -2.1253983974456787, -2.2729878425598145, 0.7045314908027649, -0.5317898392677307, -0.5568557381629944, 2.085543394088745, -0.9755871891975403, -1.7016830444335938, 1.1458121538162231, 0.255049467086792, -0.03701983764767647, 2.2467451095581055, 0.25346148014068604, -0.680073618888855, 0.36862313747406006, -0.6675212979316711, 0.7534623146057129, -0.37010592222213745, 1.3236716985702515, 0.41642504930496216, -1.2454746961593628, 1.5685169696807861, -0.33756518363952637, 0.5978608131408691, -0.7158417701721191, -0.42637360095977783, -0.6717351675033569, 0.28879642486572266, 1.8004212379455566, -0.24614322185516357, 1.509787678718567, -0.3279736042022705, -1.545628547668457, -1.678667426109314, 0.8918780088424683, 0.4146828055381775, -0.7116714119911194, 0.15801367163658142, -0.30783629417419434, 0.1695510298013687, -0.21514111757278442, 1.2127001285552979, 1.347203254699707, 0.7585168480873108, -0.33344680070877075, -0.7922359704971313, 0.21278996765613556, -0.03603809326887131, -0.789833664894104, -1.7430756092071533, -0.4514530897140503, 0.18258464336395264, 0.6184442639350891, -1.0372623205184937, 1.8447208404541016, 0.9162847995758057, 1.8484314680099487, 1.0342944860458374, -0.2918962240219116, 1.388728380203247, 0.040077485144138336, 1.9639387130737305, -0.4642416834831238, 0.6376667618751526, -0.293548047542572, -1.1438368558883667, 0.8407928347587585, -0.3171923756599426, -2.0237882137298584, -0.7674645781517029, -0.7750799059867859, -0.1423269659280777, -0.7520424723625183, 0.9217379689216614, -0.2072274386882782, -1.4194155931472778, 0.18818141520023346, -0.7517013549804688, 0.11284773051738739, -1.1912733316421509, 0.33175045251846313, 0.6534356474876404, -0.6956196427345276, 0.2351139634847641, -0.24340420961380005, -1.2534372806549072, -0.45094937086105347, 0.39998918771743774, 1.8560870885849, -0.8060049414634705, 0.9393060803413391, 0.9906054735183716, -0.6863908767700195, -0.05501335486769676, 0.3729531168937683, -0.3310127258300781, 0.8186572194099426, -1.0493983030319214, -0.41590416431427, 1.2832750082015991, -0.24298089742660522, -0.665586531162262, 1.4354172945022583, 0.6788972020149231, -0.9763747453689575, -0.0579499676823616, -0.26899421215057373, -0.8759701251983643, 0.07702101767063141, -1.6313996315002441, -0.026552582159638405, 0.42187201976776123, -1.481252670288086, -0.4190581440925598, -0.15736186504364014, 1.3813062906265259, -0.17437981069087982, 1.3912619352340698, -0.29542243480682373, -0.3027380108833313, -0.32462596893310547, -0.24618853628635406, 0.07612358033657074, -0.23788024485111237, -0.6879369616508484, 0.17752090096473694, -0.6350310444831848, 0.4234543442726135, 1.3294905424118042, 0.12321522831916809, 0.033272866159677505, 0.47139084339141846, 1.1594630479812622, 0.30553168058395386, 0.07236610352993011, -0.9705914258956909, -1.463582992553711, 1.9610568284988403, -1.3162881135940552, 2.0361173152923584, 0.8161046504974365, -0.018939439207315445, -1.737000584602356, -1.7854260206222534, 1.411445140838623, 1.1886402368545532, 2.277676582336426, 0.571064829826355, 0.3304980397224426, -0.8753255605697632, -0.6077442765235901, 0.27721965312957764, -1.0654406547546387, -0.7557787895202637, 0.19896696507930756, 2.4898452758789062, 1.7400959730148315, -0.38864463567733765, -0.251550555229187, -1.0986565351486206, 1.4458825588226318, -0.244375541806221, 0.11553935706615448, 2.0561368465423584, -0.20822785794734955, -1.1206101179122925, 1.2798420190811157, -2.3192622661590576, 0.1944592297077179, 2.015730142593384, 0.21731312572956085, 0.09433426707983017, -1.4635355472564697, -0.6799638271331787, -0.13721626996994019, -0.3776061534881592, -1.1937096118927002, 0.5046382546424866, -0.21195222437381744, -0.6975155472755432, -1.307478904724121, 0.2726789712905884, -0.9809826016426086, -1.6788805723190308, 0.18581445515155792, 1.861248254776001, 1.9049574136734009, -0.7347940802574158, 1.640997052192688, -0.33311647176742554, 0.2190665900707245, 1.3365042209625244, 1.2549183368682861, 3.221846342086792, 2.0040740966796875, -1.3281683921813965, 0.6229312419891357, -0.14190572500228882, -0.49636709690093994, 1.225124716758728, -1.2180901765823364, 1.2682491540908813, -0.15483735501766205, -1.139235496520996, -1.30351984500885, 0.8479306697845459, 0.4633428454399109, 0.031257860362529755, -0.5411226749420166, 1.1695268154144287, 0.14547966420650482, 1.2656768560409546, 0.6068729162216187, -0.32444483041763306, 0.76866614818573, -0.41743481159210205, -0.4400084614753723, 1.5455130338668823, 0.30349087715148926, -1.2199314832687378, -2.2468690872192383, -0.2083081603050232, -0.9326125383377075, 0.05468107759952545, -0.5146874785423279, -0.912034809589386, 1.62959623336792, 0.35620051622390747, -1.3689653873443604, -0.2978273630142212, -0.3771525025367737, -0.6386252045631409, 2.774327039718628, -1.3551546335220337, -0.2892131805419922, -1.1081105470657349, -0.6847487688064575, 1.734351634979248, -1.2448152303695679, -0.2542123794555664, -1.1590280532836914, -0.4963512420654297, -1.2598761320114136, -0.5126563310623169, 0.03332660719752312, -0.859971284866333, 0.9111164808273315, 0.23490001261234283, -1.3144357204437256, -0.4803202152252197, -0.767455518245697, 0.8553417325019836, -0.14496645331382751, 0.2321317046880722, 1.7843499183654785, 0.4581238031387329, -0.3780621886253357, 0.6960084438323975, 1.034861445426941, 0.6215505003929138, -0.5466713905334473, 0.38029515743255615, -0.5488739609718323, 0.25778907537460327, -1.332069993019104, 0.2959165573120117, -2.828315019607544, 0.5917255282402039, -0.14017821848392487, -0.08526010066270828, -0.060729335993528366, -1.370410442352295, 1.0751912593841553, 2.621171712875366, -1.142764687538147, 0.4735443592071533, 0.310580313205719, 1.1561450958251953, -1.6962653398513794, 0.29447394609451294, -0.3669646382331848, 2.2220914363861084, 0.2272849678993225, 1.284790277481079, -0.3924824595451355, -2.384615182876587, 0.4837747812271118, -1.2820582389831543, -1.2182273864746094, 0.8917509913444519, -0.6979727149009705, 0.00794631615281105, -1.2956278324127197, -0.2760448455810547, -0.7746614217758179, -1.2965943813323975, 0.8277756571769714, 0.10872312635183334, 0.5183880925178528, -0.6782011985778809, 0.37620043754577637, -2.0939064025878906, -1.3117529153823853, -0.30042481422424316, -0.9658203125, 0.389229416847229, -0.3459051251411438, 0.7193048596382141, -0.29033732414245605, 0.017285147681832314, 0.3591617941856384, 1.6049917936325073, 3.4208526611328125, 0.1873106211423874, 0.36626923084259033, -0.26842767000198364, -0.753320574760437, 1.388225793838501, 0.8374559283256531, -0.11605498194694519, -0.5369951128959656, -1.1055574417114258, 1.0698332786560059, 2.0476057529449463, 0.9157353639602661, 0.044706106185913086, -0.8378872871398926, -0.759453535079956, -0.038012560456991196, 0.10917113721370697, 0.49939656257629395, 0.8029924035072327, 0.22220464050769806, -0.028769878670573235, 1.3090131282806396, 1.0995640754699707, -0.39674675464630127, 0.4403701424598694, -0.7551809549331665, -0.4039798378944397, 0.45853710174560547, 0.4114196300506592, 0.012739794328808784, 0.23941709101200104, -0.9923956394195557, -0.19450907409191132, -0.4359254240989685, -0.920406699180603, -0.8698540329933167, -0.5107073783874512, -0.2829670310020447, 1.696840524673462, 0.10222815722227097, -0.5454877614974976, -0.07957272231578827, -0.6986029148101807, -0.030129676684737206, -0.9808404445648193, 0.19854339957237244, -0.15035200119018555, -0.1206047460436821, 0.024194154888391495, 1.6819844245910645, -0.9673250913619995, -1.8991996049880981, 0.297210156917572, 0.20254139602184296, -0.30751508474349976, 0.27839261293411255, 1.6171444654464722, 0.514430046081543, 1.430267572402954, 1.3964763879776, 1.0626044273376465, -0.7208877801895142, -1.3410192728042603, 0.6097970604896545, 0.9424138069152832, -1.4025580883026123, 0.7604337334632874, 0.055861517786979675, -0.342459499835968, 0.5891919732093811, 1.351138710975647, 0.5021083354949951, -2.0859553813934326, 0.6701818704605103, -0.9193713665008545, 0.7833622097969055, 0.7708635926246643, 0.6700251698493958, 0.12028041481971741, 0.715915322303772, -1.1710755825042725, -1.2045449018478394, -0.6385136842727661, -0.7559113502502441, 2.0552477836608887, -0.3264578580856323, 0.6227751970291138, -0.06087007001042366, -1.4887192249298096, -0.08386772871017456, 0.8650487065315247, 0.5109156370162964, -0.5906538963317871, 0.7463058829307556, -0.6691403388977051, -1.0228115320205688, -1.418083906173706, -0.47824645042419434, -1.086008071899414, -1.0220351219177246, 1.0207056999206543, 0.8358635902404785, 0.1933765858411789, 1.8031121492385864, 0.739549994468689, 0.32380211353302, -2.5606987476348877, 0.9263520836830139, 0.3405917286872864, -0.057976748794317245, 0.8387614488601685, 0.429906964302063, 0.8886359333992004, 0.06821856647729874, 0.6800616979598999, -2.5330655574798584, 2.411022186279297, -0.16192856431007385, 0.4874334931373596, -0.1358582079410553, -0.39257699251174927, 1.1041244268417358, 0.5111269950866699, 0.4816400408744812, -1.0389739274978638, 0.6776297688484192, -0.6041722893714905, 1.3019919395446777, 0.7979556322097778, -0.8324422240257263, -0.08574733883142471, 1.4396743774414062, 0.45410841703414917, -0.5812299847602844, -0.9341166019439697, -1.148917555809021, 0.8829429149627686, 1.6517583131790161, -0.1016596332192421, -0.18591949343681335, 0.8229086995124817, 0.6982709169387817, -1.2848950624465942, 0.2116176337003708, -0.788153886795044, -0.8733007907867432, 1.6301175355911255, 2.0475070476531982, -0.17049236595630646, -0.3271602392196655, -0.9128544926643372, -1.1384073495864868, 0.8141842484474182, 0.15208010375499725, -0.05190401151776314, 0.5609094500541687, -0.648875892162323, 1.1193122863769531, 0.8853852152824402, 0.8868417143821716, 0.3154464364051819, 0.4037274718284607, 0.3586326837539673, -0.3921096920967102, -1.2416284084320068, -0.26939594745635986, -1.2010694742202759, -2.497814178466797, 0.48482322692871094, -0.1804271638393402, -1.5096827745437622, -0.022240150719881058, -1.0990381240844727, 0.7640722990036011, -0.5362362265586853, -1.1925835609436035, -1.4708662033081055, 0.10177289694547653, -0.07347434014081955, 0.9536458253860474, -1.553942084312439, 0.0052369991317391396, 1.1924946308135986, 0.8531861305236816, -0.8022765517234802, 0.8439474701881409, 0.042992595583200455, 1.1221592426300049, 0.9997538328170776, -0.40903013944625854, 0.5038318037986755, 0.0043814461678266525, -1.308626651763916, 0.5304720997810364, 1.078006386756897, 0.1871851682662964, 1.6065300703048706, -0.5500105023384094, 0.031496819108724594, 0.43076324462890625, -0.5264057517051697, -0.4958886504173279, -0.7079336047172546, 0.6747897267341614, 0.09246872365474701, -0.8060691952705383, 0.18747690320014954, 0.051061034202575684, -0.17215237021446228, 0.12369242310523987, -1.5583869218826294, -0.053386200219392776, -0.3164573311805725, -0.6010935306549072, -1.1838102340698242, -0.10157036036252975, 1.321357011795044, -0.5178593397140503, -0.21772430837154388, 0.45505380630493164, 0.3261899948120117, 0.38647931814193726, 0.5829099416732788, -0.6947506070137024, -0.4174118638038635, -0.21304525434970856, -0.38428229093551636, 0.5060790777206421, 1.3837443590164185, -0.03893093392252922, -0.9502598643302917, 0.762769341468811, -0.3691139817237854, 0.0833912193775177, 1.9136770963668823, 0.12581990659236908, -0.8269527554512024, 0.27369046211242676, -0.7050114870071411, 1.9633032083511353, 1.7888857126235962, 1.2331113815307617, 0.021160723641514778, -1.169033408164978, 0.7354605197906494, -0.40922659635543823, -0.4356393814086914, 1.0111117362976074, 0.33808720111846924, -0.17673510313034058, -1.350982904434204, 0.7224414348602295, 1.3546923398971558, -0.7570613026618958, -1.0423117876052856, 0.13901518285274506, -0.8528791069984436, 0.9595171809196472, 0.6678895354270935, 0.39676010608673096, 0.2158847451210022, 1.6212180852890015, 0.7865619659423828, -0.29432356357574463, 0.7261362075805664, 0.40548789501190186, -0.25238603353500366, -2.072565793991089, -1.3096208572387695, 0.3301413059234619, -0.6201273798942566, -1.6581823825836182, 1.4666298627853394, -1.207540512084961, -1.0267179012298584, 0.5394647717475891, 0.03196731209754944, 1.4833544492721558, 0.3522765040397644, 1.5253198146820068, 2.0688157081604004, 0.8426814675331116, 0.4005207419395447, 1.2466692924499512, -0.19316919147968292, -0.6888313889503479, 1.8217413425445557, -0.5394747853279114, 0.3996155858039856, 1.1780900955200195, -0.20920486748218536, -1.163030743598938, -0.8327181339263916, -1.2174967527389526, -0.7263514995574951, 1.1969314813613892, 0.1016702875494957, -1.0654993057250977, 0.3313850164413452, 1.6064499616622925, 0.1223352700471878, -0.33406955003738403, 0.6340208649635315, 0.3883276581764221, -0.9502370357513428, -0.014800602570176125, -0.8965911865234375, 0.5398785471916199, -0.19646094739437103, -0.26615625619888306, 0.4104616641998291, 0.4489261507987976, 1.3390618562698364, -0.10098741948604584, 0.11282120645046234, 1.03678560256958, -1.437406301498413, 1.4972114562988281, -0.5568583607673645, 0.33392494916915894, -2.3615803718566895, 1.2935131788253784, -0.7650242447853088, 1.9011867046356201, -2.577070474624634, 0.3770737648010254, -0.5545451045036316, -0.5921722650527954, 0.4779183864593506, -0.29806220531463623, 0.24599669873714447, -0.18820230662822723, -1.2008057832717896, -0.060378797352313995, -0.7453412413597107, 0.5226020216941833, 1.1338975429534912, 1.3422330617904663, -1.1174834966659546, -0.28793466091156006, -1.7286841869354248, -0.17347352206707, -0.6384803056716919, 0.4218190312385559, -1.9348267316818237, -0.23110587894916534, -1.9061566591262817, -2.279329538345337, -1.217147707939148, -0.7688231468200684, 0.9294185638427734, 0.06537900120019913, -0.8094733357429504, 1.141416311264038, -0.37888485193252563, -1.8483935594558716, 1.103334903717041, -2.0456695556640625 ]
https://github.com/huggingface/datasets/issues/5513
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
Hi! Let's not do this - renaming it would be a breaking change, and going through the deprecation cycle is only worth it if it improves user experience.
Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released? Just wanted to get your input, and if applicable, tackle this issue myself! Thanks 🤗
304
28
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name? Hi @mariosasko, @lhoestq, or whoever reads this! :) After going through `ArrowDataset.set_format` I found out that the `type` param is actually named `type` which is a Python reserved name as you may already know, shouldn't that be renamed to `format_type` before the 3.0.0 is released? Just wanted to get your input, and if applicable, tackle this issue myself! Thanks 🤗 Hi! Let's not do this - renaming it would be a breaking change, and going through the deprecation cycle is only worth it if it improves user experience.
[ -1.181472659111023, -0.9077042937278748, -0.7534422874450684, 1.5034836530685425, -0.23491701483726501, -1.2804064750671387, 0.09039685130119324, -1.043567180633545, 1.6588337421417236, -0.9018839597702026, 0.48319265246391296, -1.7961487770080566, 0.07059219479560852, -0.5552337765693665, -0.7626476883888245, -0.8322647213935852, -0.39646467566490173, -0.882904589176178, 1.0816415548324585, 2.4723403453826904, 1.0533150434494019, -1.482168197631836, 2.691467761993408, 0.6588509678840637, -0.22546042501926422, -1.0190422534942627, 0.5135491490364075, -0.08307846635580063, -1.2142443656921387, -0.43353188037872314, -0.9305616021156311, -0.04721536487340927, -0.5964503884315491, -0.505070149898529, -0.058368414640426636, 0.4629245400428772, -0.1880565732717514, -0.4009323716163635, -0.3889857232570648, -0.7628891468048096, 0.5015018582344055, -0.37074756622314453, 1.0243580341339111, -0.29367098212242126, 1.8893139362335205, -0.44893404841423035, 0.3142377734184265, 0.66630619764328, 1.4390149116516113, 0.15638472139835358, -0.024208497256040573, 0.228642538189888, 0.42111313343048096, -0.16401949524879456, 0.41135483980178833, 1.0803450345993042, 0.603522539138794, 0.6268047094345093, 0.6878495216369629, -2.192873954772949, 1.3499332666397095, -1.1208244562149048, 0.3172343969345093, 1.3226615190505981, -0.9673279523849487, 0.2805623710155487, -1.680281400680542, 0.05868817865848541, 0.5168240070343018, -2.1053624153137207, 0.2947472929954529, -1.1950355768203735, -0.36072811484336853, 0.9238685369491577, 0.3014356195926666, -1.3530714511871338, 0.26466357707977295, -0.24267423152923584, 0.9729829430580139, 0.40661725401878357, 1.0439395904541016, -1.6750551462173462, 0.05719071626663208, -0.46300387382507324, 0.1186002790927887, -1.3689329624176025, -1.4888030290603638, 0.5571315884590149, 0.6698191165924072, 0.6230783462524414, -0.04142548143863678, 1.0309940576553345, -0.9100379943847656, 0.8173946142196655, -1.0175703763961792, -1.5663464069366455, -1.4158929586410522, -2.1403555870056152, -2.324479103088379, 0.7525362968444824, -0.5714960098266602, -0.48367390036582947, 1.986250638961792, -1.0039118528366089, -1.658629059791565, 1.110917091369629, 0.27887946367263794, -0.024544278159737587, 2.409821033477783, 0.13417518138885498, -0.6594935655593872, 0.49253347516059875, -0.8249754309654236, 0.875398576259613, -0.5310407876968384, 1.3913663625717163, 0.42444363236427307, -1.0929348468780518, 1.6044062376022339, -0.3388357162475586, 0.5594144463539124, -0.6184991598129272, -0.6664330959320068, -0.8737027049064636, 0.3578527271747589, 1.8395353555679321, -0.3372344970703125, 1.4913313388824463, -0.36537009477615356, -1.5210751295089722, -1.607975959777832, 0.9019448757171631, 0.4124753773212433, -0.917000412940979, 0.3035720884799957, -0.4227268695831299, 0.1204833835363388, -0.08212602883577347, 1.1635692119598389, 1.3091657161712646, 0.729473888874054, -0.11234847456216812, -0.9241943359375, 0.2657720148563385, -0.16120581328868866, -0.5616844296455383, -1.833912968635559, -0.48473018407821655, -0.02713281475007534, 0.6940242052078247, -1.0656121969223022, 1.8519548177719116, 0.9473056793212891, 1.932641625404358, 0.9660016894340515, -0.27379581332206726, 1.4839670658111572, -0.08420353382825851, 1.8714784383773804, -0.5380619168281555, 0.7115035057067871, -0.49411264061927795, -1.0915429592132568, 0.8727092742919922, -0.278382271528244, -1.8470712900161743, -0.7869923710823059, -0.8730950951576233, -0.2728521525859833, -0.7710729837417603, 0.9388739466667175, -0.40751782059669495, -1.3625961542129517, 0.3107512593269348, -0.6922779679298401, 0.11866322159767151, -1.226557970046997, 0.4758909344673157, 0.7259101271629333, -0.6019298434257507, 0.09088190644979477, -0.17393720149993896, -1.2690633535385132, -0.5241586565971375, 0.32571741938591003, 2.04659104347229, -0.7955763936042786, 0.9340409636497498, 1.0029997825622559, -0.6651851534843445, -0.058880120515823364, 0.3751627206802368, -0.2752710282802582, 0.7626923322677612, -1.0264334678649902, -0.47502124309539795, 1.2609598636627197, -0.2576463520526886, -0.6446537375450134, 1.4761449098587036, 0.7356674671173096, -1.028693675994873, -0.1388523131608963, -0.3476797640323639, -0.8000872135162354, 0.06106238812208176, -1.5748841762542725, 0.013089533895254135, 0.33167126774787903, -1.5839195251464844, -0.43696749210357666, -0.06603029370307922, 1.3326352834701538, -0.20776627957820892, 1.3815807104110718, -0.36574113368988037, -0.24929583072662354, -0.4156888723373413, -0.41306301951408386, 0.21787689626216888, -0.23995323479175568, -0.6536667943000793, 0.2772640287876129, -0.7248198986053467, 0.4253639280796051, 1.504770040512085, 0.24071194231510162, 0.0532936230301857, 0.45696815848350525, 1.0874167680740356, 0.41183650493621826, 0.17459425330162048, -0.9501280188560486, -1.3923594951629639, 2.0424845218658447, -1.595306634902954, 1.9732669591903687, 0.7926410436630249, -0.076654814183712, -1.6964341402053833, -1.8445955514907837, 1.4820424318313599, 1.347543478012085, 2.12502384185791, 0.7152850031852722, 0.2951408326625824, -0.8840523362159729, -0.5188854932785034, 0.46332594752311707, -1.1177698373794556, -0.7612980008125305, 0.13028934597969055, 2.4236669540405273, 1.742979645729065, -0.583608865737915, -0.2102804332971573, -0.9765161275863647, 1.4529271125793457, -0.0850478783249855, 0.3423079252243042, 1.9285049438476562, -0.3949224352836609, -1.1625295877456665, 1.1443809270858765, -2.456707715988159, 0.11511869728565216, 2.1067721843719482, 0.2738419771194458, 0.18345999717712402, -1.4649168252944946, -0.5200133919715881, -0.16238056123256683, -0.41507917642593384, -1.311780571937561, 0.6371805667877197, -0.1977059692144394, -0.7108444571495056, -1.4757429361343384, 0.3177972733974457, -1.1438865661621094, -1.5844324827194214, 0.29354894161224365, 1.787916898727417, 2.0765204429626465, -0.7297637462615967, 1.5813615322113037, -0.27091220021247864, 0.26215365529060364, 1.2649649381637573, 1.2665534019470215, 3.1275038719177246, 1.8879640102386475, -1.0803130865097046, 0.5885021686553955, -0.28342029452323914, -0.6233004927635193, 1.2158221006393433, -1.2046228647232056, 1.2394832372665405, -0.12651468813419342, -1.033660650253296, -1.3222911357879639, 0.7756571173667908, 0.39284655451774597, 0.029231736436486244, -0.452451229095459, 1.3189300298690796, 0.17029403150081635, 1.2111122608184814, 0.4660491347312927, -0.2041821926832199, 0.5435515642166138, -0.5169195532798767, -0.4580986201763153, 1.6106467247009277, 0.2821209728717804, -1.375172734260559, -2.349074363708496, -0.23367992043495178, -0.8596377372741699, 0.06501702964305878, -0.5122599601745605, -0.9713073968887329, 1.6904674768447876, 0.30902963876724243, -1.249594807624817, -0.15002752840518951, -0.3202328681945801, -0.5600659251213074, 2.6728453636169434, -1.4008152484893799, -0.2895352840423584, -0.8910982608795166, -0.5855134129524231, 1.7570642232894897, -1.301658034324646, -0.20966386795043945, -1.0573457479476929, -0.5158993601799011, -1.2798562049865723, -0.41510865092277527, -0.1521371304988861, -0.8607167601585388, 0.7049657106399536, 0.29599666595458984, -1.2821440696716309, -0.47927403450012207, -0.8840146660804749, 0.7782787084579468, -0.09102571755647659, 0.32640528678894043, 1.8176798820495605, 0.3660525381565094, -0.3158537447452545, 0.820349931716919, 1.2547297477722168, 0.5931203365325928, -0.5950886011123657, 0.30495598912239075, -0.5802575945854187, 0.37911564111709595, -1.188717246055603, 0.2924792468547821, -2.924464702606201, 0.6515533328056335, 0.0208706296980381, -0.12110591679811478, -0.08006353676319122, -1.3649951219558716, 1.2340269088745117, 2.4580044746398926, -1.1344795227050781, 0.5144862532615662, 0.18679732084274292, 1.2647325992584229, -1.4556467533111572, 0.2557172179222107, -0.4443081021308899, 2.2947824001312256, 0.13807685673236847, 1.1608742475509644, -0.38627949357032776, -2.4588286876678467, 0.45893755555152893, -1.272953748703003, -1.1953587532043457, 0.7102881669998169, -0.9550714492797852, -0.030828135088086128, -1.4252790212631226, -0.14825183153152466, -1.0186723470687866, -1.3429055213928223, 0.8545560836791992, 0.07748860120773315, 0.4341042935848236, -0.6867794394493103, 0.38108953833580017, -2.0915091037750244, -1.5135760307312012, -0.2659910023212433, -0.8721967935562134, 0.44936156272888184, -0.38175663352012634, 0.7281806468963623, -0.21717345714569092, 0.13167142868041992, 0.29563894867897034, 1.4319082498550415, 3.3824658393859863, 0.1910155713558197, 0.621236264705658, -0.24405460059642792, -0.8846193552017212, 1.4579048156738281, 1.0461186170578003, -0.08238210529088974, -0.4951593279838562, -0.9821448922157288, 1.2736501693725586, 1.902709722518921, 0.9231348037719727, -0.06387518346309662, -0.7530471086502075, -0.6252529621124268, -0.09764746576547623, 0.15750233829021454, 0.5018743872642517, 0.8271073698997498, 0.02787909470498562, 0.0914585292339325, 1.2268308401107788, 1.0748108625411987, -0.5586960315704346, 0.32813170552253723, -0.8179431557655334, -0.4146033823490143, 0.45578283071517944, 0.35367244482040405, 0.01735367812216282, 0.4871475100517273, -0.8209695219993591, -0.3697003126144409, -0.2502876818180084, -0.9792413711547852, -0.6956871151924133, -0.5217283964157104, -0.36108219623565674, 1.6003185510635376, 0.06901132315397263, -0.6069949269294739, -0.03408956527709961, -0.8781042695045471, -0.04883287101984024, -1.081622838973999, 0.07023785263299942, -0.11893068253993988, -0.17174820601940155, -0.0711570680141449, 1.815531849861145, -0.9394700527191162, -2.0892932415008545, 0.2898310124874115, 0.465543657541275, -0.2627045512199402, 0.15243232250213623, 1.4915691614151, 0.43566587567329407, 1.4500559568405151, 1.4045771360397339, 1.0247091054916382, -0.6260184049606323, -1.4191700220108032, 0.6767253279685974, 0.8971831798553467, -1.4089041948318481, 0.9158417582511902, -0.029950009658932686, -0.32181909680366516, 0.5523847341537476, 1.1834336519241333, 0.5866202712059021, -2.0211875438690186, 0.7715726494789124, -1.02023446559906, 0.9785926938056946, 0.8740710616111755, 0.7783777117729187, 0.32596874237060547, 0.7674171924591064, -1.1356379985809326, -1.1295181512832642, -0.819186270236969, -0.7806442975997925, 2.027829885482788, -0.28844183683395386, 0.6334078311920166, -0.014921574853360653, -1.3384425640106201, -0.2814236283302307, 0.7336927652359009, 0.3803504705429077, -0.4953714907169342, 0.8077887892723083, -0.7340056300163269, -1.1394280195236206, -1.4292956590652466, -0.52784264087677, -1.1373069286346436, -1.0322681665420532, 1.076367974281311, 0.8313168287277222, 0.27482759952545166, 1.9477342367172241, 0.705795407295227, 0.2042386829853058, -2.565253257751465, 0.9441913962364197, 0.38797828555107117, -0.0846274271607399, 0.8267970085144043, 0.4084993600845337, 0.941262423992157, -0.06016583740711212, 0.5761074423789978, -2.4195990562438965, 2.365328550338745, -0.2926499545574188, 0.7392435669898987, 0.01827210560441017, -0.23166561126708984, 1.0851833820343018, 0.49142035841941833, 0.502734899520874, -1.0517592430114746, 0.6367731690406799, -0.725382387638092, 1.337897777557373, 0.8987919688224792, -0.7687815427780151, 0.018525218591094017, 1.2684818506240845, 0.3764336407184601, -0.5356789827346802, -0.9248090386390686, -0.9736815094947815, 0.9828842878341675, 1.65627121925354, -0.10102158784866333, -0.07397404313087463, 0.7591500878334045, 0.6832588911056519, -1.3069709539413452, 0.04880298674106598, -0.7832752466201782, -0.8122735619544983, 1.642758846282959, 2.017199754714966, -0.18236969411373138, -0.044932059943675995, -0.7498287558555603, -1.196546196937561, 0.7308813333511353, 0.0783725306391716, 0.025108439847826958, 0.6182244420051575, -0.6429715752601624, 1.097087025642395, 0.8658212423324585, 0.8456944823265076, 0.22925099730491638, 0.27948132157325745, 0.3635507822036743, -0.2546103298664093, -1.04485023021698, -0.3212403953075409, -1.1857424974441528, -2.7152957916259766, 0.35496237874031067, -0.25213897228240967, -1.291162371635437, -0.020307160913944244, -0.9946014881134033, 0.8062244057655334, -0.5928170084953308, -1.0445250272750854, -1.4231139421463013, 0.10382392257452011, -0.18410155177116394, 0.8443589806556702, -1.6757673025131226, 0.0217826496809721, 1.2088651657104492, 1.01010000705719, -0.9186352491378784, 1.1131304502487183, 0.30912864208221436, 1.0853222608566284, 0.9501791000366211, -0.4104171693325043, 0.5967807173728943, 0.02256726659834385, -1.376450777053833, 0.5590811371803284, 1.2135838270187378, 0.06236381083726883, 1.47113037109375, -0.5124869346618652, -0.030031591653823853, 0.3663431406021118, -0.5234605073928833, -0.5639359951019287, -0.6706703305244446, 0.7699710130691528, 0.1973189115524292, -0.8577882051467896, 0.16390374302864075, -0.11197149008512497, -0.13183537125587463, 0.1146983727812767, -1.6012258529663086, -0.29231327772140503, -0.38233402371406555, -0.5708832144737244, -1.3245619535446167, -0.07227371633052826, 1.4097980260849, -0.5866051316261292, -0.0889904797077179, 0.44030749797821045, 0.43543311953544617, 0.42205724120140076, 0.5948425531387329, -0.6770844459533691, -0.42972394824028015, -0.16859717667102814, -0.2681885063648224, 0.4933491051197052, 1.2666292190551758, -0.15210334956645966, -0.9084884524345398, 0.6988188624382019, -0.25832733511924744, -0.06975866854190826, 1.8680886030197144, 0.04034799337387085, -0.8142964243888855, 0.2789088487625122, -0.6666396260261536, 1.965893268585205, 1.5899006128311157, 1.2251956462860107, -0.12855061888694763, -0.9876561760902405, 0.8163196444511414, -0.2523040771484375, -0.36034393310546875, 0.8033539652824402, 0.3291958272457123, -0.3280397951602936, -1.4222437143325806, 0.6269429326057434, 1.2059788703918457, -0.7408555746078491, -0.9188128709793091, 0.08740738779306412, -0.7978748083114624, 1.0480159521102905, 0.6271533370018005, 0.5595844388008118, 0.33312490582466125, 1.6624796390533447, 0.7817451357841492, -0.4619702100753784, 0.56803297996521, 0.3726951777935028, -0.1213308721780777, -2.029688835144043, -1.275866150856018, 0.32591214776039124, -0.5492314100265503, -1.6022682189941406, 1.347049355506897, -1.2140628099441528, -0.9344412684440613, 0.6485232710838318, 0.008136473596096039, 1.4473694562911987, 0.3262885808944702, 1.4530656337738037, 2.0260579586029053, 0.8169928193092346, 0.37802374362945557, 1.2894279956817627, -0.2646707594394684, -0.511569082736969, 1.8664146661758423, -0.4637656807899475, 0.39308860898017883, 1.104653000831604, -0.29881516098976135, -0.9695994853973389, -0.7720102667808533, -1.185263991355896, -0.6953839659690857, 1.1582521200180054, 0.03430749475955963, -1.2834665775299072, 0.30022990703582764, 1.5713800191879272, 0.028187735006213188, -0.27894097566604614, 0.5644081830978394, 0.5136258006095886, -0.815292239189148, 0.02075261063873768, -0.946969747543335, 0.5934818983078003, -0.2372189164161682, -0.37836194038391113, 0.4382734000682831, 0.43452444672584534, 1.238398790359497, -0.07580392807722092, 0.13721509277820587, 1.0411244630813599, -1.4266068935394287, 1.4397779703140259, -0.5780494213104248, 0.16970433294773102, -2.2866203784942627, 1.3357033729553223, -0.6885519623756409, 2.0864415168762207, -2.6422677040100098, 0.2992851734161377, -0.5730269551277161, -0.6018982529640198, 0.5015703439712524, -0.26482340693473816, 0.15593044459819794, -0.2897493243217468, -1.029760479927063, 0.01319904811680317, -0.7393748760223389, 0.42049914598464966, 0.9861197471618652, 1.2275346517562866, -0.987467885017395, -0.32356300950050354, -1.7307952642440796, 0.025248369202017784, -0.5188280940055847, 0.2845161557197571, -2.133446216583252, -0.2984996736049652, -2.0911295413970947, -2.1756887435913086, -1.322826862335205, -0.8277332782745361, 1.098035216331482, 0.1263105273246765, -0.8774433732032776, 1.1957610845565796, -0.31649935245513916, -1.7968032360076904, 0.9635471105575562, -1.9615718126296997 ]