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/5513
Some functions use a param named `type` shouldn't that be avoided since it's a Python reserved name?
Hi @mariosasko, ok it makes sense. Anyway, don't you think it's worth it at some point to start a deprecation cycle e.g. `fs` in `load_from_disk`? It doesn't affect user experience but it's for sure a bad practice IMO, but's up to you 😄 Feel free to close this issue otherwise!
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
50
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 @mariosasko, ok it makes sense. Anyway, don't you think it's worth it at some point to start a deprecation cycle e.g. `fs` in `load_from_disk`? It doesn't affect user experience but it's for sure a bad practice IMO, but's up to you 😄 Feel free to close this issue otherwise!
[ -1.2074476480484009, -0.9789834022521973, -0.7793334722518921, 1.492044448852539, -0.17461514472961426, -1.2549453973770142, 0.07254193723201752, -1.0410224199295044, 1.714010238647461, -0.853183388710022, 0.3969155550003052, -1.7728849649429321, 0.09019886702299118, -0.6305654048919678, -0.7849763631820679, -0.8461318016052246, -0.35989969968795776, -0.9060322046279907, 0.9914110898971558, 2.5230557918548584, 1.0152122974395752, -1.4580910205841064, 2.6842620372772217, 0.6871297359466553, -0.17456087470054626, -1.0462019443511963, 0.4694550931453705, -0.10847891867160797, -1.1696064472198486, -0.4579940736293793, -0.9338786602020264, -0.07009131461381912, -0.6387757062911987, -0.5321502685546875, 0.015693433582782745, 0.4685879349708557, -0.24760830402374268, -0.42873725295066833, -0.4726771414279938, -0.8262163400650024, 0.468408465385437, -0.40737465023994446, 1.084058403968811, -0.3049635589122772, 1.9271820783615112, -0.43928903341293335, 0.4040023982524872, 0.6865359544754028, 1.4589180946350098, 0.12170884013175964, 0.057017453014850616, 0.21214500069618225, 0.3836752772331238, -0.08687861263751984, 0.42237621545791626, 1.029988408088684, 0.6222388744354248, 0.5682158470153809, 0.6862003803253174, -2.269981622695923, 1.3440064191818237, -1.1462994813919067, 0.2942308187484741, 1.2904163599014282, -0.8832818269729614, 0.28995034098625183, -1.727264404296875, 0.06909553706645966, 0.5785801410675049, -2.12395977973938, 0.3020056486129761, -1.2463945150375366, -0.4024655818939209, 0.9095032215118408, 0.3096729516983032, -1.2834843397140503, 0.26215922832489014, -0.23632389307022095, 1.0866762399673462, 0.4270573854446411, 0.9580893516540527, -1.694388747215271, 0.08002959936857224, -0.3859017789363861, 0.11097341775894165, -1.3281911611557007, -1.5101009607315063, 0.5568721294403076, 0.6470686197280884, 0.6145956516265869, -0.014130832627415657, 1.0587183237075806, -0.9412438869476318, 0.797362208366394, -1.0510796308517456, -1.5775635242462158, -1.3989688158035278, -2.1729416847229004, -2.377528429031372, 0.680961012840271, -0.4670170843601227, -0.45283210277557373, 2.0026583671569824, -0.9906631708145142, -1.640414834022522, 1.1258015632629395, 0.23393794894218445, -0.030371952801942825, 2.3776068687438965, 0.13272230327129364, -0.6443061828613281, 0.4411276876926422, -0.7730755805969238, 0.8452935218811035, -0.5280424356460571, 1.4610798358917236, 0.41760876774787903, -1.0622601509094238, 1.5707367658615112, -0.3089858293533325, 0.5887846946716309, -0.6369450092315674, -0.608849287033081, -0.8975565433502197, 0.3342016637325287, 1.806528925895691, -0.2934647798538208, 1.4357523918151855, -0.3786408603191376, -1.519513487815857, -1.6260967254638672, 0.9229135513305664, 0.4116947054862976, -0.9071130752563477, 0.21065059304237366, -0.4283265173435211, 0.20671574771404266, -0.12777619063854218, 1.1873503923416138, 1.2707116603851318, 0.6555126905441284, -0.18005414307117462, -0.9462991952896118, 0.24992546439170837, -0.1464177519083023, -0.6278904676437378, -1.85368013381958, -0.4569958746433258, 0.053507037460803986, 0.6605396270751953, -1.1226710081100464, 1.7890137434005737, 0.8772315979003906, 1.921205759048462, 1.0131664276123047, -0.26105234026908875, 1.523959755897522, -0.012237581424415112, 1.89940345287323, -0.5940998792648315, 0.6846436262130737, -0.4260077178478241, -1.039825201034546, 0.8814470767974854, -0.2923755645751953, -1.899219036102295, -0.7652662992477417, -0.8368982076644897, -0.28832298517227173, -0.7550386190414429, 0.8314617872238159, -0.4184107184410095, -1.4215848445892334, 0.35897478461265564, -0.5959172248840332, 0.13649882376194, -1.1319000720977783, 0.4522511065006256, 0.675495982170105, -0.6119081974029541, 0.13620325922966003, -0.20462898910045624, -1.290508508682251, -0.47337549924850464, 0.32745060324668884, 2.027103900909424, -0.7575539350509644, 0.9018162488937378, 1.0480014085769653, -0.6908304691314697, -0.06163054704666138, 0.4249073565006256, -0.26498889923095703, 0.7146164178848267, -1.086455225944519, -0.47222796082496643, 1.2617554664611816, -0.29560405015945435, -0.592994213104248, 1.451709270477295, 0.7603039741516113, -1.0170122385025024, -0.13151583075523376, -0.29897066950798035, -0.7453210353851318, 0.10494168847799301, -1.6589890718460083, -0.05996348336338997, 0.3710559010505676, -1.5718642473220825, -0.4788390100002289, -0.12564146518707275, 1.2769416570663452, -0.2566916048526764, 1.3529841899871826, -0.3889424800872803, -0.23533104360103607, -0.32522669434547424, -0.40047064423561096, 0.18462984263896942, -0.18815816938877106, -0.6296666860580444, 0.19546851515769958, -0.757030725479126, 0.44319969415664673, 1.4668360948562622, 0.27021947503089905, 0.02810683846473694, 0.4248461425304413, 1.0885249376296997, 0.4001033902168274, 0.2670854330062866, -0.9015177488327026, -1.4544963836669922, 2.0284676551818848, -1.6110520362854004, 2.009150266647339, 0.7369502782821655, -0.04932615906000137, -1.7244253158569336, -1.7827666997909546, 1.4088481664657593, 1.2582989931106567, 2.1877007484436035, 0.7223588228225708, 0.29302939772605896, -0.8692307472229004, -0.5406898260116577, 0.44752979278564453, -1.0914125442504883, -0.7243682146072388, 0.1601700335741043, 2.4211337566375732, 1.7354029417037964, -0.4922841489315033, -0.24768681824207306, -0.9835736751556396, 1.4493255615234375, -0.108774334192276, 0.29827234148979187, 1.9844393730163574, -0.3846021890640259, -1.1536543369293213, 1.2075164318084717, -2.4815473556518555, 0.14798590540885925, 2.0508158206939697, 0.2942400872707367, 0.19200707972049713, -1.4630905389785767, -0.5478651523590088, -0.26217010617256165, -0.33642473816871643, -1.3216350078582764, 0.6454336643218994, -0.25637683272361755, -0.7521911859512329, -1.5199781656265259, 0.31725990772247314, -1.2061007022857666, -1.5719876289367676, 0.27422651648521423, 1.8759790658950806, 2.0528924465179443, -0.6470004320144653, 1.6162347793579102, -0.28695812821388245, 0.31404510140419006, 1.348514437675476, 1.2611894607543945, 3.138591766357422, 1.8650768995285034, -1.1046704053878784, 0.6019765138626099, -0.21904566884040833, -0.5534458160400391, 1.184262990951538, -1.1723854541778564, 1.2323142290115356, -0.07279841601848602, -1.0002055168151855, -1.2874354124069214, 0.788555383682251, 0.43269380927085876, 0.03227325901389122, -0.4507156014442444, 1.3058654069900513, 0.1617066115140915, 1.2276691198349, 0.46276628971099854, -0.3193889856338501, 0.5225422382354736, -0.520051121711731, -0.5125516653060913, 1.6053293943405151, 0.2644231915473938, -1.413832426071167, -2.3181116580963135, -0.27288293838500977, -0.8027864694595337, 0.03056960180401802, -0.5254794359207153, -0.9862065315246582, 1.6857740879058838, 0.28394466638565063, -1.3093149662017822, -0.11888664215803146, -0.2867876887321472, -0.5550969839096069, 2.6650259494781494, -1.3621761798858643, -0.3253645598888397, -0.877598762512207, -0.6591616868972778, 1.6544749736785889, -1.2918213605880737, -0.28429460525512695, -1.0413037538528442, -0.5321580171585083, -1.273250937461853, -0.45814451575279236, -0.09070487320423126, -0.8820011615753174, 0.7184967994689941, 0.3176191449165344, -1.274035930633545, -0.4453507661819458, -0.9121354818344116, 0.8407621383666992, -0.07392802089452744, 0.3393888473510742, 1.8632938861846924, 0.4197874069213867, -0.4100583791732788, 0.7626262903213501, 1.19417405128479, 0.5700407028198242, -0.6371011734008789, 0.29443058371543884, -0.6474918127059937, 0.34929949045181274, -1.204016923904419, 0.33557289838790894, -2.8858301639556885, 0.7129793167114258, 0.001453205943107605, -0.17204703390598297, -0.02108144573867321, -1.3522218465805054, 1.171950101852417, 2.552511692047119, -1.153443455696106, 0.49219247698783875, 0.2368621528148651, 1.2756649255752563, -1.5163267850875854, 0.3747820258140564, -0.3804987370967865, 2.2209110260009766, 0.1511877477169037, 1.1691681146621704, -0.3804938495159149, -2.4795174598693848, 0.516011118888855, -1.2852251529693604, -1.2303394079208374, 0.6908508539199829, -0.9259781837463379, -0.056360892951488495, -1.388379693031311, -0.21879705786705017, -1.0223172903060913, -1.336386799812317, 0.8858729600906372, 0.1337352693080902, 0.4122118353843689, -0.6736618280410767, 0.3797100782394409, -2.0820937156677246, -1.4892786741256714, -0.21059083938598633, -0.8775792121887207, 0.4591107964515686, -0.36036065220832825, 0.7002435922622681, -0.2500821053981781, 0.09365802258253098, 0.3312864601612091, 1.5216120481491089, 3.407670736312866, 0.2045787274837494, 0.5670020580291748, -0.2262549251317978, -0.9407055377960205, 1.3363769054412842, 1.0055896043777466, -0.04168976843357086, -0.4827719032764435, -1.012302041053772, 1.2549241781234741, 1.9287059307098389, 0.8986740112304688, -0.025099284946918488, -0.7385029792785645, -0.6410096883773804, -0.06729774177074432, 0.13694918155670166, 0.4463999271392822, 0.8008743524551392, 0.023120727390050888, 0.06411396712064743, 1.2760034799575806, 1.1515040397644043, -0.532050609588623, 0.2827342450618744, -0.8015577793121338, -0.3795955777168274, 0.47716453671455383, 0.32509535551071167, -0.027442926540970802, 0.3777103126049042, -0.8287025690078735, -0.28146228194236755, -0.3538917303085327, -0.9622746706008911, -0.6867045164108276, -0.5453083515167236, -0.2832758128643036, 1.5810554027557373, 0.16244271397590637, -0.5778870582580566, -0.06480784714221954, -0.8692872524261475, -0.08266397565603256, -1.0726004838943481, 0.0256635919213295, -0.11290798336267471, -0.17680050432682037, -0.0921231135725975, 1.8269180059432983, -0.9332201480865479, -2.0403406620025635, 0.2637694180011749, 0.3716220557689667, -0.28653189539909363, 0.22797004878520966, 1.5864815711975098, 0.497229665517807, 1.4404100179672241, 1.381237506866455, 1.0312491655349731, -0.6140902042388916, -1.4009790420532227, 0.7454763650894165, 0.9032752513885498, -1.3906352519989014, 0.9304431676864624, 0.05269479751586914, -0.2992817163467407, 0.645205020904541, 1.2029914855957031, 0.5240808725357056, -1.9672294855117798, 0.7354013919830322, -1.0106576681137085, 0.918041467666626, 0.8542131185531616, 0.7426276206970215, 0.33296987414360046, 0.8582929372787476, -1.160251498222351, -1.1481459140777588, -0.8216456174850464, -0.7280408143997192, 2.0255544185638428, -0.2985096573829651, 0.6008809804916382, -0.03207742050290108, -1.3887946605682373, -0.2811405658721924, 0.7654600143432617, 0.39304405450820923, -0.5080430507659912, 0.7941484451293945, -0.8026127815246582, -1.0886989831924438, -1.4156482219696045, -0.534142255783081, -1.1259982585906982, -1.0223734378814697, 1.0442665815353394, 0.8678774833679199, 0.3359445333480835, 1.9334208965301514, 0.6934255361557007, 0.22373747825622559, -2.5671520233154297, 0.9022716283798218, 0.3358720541000366, -0.09097089618444443, 0.8565224409103394, 0.43124091625213623, 0.9939148426055908, -0.03163263201713562, 0.570098876953125, -2.3333046436309814, 2.319415330886841, -0.311107337474823, 0.7419071197509766, -0.019526951014995575, -0.22739161550998688, 1.0570251941680908, 0.4375820457935333, 0.5132108926773071, -1.070119023323059, 0.6442018747329712, -0.6750714778900146, 1.3054909706115723, 0.9963887929916382, -0.7892163991928101, -0.031100183725357056, 1.2661422491073608, 0.3694364130496979, -0.5937492847442627, -0.9170085191726685, -0.9394834041595459, 0.9552050828933716, 1.6549241542816162, -0.13289275765419006, -0.047237496823072433, 0.8215227127075195, 0.6622686386108398, -1.283450961112976, 0.07916407287120819, -0.7576203346252441, -0.8129336833953857, 1.628504991531372, 2.0357799530029297, -0.21307936310768127, -0.11980773508548737, -0.7573262453079224, -1.139121413230896, 0.7209123373031616, 0.05109433829784393, -0.055119290947914124, 0.5758081674575806, -0.6446337699890137, 1.0523724555969238, 0.9017238616943359, 0.9110662937164307, 0.2370029240846634, 0.3668370842933655, 0.46150481700897217, -0.364521324634552, -1.0547711849212646, -0.32434821128845215, -1.2111645936965942, -2.6724369525909424, 0.483511358499527, -0.18624913692474365, -1.3352657556533813, -0.007210559211671352, -0.9546530246734619, 0.9076249599456787, -0.5399125814437866, -1.0891454219818115, -1.4357966184616089, 0.13308043777942657, -0.1508096158504486, 0.8956717252731323, -1.707189679145813, -0.023765485733747482, 1.190351128578186, 0.9877525568008423, -0.7908803224563599, 1.0846384763717651, 0.22865645587444305, 1.0890552997589111, 0.9046816825866699, -0.44012635946273804, 0.5838980674743652, 0.022294051945209503, -1.3425567150115967, 0.528778076171875, 1.1631687879562378, 0.0958937555551529, 1.4237722158432007, -0.4949895143508911, 0.03060845658183098, 0.3457198143005371, -0.5948933362960815, -0.5143527984619141, -0.6089878082275391, 0.7549494504928589, 0.16409726440906525, -0.7420450448989868, 0.10458540916442871, -0.09391112625598907, -0.17492571473121643, 0.08195218443870544, -1.6426256895065308, -0.2989233136177063, -0.3245603144168854, -0.5541172027587891, -1.3321510553359985, -0.12709219753742218, 1.3686243295669556, -0.562579870223999, -0.15317437052726746, 0.4877200126647949, 0.4821572005748749, 0.48820385336875916, 0.5681555271148682, -0.6691304445266724, -0.40764644742012024, -0.29157862067222595, -0.30556800961494446, 0.3846203088760376, 1.3102890253067017, -0.172298863530159, -0.9566870927810669, 0.7063149213790894, -0.2838359773159027, -0.07892012596130371, 1.8105652332305908, 0.04150821641087532, -0.771468997001648, 0.2554929256439209, -0.6831470727920532, 2.026686429977417, 1.6940287351608276, 1.2332851886749268, -0.16055317223072052, -1.0008443593978882, 0.8297857046127319, -0.33383890986442566, -0.3683444559574127, 0.8457949161529541, 0.3225778341293335, -0.3206990361213684, -1.3523838520050049, 0.66800856590271, 1.2100178003311157, -0.7776615619659424, -0.9226868152618408, 0.10828951746225357, -0.8336406946182251, 1.023646354675293, 0.5522961616516113, 0.574256420135498, 0.29017192125320435, 1.614730715751648, 0.7491103410720825, -0.5138965845108032, 0.6333614587783813, 0.4292392134666443, -0.13897377252578735, -2.0599093437194824, -1.3489540815353394, 0.3421851396560669, -0.5607056617736816, -1.6167505979537964, 1.3742402791976929, -1.1851125955581665, -0.9284710884094238, 0.6336416006088257, 0.10736650228500366, 1.4236482381820679, 0.320182204246521, 1.440893292427063, 2.0585086345672607, 0.7618856430053711, 0.46999576687812805, 1.32920241355896, -0.23439957201480865, -0.5334409475326538, 1.8725173473358154, -0.4746345579624176, 0.42081785202026367, 1.0722968578338623, -0.24037490785121918, -0.9918358325958252, -0.8116472959518433, -1.1627939939498901, -0.6770801544189453, 1.1360373497009277, 0.01123376376926899, -1.2680644989013672, 0.29283249378204346, 1.6605041027069092, 0.017293039709329605, -0.31642666459083557, 0.607202410697937, 0.45856061577796936, -0.7971700429916382, 0.0002212468534708023, -0.9649901390075684, 0.642270565032959, -0.2259623259305954, -0.32461944222450256, 0.45209214091300964, 0.44465819001197815, 1.2523711919784546, -0.058532219380140305, 0.10094841569662094, 1.0325877666473389, -1.462484359741211, 1.4114339351654053, -0.56839919090271, 0.20624208450317383, -2.3479039669036865, 1.2797654867172241, -0.6844806671142578, 2.06034255027771, -2.6005513668060303, 0.3166167438030243, -0.5808966159820557, -0.5799912214279175, 0.43887415528297424, -0.2637576162815094, 0.14721821248531342, -0.22226153314113617, -0.9890714883804321, 0.014782765880227089, -0.6970595121383667, 0.473696231842041, 0.9920036792755127, 1.2713195085525513, -1.024713397026062, -0.27272140979766846, -1.7456977367401123, 0.02959500253200531, -0.5902067422866821, 0.2913949191570282, -2.104818344116211, -0.26790499687194824, -2.0052132606506348, -2.2390670776367188, -1.3469356298446655, -0.785506010055542, 1.0778179168701172, 0.1132388561964035, -0.8569396734237671, 1.2510607242584229, -0.2656485140323639, -1.8228871822357178, 0.922751784324646, -1.956850528717041 ]
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?
I don't think deprecating a param name in this particular instance is worth the hassle, so I'm closing the issue 🙂.
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
21
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 🤗 I don't think deprecating a param name in this particular instance is worth the hassle, so I'm closing the issue 🙂.
[ -1.2216826677322388, -0.9274621605873108, -0.8090871572494507, 1.4519572257995605, -0.2148088812828064, -1.2933354377746582, 0.16014038026332855, -1.0748504400253296, 1.6663943529129028, -0.8881301879882812, 0.4465438723564148, -1.773697853088379, 0.0532158687710762, -0.5506930947303772, -0.7534933686256409, -0.8163387775421143, -0.43085232377052307, -0.8411269187927246, 1.0194804668426514, 2.464479684829712, 1.0804674625396729, -1.4498907327651978, 2.7004363536834717, 0.7278109192848206, -0.22593574225902557, -1.0176489353179932, 0.5484424233436584, -0.1015402153134346, -1.1680856943130493, -0.4820407032966614, -0.9019906520843506, -0.011741925030946732, -0.6032537221908569, -0.4910615086555481, -0.0677032396197319, 0.4744754731655121, -0.21725723147392273, -0.41601359844207764, -0.41382500529289246, -0.7614978551864624, 0.5066954493522644, -0.3659907877445221, 1.0034228563308716, -0.30774134397506714, 1.8626408576965332, -0.47350022196769714, 0.3063555061817169, 0.7465572953224182, 1.4813863039016724, 0.13294458389282227, -0.05667107552289963, 0.24594080448150635, 0.41313570737838745, -0.12265682965517044, 0.381460577249527, 1.078213095664978, 0.5958588719367981, 0.594146728515625, 0.7183994054794312, -2.2159581184387207, 1.3333526849746704, -1.173675775527954, 0.30930593609809875, 1.3777377605438232, -0.9577765464782715, 0.3146921992301941, -1.7238739728927612, 0.1220170259475708, 0.5332828760147095, -2.1321473121643066, 0.27918797731399536, -1.2113993167877197, -0.3735477924346924, 0.8622682094573975, 0.3073072135448456, -1.3412727117538452, 0.21013663709163666, -0.2223503589630127, 1.0322411060333252, 0.4730563461780548, 1.0640257596969604, -1.6421111822128296, 0.10445310920476913, -0.4972696304321289, 0.08442728966474533, -1.3900346755981445, -1.4562052488327026, 0.5159327983856201, 0.686798632144928, 0.6106948256492615, -0.0665859654545784, 1.058544635772705, -0.920577347278595, 0.7728585004806519, -0.9396718144416809, -1.5277433395385742, -1.4345073699951172, -2.1321358680725098, -2.3016672134399414, 0.7710549235343933, -0.581423819065094, -0.4999829828739166, 1.976891279220581, -1.037438154220581, -1.7089177370071411, 1.1227772235870361, 0.2681730091571808, -0.02853880450129509, 2.4007620811462402, 0.1824292093515396, -0.6489487290382385, 0.4686545133590698, -0.8265047669410706, 0.8575164079666138, -0.5516242384910583, 1.4207165241241455, 0.4577728807926178, -1.0522903203964233, 1.6039031744003296, -0.33594420552253723, 0.6035575866699219, -0.6299723386764526, -0.6197382807731628, -0.9283238649368286, 0.3692225515842438, 1.8327759504318237, -0.3442573547363281, 1.4971157312393188, -0.39555996656417847, -1.5249732732772827, -1.6221015453338623, 0.9573771357536316, 0.4041016697883606, -0.956821858882904, 0.3544985055923462, -0.4417460560798645, 0.10484904050827026, -0.08709268271923065, 1.1636284589767456, 1.3539009094238281, 0.6911593675613403, -0.17422133684158325, -0.9087812304496765, 0.2792222201824188, -0.1286981850862503, -0.5855264663696289, -1.865878939628601, -0.46066316962242126, 0.038186103105545044, 0.6462720632553101, -1.0346691608428955, 1.819236159324646, 0.9010988473892212, 1.8944255113601685, 0.9771780371665955, -0.3158544898033142, 1.4740588665008545, -0.06596042215824127, 1.8669804334640503, -0.5484787821769714, 0.7425544261932373, -0.4594670236110687, -1.0554205179214478, 0.934685230255127, -0.26440373063087463, -1.8882761001586914, -0.8087067008018494, -0.8869038820266724, -0.27031394839286804, -0.7714331746101379, 0.9295459389686584, -0.3866082429885864, -1.3609880208969116, 0.3420190215110779, -0.6453604698181152, 0.1303078681230545, -1.2376596927642822, 0.459297776222229, 0.6543091535568237, -0.5921505093574524, 0.07271614670753479, -0.15525856614112854, -1.2965008020401, -0.47513681650161743, 0.3197401463985443, 2.0061986446380615, -0.768546998500824, 0.9412844181060791, 0.9916204810142517, -0.6983515620231628, -0.06611285358667374, 0.38876181840896606, -0.28446394205093384, 0.7526662349700928, -0.9753281474113464, -0.4743768572807312, 1.237807273864746, -0.21862506866455078, -0.5813961029052734, 1.4900813102722168, 0.7355051040649414, -0.9923551082611084, -0.1254969835281372, -0.36840003728866577, -0.8731869459152222, 0.03915531188249588, -1.58439040184021, -0.0025561372749507427, 0.32740145921707153, -1.5812454223632812, -0.4548136591911316, -0.06726501137018204, 1.3472787141799927, -0.2015523463487625, 1.3714803457260132, -0.39833855628967285, -0.22127844393253326, -0.41318225860595703, -0.3627541959285736, 0.29489827156066895, -0.18023881316184998, -0.6347405910491943, 0.24268198013305664, -0.7691583037376404, 0.4221916198730469, 1.429954171180725, 0.25089380145072937, 0.05384854972362518, 0.46610432863235474, 1.083580732345581, 0.37093865871429443, 0.17637614905834198, -0.956808865070343, -1.3885400295257568, 2.0566651821136475, -1.6027053594589233, 1.9216642379760742, 0.680345892906189, -0.06618942320346832, -1.7174501419067383, -1.8580149412155151, 1.4205222129821777, 1.356149673461914, 2.1268742084503174, 0.7258461117744446, 0.3085343837738037, -0.879931628704071, -0.5644181370735168, 0.4308417737483978, -1.1845760345458984, -0.7383955717086792, 0.12134170532226562, 2.360171318054199, 1.7644226551055908, -0.623194694519043, -0.2319304645061493, -0.9934417009353638, 1.3634685277938843, -0.10646092146635056, 0.29005348682403564, 1.9543955326080322, -0.3807651102542877, -1.0952390432357788, 1.1603590250015259, -2.4877769947052, 0.11233225464820862, 2.0413646697998047, 0.2697693109512329, 0.22156552970409393, -1.4314866065979004, -0.5653308033943176, -0.15856201946735382, -0.4294598400592804, -1.3355437517166138, 0.670155942440033, -0.25489678978919983, -0.7453141808509827, -1.4802905321121216, 0.2763553559780121, -1.1454378366470337, -1.5859594345092773, 0.3077548146247864, 1.8300052881240845, 2.1058690547943115, -0.6960161924362183, 1.5933685302734375, -0.29479846358299255, 0.25670677423477173, 1.3047096729278564, 1.239640712738037, 3.098144054412842, 1.8951753377914429, -1.102678894996643, 0.5927869081497192, -0.2789086699485779, -0.6477387547492981, 1.1789978742599487, -1.164350986480713, 1.2327167987823486, -0.13364075124263763, -0.9857559204101562, -1.3030134439468384, 0.7641737461090088, 0.37686845660209656, 0.08234772086143494, -0.4096722900867462, 1.3217853307724, 0.11357970535755157, 1.2646585702896118, 0.48901352286338806, -0.27517640590667725, 0.5498848557472229, -0.5223714709281921, -0.41586679220199585, 1.6075729131698608, 0.30076509714126587, -1.3532434701919556, -2.3424370288848877, -0.2745281159877777, -0.8284847140312195, 0.0862579494714737, -0.4631041884422302, -0.9601601958274841, 1.623766303062439, 0.3392677307128906, -1.275926947593689, -0.1875329166650772, -0.33061668276786804, -0.5129252076148987, 2.695685863494873, -1.4407836198806763, -0.32502928376197815, -0.8913701772689819, -0.6080895662307739, 1.7571712732315063, -1.3308707475662231, -0.24195031821727753, -1.0744874477386475, -0.5133362412452698, -1.3143264055252075, -0.45390811562538147, -0.16105477511882782, -0.9335956573486328, 0.7078651785850525, 0.2636944651603699, -1.2278467416763306, -0.46759942173957825, -0.854303240776062, 0.7859146595001221, -0.08401668071746826, 0.36282405257225037, 1.865042805671692, 0.37242457270622253, -0.28650376200675964, 0.8311241865158081, 1.1644130945205688, 0.5549962520599365, -0.5933112502098083, 0.25104543566703796, -0.6270050406455994, 0.4078606367111206, -1.2230286598205566, 0.2729422450065613, -2.9236223697662354, 0.6617623567581177, 0.009580585174262524, -0.09146391600370407, -0.14971667528152466, -1.4172526597976685, 1.230175495147705, 2.4594194889068604, -1.1279231309890747, 0.48623162508010864, 0.19052240252494812, 1.3170795440673828, -1.4423484802246094, 0.2918402850627899, -0.4360091984272003, 2.284677028656006, 0.13380490243434906, 1.183197021484375, -0.2762250602245331, -2.464996576309204, 0.4461935758590698, -1.228918194770813, -1.205710530281067, 0.704203188419342, -0.8649672269821167, -0.04151277244091034, -1.4771703481674194, -0.21605998277664185, -1.056045413017273, -1.3180432319641113, 0.8584315180778503, 0.14972451329231262, 0.43117403984069824, -0.7030759453773499, 0.38499563932418823, -2.138965368270874, -1.4487115144729614, -0.22598612308502197, -0.8457751274108887, 0.40289682149887085, -0.36739471554756165, 0.6403831243515015, -0.19021667540073395, 0.1284252256155014, 0.2792394161224365, 1.4327878952026367, 3.3994340896606445, 0.16619053483009338, 0.6108525395393372, -0.23608796298503876, -0.8924978375434875, 1.4468700885772705, 1.0321074724197388, -0.05625023692846298, -0.5068005323410034, -0.9602990746498108, 1.262681007385254, 1.9008272886276245, 0.8964619040489197, -0.013820427469909191, -0.7866439819335938, -0.6245750188827515, -0.12944760918617249, 0.12714803218841553, 0.471906840801239, 0.8622124791145325, 0.07645729929208755, 0.05649441480636597, 1.240753173828125, 1.0647560358047485, -0.5355055332183838, 0.3538748621940613, -0.8411383032798767, -0.3965974748134613, 0.4531507194042206, 0.39202454686164856, 0.03488251194357872, 0.48289400339126587, -0.8244649171829224, -0.32170775532722473, -0.2463899850845337, -0.9756947159767151, -0.7377787232398987, -0.5076423287391663, -0.33590835332870483, 1.5769065618515015, 0.15707634389400482, -0.6482731103897095, -0.10599302500486374, -0.9224295020103455, -0.08604156970977783, -1.0942232608795166, 0.04629502817988396, -0.13947638869285583, -0.1339893937110901, -0.10176274180412292, 1.7880395650863647, -0.8874249458312988, -2.046281099319458, 0.318787544965744, 0.4536188244819641, -0.2574477791786194, 0.17823229730129242, 1.5398114919662476, 0.47859326004981995, 1.4419727325439453, 1.3554757833480835, 0.9829264879226685, -0.5986441373825073, -1.3809261322021484, 0.7068328857421875, 0.8898234367370605, -1.3938549757003784, 0.8965584635734558, 0.037472259253263474, -0.3481769263744354, 0.5867652893066406, 1.1272547245025635, 0.5196002721786499, -2.0771946907043457, 0.8116495609283447, -1.0484237670898438, 0.9600217342376709, 0.8605877757072449, 0.7505438923835754, 0.3761101961135864, 0.7929961681365967, -1.1480991840362549, -1.1529983282089233, -0.8463125228881836, -0.7874547839164734, 2.0440268516540527, -0.28766846656799316, 0.6534460783004761, -0.021602671593427658, -1.352837085723877, -0.2460312694311142, 0.7702592611312866, 0.41922345757484436, -0.4929029941558838, 0.765319287776947, -0.677509069442749, -1.1815359592437744, -1.437712550163269, -0.4803139567375183, -1.0949641466140747, -1.025252342224121, 1.0648337602615356, 0.8569568395614624, 0.2664038836956024, 1.860896348953247, 0.7112302780151367, 0.20558127760887146, -2.6233532428741455, 0.9157865643501282, 0.37158283591270447, -0.07700729370117188, 0.8489293456077576, 0.4055878221988678, 0.9550517201423645, -0.0969829112291336, 0.5302477478981018, -2.4007208347320557, 2.31075119972229, -0.28317373991012573, 0.701147735118866, 0.027711153030395508, -0.2303076684474945, 1.0661367177963257, 0.4691673517227173, 0.5322990417480469, -1.0499099493026733, 0.6536482572555542, -0.68394535779953, 1.3562946319580078, 0.945275604724884, -0.7340642213821411, -0.006810879800468683, 1.3176182508468628, 0.39621680974960327, -0.5509628057479858, -0.9372360110282898, -0.9730464220046997, 0.950578510761261, 1.6836305856704712, -0.12532806396484375, -0.061859652400016785, 0.68836510181427, 0.718068540096283, -1.3190324306488037, 0.10223326832056046, -0.7858357429504395, -0.7582564949989319, 1.6727997064590454, 2.0296852588653564, -0.18976783752441406, -0.04033000022172928, -0.809455394744873, -1.2443857192993164, 0.7108608484268188, 0.06146194785833359, 0.03863995894789696, 0.5895252227783203, -0.6674886345863342, 1.086959719657898, 0.8306638598442078, 0.8920508623123169, 0.24135509133338928, 0.3321056365966797, 0.398494154214859, -0.28515559434890747, -1.0531330108642578, -0.36794257164001465, -1.2220584154129028, -2.645854949951172, 0.45625633001327515, -0.2345810979604721, -1.314595103263855, -0.03707445040345192, -0.996776819229126, 0.8545769453048706, -0.6162027716636658, -1.003291368484497, -1.4416172504425049, 0.10669036954641342, -0.11251091957092285, 0.8269226551055908, -1.6720390319824219, 0.04803835228085518, 1.2367228269577026, 1.013464093208313, -0.8459267020225525, 1.1646349430084229, 0.33778685331344604, 1.0895729064941406, 0.8933628797531128, -0.42350900173187256, 0.5763981938362122, -0.024121122434735298, -1.397402286529541, 0.6401889324188232, 1.2015472650527954, 0.06523249298334122, 1.4631363153457642, -0.5256282687187195, 0.004055514931678772, 0.360576868057251, -0.59550940990448, -0.526475727558136, -0.6135651469230652, 0.7490090131759644, 0.22931240499019623, -0.8601818680763245, 0.13589085638523102, -0.12948063015937805, -0.1539819836616516, 0.15974263846874237, -1.5817233324050903, -0.32330480217933655, -0.37928205728530884, -0.5809921026229858, -1.2894362211227417, -0.0962243378162384, 1.412367820739746, -0.5605611801147461, -0.08555842190980911, 0.45186907052993774, 0.46226266026496887, 0.47833624482154846, 0.5770441889762878, -0.6693329215049744, -0.3814944624900818, -0.19230200350284576, -0.27574682235717773, 0.42794573307037354, 1.2810591459274292, -0.16239500045776367, -0.9003524780273438, 0.7163663506507874, -0.2685427963733673, -0.10573254525661469, 1.9321666955947876, 0.10385050624608994, -0.8196921944618225, 0.2987845242023468, -0.6868512034416199, 1.962222695350647, 1.6353040933609009, 1.1970969438552856, -0.10391570627689362, -0.9739513397216797, 0.763745903968811, -0.2933081388473511, -0.331142395734787, 0.8195481896400452, 0.34631118178367615, -0.33412230014801025, -1.3976719379425049, 0.609118640422821, 1.2340701818466187, -0.7904689311981201, -0.899661123752594, 0.014995270408689976, -0.8374596238136292, 1.0273224115371704, 0.6617346405982971, 0.5957033038139343, 0.27410945296287537, 1.6045504808425903, 0.7386329770088196, -0.4835822582244873, 0.5349525809288025, 0.4009200632572174, -0.09157271683216095, -1.9942023754119873, -1.2986801862716675, 0.355384886264801, -0.5066699385643005, -1.6036901473999023, 1.3724533319473267, -1.1990253925323486, -0.919264018535614, 0.6028573513031006, 0.08045677095651627, 1.4436306953430176, 0.3357180058956146, 1.4663211107254028, 2.057689666748047, 0.8062143921852112, 0.35052984952926636, 1.293171763420105, -0.26099222898483276, -0.5420159697532654, 1.8901495933532715, -0.4204259216785431, 0.3860807418823242, 1.126050353050232, -0.30326953530311584, -0.9430844783782959, -0.8222712278366089, -1.1741522550582886, -0.671467661857605, 1.2186338901519775, 0.058640770614147186, -1.2244064807891846, 0.27398017048835754, 1.6155037879943848, 0.06938375532627106, -0.31181085109710693, 0.5926318764686584, 0.563084602355957, -0.8397485613822937, 0.04950607195496559, -0.9288631081581116, 0.5982968211174011, -0.21307814121246338, -0.36958226561546326, 0.4977283477783203, 0.39226803183555603, 1.2207993268966675, -0.08833049982786179, 0.14040164649486542, 1.0381805896759033, -1.4569958448410034, 1.4862794876098633, -0.5458514094352722, 0.13522441685199738, -2.266526699066162, 1.3629873991012573, -0.6871919631958008, 2.0716805458068848, -2.697354793548584, 0.26800382137298584, -0.614190936088562, -0.5820400714874268, 0.4331586956977844, -0.3246079385280609, 0.11552119255065918, -0.24359773099422455, -1.0519119501113892, 0.060614876449108124, -0.7541321516036987, 0.4406968355178833, 0.9717187285423279, 1.2341030836105347, -1.0339785814285278, -0.3132982850074768, -1.6768057346343994, 0.01169565413147211, -0.5803871154785156, 0.33362066745758057, -2.1128664016723633, -0.30722856521606445, -2.0847203731536865, -2.2134029865264893, -1.3231730461120605, -0.8187592029571533, 1.1335548162460327, 0.09865839034318924, -0.8332430720329285, 1.165592074394226, -0.33258679509162903, -1.8218833208084106, 0.9602976441383362, -1.8947476148605347 ]
https://github.com/huggingface/datasets/issues/5511
Creating a dummy dataset from a bigger one
Update `datasets` or downgrade `huggingface-hub` ;) The `huggingface-hub` lib did a breaking change a few months ago, and you're using an old version of `datasets` that does't support it
### Describe the bug I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("lambdalabs/pokemon-blip-captions") dataset["train"] = dataset["train"].select(range(20)) dataset.push_to_hub("patrickvonplaten/dummy_image_data") ``` gives: ``` ~/python_bin/datasets/arrow_dataset.py in _push_parquet_shards_to_hub(self, repo_id, split, private, token, branch, max_shard_size, embed_external_files) 4003 base_wait_time=2.0, 4004 max_retries=5, -> 4005 max_wait_time=20.0, 4006 ) 4007 return repo_id, split, uploaded_size, dataset_nbytes ~/python_bin/datasets/utils/file_utils.py in _retry(func, func_args, func_kwargs, exceptions, status_codes, max_retries, base_wait_time, max_wait_time) 328 while True: 329 try: --> 330 return func(*func_args, **func_kwargs) 331 except exceptions as err: 332 if retry >= max_retries or (status_codes and err.response.status_code not in status_codes): ~/hf/lib/python3.7/site-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs) 122 ) 123 --> 124 return fn(*args, **kwargs) 125 126 return _inner_fn # type: ignore TypeError: upload_file() got an unexpected keyword argument 'identical_ok' In [2]: ``` ### Expected behavior I would have expected this to work. It's for me the most intuitive way of creating a dummy dataset. ### Environment info ``` - `datasets` version: 2.1.1.dev0 - Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.3 - PyArrow version: 11.0.0 - Pandas version: 1.3.5 ```
305
29
Creating a dummy dataset from a bigger one ### Describe the bug I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("lambdalabs/pokemon-blip-captions") dataset["train"] = dataset["train"].select(range(20)) dataset.push_to_hub("patrickvonplaten/dummy_image_data") ``` gives: ``` ~/python_bin/datasets/arrow_dataset.py in _push_parquet_shards_to_hub(self, repo_id, split, private, token, branch, max_shard_size, embed_external_files) 4003 base_wait_time=2.0, 4004 max_retries=5, -> 4005 max_wait_time=20.0, 4006 ) 4007 return repo_id, split, uploaded_size, dataset_nbytes ~/python_bin/datasets/utils/file_utils.py in _retry(func, func_args, func_kwargs, exceptions, status_codes, max_retries, base_wait_time, max_wait_time) 328 while True: 329 try: --> 330 return func(*func_args, **func_kwargs) 331 except exceptions as err: 332 if retry >= max_retries or (status_codes and err.response.status_code not in status_codes): ~/hf/lib/python3.7/site-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs) 122 ) 123 --> 124 return fn(*args, **kwargs) 125 126 return _inner_fn # type: ignore TypeError: upload_file() got an unexpected keyword argument 'identical_ok' In [2]: ``` ### Expected behavior I would have expected this to work. It's for me the most intuitive way of creating a dummy dataset. ### Environment info ``` - `datasets` version: 2.1.1.dev0 - Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.3 - PyArrow version: 11.0.0 - Pandas version: 1.3.5 ``` Update `datasets` or downgrade `huggingface-hub` ;) The `huggingface-hub` lib did a breaking change a few months ago, and you're using an old version of `datasets` that does't support it
[ -1.2701120376586914, -0.9678511023521423, -0.6017754077911377, 1.4185889959335327, -0.156211256980896, -1.290795922279358, 0.181573748588562, -1.0857007503509521, 1.5226128101348877, -0.8153998851776123, 0.2889370322227478, -1.6111980676651, 0.009617511183023453, -0.6312329769134521, -0.6914601922035217, -0.9203649759292603, -0.4455205798149109, -0.8492443561553955, 1.0741331577301025, 2.4417812824249268, 1.261872410774231, -1.3247246742248535, 2.7450003623962402, 0.6911733150482178, -0.3111540973186493, -1.034350872039795, 0.41852638125419617, 0.011856354773044586, -1.2338567972183228, -0.4763302206993103, -0.9154654741287231, -0.1356862485408783, -0.6330341696739197, -0.3690043091773987, 0.05976046621799469, 0.5380687117576599, -0.22112689912319183, -0.3065139055252075, -0.605714738368988, -0.7890831828117371, 0.5136746764183044, -0.35530129075050354, 0.9257516860961914, -0.3856966197490692, 1.7566490173339844, -0.632943332195282, 0.5547075271606445, 0.7515714764595032, 1.3551557064056396, 0.16183018684387207, -0.03144936263561249, 0.27346593141555786, 0.2800176441669464, -0.04189687967300415, 0.541140079498291, 1.1209450960159302, 0.672301709651947, 0.5315438508987427, 0.6211501955986023, -2.2260725498199463, 1.3688009977340698, -1.0090131759643555, 0.38134223222732544, 1.4587973356246948, -0.9053037166595459, 0.35591843724250793, -1.8340944051742554, -0.08424506336450577, 0.6120622158050537, -2.2504007816314697, 0.2776346206665039, -1.3062052726745605, -0.5599610805511475, 0.9671217799186707, 0.44630175828933716, -1.2469416856765747, 0.17950798571109772, -0.4908792972564697, 1.0847716331481934, 0.44960352778434753, 0.9460035562515259, -1.7301135063171387, -0.037190429866313934, -0.19283850491046906, 0.06681819260120392, -1.2921631336212158, -1.6105799674987793, 0.6661054491996765, 0.5311357975006104, 0.6127123832702637, -0.1272810399532318, 1.059333324432373, -1.077325463294983, 0.7675618529319763, -1.1203045845031738, -1.624524712562561, -1.4593201875686646, -2.437748670578003, -2.331878185272217, 0.7895985245704651, -0.45188552141189575, -0.5596337914466858, 2.099148988723755, -1.032083511352539, -1.637983798980713, 1.1404188871383667, 0.24906818568706512, 0.08487052470445633, 2.379939079284668, 0.25119373202323914, -0.7498778104782104, 0.5211148858070374, -0.8118549585342407, 0.8527802228927612, -0.3081161677837372, 1.370100736618042, 0.4536551237106323, -1.1034272909164429, 1.5014890432357788, -0.34489333629608154, 0.5857778191566467, -0.5976735353469849, -0.588543713092804, -0.7396782636642456, 0.27131664752960205, 1.8595329523086548, -0.17117665708065033, 1.4660120010375977, -0.29941239953041077, -1.5818403959274292, -1.5785748958587646, 0.8677242994308472, 0.4393540918827057, -0.8992398381233215, 0.11983727663755417, -0.5084856748580933, 0.19365760684013367, -0.04249958693981171, 1.2415876388549805, 1.2909440994262695, 0.652510941028595, -0.47295427322387695, -0.855823814868927, 0.09870100766420364, -0.10577423870563507, -0.7283125519752502, -1.800934076309204, -0.3685683310031891, 0.15853819251060486, 0.6324658989906311, -1.137669563293457, 1.8597146272659302, 0.9638140201568604, 1.9160281419754028, 1.0447564125061035, -0.40934252738952637, 1.3364499807357788, 0.052469074726104736, 1.7842849493026733, -0.6014098525047302, 0.6271066069602966, -0.34838512539863586, -1.0874179601669312, 0.8915762901306152, -0.3343069851398468, -2.06123423576355, -0.8371133208274841, -0.6636696457862854, -0.2756861746311188, -0.7576717734336853, 0.8845667839050293, -0.31745460629463196, -1.4762908220291138, 0.20323489606380463, -0.6187670230865479, 0.25711894035339355, -1.1799348592758179, 0.2725967466831207, 0.6411999464035034, -0.5934755802154541, -0.05678005516529083, -0.2343403398990631, -1.2668050527572632, -0.4759683609008789, 0.33258894085884094, 1.8210457563400269, -0.5644464492797852, 0.9709042310714722, 1.0131163597106934, -0.651503324508667, 0.041590236127376556, 0.21166318655014038, -0.18106165528297424, 0.8381809592247009, -1.0416865348815918, -0.44789940118789673, 1.2223440408706665, -0.35093745589256287, -0.6121687889099121, 1.4951820373535156, 0.7406936883926392, -1.0278434753417969, -0.2301916629076004, -0.1880330741405487, -0.9087722897529602, 0.09256064891815186, -1.5405468940734863, -0.10992525517940521, 0.5803747177124023, -1.520440936088562, -0.3181208074092865, -0.15580768883228302, 1.3635532855987549, -0.20025251805782318, 1.3416106700897217, -0.35599803924560547, -0.19003893435001373, -0.3238270878791809, -0.46646320819854736, 0.20149661600589752, -0.15968182682991028, -0.4855579733848572, 0.12378811091184616, -0.8345310688018799, 0.3681532144546509, 1.4714525938034058, 0.33230045437812805, 0.09312141686677933, 0.4219951033592224, 1.1249022483825684, 0.3067020773887634, -0.09080895036458969, -0.8032174110412598, -1.5452585220336914, 2.0161631107330322, -1.5001463890075684, 1.943716049194336, 0.7783737778663635, -0.010168759152293205, -1.7890084981918335, -1.7479205131530762, 1.2571686506271362, 1.1354619264602661, 2.2941365242004395, 0.43182840943336487, 0.40628740191459656, -0.8578943610191345, -0.7423451542854309, 0.34146836400032043, -0.9828104972839355, -0.6418235301971436, 0.17133691906929016, 2.3483364582061768, 1.8808478116989136, -0.4205322563648224, -0.17877323925495148, -0.9571796655654907, 1.4339054822921753, -0.30493998527526855, 0.302234411239624, 2.0721988677978516, -0.3372269868850708, -1.0864675045013428, 1.3446118831634521, -2.477431297302246, 0.19157910346984863, 2.0921809673309326, 0.32375025749206543, 0.18524028360843658, -1.3077926635742188, -0.563697874546051, -0.404878705739975, -0.41482827067375183, -1.2410999536514282, 0.5676605105400085, -0.27124935388565063, -0.756783127784729, -1.3942557573318481, 0.13511765003204346, -1.1640325784683228, -1.6782557964324951, 0.33282461762428284, 1.897144079208374, 2.1233420372009277, -0.6346049308776855, 1.5086612701416016, -0.415270060300827, 0.07831062376499176, 1.1617331504821777, 1.3175359964370728, 3.0312938690185547, 1.8087892532348633, -1.2465753555297852, 0.6657353043556213, -0.20986422896385193, -0.5442703366279602, 1.1029125452041626, -1.1182957887649536, 1.2640109062194824, -0.084491066634655, -1.1841554641723633, -1.2519456148147583, 1.0339347124099731, 0.4648541510105133, 0.0703321099281311, -0.5403023362159729, 1.2224382162094116, 0.1407288759946823, 1.3245916366577148, 0.606157660484314, -0.42876315116882324, 0.5086427927017212, -0.435819149017334, -0.592224657535553, 1.5612778663635254, 0.2349882423877716, -1.574790596961975, -2.282414674758911, -0.26937389373779297, -0.8732200860977173, 0.049928218126297, -0.6849749684333801, -1.0004351139068604, 1.6340447664260864, 0.30180442333221436, -1.2829335927963257, -0.21851930022239685, -0.260659396648407, -0.4763818383216858, 2.700558662414551, -1.2005754709243774, -0.13483606278896332, -0.9229866862297058, -0.6748839020729065, 1.6779463291168213, -1.2814468145370483, -0.21755152940750122, -1.0936335325241089, -0.5948554277420044, -1.1946592330932617, -0.427871435880661, 0.04109150171279907, -1.0228428840637207, 0.7520381212234497, 0.1114422082901001, -1.140028715133667, -0.3501853048801422, -0.8953303694725037, 1.0131703615188599, -0.14636185765266418, 0.11435778439044952, 1.778138279914856, 0.2943352162837982, -0.4171055555343628, 0.8093468546867371, 1.2044601440429688, 0.6686918139457703, -0.6733521819114685, -0.04341331124305725, -0.632061243057251, 0.44072017073631287, -1.2308601140975952, 0.30615273118019104, -2.97927188873291, 0.7510744333267212, -0.10608024895191193, -0.09326989948749542, -0.047585926949977875, -1.3781827688217163, 1.064453363418579, 2.5900063514709473, -1.2673821449279785, 0.5262967944145203, 0.3710930347442627, 1.1497818231582642, -1.5781645774841309, 0.38175857067108154, -0.5259948968887329, 2.1440412998199463, 0.20701900124549866, 1.2632205486297607, -0.509614884853363, -2.296555757522583, 0.5935536623001099, -1.203606367111206, -1.1600955724716187, 0.7190043926239014, -0.9108551144599915, 0.22276338934898376, -1.4304836988449097, -0.23758265376091003, -0.8897096514701843, -1.1745823621749878, 0.6375752687454224, 0.15959912538528442, 0.36372604966163635, -0.5289963483810425, 0.2376086264848709, -2.280691385269165, -1.3898813724517822, -0.16543565690517426, -0.9272547960281372, 0.5731666684150696, -0.46071961522102356, 0.6366185545921326, -0.031568493694067, 0.04540567845106125, 0.3261244297027588, 1.565984845161438, 3.404487133026123, 0.09568557888269424, 0.20021575689315796, -0.18297214806079865, -0.9328691959381104, 1.4488335847854614, 0.8637062907218933, -0.023176006972789764, -0.5943205952644348, -0.9966126084327698, 1.2707955837249756, 2.01200008392334, 0.996152937412262, 0.03325502574443817, -0.8650431036949158, -0.6394131183624268, -0.047840386629104614, 0.22102488577365875, 0.46858614683151245, 0.8212445974349976, 0.010976815596222878, 0.11107983440160751, 1.4447174072265625, 1.106373906135559, -0.38698792457580566, 0.35802945494651794, -0.889491081237793, -0.4123205840587616, 0.4208574891090393, 0.23932166397571564, -0.07992732524871826, 0.44354546070098877, -0.9967628121376038, -0.22461441159248352, -0.3568461537361145, -0.8607209920883179, -0.7070729732513428, -0.43882685899734497, -0.5044597387313843, 1.6032317876815796, 0.11498358100652695, -0.5017693638801575, 0.11460224539041519, -0.6812869310379028, -0.16702495515346527, -1.1864542961120605, 0.26055991649627686, -0.0687248706817627, -0.11911670863628387, -0.20851995050907135, 1.6712815761566162, -0.8822609186172485, -2.0887062549591064, 0.17075712978839874, 0.3003562390804291, -0.3145255148410797, 0.1370215117931366, 1.6948667764663696, 0.4816635549068451, 1.4848681688308716, 1.3043386936187744, 0.9522088170051575, -0.6044618487358093, -1.2701992988586426, 0.8272156119346619, 0.9172751307487488, -1.3653078079223633, 0.9101229310035706, -0.12218299508094788, -0.518670916557312, 0.6833773255348206, 1.237800121307373, 0.47215235233306885, -2.0657854080200195, 0.88703453540802, -1.0774928331375122, 0.8256786465644836, 0.7819430232048035, 0.6570971608161926, 0.29115748405456543, 0.9709352850914001, -1.2322571277618408, -1.1425659656524658, -0.7165758013725281, -0.70622318983078, 1.9965696334838867, -0.3505980372428894, 0.6964457631111145, -0.20451024174690247, -1.2148770093917847, -0.0881076529622078, 0.7690061330795288, 0.3863028883934021, -0.43138355016708374, 0.8422000408172607, -0.6527800559997559, -0.9940434098243713, -1.3218841552734375, -0.34867164492607117, -1.0918959379196167, -0.9343268871307373, 1.0567841529846191, 0.7111902832984924, 0.3955744206905365, 1.882401943206787, 0.6262480616569519, 0.33838921785354614, -2.5656216144561768, 0.8732298016548157, 0.24468158185482025, -0.0823504626750946, 0.8857179284095764, 0.34694531559944153, 1.1562590599060059, 0.07168873399496078, 0.5784111618995667, -2.3633370399475098, 2.235135555267334, -0.17012406885623932, 0.6536877751350403, -0.05571077764034271, -0.15070384740829468, 1.1462867259979248, 0.5902503132820129, 0.5315912961959839, -1.0198795795440674, 0.7396312952041626, -0.4791414141654968, 1.182366132736206, 0.9187151789665222, -0.8244728446006775, 0.009865934029221535, 1.4456113576889038, 0.48056766390800476, -0.5361588001251221, -0.9975407719612122, -0.8325205445289612, 0.9020541906356812, 1.6560709476470947, -0.1259511560201645, -0.06990834325551987, 0.7511942386627197, 0.654532253742218, -1.2030583620071411, 0.05724918842315674, -0.598980724811554, -0.7606006264686584, 1.6180651187896729, 2.1076033115386963, -0.21265706419944763, -0.03954150527715683, -0.718761682510376, -1.2802153825759888, 0.7657238841056824, -0.1552971601486206, -0.024157922714948654, 0.5977044701576233, -0.6151134371757507, 0.9754002094268799, 0.7424662709236145, 0.948697566986084, 0.1435118466615677, 0.24820591509342194, 0.380560964345932, -0.3156411051750183, -1.162009835243225, -0.3000498414039612, -1.1037007570266724, -2.6230478286743164, 0.3981819152832031, -0.2860991060733795, -1.430275321006775, 0.048867203295230865, -1.0282827615737915, 0.94920414686203, -0.641526997089386, -1.099648118019104, -1.552650809288025, 0.26650482416152954, -0.023171406239271164, 0.9675496220588684, -1.6697850227355957, -0.1876523345708847, 1.0954761505126953, 0.705371618270874, -0.6513742804527283, 0.9729475975036621, 0.276836097240448, 0.9478747248649597, 0.705163836479187, -0.38769835233688354, 0.6617962121963501, 0.02684454806149006, -1.416061282157898, 0.5113260746002197, 1.2158623933792114, 0.1464226096868515, 1.3366422653198242, -0.41439592838287354, 0.06024765968322754, 0.4200409948825836, -0.6676916480064392, -0.4467995762825012, -0.317949503660202, 0.6957471966743469, 0.09635386615991592, -0.9885845184326172, -0.10538723319768906, -0.1386346071958542, -0.38283008337020874, 0.27237674593925476, -1.4294931888580322, -0.24098286032676697, -0.5121631026268005, -0.4996090233325958, -1.3096567392349243, -0.12155400216579437, 1.4403879642486572, -0.6895302534103394, -0.19439058005809784, 0.5383349657058716, 0.43031448125839233, 0.5514649152755737, 0.7084057331085205, -0.761012613773346, -0.17333799600601196, -0.3137359321117401, -0.3205431401729584, 0.24404607713222504, 1.2908498048782349, -0.06915927678346634, -0.9445298910140991, 0.6730189323425293, -0.30055806040763855, 0.14415857195854187, 2.0149991512298584, 0.10341379046440125, -0.751731812953949, 0.3893998861312866, -0.7574664354324341, 1.867529034614563, 1.6676875352859497, 1.2529112100601196, -0.13035248219966888, -0.9441850185394287, 0.579005241394043, -0.2957710325717926, -0.3427589535713196, 0.8774634003639221, 0.2979179322719574, -0.2473415583372116, -1.4158529043197632, 0.8423227667808533, 1.2208980321884155, -0.7930943965911865, -0.8593379855155945, 0.17613306641578674, -0.828410804271698, 1.210508942604065, 0.5130645632743835, 0.4318094253540039, 0.2579350769519806, 1.6127077341079712, 0.7036945819854736, -0.4701027572154999, 0.4872409999370575, 0.5114598274230957, -0.24617180228233337, -2.1373796463012695, -1.1819565296173096, 0.3323911428451538, -0.5770478248596191, -1.5472557544708252, 1.3291752338409424, -1.07781982421875, -1.0416841506958008, 0.5562083721160889, 0.05350732058286667, 1.3855717182159424, 0.4237132668495178, 1.597894310951233, 2.0999467372894287, 0.8616477251052856, 0.5196582078933716, 1.3184500932693481, -0.1469215452671051, -0.4526768624782562, 1.828454613685608, -0.38396793603897095, 0.4397783875465393, 1.1758456230163574, -0.4122530519962311, -1.091272234916687, -0.795009970664978, -1.0914005041122437, -0.6807569861412048, 1.1347408294677734, 0.1061844602227211, -1.0534669160842896, 0.277305543422699, 1.596124291419983, 0.16345207393169403, -0.1922563761472702, 0.6278272867202759, 0.37848731875419617, -0.7882641553878784, -0.023852279409766197, -0.9772629141807556, 0.5052298903465271, -0.28564170002937317, -0.31237709522247314, 0.37340569496154785, 0.4922453761100769, 1.3375099897384644, -0.09488751739263535, 0.17688383162021637, 0.9676333069801331, -1.4520459175109863, 1.363991141319275, -0.6129885911941528, 0.318002313375473, -2.3047752380371094, 1.3497002124786377, -0.6949353218078613, 1.9545562267303467, -2.6490118503570557, 0.39825496077537537, -0.5756298303604126, -0.6105549931526184, 0.24144648015499115, -0.37159469723701477, 0.1525932401418686, -0.08410430699586868, -1.09695565700531, 0.08725213259458542, -0.6887655258178711, 0.5800652503967285, 1.1121584177017212, 1.4395465850830078, -1.114985704421997, -0.23256279528141022, -1.684023380279541, -0.11273523420095444, -0.8210606575012207, 0.28967225551605225, -1.9836379289627075, -0.06829885393381119, -1.9236721992492676, -2.3647713661193848, -1.2536509037017822, -0.88212651014328, 1.164716124534607, 0.18056586384773254, -0.8504762053489685, 1.2941417694091797, -0.3390241265296936, -1.8426051139831543, 1.1140704154968262, -2.151139259338379 ]
https://github.com/huggingface/datasets/issues/5511
Creating a dummy dataset from a bigger one
Getting same error with latest versions. ```shell --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[99], line 1 ----> 1 dataset.push_to_hub("mirfan899/kids_phoneme_asr") File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:3538, in Dataset.push_to_hub(self, repo_id, split, private, token, branch, shard_size, embed_external_files) 3493 def push_to_hub( 3494 self, 3495 repo_id: str, (...) 3501 embed_external_files: bool = True, 3502 ): 3503 """Pushes the dataset to the hub. 3504 The dataset is pushed using HTTP requests and does not need to have neither git or git-lfs installed. 3505 (...) 3536 ``` 3537 """ -> 3538 repo_id, split, uploaded_size, dataset_nbytes = self._push_parquet_shards_to_hub( 3539 repo_id=repo_id, 3540 split=split, 3541 private=private, 3542 token=token, 3543 branch=branch, 3544 shard_size=shard_size, 3545 embed_external_files=embed_external_files, 3546 ) 3547 organization, dataset_name = repo_id.split("/") 3548 info_to_dump = self.info.copy() File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:3474, in Dataset._push_parquet_shards_to_hub(self, repo_id, split, private, token, branch, shard_size, embed_external_files) 3472 shard.to_parquet(buffer) 3473 uploaded_size += buffer.tell() -> 3474 _retry( 3475 api.upload_file, 3476 func_kwargs=dict( 3477 path_or_fileobj=buffer.getvalue(), 3478 path_in_repo=path_in_repo(index), 3479 repo_id=repo_id, 3480 token=token, 3481 repo_type="dataset", 3482 revision=branch, 3483 identical_ok=True, 3484 ), 3485 exceptions=HTTPError, 3486 status_codes=[504], 3487 base_wait_time=2.0, 3488 max_retries=5, 3489 max_wait_time=20.0, 3490 ) 3491 return repo_id, split, uploaded_size, dataset_nbytes File /opt/conda/lib/python3.10/site-packages/datasets/utils/file_utils.py:330, in _retry(func, func_args, func_kwargs, exceptions, status_codes, max_retries, base_wait_time, max_wait_time) 328 while True: 329 try: --> 330 return func(*func_args, **func_kwargs) 331 except exceptions as err: 332 if retry >= max_retries or (status_codes and err.response.status_code not in status_codes): File /opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py:120, in validate_hf_hub_args.<locals>._inner_fn(*args, **kwargs) 117 if check_use_auth_token: 118 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs) --> 120 return fn(*args, **kwargs) TypeError: HfApi.upload_file() got an unexpected keyword argument 'identical_ok' ```
### Describe the bug I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("lambdalabs/pokemon-blip-captions") dataset["train"] = dataset["train"].select(range(20)) dataset.push_to_hub("patrickvonplaten/dummy_image_data") ``` gives: ``` ~/python_bin/datasets/arrow_dataset.py in _push_parquet_shards_to_hub(self, repo_id, split, private, token, branch, max_shard_size, embed_external_files) 4003 base_wait_time=2.0, 4004 max_retries=5, -> 4005 max_wait_time=20.0, 4006 ) 4007 return repo_id, split, uploaded_size, dataset_nbytes ~/python_bin/datasets/utils/file_utils.py in _retry(func, func_args, func_kwargs, exceptions, status_codes, max_retries, base_wait_time, max_wait_time) 328 while True: 329 try: --> 330 return func(*func_args, **func_kwargs) 331 except exceptions as err: 332 if retry >= max_retries or (status_codes and err.response.status_code not in status_codes): ~/hf/lib/python3.7/site-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs) 122 ) 123 --> 124 return fn(*args, **kwargs) 125 126 return _inner_fn # type: ignore TypeError: upload_file() got an unexpected keyword argument 'identical_ok' In [2]: ``` ### Expected behavior I would have expected this to work. It's for me the most intuitive way of creating a dummy dataset. ### Environment info ``` - `datasets` version: 2.1.1.dev0 - Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.3 - PyArrow version: 11.0.0 - Pandas version: 1.3.5 ```
305
237
Creating a dummy dataset from a bigger one ### Describe the bug I often want to create a dummy dataset from a bigger dataset for fast iteration when training. However, I'm having a hard time doing this especially when trying to upload the dataset to the Hub. ### Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("lambdalabs/pokemon-blip-captions") dataset["train"] = dataset["train"].select(range(20)) dataset.push_to_hub("patrickvonplaten/dummy_image_data") ``` gives: ``` ~/python_bin/datasets/arrow_dataset.py in _push_parquet_shards_to_hub(self, repo_id, split, private, token, branch, max_shard_size, embed_external_files) 4003 base_wait_time=2.0, 4004 max_retries=5, -> 4005 max_wait_time=20.0, 4006 ) 4007 return repo_id, split, uploaded_size, dataset_nbytes ~/python_bin/datasets/utils/file_utils.py in _retry(func, func_args, func_kwargs, exceptions, status_codes, max_retries, base_wait_time, max_wait_time) 328 while True: 329 try: --> 330 return func(*func_args, **func_kwargs) 331 except exceptions as err: 332 if retry >= max_retries or (status_codes and err.response.status_code not in status_codes): ~/hf/lib/python3.7/site-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs) 122 ) 123 --> 124 return fn(*args, **kwargs) 125 126 return _inner_fn # type: ignore TypeError: upload_file() got an unexpected keyword argument 'identical_ok' In [2]: ``` ### Expected behavior I would have expected this to work. It's for me the most intuitive way of creating a dummy dataset. ### Environment info ``` - `datasets` version: 2.1.1.dev0 - Platform: Linux-4.19.0-22-cloud-amd64-x86_64-with-debian-10.13 - Python version: 3.7.3 - PyArrow version: 11.0.0 - Pandas version: 1.3.5 ``` Getting same error with latest versions. ```shell --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[99], line 1 ----> 1 dataset.push_to_hub("mirfan899/kids_phoneme_asr") File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:3538, in Dataset.push_to_hub(self, repo_id, split, private, token, branch, shard_size, embed_external_files) 3493 def push_to_hub( 3494 self, 3495 repo_id: str, (...) 3501 embed_external_files: bool = True, 3502 ): 3503 """Pushes the dataset to the hub. 3504 The dataset is pushed using HTTP requests and does not need to have neither git or git-lfs installed. 3505 (...) 3536 ``` 3537 """ -> 3538 repo_id, split, uploaded_size, dataset_nbytes = self._push_parquet_shards_to_hub( 3539 repo_id=repo_id, 3540 split=split, 3541 private=private, 3542 token=token, 3543 branch=branch, 3544 shard_size=shard_size, 3545 embed_external_files=embed_external_files, 3546 ) 3547 organization, dataset_name = repo_id.split("/") 3548 info_to_dump = self.info.copy() File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:3474, in Dataset._push_parquet_shards_to_hub(self, repo_id, split, private, token, branch, shard_size, embed_external_files) 3472 shard.to_parquet(buffer) 3473 uploaded_size += buffer.tell() -> 3474 _retry( 3475 api.upload_file, 3476 func_kwargs=dict( 3477 path_or_fileobj=buffer.getvalue(), 3478 path_in_repo=path_in_repo(index), 3479 repo_id=repo_id, 3480 token=token, 3481 repo_type="dataset", 3482 revision=branch, 3483 identical_ok=True, 3484 ), 3485 exceptions=HTTPError, 3486 status_codes=[504], 3487 base_wait_time=2.0, 3488 max_retries=5, 3489 max_wait_time=20.0, 3490 ) 3491 return repo_id, split, uploaded_size, dataset_nbytes File /opt/conda/lib/python3.10/site-packages/datasets/utils/file_utils.py:330, in _retry(func, func_args, func_kwargs, exceptions, status_codes, max_retries, base_wait_time, max_wait_time) 328 while True: 329 try: --> 330 return func(*func_args, **func_kwargs) 331 except exceptions as err: 332 if retry >= max_retries or (status_codes and err.response.status_code not in status_codes): File /opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py:120, in validate_hf_hub_args.<locals>._inner_fn(*args, **kwargs) 117 if check_use_auth_token: 118 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs) --> 120 return fn(*args, **kwargs) TypeError: HfApi.upload_file() got an unexpected keyword argument 'identical_ok' ```
[ -1.2701120376586914, -0.9678511023521423, -0.6017754077911377, 1.4185889959335327, -0.156211256980896, -1.290795922279358, 0.181573748588562, -1.0857007503509521, 1.5226128101348877, -0.8153998851776123, 0.2889370322227478, -1.6111980676651, 0.009617511183023453, -0.6312329769134521, -0.6914601922035217, -0.9203649759292603, -0.4455205798149109, -0.8492443561553955, 1.0741331577301025, 2.4417812824249268, 1.261872410774231, -1.3247246742248535, 2.7450003623962402, 0.6911733150482178, -0.3111540973186493, -1.034350872039795, 0.41852638125419617, 0.011856354773044586, -1.2338567972183228, -0.4763302206993103, -0.9154654741287231, -0.1356862485408783, -0.6330341696739197, -0.3690043091773987, 0.05976046621799469, 0.5380687117576599, -0.22112689912319183, -0.3065139055252075, -0.605714738368988, -0.7890831828117371, 0.5136746764183044, -0.35530129075050354, 0.9257516860961914, -0.3856966197490692, 1.7566490173339844, -0.632943332195282, 0.5547075271606445, 0.7515714764595032, 1.3551557064056396, 0.16183018684387207, -0.03144936263561249, 0.27346593141555786, 0.2800176441669464, -0.04189687967300415, 0.541140079498291, 1.1209450960159302, 0.672301709651947, 0.5315438508987427, 0.6211501955986023, -2.2260725498199463, 1.3688009977340698, -1.0090131759643555, 0.38134223222732544, 1.4587973356246948, -0.9053037166595459, 0.35591843724250793, -1.8340944051742554, -0.08424506336450577, 0.6120622158050537, -2.2504007816314697, 0.2776346206665039, -1.3062052726745605, -0.5599610805511475, 0.9671217799186707, 0.44630175828933716, -1.2469416856765747, 0.17950798571109772, -0.4908792972564697, 1.0847716331481934, 0.44960352778434753, 0.9460035562515259, -1.7301135063171387, -0.037190429866313934, -0.19283850491046906, 0.06681819260120392, -1.2921631336212158, -1.6105799674987793, 0.6661054491996765, 0.5311357975006104, 0.6127123832702637, -0.1272810399532318, 1.059333324432373, -1.077325463294983, 0.7675618529319763, -1.1203045845031738, -1.624524712562561, -1.4593201875686646, -2.437748670578003, -2.331878185272217, 0.7895985245704651, -0.45188552141189575, -0.5596337914466858, 2.099148988723755, -1.032083511352539, -1.637983798980713, 1.1404188871383667, 0.24906818568706512, 0.08487052470445633, 2.379939079284668, 0.25119373202323914, -0.7498778104782104, 0.5211148858070374, -0.8118549585342407, 0.8527802228927612, -0.3081161677837372, 1.370100736618042, 0.4536551237106323, -1.1034272909164429, 1.5014890432357788, -0.34489333629608154, 0.5857778191566467, -0.5976735353469849, -0.588543713092804, -0.7396782636642456, 0.27131664752960205, 1.8595329523086548, -0.17117665708065033, 1.4660120010375977, -0.29941239953041077, -1.5818403959274292, -1.5785748958587646, 0.8677242994308472, 0.4393540918827057, -0.8992398381233215, 0.11983727663755417, -0.5084856748580933, 0.19365760684013367, -0.04249958693981171, 1.2415876388549805, 1.2909440994262695, 0.652510941028595, -0.47295427322387695, -0.855823814868927, 0.09870100766420364, -0.10577423870563507, -0.7283125519752502, -1.800934076309204, -0.3685683310031891, 0.15853819251060486, 0.6324658989906311, -1.137669563293457, 1.8597146272659302, 0.9638140201568604, 1.9160281419754028, 1.0447564125061035, -0.40934252738952637, 1.3364499807357788, 0.052469074726104736, 1.7842849493026733, -0.6014098525047302, 0.6271066069602966, -0.34838512539863586, -1.0874179601669312, 0.8915762901306152, -0.3343069851398468, -2.06123423576355, -0.8371133208274841, -0.6636696457862854, -0.2756861746311188, -0.7576717734336853, 0.8845667839050293, -0.31745460629463196, -1.4762908220291138, 0.20323489606380463, -0.6187670230865479, 0.25711894035339355, -1.1799348592758179, 0.2725967466831207, 0.6411999464035034, -0.5934755802154541, -0.05678005516529083, -0.2343403398990631, -1.2668050527572632, -0.4759683609008789, 0.33258894085884094, 1.8210457563400269, -0.5644464492797852, 0.9709042310714722, 1.0131163597106934, -0.651503324508667, 0.041590236127376556, 0.21166318655014038, -0.18106165528297424, 0.8381809592247009, -1.0416865348815918, -0.44789940118789673, 1.2223440408706665, -0.35093745589256287, -0.6121687889099121, 1.4951820373535156, 0.7406936883926392, -1.0278434753417969, -0.2301916629076004, -0.1880330741405487, -0.9087722897529602, 0.09256064891815186, -1.5405468940734863, -0.10992525517940521, 0.5803747177124023, -1.520440936088562, -0.3181208074092865, -0.15580768883228302, 1.3635532855987549, -0.20025251805782318, 1.3416106700897217, -0.35599803924560547, -0.19003893435001373, -0.3238270878791809, -0.46646320819854736, 0.20149661600589752, -0.15968182682991028, -0.4855579733848572, 0.12378811091184616, -0.8345310688018799, 0.3681532144546509, 1.4714525938034058, 0.33230045437812805, 0.09312141686677933, 0.4219951033592224, 1.1249022483825684, 0.3067020773887634, -0.09080895036458969, -0.8032174110412598, -1.5452585220336914, 2.0161631107330322, -1.5001463890075684, 1.943716049194336, 0.7783737778663635, -0.010168759152293205, -1.7890084981918335, -1.7479205131530762, 1.2571686506271362, 1.1354619264602661, 2.2941365242004395, 0.43182840943336487, 0.40628740191459656, -0.8578943610191345, -0.7423451542854309, 0.34146836400032043, -0.9828104972839355, -0.6418235301971436, 0.17133691906929016, 2.3483364582061768, 1.8808478116989136, -0.4205322563648224, -0.17877323925495148, -0.9571796655654907, 1.4339054822921753, -0.30493998527526855, 0.302234411239624, 2.0721988677978516, -0.3372269868850708, -1.0864675045013428, 1.3446118831634521, -2.477431297302246, 0.19157910346984863, 2.0921809673309326, 0.32375025749206543, 0.18524028360843658, -1.3077926635742188, -0.563697874546051, -0.404878705739975, -0.41482827067375183, -1.2410999536514282, 0.5676605105400085, -0.27124935388565063, -0.756783127784729, -1.3942557573318481, 0.13511765003204346, -1.1640325784683228, -1.6782557964324951, 0.33282461762428284, 1.897144079208374, 2.1233420372009277, -0.6346049308776855, 1.5086612701416016, -0.415270060300827, 0.07831062376499176, 1.1617331504821777, 1.3175359964370728, 3.0312938690185547, 1.8087892532348633, -1.2465753555297852, 0.6657353043556213, -0.20986422896385193, -0.5442703366279602, 1.1029125452041626, -1.1182957887649536, 1.2640109062194824, -0.084491066634655, -1.1841554641723633, -1.2519456148147583, 1.0339347124099731, 0.4648541510105133, 0.0703321099281311, -0.5403023362159729, 1.2224382162094116, 0.1407288759946823, 1.3245916366577148, 0.606157660484314, -0.42876315116882324, 0.5086427927017212, -0.435819149017334, -0.592224657535553, 1.5612778663635254, 0.2349882423877716, -1.574790596961975, -2.282414674758911, -0.26937389373779297, -0.8732200860977173, 0.049928218126297, -0.6849749684333801, -1.0004351139068604, 1.6340447664260864, 0.30180442333221436, -1.2829335927963257, -0.21851930022239685, -0.260659396648407, -0.4763818383216858, 2.700558662414551, -1.2005754709243774, -0.13483606278896332, -0.9229866862297058, -0.6748839020729065, 1.6779463291168213, -1.2814468145370483, -0.21755152940750122, -1.0936335325241089, -0.5948554277420044, -1.1946592330932617, -0.427871435880661, 0.04109150171279907, -1.0228428840637207, 0.7520381212234497, 0.1114422082901001, -1.140028715133667, -0.3501853048801422, -0.8953303694725037, 1.0131703615188599, -0.14636185765266418, 0.11435778439044952, 1.778138279914856, 0.2943352162837982, -0.4171055555343628, 0.8093468546867371, 1.2044601440429688, 0.6686918139457703, -0.6733521819114685, -0.04341331124305725, -0.632061243057251, 0.44072017073631287, -1.2308601140975952, 0.30615273118019104, -2.97927188873291, 0.7510744333267212, -0.10608024895191193, -0.09326989948749542, -0.047585926949977875, -1.3781827688217163, 1.064453363418579, 2.5900063514709473, -1.2673821449279785, 0.5262967944145203, 0.3710930347442627, 1.1497818231582642, -1.5781645774841309, 0.38175857067108154, -0.5259948968887329, 2.1440412998199463, 0.20701900124549866, 1.2632205486297607, -0.509614884853363, -2.296555757522583, 0.5935536623001099, -1.203606367111206, -1.1600955724716187, 0.7190043926239014, -0.9108551144599915, 0.22276338934898376, -1.4304836988449097, -0.23758265376091003, -0.8897096514701843, -1.1745823621749878, 0.6375752687454224, 0.15959912538528442, 0.36372604966163635, -0.5289963483810425, 0.2376086264848709, -2.280691385269165, -1.3898813724517822, -0.16543565690517426, -0.9272547960281372, 0.5731666684150696, -0.46071961522102356, 0.6366185545921326, -0.031568493694067, 0.04540567845106125, 0.3261244297027588, 1.565984845161438, 3.404487133026123, 0.09568557888269424, 0.20021575689315796, -0.18297214806079865, -0.9328691959381104, 1.4488335847854614, 0.8637062907218933, -0.023176006972789764, -0.5943205952644348, -0.9966126084327698, 1.2707955837249756, 2.01200008392334, 0.996152937412262, 0.03325502574443817, -0.8650431036949158, -0.6394131183624268, -0.047840386629104614, 0.22102488577365875, 0.46858614683151245, 0.8212445974349976, 0.010976815596222878, 0.11107983440160751, 1.4447174072265625, 1.106373906135559, -0.38698792457580566, 0.35802945494651794, -0.889491081237793, -0.4123205840587616, 0.4208574891090393, 0.23932166397571564, -0.07992732524871826, 0.44354546070098877, -0.9967628121376038, -0.22461441159248352, -0.3568461537361145, -0.8607209920883179, -0.7070729732513428, -0.43882685899734497, -0.5044597387313843, 1.6032317876815796, 0.11498358100652695, -0.5017693638801575, 0.11460224539041519, -0.6812869310379028, -0.16702495515346527, -1.1864542961120605, 0.26055991649627686, -0.0687248706817627, -0.11911670863628387, -0.20851995050907135, 1.6712815761566162, -0.8822609186172485, -2.0887062549591064, 0.17075712978839874, 0.3003562390804291, -0.3145255148410797, 0.1370215117931366, 1.6948667764663696, 0.4816635549068451, 1.4848681688308716, 1.3043386936187744, 0.9522088170051575, -0.6044618487358093, -1.2701992988586426, 0.8272156119346619, 0.9172751307487488, -1.3653078079223633, 0.9101229310035706, -0.12218299508094788, -0.518670916557312, 0.6833773255348206, 1.237800121307373, 0.47215235233306885, -2.0657854080200195, 0.88703453540802, -1.0774928331375122, 0.8256786465644836, 0.7819430232048035, 0.6570971608161926, 0.29115748405456543, 0.9709352850914001, -1.2322571277618408, -1.1425659656524658, -0.7165758013725281, -0.70622318983078, 1.9965696334838867, -0.3505980372428894, 0.6964457631111145, -0.20451024174690247, -1.2148770093917847, -0.0881076529622078, 0.7690061330795288, 0.3863028883934021, -0.43138355016708374, 0.8422000408172607, -0.6527800559997559, -0.9940434098243713, -1.3218841552734375, -0.34867164492607117, -1.0918959379196167, -0.9343268871307373, 1.0567841529846191, 0.7111902832984924, 0.3955744206905365, 1.882401943206787, 0.6262480616569519, 0.33838921785354614, -2.5656216144561768, 0.8732298016548157, 0.24468158185482025, -0.0823504626750946, 0.8857179284095764, 0.34694531559944153, 1.1562590599060059, 0.07168873399496078, 0.5784111618995667, -2.3633370399475098, 2.235135555267334, -0.17012406885623932, 0.6536877751350403, -0.05571077764034271, -0.15070384740829468, 1.1462867259979248, 0.5902503132820129, 0.5315912961959839, -1.0198795795440674, 0.7396312952041626, -0.4791414141654968, 1.182366132736206, 0.9187151789665222, -0.8244728446006775, 0.009865934029221535, 1.4456113576889038, 0.48056766390800476, -0.5361588001251221, -0.9975407719612122, -0.8325205445289612, 0.9020541906356812, 1.6560709476470947, -0.1259511560201645, -0.06990834325551987, 0.7511942386627197, 0.654532253742218, -1.2030583620071411, 0.05724918842315674, -0.598980724811554, -0.7606006264686584, 1.6180651187896729, 2.1076033115386963, -0.21265706419944763, -0.03954150527715683, -0.718761682510376, -1.2802153825759888, 0.7657238841056824, -0.1552971601486206, -0.024157922714948654, 0.5977044701576233, -0.6151134371757507, 0.9754002094268799, 0.7424662709236145, 0.948697566986084, 0.1435118466615677, 0.24820591509342194, 0.380560964345932, -0.3156411051750183, -1.162009835243225, -0.3000498414039612, -1.1037007570266724, -2.6230478286743164, 0.3981819152832031, -0.2860991060733795, -1.430275321006775, 0.048867203295230865, -1.0282827615737915, 0.94920414686203, -0.641526997089386, -1.099648118019104, -1.552650809288025, 0.26650482416152954, -0.023171406239271164, 0.9675496220588684, -1.6697850227355957, -0.1876523345708847, 1.0954761505126953, 0.705371618270874, -0.6513742804527283, 0.9729475975036621, 0.276836097240448, 0.9478747248649597, 0.705163836479187, -0.38769835233688354, 0.6617962121963501, 0.02684454806149006, -1.416061282157898, 0.5113260746002197, 1.2158623933792114, 0.1464226096868515, 1.3366422653198242, -0.41439592838287354, 0.06024765968322754, 0.4200409948825836, -0.6676916480064392, -0.4467995762825012, -0.317949503660202, 0.6957471966743469, 0.09635386615991592, -0.9885845184326172, -0.10538723319768906, -0.1386346071958542, -0.38283008337020874, 0.27237674593925476, -1.4294931888580322, -0.24098286032676697, -0.5121631026268005, -0.4996090233325958, -1.3096567392349243, -0.12155400216579437, 1.4403879642486572, -0.6895302534103394, -0.19439058005809784, 0.5383349657058716, 0.43031448125839233, 0.5514649152755737, 0.7084057331085205, -0.761012613773346, -0.17333799600601196, -0.3137359321117401, -0.3205431401729584, 0.24404607713222504, 1.2908498048782349, -0.06915927678346634, -0.9445298910140991, 0.6730189323425293, -0.30055806040763855, 0.14415857195854187, 2.0149991512298584, 0.10341379046440125, -0.751731812953949, 0.3893998861312866, -0.7574664354324341, 1.867529034614563, 1.6676875352859497, 1.2529112100601196, -0.13035248219966888, -0.9441850185394287, 0.579005241394043, -0.2957710325717926, -0.3427589535713196, 0.8774634003639221, 0.2979179322719574, -0.2473415583372116, -1.4158529043197632, 0.8423227667808533, 1.2208980321884155, -0.7930943965911865, -0.8593379855155945, 0.17613306641578674, -0.828410804271698, 1.210508942604065, 0.5130645632743835, 0.4318094253540039, 0.2579350769519806, 1.6127077341079712, 0.7036945819854736, -0.4701027572154999, 0.4872409999370575, 0.5114598274230957, -0.24617180228233337, -2.1373796463012695, -1.1819565296173096, 0.3323911428451538, -0.5770478248596191, -1.5472557544708252, 1.3291752338409424, -1.07781982421875, -1.0416841506958008, 0.5562083721160889, 0.05350732058286667, 1.3855717182159424, 0.4237132668495178, 1.597894310951233, 2.0999467372894287, 0.8616477251052856, 0.5196582078933716, 1.3184500932693481, -0.1469215452671051, -0.4526768624782562, 1.828454613685608, -0.38396793603897095, 0.4397783875465393, 1.1758456230163574, -0.4122530519962311, -1.091272234916687, -0.795009970664978, -1.0914005041122437, -0.6807569861412048, 1.1347408294677734, 0.1061844602227211, -1.0534669160842896, 0.277305543422699, 1.596124291419983, 0.16345207393169403, -0.1922563761472702, 0.6278272867202759, 0.37848731875419617, -0.7882641553878784, -0.023852279409766197, -0.9772629141807556, 0.5052298903465271, -0.28564170002937317, -0.31237709522247314, 0.37340569496154785, 0.4922453761100769, 1.3375099897384644, -0.09488751739263535, 0.17688383162021637, 0.9676333069801331, -1.4520459175109863, 1.363991141319275, -0.6129885911941528, 0.318002313375473, -2.3047752380371094, 1.3497002124786377, -0.6949353218078613, 1.9545562267303467, -2.6490118503570557, 0.39825496077537537, -0.5756298303604126, -0.6105549931526184, 0.24144648015499115, -0.37159469723701477, 0.1525932401418686, -0.08410430699586868, -1.09695565700531, 0.08725213259458542, -0.6887655258178711, 0.5800652503967285, 1.1121584177017212, 1.4395465850830078, -1.114985704421997, -0.23256279528141022, -1.684023380279541, -0.11273523420095444, -0.8210606575012207, 0.28967225551605225, -1.9836379289627075, -0.06829885393381119, -1.9236721992492676, -2.3647713661193848, -1.2536509037017822, -0.88212651014328, 1.164716124534607, 0.18056586384773254, -0.8504762053489685, 1.2941417694091797, -0.3390241265296936, -1.8426051139831543, 1.1140704154968262, -2.151139259338379 ]
https://github.com/huggingface/datasets/issues/5508
Saving a dataset after setting format to torch doesn't work, but only if filtering
Hey, I'm a research engineer working on language modelling wanting to contribute to open source. I was wondering if I could give it a shot?
### Describe the bug Saving a dataset after setting format to torch doesn't work, but only if filtering ### Steps to reproduce the bug ``` a = Dataset.from_dict({"b": [1, 2]}) a.set_format('torch') a.save_to_disk("test_save") # saves successfully a.filter(None).save_to_disk("test_save_filter") # does not >> [...] TypeError: Provided `function` which is applied to all elements of table returns a `dict` of types [<class 'torch.Tensor'>]. When using `batched=True`, make sure provided `function` returns a `dict` of types like `(<class 'list'>, <class 'numpy.ndarray'>)`. # note: skipping the format change to torch lets this work. ### Expected behavior Saving to work ### Environment info - `datasets` version: 2.4.0 - Platform: Linux-6.1.9-arch1-1-x86_64-with-glibc2.36 - Python version: 3.10.9 - PyArrow version: 9.0.0 - Pandas version: 1.4.4
306
25
Saving a dataset after setting format to torch doesn't work, but only if filtering ### Describe the bug Saving a dataset after setting format to torch doesn't work, but only if filtering ### Steps to reproduce the bug ``` a = Dataset.from_dict({"b": [1, 2]}) a.set_format('torch') a.save_to_disk("test_save") # saves successfully a.filter(None).save_to_disk("test_save_filter") # does not >> [...] TypeError: Provided `function` which is applied to all elements of table returns a `dict` of types [<class 'torch.Tensor'>]. When using `batched=True`, make sure provided `function` returns a `dict` of types like `(<class 'list'>, <class 'numpy.ndarray'>)`. # note: skipping the format change to torch lets this work. ### Expected behavior Saving to work ### Environment info - `datasets` version: 2.4.0 - Platform: Linux-6.1.9-arch1-1-x86_64-with-glibc2.36 - Python version: 3.10.9 - PyArrow version: 9.0.0 - Pandas version: 1.4.4 Hey, I'm a research engineer working on language modelling wanting to contribute to open source. I was wondering if I could give it a shot?
[ -1.1304316520690918, -0.8675511479377747, -0.77523273229599, 1.534570336341858, -0.15542897582054138, -1.2044962644577026, 0.15054906904697418, -1.0520758628845215, 1.714974045753479, -0.8151836395263672, 0.31460586190223694, -1.6270716190338135, 0.09192617982625961, -0.6353017091751099, -0.7122033834457397, -0.874954342842102, -0.38116323947906494, -0.5977566838264465, 1.0289182662963867, 2.494244337081909, 1.108606219291687, -1.4605519771575928, 2.5994675159454346, 0.7635384798049927, -0.15283407270908356, -1.003737449645996, 0.49894192814826965, 0.048566438257694244, -1.25937819480896, -0.39362457394599915, -0.9272529482841492, -0.1504715234041214, -0.624596118927002, -0.5759046077728271, -0.06376076489686966, 0.32414767146110535, -0.3079288601875305, -0.467009037733078, -0.49042487144470215, -0.8790383338928223, 0.3713279664516449, -0.45173850655555725, 0.8914180397987366, -0.3026425540447235, 1.764371395111084, -0.5843114256858826, 0.6117318868637085, 0.7009385228157043, 1.3582749366760254, 0.2023243010044098, -0.05765526741743088, 0.3822026252746582, 0.3765110373497009, -0.046032197773456573, 0.4610925316810608, 1.0201624631881714, 0.6740749478340149, 0.4811803698539734, 0.7170917987823486, -2.2784500122070312, 1.2697845697402954, -1.0544174909591675, 0.28563687205314636, 1.2872916460037231, -0.9902102947235107, 0.35367798805236816, -1.7439404726028442, -0.0508260652422905, 0.6435456275939941, -2.2844841480255127, 0.2652408480644226, -1.401684045791626, -0.5318612456321716, 1.0274138450622559, 0.4753177762031555, -1.2215394973754883, 0.0316435843706131, -0.3962530493736267, 0.9349376559257507, 0.44224098324775696, 1.0530033111572266, -1.7219940423965454, -0.032997582107782364, -0.3355237543582916, 0.21321618556976318, -1.2401881217956543, -1.46751070022583, 0.5907818078994751, 0.7088647484779358, 0.5447463393211365, -0.03407573327422142, 0.9015156626701355, -1.014193058013916, 0.7153973579406738, -1.054193139076233, -1.8110651969909668, -1.4110519886016846, -2.256406307220459, -2.286473035812378, 0.7213203310966492, -0.4387272596359253, -0.45622044801712036, 2.086668014526367, -1.0222439765930176, -1.7816717624664307, 1.1394973993301392, 0.25521406531333923, -0.10032898932695389, 2.443596363067627, 0.14968860149383545, -0.7207223773002625, 0.5147988796234131, -0.8718999028205872, 0.6808425784111023, -0.44945284724235535, 1.308771014213562, 0.36168721318244934, -1.0364161729812622, 1.6293354034423828, -0.3776613771915436, 0.5747387409210205, -0.7411390542984009, -0.4293321967124939, -0.6554968953132629, 0.307077020406723, 1.903301477432251, -0.265341579914093, 1.4893532991409302, -0.3261258006095886, -1.487446904182434, -1.6160225868225098, 0.8473172187805176, 0.42422929406166077, -0.7861730456352234, 0.20618398487567902, -0.32245492935180664, 0.1540556102991104, -0.05910220742225647, 1.1408699750900269, 1.3259884119033813, 0.7256383299827576, -0.2659150958061218, -0.9380233883857727, 0.168817400932312, -0.06253063678741455, -0.7241926193237305, -1.8039519786834717, -0.36410003900527954, 0.10809648782014847, 0.6887131333351135, -1.2089757919311523, 1.7932665348052979, 0.8199518322944641, 1.9280540943145752, 1.0680850744247437, -0.35290786623954773, 1.5432409048080444, 0.08977599442005157, 1.8985787630081177, -0.41448476910591125, 0.7265934944152832, -0.39903533458709717, -1.0958195924758911, 0.7864280939102173, -0.35793226957321167, -2.068539619445801, -0.6506626009941101, -0.8706942796707153, -0.1779339760541916, -0.7934310436248779, 1.0323048830032349, -0.22892798483371735, -1.318040370941162, 0.3181803226470947, -0.8057227730751038, 0.14295005798339844, -1.1919889450073242, 0.33823248744010925, 0.7920822501182556, -0.5267077684402466, 0.18854659795761108, -0.307257741689682, -1.324501395225525, -0.46864545345306396, 0.39249324798583984, 1.8431702852249146, -0.787087619304657, 0.8621531128883362, 1.0314427614212036, -0.6187111735343933, -0.062049850821495056, 0.4069038927555084, -0.21149851381778717, 0.874603271484375, -1.039379358291626, -0.42979997396469116, 1.1872004270553589, -0.27180129289627075, -0.6081530451774597, 1.484997034072876, 0.6827754974365234, -0.9940759539604187, -0.16124796867370605, -0.11954917013645172, -0.7867825627326965, 0.08641465753316879, -1.7039824724197388, -0.011077379807829857, 0.3706834614276886, -1.5702518224716187, -0.4537126421928406, -0.15476767718791962, 1.3153858184814453, -0.04689439386129379, 1.3699021339416504, -0.3661864101886749, -0.2030012607574463, -0.45631083846092224, -0.36522814631462097, 0.10690970718860626, -0.2969221770763397, -0.556613028049469, 0.20120996236801147, -0.7331638932228088, 0.36760520935058594, 1.384076714515686, 0.29008734226226807, 0.12294203042984009, 0.5577935576438904, 1.0725336074829102, 0.29867008328437805, -0.09103565663099289, -0.8736420273780823, -1.5608546733856201, 2.1326797008514404, -1.4047425985336304, 2.0913968086242676, 0.7203390002250671, -0.12588021159172058, -1.8039110898971558, -1.9245043992996216, 1.3691668510437012, 1.138658046722412, 2.321875810623169, 0.6012849807739258, 0.3908449411392212, -0.9476101994514465, -0.5372316241264343, 0.2537299692630768, -0.9516176581382751, -0.8218066692352295, 0.1521999090909958, 2.4134202003479004, 1.669338345527649, -0.34689006209373474, -0.09034393727779388, -1.1518548727035522, 1.5270652770996094, -0.20282770693302155, 0.2401709109544754, 1.9306716918945312, -0.2523481249809265, -1.0550895929336548, 1.231916069984436, -2.3458070755004883, 0.11220411211252213, 2.0092878341674805, 0.15794171392917633, 0.12144272029399872, -1.3271360397338867, -0.7119007706642151, -0.3531416654586792, -0.29140692949295044, -1.198581337928772, 0.5179386138916016, -0.175594761967659, -0.7768419981002808, -1.4891512393951416, 0.2306261509656906, -1.0787923336029053, -1.6544389724731445, 0.20595799386501312, 1.787554383277893, 1.960788369178772, -0.785926103591919, 1.5497835874557495, -0.30243560671806335, 0.1667444258928299, 1.2599118947982788, 1.1705052852630615, 3.157871961593628, 2.0277302265167236, -1.2588788270950317, 0.6130058765411377, -0.12655849754810333, -0.43403467535972595, 1.1365070343017578, -1.296481966972351, 1.3376165628433228, -0.14525938034057617, -1.1686949729919434, -1.2440192699432373, 0.9087952971458435, 0.45669010281562805, 0.06850063800811768, -0.5458905100822449, 1.201398253440857, 0.07154715806245804, 1.3261072635650635, 0.5493733882904053, -0.2743292450904846, 0.5860801935195923, -0.40972504019737244, -0.5012500882148743, 1.5455800294876099, 0.25914764404296875, -1.4971243143081665, -2.310950994491577, -0.19423596560955048, -0.9191188812255859, -0.06659898906946182, -0.6145917177200317, -1.011683702468872, 1.6589237451553345, 0.3969767391681671, -1.1225647926330566, -0.2823181748390198, -0.33389243483543396, -0.6377425193786621, 2.872710943222046, -1.418915033340454, -0.323318749666214, -1.0348055362701416, -0.6078967452049255, 1.6674410104751587, -1.2454615831375122, -0.1602148711681366, -1.0672682523727417, -0.5261754989624023, -1.270373821258545, -0.47776514291763306, -0.11119984090328217, -0.9634156823158264, 0.8264325857162476, 0.2596428096294403, -1.2319647073745728, -0.33285850286483765, -0.8918004035949707, 0.7546952962875366, -0.11537742614746094, 0.26054561138153076, 1.8864333629608154, 0.3573441207408905, -0.32122477889060974, 0.7698630690574646, 1.155815839767456, 0.5910733938217163, -0.5887441635131836, 0.2581116557121277, -0.5578476190567017, 0.38398873805999756, -1.2126446962356567, 0.32934853434562683, -2.772453546524048, 0.5948063135147095, -0.051543913781642914, -0.04422522336244583, -0.009628946892917156, -1.2773182392120361, 1.1543292999267578, 2.5665807723999023, -1.2110244035720825, 0.503980278968811, 0.23004809021949768, 1.2352993488311768, -1.5484232902526855, 0.3153052031993866, -0.4137972891330719, 2.2249257564544678, 0.21191799640655518, 1.139214277267456, -0.43333128094673157, -2.4222371578216553, 0.6663089990615845, -1.2537919282913208, -1.2378782033920288, 0.7019278407096863, -0.8612191677093506, -0.016454143449664116, -1.3169783353805542, -0.15006791055202484, -0.7268602848052979, -1.1991716623306274, 0.6619694828987122, 0.07658672332763672, 0.5699126720428467, -0.6414437890052795, 0.35736775398254395, -2.3060414791107178, -1.4608097076416016, -0.24374859035015106, -0.9207448363304138, 0.44953447580337524, -0.329113245010376, 0.771881103515625, -0.20058715343475342, 0.010844282805919647, 0.28973111510276794, 1.5075281858444214, 3.3455657958984375, 0.24142621457576752, 0.44250261783599854, -0.23792602121829987, -0.8689228892326355, 1.3690458536148071, 0.8174486756324768, -0.18703404068946838, -0.5273760557174683, -0.9807064533233643, 1.2817115783691406, 1.9715348482131958, 0.989753782749176, -0.03238502889871597, -0.8260756731033325, -0.7035589218139648, -0.015757936984300613, 0.2174946814775467, 0.3896426260471344, 0.856930136680603, 0.09006913751363754, 0.06612200289964676, 1.5060070753097534, 1.235721468925476, -0.4118114709854126, 0.35218545794487, -0.8166251182556152, -0.43439188599586487, 0.6114707589149475, 0.35804906487464905, -0.023211460560560226, 0.34479591250419617, -1.029542088508606, -0.1923493593931198, -0.3834458589553833, -0.8424353003501892, -0.7329801917076111, -0.4208838939666748, -0.3028380870819092, 1.7583283185958862, 0.10564612597227097, -0.47127777338027954, -0.03633607551455498, -0.7233222723007202, -0.030240273103117943, -0.9914698004722595, 0.28118276596069336, -0.08139287680387497, -0.0712091401219368, -0.09495360404253006, 1.7737970352172852, -0.9696449637413025, -2.022321939468384, 0.23104152083396912, 0.18557043373584747, -0.3614029884338379, 0.2612447440624237, 1.6519583463668823, 0.5342037081718445, 1.4803109169006348, 1.365443229675293, 0.9266536235809326, -0.7035152316093445, -1.2788221836090088, 0.6321393251419067, 0.9848472476005554, -1.4022818803787231, 0.7154041528701782, 0.07595048099756241, -0.5339605808258057, 0.5732260346412659, 1.178688883781433, 0.5100804567337036, -1.9935071468353271, 0.7479641437530518, -0.9845988750457764, 0.8766663074493408, 0.7743102312088013, 0.73397296667099, 0.17522671818733215, 0.7652925252914429, -1.2525384426116943, -1.1278982162475586, -0.7753146886825562, -0.7632341980934143, 1.9573287963867188, -0.33184972405433655, 0.547514796257019, -0.1758253276348114, -1.3871915340423584, -0.12080822139978409, 0.6707785725593567, 0.41016891598701477, -0.48382213711738586, 0.7908248901367188, -0.614844560623169, -1.1689674854278564, -1.399583101272583, -0.5610140562057495, -0.9984903931617737, -1.0192803144454956, 1.0890835523605347, 0.8088242411613464, 0.21386726200580597, 1.8595411777496338, 0.6009156107902527, 0.18490368127822876, -2.6624653339385986, 0.9713014960289001, 0.2849944829940796, -0.08469982445240021, 0.8230114579200745, 0.3956468105316162, 0.9602532982826233, -0.06895019859075546, 0.5425465106964111, -2.410489559173584, 2.3171133995056152, -0.1906435787677765, 0.7365490198135376, -0.06220898777246475, -0.014657324180006981, 0.9576963186264038, 0.5289512276649475, 0.5628229975700378, -1.0091166496276855, 0.6643596291542053, -0.5645149350166321, 1.3342186212539673, 0.7736634612083435, -0.7684540152549744, -0.11718413978815079, 1.292773962020874, 0.43387702107429504, -0.6306870579719543, -0.9719025492668152, -1.0268995761871338, 0.9825270175933838, 1.792972207069397, -0.08802875876426697, -0.02317342907190323, 0.8018713593482971, 0.5635691285133362, -1.3316714763641357, -0.029563425108790398, -0.764822244644165, -0.6927266716957092, 1.6437292098999023, 2.0886285305023193, -0.14049170911312103, -0.13369132578372955, -0.7432755827903748, -1.330325722694397, 0.7777941823005676, 0.04527471959590912, 0.03502994775772095, 0.6721804738044739, -0.5067111253738403, 1.0716814994812012, 0.8638445138931274, 0.9984776973724365, 0.2678047716617584, 0.2412957400083542, 0.3419308364391327, -0.3386332094669342, -1.2247971296310425, -0.29530173540115356, -1.143687129020691, -2.4440083503723145, 0.4018312096595764, -0.2786109745502472, -1.4329884052276611, 0.022398659959435463, -0.9938477277755737, 0.8650224208831787, -0.5659077763557434, -1.0032103061676025, -1.41859769821167, 0.10636843740940094, -0.02444784715771675, 0.903043270111084, -1.547336220741272, -0.03517349436879158, 1.2631994485855103, 0.9600963592529297, -0.7635320425033569, 0.9596399664878845, 0.26513737440109253, 1.080568790435791, 0.9398408532142639, -0.37788039445877075, 0.5535193681716919, 0.09881240129470825, -1.3274000883102417, 0.4946572482585907, 1.2174559831619263, 0.20065787434577942, 1.425795555114746, -0.632318913936615, -0.07193643599748611, 0.34632426500320435, -0.45893797278404236, -0.4548356533050537, -0.6340164542198181, 0.6566265821456909, 0.06443799287080765, -0.8512351512908936, 0.050492674112319946, -0.004377375822514296, -0.19960325956344604, 0.2187521904706955, -1.5430389642715454, -0.030726123601198196, -0.33180734515190125, -0.626571536064148, -1.2352309226989746, -0.11120232939720154, 1.328013300895691, -0.7668688297271729, -0.048623226583004, 0.5134981274604797, 0.3908831477165222, 0.49601438641548157, 0.754206657409668, -0.6038400530815125, -0.43824058771133423, -0.19094514846801758, -0.3299948275089264, 0.42640191316604614, 1.285703420639038, -0.14441639184951782, -1.045941710472107, 0.7340056896209717, -0.4199979305267334, 0.0988447368144989, 1.8802008628845215, 0.08865750581026077, -0.8358162045478821, 0.27714601159095764, -0.7081983685493469, 1.980837345123291, 1.718953013420105, 1.1962286233901978, -0.08801555633544922, -1.0152297019958496, 0.7324520945549011, -0.3215724229812622, -0.40199556946754456, 0.8305776715278625, 0.4719873070716858, -0.2828942537307739, -1.3280935287475586, 0.6841146349906921, 1.1489379405975342, -0.8839370012283325, -0.9017945528030396, 0.15444914996623993, -0.8130474090576172, 1.093045949935913, 0.7806190848350525, 0.40441256761550903, 0.21981561183929443, 1.7387118339538574, 0.7548578381538391, -0.5362567901611328, 0.5640090703964233, 0.4379740059375763, -0.19315312802791595, -2.0521535873413086, -1.1401927471160889, 0.30426499247550964, -0.5347208380699158, -1.601099967956543, 1.3478080034255981, -1.2382867336273193, -0.8743088841438293, 0.5786184668540955, 0.11601543426513672, 1.4224847555160522, 0.2865296006202698, 1.496840000152588, 2.0453603267669678, 0.8966953158378601, 0.4576544463634491, 1.2977113723754883, -0.2838030755519867, -0.4663112461566925, 1.8059728145599365, -0.34665727615356445, 0.5166189670562744, 1.173248052597046, -0.33323079347610474, -1.061421513557434, -0.8037781715393066, -1.2553328275680542, -0.7094549536705017, 1.1424845457077026, 0.11560314893722534, -1.1883962154388428, 0.2969557046890259, 1.5346585512161255, 0.05241338908672333, -0.3545648753643036, 0.5692559480667114, 0.3667331635951996, -0.8456647396087646, -0.07965340465307236, -0.9867025017738342, 0.5906774401664734, -0.2677011787891388, -0.34862297773361206, 0.3945406973361969, 0.33569034934043884, 1.2790272235870361, 0.05159503221511841, 0.17222265899181366, 1.1554664373397827, -1.4498978853225708, 1.5072561502456665, -0.704673171043396, 0.2935992181301117, -2.2393393516540527, 1.2911267280578613, -0.7358169555664062, 1.9173645973205566, -2.7065036296844482, 0.42311573028564453, -0.6158713102340698, -0.42840492725372314, 0.367805540561676, -0.2914188802242279, 0.18519380688667297, -0.13706837594509125, -1.238700270652771, -0.11386948078870773, -0.7032846212387085, 0.4424733519554138, 1.0648157596588135, 1.331483006477356, -1.0497678518295288, -0.2490437626838684, -1.7090816497802734, -0.18141727149486542, -0.6900014281272888, 0.33081886172294617, -1.9356454610824585, -0.13759475946426392, -1.8712148666381836, -2.384260416030884, -1.2824232578277588, -0.7731514573097229, 1.1283986568450928, 0.02719474397599697, -0.8266474604606628, 1.2006113529205322, -0.30356499552726746, -1.8028744459152222, 1.1316590309143066, -2.167968273162842 ]
https://github.com/huggingface/datasets/issues/5506
IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs
Hi ! `datasets` doesn't do batching - the PyTorch DataLoader does and is created by the `Trainer`. Do you pass other arguments to training_args with respect to data loading ? Also we recently released `.to_iterable_dataset` that does pretty much what you implemented, but using contiguous shards to get a better speed: ```python if use_iterable_dataset: num_shards = 100 dataset = dataset.to_iterable_dataset(num_shards=num_shards) ```
### Describe the bug I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256. Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous shards and passing those to an `IterableDataset`. I observed an unexpected drop in GPU memory utilization, and found the batch size returned from the model had been cut in half. When using `Trainer` with 2 GPUs and a batch size of 256, `Dataset` returns a batch of size 512 (256 per GPU), while `IterableDataset` returns a batch size of 256 (256 total). My guess is `IterableDataset` isn't accounting for multiple cards. ### Steps to reproduce the bug ```python import datasets from datasets import IterableDataset from transformers import RobertaConfig from transformers import RobertaTokenizerFast from transformers import RobertaForMaskedLM from transformers import DataCollatorForLanguageModeling from transformers import Trainer, TrainingArguments use_iterable_dataset = True def gen_from_shards(shards): for shard in shards: for example in shard: yield example dataset = datasets.load_from_disk('my_dataset.hf') if use_iterable_dataset: n_shards = 100 shards = [dataset.shard(num_shards=n_shards, index=i) for i in range(n_shards)] dataset = IterableDataset.from_generator(gen_from_shards, gen_kwargs={"shards": shards}) tokenizer = RobertaTokenizerFast.from_pretrained("./my_tokenizer", max_len=160, use_fast=True) config = RobertaConfig( vocab_size=8248, max_position_embeddings=256, num_attention_heads=8, num_hidden_layers=6, type_vocab_size=1) model = RobertaForMaskedLM(config=config) data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15) training_args = TrainingArguments( per_device_train_batch_size=256 # other args removed for brevity ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=dataset, ) trainer.train() ``` ### Expected behavior Expected `Dataset` and `IterableDataset` to have the same batch size behavior. If the current behavior is intentional, the batch size printout at the start of training should be updated. Currently, both dataset classes result in `Trainer` printing the same total batch size, even though the batch size sent to the GPUs are different. ### Environment info datasets 2.7.1 transformers 4.25.1
307
61
IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs ### Describe the bug I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256. Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous shards and passing those to an `IterableDataset`. I observed an unexpected drop in GPU memory utilization, and found the batch size returned from the model had been cut in half. When using `Trainer` with 2 GPUs and a batch size of 256, `Dataset` returns a batch of size 512 (256 per GPU), while `IterableDataset` returns a batch size of 256 (256 total). My guess is `IterableDataset` isn't accounting for multiple cards. ### Steps to reproduce the bug ```python import datasets from datasets import IterableDataset from transformers import RobertaConfig from transformers import RobertaTokenizerFast from transformers import RobertaForMaskedLM from transformers import DataCollatorForLanguageModeling from transformers import Trainer, TrainingArguments use_iterable_dataset = True def gen_from_shards(shards): for shard in shards: for example in shard: yield example dataset = datasets.load_from_disk('my_dataset.hf') if use_iterable_dataset: n_shards = 100 shards = [dataset.shard(num_shards=n_shards, index=i) for i in range(n_shards)] dataset = IterableDataset.from_generator(gen_from_shards, gen_kwargs={"shards": shards}) tokenizer = RobertaTokenizerFast.from_pretrained("./my_tokenizer", max_len=160, use_fast=True) config = RobertaConfig( vocab_size=8248, max_position_embeddings=256, num_attention_heads=8, num_hidden_layers=6, type_vocab_size=1) model = RobertaForMaskedLM(config=config) data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15) training_args = TrainingArguments( per_device_train_batch_size=256 # other args removed for brevity ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=dataset, ) trainer.train() ``` ### Expected behavior Expected `Dataset` and `IterableDataset` to have the same batch size behavior. If the current behavior is intentional, the batch size printout at the start of training should be updated. Currently, both dataset classes result in `Trainer` printing the same total batch size, even though the batch size sent to the GPUs are different. ### Environment info datasets 2.7.1 transformers 4.25.1 Hi ! `datasets` doesn't do batching - the PyTorch DataLoader does and is created by the `Trainer`. Do you pass other arguments to training_args with respect to data loading ? Also we recently released `.to_iterable_dataset` that does pretty much what you implemented, but using contiguous shards to get a better speed: ```python if use_iterable_dataset: num_shards = 100 dataset = dataset.to_iterable_dataset(num_shards=num_shards) ```
[ -1.330300211906433, -1.0070868730545044, -0.7057075500488281, 1.541914939880371, -0.20247779786586761, -1.204946756362915, 0.18128500878810883, -1.0793545246124268, 1.6051658391952515, -0.857101559638977, 0.3794158399105072, -1.6458162069320679, 0.10278196632862091, -0.5253657102584839, -0.732692301273346, -0.8835270404815674, -0.4666351079940796, -0.8129115700721741, 1.0569967031478882, 2.4064033031463623, 1.2805927991867065, -1.3345305919647217, 2.727155923843384, 0.7059481143951416, -0.2552754282951355, -1.0400303602218628, 0.5262213945388794, 0.06648530811071396, -1.2846003770828247, -0.517024040222168, -0.8779680728912354, -0.045043766498565674, -0.553604006767273, -0.4806723892688751, -0.013438746333122253, 0.4373433291912079, -0.23067067563533783, -0.3915261924266815, -0.4588215947151184, -0.7784079313278198, 0.499377965927124, -0.3882030248641968, 0.9341704249382019, -0.3141300678253174, 1.8320337533950806, -0.5388620495796204, 0.5026477575302124, 0.7517757415771484, 1.3438777923583984, 0.171829491853714, -0.010076219215989113, 0.2971275746822357, 0.35950568318367004, -0.09644041210412979, 0.4878503978252411, 1.1479557752609253, 0.643693745136261, 0.5491988658905029, 0.752405047416687, -2.257356643676758, 1.371885061264038, -1.110887885093689, 0.3945104479789734, 1.3003376722335815, -0.9186447262763977, 0.366359144449234, -1.748071312904358, -0.05786213278770447, 0.5709447860717773, -2.214942693710327, 0.2947036623954773, -1.2850793600082397, -0.477752149105072, 1.0572335720062256, 0.34068265557289124, -1.2368863821029663, 0.18926358222961426, -0.4416259229183197, 1.1098206043243408, 0.4742520749568939, 1.0590159893035889, -1.6518778800964355, -0.02899257466197014, -0.24265752732753754, 0.13574731349945068, -1.3127281665802002, -1.5620167255401611, 0.547944188117981, 0.5449100136756897, 0.6199785470962524, -0.12813177704811096, 1.1226862668991089, -0.9685429334640503, 0.7628755569458008, -1.0531370639801025, -1.5861124992370605, -1.4121575355529785, -2.2857179641723633, -2.2676148414611816, 0.7188959121704102, -0.4889272451400757, -0.6309847831726074, 2.0428197383880615, -1.0568187236785889, -1.7743252515792847, 1.1218187808990479, 0.2471432089805603, 0.045313604176044464, 2.317101001739502, 0.17753925919532776, -0.6922691464424133, 0.3505401611328125, -0.776167631149292, 0.8279404044151306, -0.38506028056144714, 1.3741776943206787, 0.4722118675708771, -1.0450235605239868, 1.545751690864563, -0.3862294852733612, 0.535862386226654, -0.6677117943763733, -0.5802339911460876, -0.8576282262802124, 0.29276904463768005, 1.8755297660827637, -0.2917478084564209, 1.4932008981704712, -0.3747316002845764, -1.6039587259292603, -1.6290074586868286, 0.8732726573944092, 0.4779943525791168, -0.7530608773231506, 0.12532168626785278, -0.3823017477989197, 0.10132630169391632, -0.09225846081972122, 1.1097773313522339, 1.1790999174118042, 0.7350666522979736, -0.4257865250110626, -0.8323723673820496, 0.22560417652130127, -0.04087673872709274, -0.7060409188270569, -1.797329068183899, -0.34599918127059937, 0.11464385688304901, 0.6674525737762451, -1.1192868947982788, 1.7680357694625854, 0.9461258053779602, 1.930243730545044, 1.0114103555679321, -0.3754332661628723, 1.4427546262741089, 0.08728145062923431, 1.7740792036056519, -0.498390793800354, 0.6827315092086792, -0.3576193153858185, -1.1798092126846313, 0.8619272708892822, -0.33113712072372437, -2.0549123287200928, -0.8423274755477905, -0.7469790577888489, -0.1610528975725174, -0.8587328195571899, 0.9930679202079773, -0.3126530945301056, -1.4952833652496338, 0.1899760514497757, -0.602672278881073, 0.2998020350933075, -1.128642201423645, 0.33727166056632996, 0.695479154586792, -0.6219732761383057, 0.08772985637187958, -0.24224428832530975, -1.2248247861862183, -0.5177403092384338, 0.317472904920578, 1.8503884077072144, -0.7107067108154297, 0.9708203077316284, 1.0600413084030151, -0.6766783595085144, 0.029985154047608376, 0.2637501358985901, -0.21423381567001343, 0.8105876445770264, -1.0167646408081055, -0.4705122709274292, 1.3156849145889282, -0.26311442255973816, -0.5845087170600891, 1.574092984199524, 0.7099491357803345, -0.9703527688980103, -0.17734460532665253, -0.21650031208992004, -0.8940155506134033, -0.014809081330895424, -1.5060051679611206, -0.005578790325671434, 0.4356953203678131, -1.527254343032837, -0.3879658579826355, -0.19953568279743195, 1.293247103691101, -0.20491249859333038, 1.4713670015335083, -0.33192113041877747, -0.18867507576942444, -0.27422013878822327, -0.29022231698036194, 0.20056815445423126, -0.1876639425754547, -0.6320105195045471, 0.17546500265598297, -0.7900084853172302, 0.4211917221546173, 1.4241727590560913, 0.3484375476837158, 0.017816754058003426, 0.4198225438594818, 1.1265461444854736, 0.3675084710121155, -0.0660940557718277, -0.8811236619949341, -1.5201473236083984, 1.9879674911499023, -1.4712932109832764, 1.9578814506530762, 0.7781879305839539, -0.039750322699546814, -1.7308917045593262, -1.7278013229370117, 1.2870725393295288, 1.215645670890808, 2.3574540615081787, 0.5849915742874146, 0.3681792914867401, -0.8855059146881104, -0.6784647703170776, 0.33094197511672974, -1.0542361736297607, -0.632020890712738, 0.14193780720233917, 2.297379970550537, 1.8657586574554443, -0.40756499767303467, -0.1517937034368515, -1.0125300884246826, 1.3692536354064941, -0.24158908426761627, 0.2424629032611847, 2.0079524517059326, -0.23749147355556488, -1.0619620084762573, 1.387087106704712, -2.3952441215515137, 0.1593218892812729, 2.03705096244812, 0.3096327483654022, 0.07354112714529037, -1.4076379537582397, -0.6072229146957397, -0.34579285979270935, -0.4038585424423218, -1.3032052516937256, 0.5056120157241821, -0.2624976336956024, -0.7119390368461609, -1.3926888704299927, 0.22562186419963837, -1.1112104654312134, -1.6475129127502441, 0.3123587965965271, 1.8638421297073364, 2.027223825454712, -0.6887818574905396, 1.5082437992095947, -0.3215019106864929, 0.2108662724494934, 1.2600895166397095, 1.3040522336959839, 3.023986339569092, 1.8720173835754395, -1.3373404741287231, 0.6535206437110901, -0.19551174342632294, -0.5455184578895569, 1.1480730772018433, -1.2784467935562134, 1.27271568775177, -0.05497405678033829, -1.223375678062439, -1.2800496816635132, 0.9804906845092773, 0.4283725321292877, 0.18981017172336578, -0.5458464026451111, 1.2647514343261719, 0.02238844521343708, 1.3488571643829346, 0.5701412558555603, -0.4027180075645447, 0.5376245379447937, -0.42777660489082336, -0.5594948530197144, 1.5412349700927734, 0.16339874267578125, -1.4198102951049805, -2.21004319190979, -0.2575261890888214, -0.8164865374565125, 0.024635648354887962, -0.6273241639137268, -1.019738793373108, 1.638754963874817, 0.40250369906425476, -1.2906285524368286, -0.3051801323890686, -0.32600757479667664, -0.6075274348258972, 2.6496870517730713, -1.2857242822647095, -0.20354434847831726, -1.0702570676803589, -0.653813898563385, 1.628574252128601, -1.2642112970352173, -0.21437396109104156, -0.9642095565795898, -0.5895847678184509, -1.286691665649414, -0.5082114934921265, 0.04962300509214401, -0.9415860176086426, 0.8259120583534241, 0.2555787265300751, -1.1671652793884277, -0.406744122505188, -0.7962384819984436, 0.9902085661888123, -0.14977239072322845, 0.2249128520488739, 1.7644866704940796, 0.36117279529571533, -0.3595455288887024, 0.7715727686882019, 1.1586179733276367, 0.6319950819015503, -0.6604403853416443, 0.10215853154659271, -0.7922356724739075, 0.32968300580978394, -1.3371539115905762, 0.3179503381252289, -2.9154443740844727, 0.6417971253395081, -0.09462624788284302, -0.05470806360244751, -0.09361489117145538, -1.3429747819900513, 1.098833441734314, 2.6456501483917236, -1.2073792219161987, 0.49626994132995605, 0.3575000464916229, 1.1375997066497803, -1.6289474964141846, 0.383324533700943, -0.46039703488349915, 2.0644547939300537, 0.21809644997119904, 1.3352748155593872, -0.5173345804214478, -2.424109935760498, 0.6350429654121399, -1.3017736673355103, -1.166090726852417, 0.7902131080627441, -0.9504687786102295, 0.07987719774246216, -1.3816266059875488, -0.27841973304748535, -0.8752079606056213, -1.1560187339782715, 0.7259415984153748, 0.2035028487443924, 0.3908558487892151, -0.6120080947875977, 0.36395952105522156, -2.2385034561157227, -1.3169564008712769, -0.2281372994184494, -0.967816948890686, 0.5055221319198608, -0.44776830077171326, 0.6398690342903137, -0.11477877199649811, 0.021150387823581696, 0.4041261076927185, 1.5212076902389526, 3.428434371948242, 0.326408714056015, 0.3649306297302246, -0.09787912666797638, -0.9206802845001221, 1.4469133615493774, 0.8756110072135925, -0.14920473098754883, -0.5361266732215881, -1.0644060373306274, 1.2327035665512085, 1.919386386871338, 0.9991396069526672, -0.049914710223674774, -0.8591791987419128, -0.7245702147483826, -0.07376670092344284, 0.1239759773015976, 0.5201033353805542, 0.8681148886680603, 0.08586233109235764, 0.10419103503227234, 1.4660353660583496, 1.1555522680282593, -0.37787556648254395, 0.29080653190612793, -0.8911755681037903, -0.45581352710723877, 0.4900673031806946, 0.29889610409736633, -0.08479337394237518, 0.47054585814476013, -1.0200111865997314, -0.17394468188285828, -0.3727533519268036, -0.881012499332428, -0.719036877155304, -0.41330084204673767, -0.36058324575424194, 1.6174519062042236, 0.12029166519641876, -0.594415545463562, -0.024770205840468407, -0.7107428908348083, -0.23848240077495575, -1.116622805595398, 0.22873301804065704, -0.10674893856048584, -0.08138226717710495, -0.16828158497810364, 1.7529723644256592, -0.9345071911811829, -2.0951857566833496, 0.23815466463565826, 0.20706789195537567, -0.26977071166038513, 0.18538634479045868, 1.6730676889419556, 0.4651373624801636, 1.388505220413208, 1.3125098943710327, 0.9780656099319458, -0.6666945219039917, -1.3303126096725464, 0.8043810129165649, 0.9776833653450012, -1.366506814956665, 0.8080549240112305, 0.009888431057333946, -0.49815109372138977, 0.6536775231361389, 1.230841875076294, 0.5147008299827576, -2.0216622352600098, 0.7935599684715271, -1.0930877923965454, 0.7954343557357788, 0.811789333820343, 0.6796503663063049, 0.18387238681316376, 0.8911120295524597, -1.2798254489898682, -1.0990920066833496, -0.6776227355003357, -0.7693110704421997, 1.932209849357605, -0.32777121663093567, 0.6835402250289917, -0.20174548029899597, -1.238667607307434, -0.12717033922672272, 0.7084158062934875, 0.27610522508621216, -0.47009041905403137, 0.804460346698761, -0.6100078821182251, -1.062215805053711, -1.3800183534622192, -0.4420214593410492, -1.054805040359497, -0.903128981590271, 1.0341827869415283, 0.7183678150177002, 0.2135562151670456, 1.8174901008605957, 0.6992599964141846, 0.2566520571708679, -2.661717414855957, 0.8028326630592346, 0.21400929987430573, -0.02998742274940014, 0.819933295249939, 0.32148709893226624, 1.0113298892974854, 0.17347083985805511, 0.5258371233940125, -2.5248377323150635, 2.3161537647247314, -0.22551017999649048, 0.6632574200630188, -0.07824307680130005, -0.2330964207649231, 1.201246976852417, 0.6187177896499634, 0.5115250945091248, -1.090790033340454, 0.6526623368263245, -0.5713430047035217, 1.1911399364471436, 0.7660372853279114, -0.7837318181991577, -0.07295310497283936, 1.4253684282302856, 0.4643060863018036, -0.5207448601722717, -0.9334186315536499, -0.9622027277946472, 0.9797672033309937, 1.6956710815429688, -0.05385897308588028, -0.0524403378367424, 0.735986590385437, 0.6957228779792786, -1.1918704509735107, 0.04495735466480255, -0.5956936478614807, -0.7703225612640381, 1.646741509437561, 2.096513271331787, -0.1826598048210144, -0.15007415413856506, -0.7449532151222229, -1.1588056087493896, 0.8022423386573792, -0.06277991831302643, 0.017141830176115036, 0.6048493981361389, -0.6680243015289307, 1.0621111392974854, 0.9077872037887573, 0.9765607118606567, 0.2168339043855667, 0.27940937876701355, 0.36330893635749817, -0.3652726709842682, -1.1688822507858276, -0.16480819880962372, -1.159109115600586, -2.545684576034546, 0.37864163517951965, -0.20322300493717194, -1.419768214225769, 0.07205023616552353, -1.047114372253418, 0.9556488990783691, -0.6428582072257996, -1.1424083709716797, -1.5549808740615845, 0.15641488134860992, -0.044930920004844666, 0.8910064697265625, -1.5570595264434814, -0.13095854222774506, 1.2123427391052246, 0.8228396773338318, -0.644338071346283, 1.0232443809509277, 0.169333353638649, 0.981563150882721, 0.8397886157035828, -0.3246525526046753, 0.5891821980476379, 0.06677228957414627, -1.3586013317108154, 0.47915321588516235, 1.196104645729065, 0.1881761997938156, 1.5304546356201172, -0.5006389021873474, 0.03687586635351181, 0.36752739548683167, -0.6369158625602722, -0.52562016248703, -0.42565298080444336, 0.6634657979011536, 0.1248880922794342, -0.8869314789772034, 0.017628975212574005, -0.07805053889751434, -0.27870914340019226, 0.1790892630815506, -1.5482509136199951, -0.2350754737854004, -0.39637163281440735, -0.5812478065490723, -1.2711482048034668, -0.02674308605492115, 1.5220472812652588, -0.7290046215057373, -0.23662495613098145, 0.5462004542350769, 0.36825546622276306, 0.5155212879180908, 0.6261498928070068, -0.7141633033752441, -0.25926682353019714, -0.2550375163555145, -0.24902644753456116, 0.3715338706970215, 1.3438754081726074, -0.12151556462049484, -0.8977120518684387, 0.6862813234329224, -0.31578320264816284, 0.08841583877801895, 1.902022361755371, 0.11286021023988724, -0.7380821704864502, 0.3185040354728699, -0.7746232151985168, 1.9529197216033936, 1.7635668516159058, 1.2985366582870483, -0.10797331482172012, -0.9726760983467102, 0.5222362279891968, -0.37134698033332825, -0.3978215754032135, 0.8637933731079102, 0.4623246490955353, -0.23285453021526337, -1.416683316230774, 0.6756718754768372, 1.2177833318710327, -0.8703461289405823, -0.8345470428466797, 0.16886045038700104, -0.7703132033348083, 1.0840922594070435, 0.569025993347168, 0.32870832085609436, 0.27682924270629883, 1.653287649154663, 0.7956596612930298, -0.40687403082847595, 0.599983274936676, 0.4752320945262909, -0.12566176056861877, -2.076564311981201, -1.2207995653152466, 0.30297377705574036, -0.5420041084289551, -1.5229207277297974, 1.3560397624969482, -1.059923529624939, -0.9792155027389526, 0.5990341305732727, 0.06171610206365585, 1.4261537790298462, 0.3943970799446106, 1.5840531587600708, 2.054042100906372, 0.8279854655265808, 0.34888359904289246, 1.299117922782898, -0.16481351852416992, -0.49221956729888916, 1.8628456592559814, -0.41843336820602417, 0.4307821989059448, 1.1313064098358154, -0.3251403868198395, -1.0945124626159668, -0.8138871788978577, -1.2526289224624634, -0.6588881015777588, 1.1025840044021606, 0.1557273119688034, -1.112207293510437, 0.23029999434947968, 1.5020512342453003, 0.1715625822544098, -0.1872936636209488, 0.645148515701294, 0.4486329257488251, -0.8699912428855896, -0.06514398753643036, -0.8897889256477356, 0.5150067210197449, -0.2873986065387726, -0.37093064188957214, 0.2814584970474243, 0.5474342703819275, 1.2823420763015747, -0.058637045323848724, 0.09281469881534576, 1.1315771341323853, -1.433056116104126, 1.421007513999939, -0.752429723739624, 0.3401699960231781, -2.3758223056793213, 1.3089460134506226, -0.7292852997779846, 2.009026527404785, -2.6188480854034424, 0.40457776188850403, -0.6510143280029297, -0.5459246635437012, 0.36237525939941406, -0.38873937726020813, 0.15865056216716766, -0.14371241629123688, -1.066032886505127, -0.02020213007926941, -0.664858341217041, 0.6238486170768738, 1.1054966449737549, 1.3915108442306519, -1.1460764408111572, -0.30621567368507385, -1.7611271142959595, -0.1619202047586441, -0.7081156969070435, 0.3218226432800293, -1.978692650794983, -0.17839045822620392, -1.9256722927093506, -2.3121140003204346, -1.272071123123169, -0.7780624628067017, 1.0491899251937866, 0.14488142728805542, -0.8340746760368347, 1.1892963647842407, -0.3687296509742737, -1.7758772373199463, 1.1105529069900513, -2.191962480545044 ]
https://github.com/huggingface/datasets/issues/5506
IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs
This is the full set of training args passed. No training args were changed when switching dataset types. ```python training_args = TrainingArguments( output_dir="./checkpoints", overwrite_output_dir=True, num_train_epochs=1, per_device_train_batch_size=256, save_steps=2000, save_total_limit=4, prediction_loss_only=True, report_to='none', gradient_accumulation_steps=6, fp16=True, max_steps=60000, lr_scheduler_type='linear', warmup_ratio=0.1, logging_steps=100, weight_decay=0.01, adam_beta1=0.9, adam_beta2=0.98, adam_epsilon=1e-6, learning_rate=1e-4 ) ```
### Describe the bug I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256. Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous shards and passing those to an `IterableDataset`. I observed an unexpected drop in GPU memory utilization, and found the batch size returned from the model had been cut in half. When using `Trainer` with 2 GPUs and a batch size of 256, `Dataset` returns a batch of size 512 (256 per GPU), while `IterableDataset` returns a batch size of 256 (256 total). My guess is `IterableDataset` isn't accounting for multiple cards. ### Steps to reproduce the bug ```python import datasets from datasets import IterableDataset from transformers import RobertaConfig from transformers import RobertaTokenizerFast from transformers import RobertaForMaskedLM from transformers import DataCollatorForLanguageModeling from transformers import Trainer, TrainingArguments use_iterable_dataset = True def gen_from_shards(shards): for shard in shards: for example in shard: yield example dataset = datasets.load_from_disk('my_dataset.hf') if use_iterable_dataset: n_shards = 100 shards = [dataset.shard(num_shards=n_shards, index=i) for i in range(n_shards)] dataset = IterableDataset.from_generator(gen_from_shards, gen_kwargs={"shards": shards}) tokenizer = RobertaTokenizerFast.from_pretrained("./my_tokenizer", max_len=160, use_fast=True) config = RobertaConfig( vocab_size=8248, max_position_embeddings=256, num_attention_heads=8, num_hidden_layers=6, type_vocab_size=1) model = RobertaForMaskedLM(config=config) data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15) training_args = TrainingArguments( per_device_train_batch_size=256 # other args removed for brevity ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=dataset, ) trainer.train() ``` ### Expected behavior Expected `Dataset` and `IterableDataset` to have the same batch size behavior. If the current behavior is intentional, the batch size printout at the start of training should be updated. Currently, both dataset classes result in `Trainer` printing the same total batch size, even though the batch size sent to the GPUs are different. ### Environment info datasets 2.7.1 transformers 4.25.1
307
43
IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs ### Describe the bug I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256. Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous shards and passing those to an `IterableDataset`. I observed an unexpected drop in GPU memory utilization, and found the batch size returned from the model had been cut in half. When using `Trainer` with 2 GPUs and a batch size of 256, `Dataset` returns a batch of size 512 (256 per GPU), while `IterableDataset` returns a batch size of 256 (256 total). My guess is `IterableDataset` isn't accounting for multiple cards. ### Steps to reproduce the bug ```python import datasets from datasets import IterableDataset from transformers import RobertaConfig from transformers import RobertaTokenizerFast from transformers import RobertaForMaskedLM from transformers import DataCollatorForLanguageModeling from transformers import Trainer, TrainingArguments use_iterable_dataset = True def gen_from_shards(shards): for shard in shards: for example in shard: yield example dataset = datasets.load_from_disk('my_dataset.hf') if use_iterable_dataset: n_shards = 100 shards = [dataset.shard(num_shards=n_shards, index=i) for i in range(n_shards)] dataset = IterableDataset.from_generator(gen_from_shards, gen_kwargs={"shards": shards}) tokenizer = RobertaTokenizerFast.from_pretrained("./my_tokenizer", max_len=160, use_fast=True) config = RobertaConfig( vocab_size=8248, max_position_embeddings=256, num_attention_heads=8, num_hidden_layers=6, type_vocab_size=1) model = RobertaForMaskedLM(config=config) data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15) training_args = TrainingArguments( per_device_train_batch_size=256 # other args removed for brevity ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=dataset, ) trainer.train() ``` ### Expected behavior Expected `Dataset` and `IterableDataset` to have the same batch size behavior. If the current behavior is intentional, the batch size printout at the start of training should be updated. Currently, both dataset classes result in `Trainer` printing the same total batch size, even though the batch size sent to the GPUs are different. ### Environment info datasets 2.7.1 transformers 4.25.1 This is the full set of training args passed. No training args were changed when switching dataset types. ```python training_args = TrainingArguments( output_dir="./checkpoints", overwrite_output_dir=True, num_train_epochs=1, per_device_train_batch_size=256, save_steps=2000, save_total_limit=4, prediction_loss_only=True, report_to='none', gradient_accumulation_steps=6, fp16=True, max_steps=60000, lr_scheduler_type='linear', warmup_ratio=0.1, logging_steps=100, weight_decay=0.01, adam_beta1=0.9, adam_beta2=0.98, adam_epsilon=1e-6, learning_rate=1e-4 ) ```
[ -1.330300211906433, -1.0070868730545044, -0.7057075500488281, 1.541914939880371, -0.20247779786586761, -1.204946756362915, 0.18128500878810883, -1.0793545246124268, 1.6051658391952515, -0.857101559638977, 0.3794158399105072, -1.6458162069320679, 0.10278196632862091, -0.5253657102584839, -0.732692301273346, -0.8835270404815674, -0.4666351079940796, -0.8129115700721741, 1.0569967031478882, 2.4064033031463623, 1.2805927991867065, -1.3345305919647217, 2.727155923843384, 0.7059481143951416, -0.2552754282951355, -1.0400303602218628, 0.5262213945388794, 0.06648530811071396, -1.2846003770828247, -0.517024040222168, -0.8779680728912354, -0.045043766498565674, -0.553604006767273, -0.4806723892688751, -0.013438746333122253, 0.4373433291912079, -0.23067067563533783, -0.3915261924266815, -0.4588215947151184, -0.7784079313278198, 0.499377965927124, -0.3882030248641968, 0.9341704249382019, -0.3141300678253174, 1.8320337533950806, -0.5388620495796204, 0.5026477575302124, 0.7517757415771484, 1.3438777923583984, 0.171829491853714, -0.010076219215989113, 0.2971275746822357, 0.35950568318367004, -0.09644041210412979, 0.4878503978252411, 1.1479557752609253, 0.643693745136261, 0.5491988658905029, 0.752405047416687, -2.257356643676758, 1.371885061264038, -1.110887885093689, 0.3945104479789734, 1.3003376722335815, -0.9186447262763977, 0.366359144449234, -1.748071312904358, -0.05786213278770447, 0.5709447860717773, -2.214942693710327, 0.2947036623954773, -1.2850793600082397, -0.477752149105072, 1.0572335720062256, 0.34068265557289124, -1.2368863821029663, 0.18926358222961426, -0.4416259229183197, 1.1098206043243408, 0.4742520749568939, 1.0590159893035889, -1.6518778800964355, -0.02899257466197014, -0.24265752732753754, 0.13574731349945068, -1.3127281665802002, -1.5620167255401611, 0.547944188117981, 0.5449100136756897, 0.6199785470962524, -0.12813177704811096, 1.1226862668991089, -0.9685429334640503, 0.7628755569458008, -1.0531370639801025, -1.5861124992370605, -1.4121575355529785, -2.2857179641723633, -2.2676148414611816, 0.7188959121704102, -0.4889272451400757, -0.6309847831726074, 2.0428197383880615, -1.0568187236785889, -1.7743252515792847, 1.1218187808990479, 0.2471432089805603, 0.045313604176044464, 2.317101001739502, 0.17753925919532776, -0.6922691464424133, 0.3505401611328125, -0.776167631149292, 0.8279404044151306, -0.38506028056144714, 1.3741776943206787, 0.4722118675708771, -1.0450235605239868, 1.545751690864563, -0.3862294852733612, 0.535862386226654, -0.6677117943763733, -0.5802339911460876, -0.8576282262802124, 0.29276904463768005, 1.8755297660827637, -0.2917478084564209, 1.4932008981704712, -0.3747316002845764, -1.6039587259292603, -1.6290074586868286, 0.8732726573944092, 0.4779943525791168, -0.7530608773231506, 0.12532168626785278, -0.3823017477989197, 0.10132630169391632, -0.09225846081972122, 1.1097773313522339, 1.1790999174118042, 0.7350666522979736, -0.4257865250110626, -0.8323723673820496, 0.22560417652130127, -0.04087673872709274, -0.7060409188270569, -1.797329068183899, -0.34599918127059937, 0.11464385688304901, 0.6674525737762451, -1.1192868947982788, 1.7680357694625854, 0.9461258053779602, 1.930243730545044, 1.0114103555679321, -0.3754332661628723, 1.4427546262741089, 0.08728145062923431, 1.7740792036056519, -0.498390793800354, 0.6827315092086792, -0.3576193153858185, -1.1798092126846313, 0.8619272708892822, -0.33113712072372437, -2.0549123287200928, -0.8423274755477905, -0.7469790577888489, -0.1610528975725174, -0.8587328195571899, 0.9930679202079773, -0.3126530945301056, -1.4952833652496338, 0.1899760514497757, -0.602672278881073, 0.2998020350933075, -1.128642201423645, 0.33727166056632996, 0.695479154586792, -0.6219732761383057, 0.08772985637187958, -0.24224428832530975, -1.2248247861862183, -0.5177403092384338, 0.317472904920578, 1.8503884077072144, -0.7107067108154297, 0.9708203077316284, 1.0600413084030151, -0.6766783595085144, 0.029985154047608376, 0.2637501358985901, -0.21423381567001343, 0.8105876445770264, -1.0167646408081055, -0.4705122709274292, 1.3156849145889282, -0.26311442255973816, -0.5845087170600891, 1.574092984199524, 0.7099491357803345, -0.9703527688980103, -0.17734460532665253, -0.21650031208992004, -0.8940155506134033, -0.014809081330895424, -1.5060051679611206, -0.005578790325671434, 0.4356953203678131, -1.527254343032837, -0.3879658579826355, -0.19953568279743195, 1.293247103691101, -0.20491249859333038, 1.4713670015335083, -0.33192113041877747, -0.18867507576942444, -0.27422013878822327, -0.29022231698036194, 0.20056815445423126, -0.1876639425754547, -0.6320105195045471, 0.17546500265598297, -0.7900084853172302, 0.4211917221546173, 1.4241727590560913, 0.3484375476837158, 0.017816754058003426, 0.4198225438594818, 1.1265461444854736, 0.3675084710121155, -0.0660940557718277, -0.8811236619949341, -1.5201473236083984, 1.9879674911499023, -1.4712932109832764, 1.9578814506530762, 0.7781879305839539, -0.039750322699546814, -1.7308917045593262, -1.7278013229370117, 1.2870725393295288, 1.215645670890808, 2.3574540615081787, 0.5849915742874146, 0.3681792914867401, -0.8855059146881104, -0.6784647703170776, 0.33094197511672974, -1.0542361736297607, -0.632020890712738, 0.14193780720233917, 2.297379970550537, 1.8657586574554443, -0.40756499767303467, -0.1517937034368515, -1.0125300884246826, 1.3692536354064941, -0.24158908426761627, 0.2424629032611847, 2.0079524517059326, -0.23749147355556488, -1.0619620084762573, 1.387087106704712, -2.3952441215515137, 0.1593218892812729, 2.03705096244812, 0.3096327483654022, 0.07354112714529037, -1.4076379537582397, -0.6072229146957397, -0.34579285979270935, -0.4038585424423218, -1.3032052516937256, 0.5056120157241821, -0.2624976336956024, -0.7119390368461609, -1.3926888704299927, 0.22562186419963837, -1.1112104654312134, -1.6475129127502441, 0.3123587965965271, 1.8638421297073364, 2.027223825454712, -0.6887818574905396, 1.5082437992095947, -0.3215019106864929, 0.2108662724494934, 1.2600895166397095, 1.3040522336959839, 3.023986339569092, 1.8720173835754395, -1.3373404741287231, 0.6535206437110901, -0.19551174342632294, -0.5455184578895569, 1.1480730772018433, -1.2784467935562134, 1.27271568775177, -0.05497405678033829, -1.223375678062439, -1.2800496816635132, 0.9804906845092773, 0.4283725321292877, 0.18981017172336578, -0.5458464026451111, 1.2647514343261719, 0.02238844521343708, 1.3488571643829346, 0.5701412558555603, -0.4027180075645447, 0.5376245379447937, -0.42777660489082336, -0.5594948530197144, 1.5412349700927734, 0.16339874267578125, -1.4198102951049805, -2.21004319190979, -0.2575261890888214, -0.8164865374565125, 0.024635648354887962, -0.6273241639137268, -1.019738793373108, 1.638754963874817, 0.40250369906425476, -1.2906285524368286, -0.3051801323890686, -0.32600757479667664, -0.6075274348258972, 2.6496870517730713, -1.2857242822647095, -0.20354434847831726, -1.0702570676803589, -0.653813898563385, 1.628574252128601, -1.2642112970352173, -0.21437396109104156, -0.9642095565795898, -0.5895847678184509, -1.286691665649414, -0.5082114934921265, 0.04962300509214401, -0.9415860176086426, 0.8259120583534241, 0.2555787265300751, -1.1671652793884277, -0.406744122505188, -0.7962384819984436, 0.9902085661888123, -0.14977239072322845, 0.2249128520488739, 1.7644866704940796, 0.36117279529571533, -0.3595455288887024, 0.7715727686882019, 1.1586179733276367, 0.6319950819015503, -0.6604403853416443, 0.10215853154659271, -0.7922356724739075, 0.32968300580978394, -1.3371539115905762, 0.3179503381252289, -2.9154443740844727, 0.6417971253395081, -0.09462624788284302, -0.05470806360244751, -0.09361489117145538, -1.3429747819900513, 1.098833441734314, 2.6456501483917236, -1.2073792219161987, 0.49626994132995605, 0.3575000464916229, 1.1375997066497803, -1.6289474964141846, 0.383324533700943, -0.46039703488349915, 2.0644547939300537, 0.21809644997119904, 1.3352748155593872, -0.5173345804214478, -2.424109935760498, 0.6350429654121399, -1.3017736673355103, -1.166090726852417, 0.7902131080627441, -0.9504687786102295, 0.07987719774246216, -1.3816266059875488, -0.27841973304748535, -0.8752079606056213, -1.1560187339782715, 0.7259415984153748, 0.2035028487443924, 0.3908558487892151, -0.6120080947875977, 0.36395952105522156, -2.2385034561157227, -1.3169564008712769, -0.2281372994184494, -0.967816948890686, 0.5055221319198608, -0.44776830077171326, 0.6398690342903137, -0.11477877199649811, 0.021150387823581696, 0.4041261076927185, 1.5212076902389526, 3.428434371948242, 0.326408714056015, 0.3649306297302246, -0.09787912666797638, -0.9206802845001221, 1.4469133615493774, 0.8756110072135925, -0.14920473098754883, -0.5361266732215881, -1.0644060373306274, 1.2327035665512085, 1.919386386871338, 0.9991396069526672, -0.049914710223674774, -0.8591791987419128, -0.7245702147483826, -0.07376670092344284, 0.1239759773015976, 0.5201033353805542, 0.8681148886680603, 0.08586233109235764, 0.10419103503227234, 1.4660353660583496, 1.1555522680282593, -0.37787556648254395, 0.29080653190612793, -0.8911755681037903, -0.45581352710723877, 0.4900673031806946, 0.29889610409736633, -0.08479337394237518, 0.47054585814476013, -1.0200111865997314, -0.17394468188285828, -0.3727533519268036, -0.881012499332428, -0.719036877155304, -0.41330084204673767, -0.36058324575424194, 1.6174519062042236, 0.12029166519641876, -0.594415545463562, -0.024770205840468407, -0.7107428908348083, -0.23848240077495575, -1.116622805595398, 0.22873301804065704, -0.10674893856048584, -0.08138226717710495, -0.16828158497810364, 1.7529723644256592, -0.9345071911811829, -2.0951857566833496, 0.23815466463565826, 0.20706789195537567, -0.26977071166038513, 0.18538634479045868, 1.6730676889419556, 0.4651373624801636, 1.388505220413208, 1.3125098943710327, 0.9780656099319458, -0.6666945219039917, -1.3303126096725464, 0.8043810129165649, 0.9776833653450012, -1.366506814956665, 0.8080549240112305, 0.009888431057333946, -0.49815109372138977, 0.6536775231361389, 1.230841875076294, 0.5147008299827576, -2.0216622352600098, 0.7935599684715271, -1.0930877923965454, 0.7954343557357788, 0.811789333820343, 0.6796503663063049, 0.18387238681316376, 0.8911120295524597, -1.2798254489898682, -1.0990920066833496, -0.6776227355003357, -0.7693110704421997, 1.932209849357605, -0.32777121663093567, 0.6835402250289917, -0.20174548029899597, -1.238667607307434, -0.12717033922672272, 0.7084158062934875, 0.27610522508621216, -0.47009041905403137, 0.804460346698761, -0.6100078821182251, -1.062215805053711, -1.3800183534622192, -0.4420214593410492, -1.054805040359497, -0.903128981590271, 1.0341827869415283, 0.7183678150177002, 0.2135562151670456, 1.8174901008605957, 0.6992599964141846, 0.2566520571708679, -2.661717414855957, 0.8028326630592346, 0.21400929987430573, -0.02998742274940014, 0.819933295249939, 0.32148709893226624, 1.0113298892974854, 0.17347083985805511, 0.5258371233940125, -2.5248377323150635, 2.3161537647247314, -0.22551017999649048, 0.6632574200630188, -0.07824307680130005, -0.2330964207649231, 1.201246976852417, 0.6187177896499634, 0.5115250945091248, -1.090790033340454, 0.6526623368263245, -0.5713430047035217, 1.1911399364471436, 0.7660372853279114, -0.7837318181991577, -0.07295310497283936, 1.4253684282302856, 0.4643060863018036, -0.5207448601722717, -0.9334186315536499, -0.9622027277946472, 0.9797672033309937, 1.6956710815429688, -0.05385897308588028, -0.0524403378367424, 0.735986590385437, 0.6957228779792786, -1.1918704509735107, 0.04495735466480255, -0.5956936478614807, -0.7703225612640381, 1.646741509437561, 2.096513271331787, -0.1826598048210144, -0.15007415413856506, -0.7449532151222229, -1.1588056087493896, 0.8022423386573792, -0.06277991831302643, 0.017141830176115036, 0.6048493981361389, -0.6680243015289307, 1.0621111392974854, 0.9077872037887573, 0.9765607118606567, 0.2168339043855667, 0.27940937876701355, 0.36330893635749817, -0.3652726709842682, -1.1688822507858276, -0.16480819880962372, -1.159109115600586, -2.545684576034546, 0.37864163517951965, -0.20322300493717194, -1.419768214225769, 0.07205023616552353, -1.047114372253418, 0.9556488990783691, -0.6428582072257996, -1.1424083709716797, -1.5549808740615845, 0.15641488134860992, -0.044930920004844666, 0.8910064697265625, -1.5570595264434814, -0.13095854222774506, 1.2123427391052246, 0.8228396773338318, -0.644338071346283, 1.0232443809509277, 0.169333353638649, 0.981563150882721, 0.8397886157035828, -0.3246525526046753, 0.5891821980476379, 0.06677228957414627, -1.3586013317108154, 0.47915321588516235, 1.196104645729065, 0.1881761997938156, 1.5304546356201172, -0.5006389021873474, 0.03687586635351181, 0.36752739548683167, -0.6369158625602722, -0.52562016248703, -0.42565298080444336, 0.6634657979011536, 0.1248880922794342, -0.8869314789772034, 0.017628975212574005, -0.07805053889751434, -0.27870914340019226, 0.1790892630815506, -1.5482509136199951, -0.2350754737854004, -0.39637163281440735, -0.5812478065490723, -1.2711482048034668, -0.02674308605492115, 1.5220472812652588, -0.7290046215057373, -0.23662495613098145, 0.5462004542350769, 0.36825546622276306, 0.5155212879180908, 0.6261498928070068, -0.7141633033752441, -0.25926682353019714, -0.2550375163555145, -0.24902644753456116, 0.3715338706970215, 1.3438754081726074, -0.12151556462049484, -0.8977120518684387, 0.6862813234329224, -0.31578320264816284, 0.08841583877801895, 1.902022361755371, 0.11286021023988724, -0.7380821704864502, 0.3185040354728699, -0.7746232151985168, 1.9529197216033936, 1.7635668516159058, 1.2985366582870483, -0.10797331482172012, -0.9726760983467102, 0.5222362279891968, -0.37134698033332825, -0.3978215754032135, 0.8637933731079102, 0.4623246490955353, -0.23285453021526337, -1.416683316230774, 0.6756718754768372, 1.2177833318710327, -0.8703461289405823, -0.8345470428466797, 0.16886045038700104, -0.7703132033348083, 1.0840922594070435, 0.569025993347168, 0.32870832085609436, 0.27682924270629883, 1.653287649154663, 0.7956596612930298, -0.40687403082847595, 0.599983274936676, 0.4752320945262909, -0.12566176056861877, -2.076564311981201, -1.2207995653152466, 0.30297377705574036, -0.5420041084289551, -1.5229207277297974, 1.3560397624969482, -1.059923529624939, -0.9792155027389526, 0.5990341305732727, 0.06171610206365585, 1.4261537790298462, 0.3943970799446106, 1.5840531587600708, 2.054042100906372, 0.8279854655265808, 0.34888359904289246, 1.299117922782898, -0.16481351852416992, -0.49221956729888916, 1.8628456592559814, -0.41843336820602417, 0.4307821989059448, 1.1313064098358154, -0.3251403868198395, -1.0945124626159668, -0.8138871788978577, -1.2526289224624634, -0.6588881015777588, 1.1025840044021606, 0.1557273119688034, -1.112207293510437, 0.23029999434947968, 1.5020512342453003, 0.1715625822544098, -0.1872936636209488, 0.645148515701294, 0.4486329257488251, -0.8699912428855896, -0.06514398753643036, -0.8897889256477356, 0.5150067210197449, -0.2873986065387726, -0.37093064188957214, 0.2814584970474243, 0.5474342703819275, 1.2823420763015747, -0.058637045323848724, 0.09281469881534576, 1.1315771341323853, -1.433056116104126, 1.421007513999939, -0.752429723739624, 0.3401699960231781, -2.3758223056793213, 1.3089460134506226, -0.7292852997779846, 2.009026527404785, -2.6188480854034424, 0.40457776188850403, -0.6510143280029297, -0.5459246635437012, 0.36237525939941406, -0.38873937726020813, 0.15865056216716766, -0.14371241629123688, -1.066032886505127, -0.02020213007926941, -0.664858341217041, 0.6238486170768738, 1.1054966449737549, 1.3915108442306519, -1.1460764408111572, -0.30621567368507385, -1.7611271142959595, -0.1619202047586441, -0.7081156969070435, 0.3218226432800293, -1.978692650794983, -0.17839045822620392, -1.9256722927093506, -2.3121140003204346, -1.272071123123169, -0.7780624628067017, 1.0491899251937866, 0.14488142728805542, -0.8340746760368347, 1.1892963647842407, -0.3687296509742737, -1.7758772373199463, 1.1105529069900513, -2.191962480545044 ]
https://github.com/huggingface/datasets/issues/5506
IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs
Makes sense. Given that it's a `transformers` issue and already being tracked, I'll close this out.
### Describe the bug I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256. Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous shards and passing those to an `IterableDataset`. I observed an unexpected drop in GPU memory utilization, and found the batch size returned from the model had been cut in half. When using `Trainer` with 2 GPUs and a batch size of 256, `Dataset` returns a batch of size 512 (256 per GPU), while `IterableDataset` returns a batch size of 256 (256 total). My guess is `IterableDataset` isn't accounting for multiple cards. ### Steps to reproduce the bug ```python import datasets from datasets import IterableDataset from transformers import RobertaConfig from transformers import RobertaTokenizerFast from transformers import RobertaForMaskedLM from transformers import DataCollatorForLanguageModeling from transformers import Trainer, TrainingArguments use_iterable_dataset = True def gen_from_shards(shards): for shard in shards: for example in shard: yield example dataset = datasets.load_from_disk('my_dataset.hf') if use_iterable_dataset: n_shards = 100 shards = [dataset.shard(num_shards=n_shards, index=i) for i in range(n_shards)] dataset = IterableDataset.from_generator(gen_from_shards, gen_kwargs={"shards": shards}) tokenizer = RobertaTokenizerFast.from_pretrained("./my_tokenizer", max_len=160, use_fast=True) config = RobertaConfig( vocab_size=8248, max_position_embeddings=256, num_attention_heads=8, num_hidden_layers=6, type_vocab_size=1) model = RobertaForMaskedLM(config=config) data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15) training_args = TrainingArguments( per_device_train_batch_size=256 # other args removed for brevity ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=dataset, ) trainer.train() ``` ### Expected behavior Expected `Dataset` and `IterableDataset` to have the same batch size behavior. If the current behavior is intentional, the batch size printout at the start of training should be updated. Currently, both dataset classes result in `Trainer` printing the same total batch size, even though the batch size sent to the GPUs are different. ### Environment info datasets 2.7.1 transformers 4.25.1
307
16
IterableDataset and Dataset return different batch sizes when using Trainer with multiple GPUs ### Describe the bug I am training a Roberta model using 2 GPUs and the `Trainer` API with a batch size of 256. Initially I used a standard `Dataset`, but had issues with slow data loading. After reading [this issue](https://github.com/huggingface/datasets/issues/2252), I swapped to loading my dataset as contiguous shards and passing those to an `IterableDataset`. I observed an unexpected drop in GPU memory utilization, and found the batch size returned from the model had been cut in half. When using `Trainer` with 2 GPUs and a batch size of 256, `Dataset` returns a batch of size 512 (256 per GPU), while `IterableDataset` returns a batch size of 256 (256 total). My guess is `IterableDataset` isn't accounting for multiple cards. ### Steps to reproduce the bug ```python import datasets from datasets import IterableDataset from transformers import RobertaConfig from transformers import RobertaTokenizerFast from transformers import RobertaForMaskedLM from transformers import DataCollatorForLanguageModeling from transformers import Trainer, TrainingArguments use_iterable_dataset = True def gen_from_shards(shards): for shard in shards: for example in shard: yield example dataset = datasets.load_from_disk('my_dataset.hf') if use_iterable_dataset: n_shards = 100 shards = [dataset.shard(num_shards=n_shards, index=i) for i in range(n_shards)] dataset = IterableDataset.from_generator(gen_from_shards, gen_kwargs={"shards": shards}) tokenizer = RobertaTokenizerFast.from_pretrained("./my_tokenizer", max_len=160, use_fast=True) config = RobertaConfig( vocab_size=8248, max_position_embeddings=256, num_attention_heads=8, num_hidden_layers=6, type_vocab_size=1) model = RobertaForMaskedLM(config=config) data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=True, mlm_probability=0.15) training_args = TrainingArguments( per_device_train_batch_size=256 # other args removed for brevity ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=dataset, ) trainer.train() ``` ### Expected behavior Expected `Dataset` and `IterableDataset` to have the same batch size behavior. If the current behavior is intentional, the batch size printout at the start of training should be updated. Currently, both dataset classes result in `Trainer` printing the same total batch size, even though the batch size sent to the GPUs are different. ### Environment info datasets 2.7.1 transformers 4.25.1 Makes sense. Given that it's a `transformers` issue and already being tracked, I'll close this out.
[ -1.330300211906433, -1.0070868730545044, -0.7057075500488281, 1.541914939880371, -0.20247779786586761, -1.204946756362915, 0.18128500878810883, -1.0793545246124268, 1.6051658391952515, -0.857101559638977, 0.3794158399105072, -1.6458162069320679, 0.10278196632862091, -0.5253657102584839, -0.732692301273346, -0.8835270404815674, -0.4666351079940796, -0.8129115700721741, 1.0569967031478882, 2.4064033031463623, 1.2805927991867065, -1.3345305919647217, 2.727155923843384, 0.7059481143951416, -0.2552754282951355, -1.0400303602218628, 0.5262213945388794, 0.06648530811071396, -1.2846003770828247, -0.517024040222168, -0.8779680728912354, -0.045043766498565674, -0.553604006767273, -0.4806723892688751, -0.013438746333122253, 0.4373433291912079, -0.23067067563533783, -0.3915261924266815, -0.4588215947151184, -0.7784079313278198, 0.499377965927124, -0.3882030248641968, 0.9341704249382019, -0.3141300678253174, 1.8320337533950806, -0.5388620495796204, 0.5026477575302124, 0.7517757415771484, 1.3438777923583984, 0.171829491853714, -0.010076219215989113, 0.2971275746822357, 0.35950568318367004, -0.09644041210412979, 0.4878503978252411, 1.1479557752609253, 0.643693745136261, 0.5491988658905029, 0.752405047416687, -2.257356643676758, 1.371885061264038, -1.110887885093689, 0.3945104479789734, 1.3003376722335815, -0.9186447262763977, 0.366359144449234, -1.748071312904358, -0.05786213278770447, 0.5709447860717773, -2.214942693710327, 0.2947036623954773, -1.2850793600082397, -0.477752149105072, 1.0572335720062256, 0.34068265557289124, -1.2368863821029663, 0.18926358222961426, -0.4416259229183197, 1.1098206043243408, 0.4742520749568939, 1.0590159893035889, -1.6518778800964355, -0.02899257466197014, -0.24265752732753754, 0.13574731349945068, -1.3127281665802002, -1.5620167255401611, 0.547944188117981, 0.5449100136756897, 0.6199785470962524, -0.12813177704811096, 1.1226862668991089, -0.9685429334640503, 0.7628755569458008, -1.0531370639801025, -1.5861124992370605, -1.4121575355529785, -2.2857179641723633, -2.2676148414611816, 0.7188959121704102, -0.4889272451400757, -0.6309847831726074, 2.0428197383880615, -1.0568187236785889, -1.7743252515792847, 1.1218187808990479, 0.2471432089805603, 0.045313604176044464, 2.317101001739502, 0.17753925919532776, -0.6922691464424133, 0.3505401611328125, -0.776167631149292, 0.8279404044151306, -0.38506028056144714, 1.3741776943206787, 0.4722118675708771, -1.0450235605239868, 1.545751690864563, -0.3862294852733612, 0.535862386226654, -0.6677117943763733, -0.5802339911460876, -0.8576282262802124, 0.29276904463768005, 1.8755297660827637, -0.2917478084564209, 1.4932008981704712, -0.3747316002845764, -1.6039587259292603, -1.6290074586868286, 0.8732726573944092, 0.4779943525791168, -0.7530608773231506, 0.12532168626785278, -0.3823017477989197, 0.10132630169391632, -0.09225846081972122, 1.1097773313522339, 1.1790999174118042, 0.7350666522979736, -0.4257865250110626, -0.8323723673820496, 0.22560417652130127, -0.04087673872709274, -0.7060409188270569, -1.797329068183899, -0.34599918127059937, 0.11464385688304901, 0.6674525737762451, -1.1192868947982788, 1.7680357694625854, 0.9461258053779602, 1.930243730545044, 1.0114103555679321, -0.3754332661628723, 1.4427546262741089, 0.08728145062923431, 1.7740792036056519, -0.498390793800354, 0.6827315092086792, -0.3576193153858185, -1.1798092126846313, 0.8619272708892822, -0.33113712072372437, -2.0549123287200928, -0.8423274755477905, -0.7469790577888489, -0.1610528975725174, -0.8587328195571899, 0.9930679202079773, -0.3126530945301056, -1.4952833652496338, 0.1899760514497757, -0.602672278881073, 0.2998020350933075, -1.128642201423645, 0.33727166056632996, 0.695479154586792, -0.6219732761383057, 0.08772985637187958, -0.24224428832530975, -1.2248247861862183, -0.5177403092384338, 0.317472904920578, 1.8503884077072144, -0.7107067108154297, 0.9708203077316284, 1.0600413084030151, -0.6766783595085144, 0.029985154047608376, 0.2637501358985901, -0.21423381567001343, 0.8105876445770264, -1.0167646408081055, -0.4705122709274292, 1.3156849145889282, -0.26311442255973816, -0.5845087170600891, 1.574092984199524, 0.7099491357803345, -0.9703527688980103, -0.17734460532665253, -0.21650031208992004, -0.8940155506134033, -0.014809081330895424, -1.5060051679611206, -0.005578790325671434, 0.4356953203678131, -1.527254343032837, -0.3879658579826355, -0.19953568279743195, 1.293247103691101, -0.20491249859333038, 1.4713670015335083, -0.33192113041877747, -0.18867507576942444, -0.27422013878822327, -0.29022231698036194, 0.20056815445423126, -0.1876639425754547, -0.6320105195045471, 0.17546500265598297, -0.7900084853172302, 0.4211917221546173, 1.4241727590560913, 0.3484375476837158, 0.017816754058003426, 0.4198225438594818, 1.1265461444854736, 0.3675084710121155, -0.0660940557718277, -0.8811236619949341, -1.5201473236083984, 1.9879674911499023, -1.4712932109832764, 1.9578814506530762, 0.7781879305839539, -0.039750322699546814, -1.7308917045593262, -1.7278013229370117, 1.2870725393295288, 1.215645670890808, 2.3574540615081787, 0.5849915742874146, 0.3681792914867401, -0.8855059146881104, -0.6784647703170776, 0.33094197511672974, -1.0542361736297607, -0.632020890712738, 0.14193780720233917, 2.297379970550537, 1.8657586574554443, -0.40756499767303467, -0.1517937034368515, -1.0125300884246826, 1.3692536354064941, -0.24158908426761627, 0.2424629032611847, 2.0079524517059326, -0.23749147355556488, -1.0619620084762573, 1.387087106704712, -2.3952441215515137, 0.1593218892812729, 2.03705096244812, 0.3096327483654022, 0.07354112714529037, -1.4076379537582397, -0.6072229146957397, -0.34579285979270935, -0.4038585424423218, -1.3032052516937256, 0.5056120157241821, -0.2624976336956024, -0.7119390368461609, -1.3926888704299927, 0.22562186419963837, -1.1112104654312134, -1.6475129127502441, 0.3123587965965271, 1.8638421297073364, 2.027223825454712, -0.6887818574905396, 1.5082437992095947, -0.3215019106864929, 0.2108662724494934, 1.2600895166397095, 1.3040522336959839, 3.023986339569092, 1.8720173835754395, -1.3373404741287231, 0.6535206437110901, -0.19551174342632294, -0.5455184578895569, 1.1480730772018433, -1.2784467935562134, 1.27271568775177, -0.05497405678033829, -1.223375678062439, -1.2800496816635132, 0.9804906845092773, 0.4283725321292877, 0.18981017172336578, -0.5458464026451111, 1.2647514343261719, 0.02238844521343708, 1.3488571643829346, 0.5701412558555603, -0.4027180075645447, 0.5376245379447937, -0.42777660489082336, -0.5594948530197144, 1.5412349700927734, 0.16339874267578125, -1.4198102951049805, -2.21004319190979, -0.2575261890888214, -0.8164865374565125, 0.024635648354887962, -0.6273241639137268, -1.019738793373108, 1.638754963874817, 0.40250369906425476, -1.2906285524368286, -0.3051801323890686, -0.32600757479667664, -0.6075274348258972, 2.6496870517730713, -1.2857242822647095, -0.20354434847831726, -1.0702570676803589, -0.653813898563385, 1.628574252128601, -1.2642112970352173, -0.21437396109104156, -0.9642095565795898, -0.5895847678184509, -1.286691665649414, -0.5082114934921265, 0.04962300509214401, -0.9415860176086426, 0.8259120583534241, 0.2555787265300751, -1.1671652793884277, -0.406744122505188, -0.7962384819984436, 0.9902085661888123, -0.14977239072322845, 0.2249128520488739, 1.7644866704940796, 0.36117279529571533, -0.3595455288887024, 0.7715727686882019, 1.1586179733276367, 0.6319950819015503, -0.6604403853416443, 0.10215853154659271, -0.7922356724739075, 0.32968300580978394, -1.3371539115905762, 0.3179503381252289, -2.9154443740844727, 0.6417971253395081, -0.09462624788284302, -0.05470806360244751, -0.09361489117145538, -1.3429747819900513, 1.098833441734314, 2.6456501483917236, -1.2073792219161987, 0.49626994132995605, 0.3575000464916229, 1.1375997066497803, -1.6289474964141846, 0.383324533700943, -0.46039703488349915, 2.0644547939300537, 0.21809644997119904, 1.3352748155593872, -0.5173345804214478, -2.424109935760498, 0.6350429654121399, -1.3017736673355103, -1.166090726852417, 0.7902131080627441, -0.9504687786102295, 0.07987719774246216, -1.3816266059875488, -0.27841973304748535, -0.8752079606056213, -1.1560187339782715, 0.7259415984153748, 0.2035028487443924, 0.3908558487892151, -0.6120080947875977, 0.36395952105522156, -2.2385034561157227, -1.3169564008712769, -0.2281372994184494, -0.967816948890686, 0.5055221319198608, -0.44776830077171326, 0.6398690342903137, -0.11477877199649811, 0.021150387823581696, 0.4041261076927185, 1.5212076902389526, 3.428434371948242, 0.326408714056015, 0.3649306297302246, -0.09787912666797638, -0.9206802845001221, 1.4469133615493774, 0.8756110072135925, -0.14920473098754883, -0.5361266732215881, -1.0644060373306274, 1.2327035665512085, 1.919386386871338, 0.9991396069526672, -0.049914710223674774, -0.8591791987419128, -0.7245702147483826, -0.07376670092344284, 0.1239759773015976, 0.5201033353805542, 0.8681148886680603, 0.08586233109235764, 0.10419103503227234, 1.4660353660583496, 1.1555522680282593, -0.37787556648254395, 0.29080653190612793, -0.8911755681037903, -0.45581352710723877, 0.4900673031806946, 0.29889610409736633, -0.08479337394237518, 0.47054585814476013, -1.0200111865997314, -0.17394468188285828, -0.3727533519268036, -0.881012499332428, -0.719036877155304, -0.41330084204673767, -0.36058324575424194, 1.6174519062042236, 0.12029166519641876, -0.594415545463562, -0.024770205840468407, -0.7107428908348083, -0.23848240077495575, -1.116622805595398, 0.22873301804065704, -0.10674893856048584, -0.08138226717710495, -0.16828158497810364, 1.7529723644256592, -0.9345071911811829, -2.0951857566833496, 0.23815466463565826, 0.20706789195537567, -0.26977071166038513, 0.18538634479045868, 1.6730676889419556, 0.4651373624801636, 1.388505220413208, 1.3125098943710327, 0.9780656099319458, -0.6666945219039917, -1.3303126096725464, 0.8043810129165649, 0.9776833653450012, -1.366506814956665, 0.8080549240112305, 0.009888431057333946, -0.49815109372138977, 0.6536775231361389, 1.230841875076294, 0.5147008299827576, -2.0216622352600098, 0.7935599684715271, -1.0930877923965454, 0.7954343557357788, 0.811789333820343, 0.6796503663063049, 0.18387238681316376, 0.8911120295524597, -1.2798254489898682, -1.0990920066833496, -0.6776227355003357, -0.7693110704421997, 1.932209849357605, -0.32777121663093567, 0.6835402250289917, -0.20174548029899597, -1.238667607307434, -0.12717033922672272, 0.7084158062934875, 0.27610522508621216, -0.47009041905403137, 0.804460346698761, -0.6100078821182251, -1.062215805053711, -1.3800183534622192, -0.4420214593410492, -1.054805040359497, -0.903128981590271, 1.0341827869415283, 0.7183678150177002, 0.2135562151670456, 1.8174901008605957, 0.6992599964141846, 0.2566520571708679, -2.661717414855957, 0.8028326630592346, 0.21400929987430573, -0.02998742274940014, 0.819933295249939, 0.32148709893226624, 1.0113298892974854, 0.17347083985805511, 0.5258371233940125, -2.5248377323150635, 2.3161537647247314, -0.22551017999649048, 0.6632574200630188, -0.07824307680130005, -0.2330964207649231, 1.201246976852417, 0.6187177896499634, 0.5115250945091248, -1.090790033340454, 0.6526623368263245, -0.5713430047035217, 1.1911399364471436, 0.7660372853279114, -0.7837318181991577, -0.07295310497283936, 1.4253684282302856, 0.4643060863018036, -0.5207448601722717, -0.9334186315536499, -0.9622027277946472, 0.9797672033309937, 1.6956710815429688, -0.05385897308588028, -0.0524403378367424, 0.735986590385437, 0.6957228779792786, -1.1918704509735107, 0.04495735466480255, -0.5956936478614807, -0.7703225612640381, 1.646741509437561, 2.096513271331787, -0.1826598048210144, -0.15007415413856506, -0.7449532151222229, -1.1588056087493896, 0.8022423386573792, -0.06277991831302643, 0.017141830176115036, 0.6048493981361389, -0.6680243015289307, 1.0621111392974854, 0.9077872037887573, 0.9765607118606567, 0.2168339043855667, 0.27940937876701355, 0.36330893635749817, -0.3652726709842682, -1.1688822507858276, -0.16480819880962372, -1.159109115600586, -2.545684576034546, 0.37864163517951965, -0.20322300493717194, -1.419768214225769, 0.07205023616552353, -1.047114372253418, 0.9556488990783691, -0.6428582072257996, -1.1424083709716797, -1.5549808740615845, 0.15641488134860992, -0.044930920004844666, 0.8910064697265625, -1.5570595264434814, -0.13095854222774506, 1.2123427391052246, 0.8228396773338318, -0.644338071346283, 1.0232443809509277, 0.169333353638649, 0.981563150882721, 0.8397886157035828, -0.3246525526046753, 0.5891821980476379, 0.06677228957414627, -1.3586013317108154, 0.47915321588516235, 1.196104645729065, 0.1881761997938156, 1.5304546356201172, -0.5006389021873474, 0.03687586635351181, 0.36752739548683167, -0.6369158625602722, -0.52562016248703, -0.42565298080444336, 0.6634657979011536, 0.1248880922794342, -0.8869314789772034, 0.017628975212574005, -0.07805053889751434, -0.27870914340019226, 0.1790892630815506, -1.5482509136199951, -0.2350754737854004, -0.39637163281440735, -0.5812478065490723, -1.2711482048034668, -0.02674308605492115, 1.5220472812652588, -0.7290046215057373, -0.23662495613098145, 0.5462004542350769, 0.36825546622276306, 0.5155212879180908, 0.6261498928070068, -0.7141633033752441, -0.25926682353019714, -0.2550375163555145, -0.24902644753456116, 0.3715338706970215, 1.3438754081726074, -0.12151556462049484, -0.8977120518684387, 0.6862813234329224, -0.31578320264816284, 0.08841583877801895, 1.902022361755371, 0.11286021023988724, -0.7380821704864502, 0.3185040354728699, -0.7746232151985168, 1.9529197216033936, 1.7635668516159058, 1.2985366582870483, -0.10797331482172012, -0.9726760983467102, 0.5222362279891968, -0.37134698033332825, -0.3978215754032135, 0.8637933731079102, 0.4623246490955353, -0.23285453021526337, -1.416683316230774, 0.6756718754768372, 1.2177833318710327, -0.8703461289405823, -0.8345470428466797, 0.16886045038700104, -0.7703132033348083, 1.0840922594070435, 0.569025993347168, 0.32870832085609436, 0.27682924270629883, 1.653287649154663, 0.7956596612930298, -0.40687403082847595, 0.599983274936676, 0.4752320945262909, -0.12566176056861877, -2.076564311981201, -1.2207995653152466, 0.30297377705574036, -0.5420041084289551, -1.5229207277297974, 1.3560397624969482, -1.059923529624939, -0.9792155027389526, 0.5990341305732727, 0.06171610206365585, 1.4261537790298462, 0.3943970799446106, 1.5840531587600708, 2.054042100906372, 0.8279854655265808, 0.34888359904289246, 1.299117922782898, -0.16481351852416992, -0.49221956729888916, 1.8628456592559814, -0.41843336820602417, 0.4307821989059448, 1.1313064098358154, -0.3251403868198395, -1.0945124626159668, -0.8138871788978577, -1.2526289224624634, -0.6588881015777588, 1.1025840044021606, 0.1557273119688034, -1.112207293510437, 0.23029999434947968, 1.5020512342453003, 0.1715625822544098, -0.1872936636209488, 0.645148515701294, 0.4486329257488251, -0.8699912428855896, -0.06514398753643036, -0.8897889256477356, 0.5150067210197449, -0.2873986065387726, -0.37093064188957214, 0.2814584970474243, 0.5474342703819275, 1.2823420763015747, -0.058637045323848724, 0.09281469881534576, 1.1315771341323853, -1.433056116104126, 1.421007513999939, -0.752429723739624, 0.3401699960231781, -2.3758223056793213, 1.3089460134506226, -0.7292852997779846, 2.009026527404785, -2.6188480854034424, 0.40457776188850403, -0.6510143280029297, -0.5459246635437012, 0.36237525939941406, -0.38873937726020813, 0.15865056216716766, -0.14371241629123688, -1.066032886505127, -0.02020213007926941, -0.664858341217041, 0.6238486170768738, 1.1054966449737549, 1.3915108442306519, -1.1460764408111572, -0.30621567368507385, -1.7611271142959595, -0.1619202047586441, -0.7081156969070435, 0.3218226432800293, -1.978692650794983, -0.17839045822620392, -1.9256722927093506, -2.3121140003204346, -1.272071123123169, -0.7780624628067017, 1.0491899251937866, 0.14488142728805542, -0.8340746760368347, 1.1892963647842407, -0.3687296509742737, -1.7758772373199463, 1.1105529069900513, -2.191962480545044 ]
https://github.com/huggingface/datasets/issues/5505
PyTorch BatchSampler still loads from Dataset one-by-one
This change seems to come from a few months ago in the PyTorch side. That's good news and it means we may not need to pass a batch_sampler as soon as we add `Dataset.__getitems__` to get the optimal speed :) Thanks for reporting ! Would you like to open a PR to add `__getitems__` and remove this outdated documentation ?
### Describe the bug In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue. I'm not sure if this is a mistake in the docs or the code, but it seems that the only way for a Dataset to be passed a list of indexes by PyTorch (instead of one index at a time) is to define a `__getitems__` method (note the plural) on the Dataset object, and since the HF Dataset doesn't have this, PyTorch executes [this line of code](https://github.com/pytorch/pytorch/blob/master/torch/utils/data/_utils/fetch.py#L58), reverting to fetching one-by-one. ### Steps to reproduce the bug You can put a breakpoint in `Dataset.__getitem__()` or just print the args from there and see that it's called multiple times for a single `next(iter(dataloader))`, even when using the code from the docs: ```py from torch.utils.data.sampler import BatchSampler, RandomSampler batch_sampler = BatchSampler(RandomSampler(ds), batch_size=32, drop_last=False) dataloader = DataLoader(ds, batch_sampler=batch_sampler) ``` ### Expected behavior The expected behaviour would be for it to fetch batches from the dataset, rather than one-by-one. To demonstrate that there is room for improvement: once I have a HF dataset `ds`, if I just add this line: ```py ds.__getitems__ = ds.__getitem__ ``` ...then the time taken to loop over the dataset improves considerably (for wikitext-103, from one minute to 13 seconds with batch size 32). Probably not a big deal in the grand scheme of things, but seems like an easy win. ### 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: 10.0.1 - Pandas version: 1.5.3
308
60
PyTorch BatchSampler still loads from Dataset one-by-one ### Describe the bug In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue. I'm not sure if this is a mistake in the docs or the code, but it seems that the only way for a Dataset to be passed a list of indexes by PyTorch (instead of one index at a time) is to define a `__getitems__` method (note the plural) on the Dataset object, and since the HF Dataset doesn't have this, PyTorch executes [this line of code](https://github.com/pytorch/pytorch/blob/master/torch/utils/data/_utils/fetch.py#L58), reverting to fetching one-by-one. ### Steps to reproduce the bug You can put a breakpoint in `Dataset.__getitem__()` or just print the args from there and see that it's called multiple times for a single `next(iter(dataloader))`, even when using the code from the docs: ```py from torch.utils.data.sampler import BatchSampler, RandomSampler batch_sampler = BatchSampler(RandomSampler(ds), batch_size=32, drop_last=False) dataloader = DataLoader(ds, batch_sampler=batch_sampler) ``` ### Expected behavior The expected behaviour would be for it to fetch batches from the dataset, rather than one-by-one. To demonstrate that there is room for improvement: once I have a HF dataset `ds`, if I just add this line: ```py ds.__getitems__ = ds.__getitem__ ``` ...then the time taken to loop over the dataset improves considerably (for wikitext-103, from one minute to 13 seconds with batch size 32). Probably not a big deal in the grand scheme of things, but seems like an easy win. ### 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: 10.0.1 - Pandas version: 1.5.3 This change seems to come from a few months ago in the PyTorch side. That's good news and it means we may not need to pass a batch_sampler as soon as we add `Dataset.__getitems__` to get the optimal speed :) Thanks for reporting ! Would you like to open a PR to add `__getitems__` and remove this outdated documentation ?
[ -1.2740635871887207, -0.9522457718849182, -0.8109618425369263, 1.4744322299957275, -0.08666042983531952, -1.3567854166030884, 0.14825250208377838, -1.0554382801055908, 1.7112696170806885, -0.830684244632721, 0.2660365104675293, -1.6319947242736816, 0.12265457957983017, -0.5992708206176758, -0.7478147149085999, -0.8951549530029297, -0.37660232186317444, -0.8387705683708191, 1.1057120561599731, 2.4588546752929688, 1.200115442276001, -1.3629870414733887, 2.743192672729492, 0.7375364899635315, -0.22646303474903107, -1.0628576278686523, 0.43522143363952637, -0.1086094006896019, -1.27439546585083, -0.5231581330299377, -0.928102433681488, -0.08268439024686813, -0.5579121708869934, -0.555807888507843, 0.009571431204676628, 0.5018447041511536, -0.32252395153045654, -0.38289159536361694, -0.5343741178512573, -0.7667842507362366, 0.42678436636924744, -0.36741557717323303, 0.9075946807861328, -0.266249418258667, 1.8445138931274414, -0.5153849720954895, 0.4646424353122711, 0.6626330018043518, 1.4087300300598145, 0.21303635835647583, -0.05918680131435394, 0.26779845356941223, 0.24414968490600586, -0.07042588293552399, 0.5640941262245178, 1.1659376621246338, 0.6699814796447754, 0.5366984009742737, 0.6808018088340759, -2.234917640686035, 1.3316537141799927, -0.9917369484901428, 0.3291182518005371, 1.3851304054260254, -0.9752345085144043, 0.3347621262073517, -1.7391161918640137, -0.05103299021720886, 0.5839574933052063, -2.199469804763794, 0.27437087893486023, -1.2558517456054688, -0.473392128944397, 1.002955436706543, 0.343257337808609, -1.2500094175338745, 0.1638839989900589, -0.4395078420639038, 1.1157740354537964, 0.4504551887512207, 1.1670804023742676, -1.69745671749115, -0.05766848474740982, -0.22063884139060974, 0.13288713991641998, -1.2878628969192505, -1.5699670314788818, 0.5896463990211487, 0.5892331600189209, 0.5841555595397949, -0.1051604300737381, 1.0988144874572754, -0.9882992506027222, 0.7716488242149353, -0.9553697109222412, -1.6829802989959717, -1.3714542388916016, -2.2802093029022217, -2.3544561862945557, 0.7835457921028137, -0.4675610363483429, -0.5929284691810608, 2.140148401260376, -1.0414129495620728, -1.7741363048553467, 1.1597689390182495, 0.2980054020881653, 0.03598646819591522, 2.3972442150115967, 0.22368064522743225, -0.7579838037490845, 0.455863356590271, -0.6752174496650696, 0.8334265351295471, -0.42640072107315063, 1.2976938486099243, 0.4403837025165558, -1.0103707313537598, 1.5471900701522827, -0.4097543954849243, 0.5947389602661133, -0.73686283826828, -0.4724524915218353, -0.7444366812705994, 0.425898939371109, 1.8849031925201416, -0.3791537582874298, 1.5971418619155884, -0.3977747857570648, -1.44391667842865, -1.5796059370040894, 0.9301976561546326, 0.44265151023864746, -0.8273853659629822, 0.14707909524440765, -0.46063634753227234, 0.1631147861480713, -0.1023315042257309, 1.0934251546859741, 1.3024883270263672, 0.5815829634666443, -0.4432256817817688, -0.9012848138809204, 0.19492687284946442, -0.1457810401916504, -0.6948109865188599, -1.7445749044418335, -0.291905015707016, 0.17188258469104767, 0.6202013492584229, -1.1408494710922241, 1.798446774482727, 0.7870254516601562, 1.9769741296768188, 0.9817028641700745, -0.37184011936187744, 1.4906806945800781, 0.12238388508558273, 1.8646609783172607, -0.5397392511367798, 0.6292708516120911, -0.3143942952156067, -1.1170562505722046, 0.8478955030441284, -0.33742591738700867, -2.0115203857421875, -0.6669330596923828, -0.7484644651412964, -0.18713244795799255, -0.7762133479118347, 0.8605181574821472, -0.307270884513855, -1.4605497121810913, 0.26820024847984314, -0.7191405296325684, 0.17223285138607025, -1.242845058441162, 0.29304078221321106, 0.6973569393157959, -0.5607688426971436, 0.056279994547367096, -0.28005969524383545, -1.3071209192276, -0.49957549571990967, 0.30387571454048157, 1.8087877035140991, -0.7189295887947083, 0.91794353723526, 1.0525161027908325, -0.6856940984725952, -0.03346103057265282, 0.34726086258888245, -0.3026522696018219, 0.9203453660011292, -1.047333836555481, -0.4414862394332886, 1.22523832321167, -0.22786898910999298, -0.6274656057357788, 1.468371868133545, 0.763728141784668, -1.011174201965332, -0.14003631472587585, -0.11608366668224335, -0.8892926573753357, 0.08325967192649841, -1.640421748161316, -0.12108343094587326, 0.4164283573627472, -1.4705092906951904, -0.4265669286251068, -0.15916435420513153, 1.1863455772399902, -0.19058510661125183, 1.44981050491333, -0.4253881573677063, -0.1387040913105011, -0.3381805717945099, -0.3761996328830719, 0.08372920751571655, -0.16809310019016266, -0.5076242685317993, 0.1679603010416031, -0.7502735257148743, 0.3403640389442444, 1.396533489227295, 0.3557499051094055, 0.10628048330545425, 0.4982295632362366, 1.1565598249435425, 0.3525013327598572, 0.002172280102968216, -0.8718411326408386, -1.5225775241851807, 1.9240913391113281, -1.4548574686050415, 2.0268466472625732, 0.8479447364807129, -0.01946156471967697, -1.6812405586242676, -1.8399524688720703, 1.3618192672729492, 1.1298860311508179, 2.322103977203369, 0.5059617161750793, 0.3866996467113495, -0.8309767842292786, -0.7101361155509949, 0.35604700446128845, -0.9180920720100403, -0.7001097798347473, 0.12094248086214066, 2.384086847305298, 1.8442809581756592, -0.3563074767589569, -0.19460894167423248, -0.9694173336029053, 1.4047640562057495, -0.2858293056488037, 0.20846329629421234, 1.9858676195144653, -0.24711717665195465, -0.9565303325653076, 1.2843066453933716, -2.4244513511657715, 0.1564331352710724, 2.004772901535034, 0.24131089448928833, 0.06690522283315659, -1.3287255764007568, -0.6235535144805908, -0.22107483446598053, -0.3699009120464325, -1.2014055252075195, 0.47281014919281006, -0.3364977240562439, -0.6936852931976318, -1.4355677366256714, 0.192454531788826, -1.1090885400772095, -1.644214391708374, 0.21891459822654724, 1.9184478521347046, 2.035004138946533, -0.7440891861915588, 1.5304025411605835, -0.3306836187839508, 0.1675363928079605, 1.2128204107284546, 1.240361213684082, 3.0792973041534424, 1.8919779062271118, -1.3756223917007446, 0.5817863941192627, -0.15290364623069763, -0.5299694538116455, 1.1858186721801758, -1.16386079788208, 1.2581571340560913, -0.12506423890590668, -1.2472620010375977, -1.3223322629928589, 1.0263159275054932, 0.4995742440223694, 0.10217524319887161, -0.5481563210487366, 1.2429733276367188, 0.03501302748918533, 1.2763971090316772, 0.5649321675300598, -0.42886340618133545, 0.6272503733634949, -0.3364138901233673, -0.5488088726997375, 1.5562344789505005, 0.195983424782753, -1.376570224761963, -2.2220494747161865, -0.2576596736907959, -0.8220540285110474, 0.023031482473015785, -0.7197508215904236, -1.0392619371414185, 1.6149346828460693, 0.37899723649024963, -1.232386589050293, -0.29984551668167114, -0.36858299374580383, -0.6260860562324524, 2.6427371501922607, -1.3570077419281006, -0.2196405827999115, -1.029685139656067, -0.5516490936279297, 1.5893892049789429, -1.1793566942214966, -0.2243673950433731, -1.05022394657135, -0.6384265422821045, -1.1956241130828857, -0.47701796889305115, -0.05894693732261658, -0.887900173664093, 0.8075908422470093, 0.18914252519607544, -1.223759651184082, -0.2738598883152008, -0.8240053057670593, 0.9391671419143677, -0.21352656185626984, 0.14573733508586884, 1.879694938659668, 0.3669651448726654, -0.46825385093688965, 0.7754479646682739, 1.1509991884231567, 0.5668382048606873, -0.6151524782180786, 0.21079406142234802, -0.6869995594024658, 0.3972768187522888, -1.2859432697296143, 0.26928582787513733, -2.8728480339050293, 0.6246635913848877, -0.05817801505327225, -0.07007205486297607, -0.07108509540557861, -1.3892663717269897, 1.0170284509658813, 2.6696128845214844, -1.0802525281906128, 0.465665340423584, 0.3449766933917999, 1.2842200994491577, -1.69900381565094, 0.25382354855537415, -0.45578429102897644, 2.046024799346924, 0.16290876269340515, 1.218258261680603, -0.5124916434288025, -2.338203191757202, 0.5797174572944641, -1.2899049520492554, -1.1084712743759155, 0.8623931407928467, -0.8786172866821289, 0.14638246595859528, -1.4057241678237915, -0.29322654008865356, -0.7882171869277954, -1.2049007415771484, 0.7030226588249207, 0.09112157672643661, 0.44867584109306335, -0.6743871569633484, 0.2786233127117157, -2.2303647994995117, -1.362052321434021, -0.14128190279006958, -0.8985534310340881, 0.4407421946525574, -0.4322947859764099, 0.6504974365234375, -0.1677868813276291, 0.005124752409756184, 0.32501891255378723, 1.4683934450149536, 3.418454170227051, 0.2363092005252838, 0.379033625125885, -0.26679351925849915, -0.8835205435752869, 1.4316221475601196, 0.8425948619842529, -0.19387948513031006, -0.5691258907318115, -1.0294501781463623, 1.3444969654083252, 1.921874761581421, 1.054653286933899, 0.054890528321266174, -0.8620245456695557, -0.7353792190551758, -0.040377385914325714, 0.14779117703437805, 0.4105221927165985, 0.9412869215011597, 0.13072480261325836, 0.138734832406044, 1.4061572551727295, 1.150992512702942, -0.4701003134250641, 0.41835978627204895, -0.8407310843467712, -0.4608680009841919, 0.448714017868042, 0.2878858745098114, -0.0520271435379982, 0.32454466819763184, -0.9601494669914246, -0.2753016948699951, -0.445639431476593, -0.8303312659263611, -0.7426245212554932, -0.39847421646118164, -0.3298834264278412, 1.6998076438903809, 0.12105273455381393, -0.5141693949699402, -0.06416204571723938, -0.7169559597969055, -0.1303582787513733, -1.0987099409103394, 0.24144059419631958, -0.06459096074104309, -0.16285718977451324, -0.08260294049978256, 1.6401703357696533, -0.9394636750221252, -2.092493772506714, 0.18632516264915466, 0.22053393721580505, -0.2923354208469391, 0.18040511012077332, 1.746738076210022, 0.46912428736686707, 1.4191206693649292, 1.399525761604309, 0.9801839590072632, -0.7636554837226868, -1.2921217679977417, 0.7242516875267029, 0.9444621205329895, -1.4080901145935059, 0.9029137492179871, -0.06757556647062302, -0.5874285101890564, 0.6091387271881104, 1.3118857145309448, 0.506217896938324, -2.064427614212036, 0.872459888458252, -1.0051172971725464, 0.8108908534049988, 0.7104528546333313, 0.7113982439041138, 0.22609642148017883, 0.7854163646697998, -1.2453662157058716, -1.2640570402145386, -0.7099898457527161, -0.697694718837738, 1.95268976688385, -0.23227772116661072, 0.595029354095459, -0.2110988199710846, -1.3953269720077515, -0.0441528782248497, 0.7434700131416321, 0.3889816999435425, -0.4489248991012573, 0.7964587807655334, -0.6762043237686157, -1.0406618118286133, -1.3822423219680786, -0.45307663083076477, -1.0953363180160522, -0.9051775932312012, 1.0461620092391968, 0.7934074997901917, 0.2618548274040222, 1.8503376245498657, 0.6292128562927246, 0.30634409189224243, -2.532674789428711, 0.9444088339805603, 0.3502754271030426, -0.12931546568870544, 0.8311838507652283, 0.3679483234882355, 1.039289116859436, 0.051169753074645996, 0.5313554406166077, -2.3647396564483643, 2.2819948196411133, -0.1920522004365921, 0.6449334621429443, -0.08011873811483383, -0.211617112159729, 1.1174461841583252, 0.5667018294334412, 0.5902444124221802, -1.0402072668075562, 0.7322150468826294, -0.5860462188720703, 1.2103421688079834, 0.8870367407798767, -0.8056502938270569, -0.062060125172138214, 1.4380375146865845, 0.4055982828140259, -0.5411310791969299, -0.9538847208023071, -0.9792271852493286, 0.9319744110107422, 1.7888752222061157, 0.018129926174879074, 0.018427712842822075, 0.8155366778373718, 0.7143733501434326, -1.2124372720718384, 0.11777567118406296, -0.7537164092063904, -0.7861184477806091, 1.670318365097046, 1.9796137809753418, -0.17733262479305267, -0.17926013469696045, -0.6586657166481018, -1.251983404159546, 0.770878791809082, -0.08777114003896713, 0.08411506563425064, 0.6995328068733215, -0.6717637181282043, 1.0643064975738525, 0.8690910339355469, 0.9355872273445129, 0.07147236913442612, 0.1826789677143097, 0.33744385838508606, -0.367917537689209, -1.1274635791778564, -0.23838186264038086, -1.0794042348861694, -2.520390748977661, 0.4627947211265564, -0.17551298439502716, -1.4298969507217407, 0.008653882890939713, -0.9623713493347168, 0.9352016448974609, -0.5474686026573181, -1.133797526359558, -1.4774982929229736, 0.2872264087200165, -0.1299583464860916, 0.8868012428283691, -1.5905725955963135, -0.09530990570783615, 1.1856539249420166, 0.8097959160804749, -0.6511030793190002, 1.0110775232315063, 0.16881583631038666, 0.9891083240509033, 0.8515189290046692, -0.33243808150291443, 0.4746020436286926, 0.00374717079102993, -1.3884131908416748, 0.5068013668060303, 1.1471073627471924, 0.20019285380840302, 1.533097743988037, -0.498272567987442, -0.023431088775396347, 0.36263352632522583, -0.4996091425418854, -0.42346975207328796, -0.556814432144165, 0.7652143239974976, -0.0063200099393725395, -0.8456575870513916, 0.06536456942558289, -0.1017485111951828, -0.2870310842990875, 0.11313538253307343, -1.4828225374221802, -0.13036437332630157, -0.4247745871543884, -0.5949143767356873, -1.26466965675354, 0.0038202516734600067, 1.484503149986267, -0.7614838480949402, -0.22684508562088013, 0.44123974442481995, 0.39934417605400085, 0.47996214032173157, 0.6684027910232544, -0.6005746126174927, -0.2723878026008606, -0.2032383382320404, -0.3669339120388031, 0.33075088262557983, 1.3420909643173218, -0.12993879616260529, -0.9487149715423584, 0.7425758838653564, -0.41756078600883484, 0.010136693716049194, 1.8880102634429932, 0.12943097949028015, -0.7598791718482971, 0.3856702148914337, -0.7006841897964478, 1.8779691457748413, 1.8029075860977173, 1.4219433069229126, -0.0835268422961235, -1.0313209295272827, 0.660347044467926, -0.36839863657951355, -0.3941434621810913, 0.9841081500053406, 0.3217256963253021, -0.2748287320137024, -1.4849307537078857, 0.7108253836631775, 1.1565570831298828, -0.7945437431335449, -0.8257076740264893, 0.05433093011379242, -0.7656852006912231, 1.1495124101638794, 0.6084834337234497, 0.3421464264392853, 0.22942540049552917, 1.6174134016036987, 0.6872047185897827, -0.4845116436481476, 0.5112789869308472, 0.496343731880188, -0.16095711290836334, -2.1334338188171387, -1.1017509698867798, 0.25624364614486694, -0.4492165744304657, -1.5742048025131226, 1.3702056407928467, -1.1876168251037598, -0.9173092842102051, 0.5166133046150208, 0.07243318110704422, 1.4505878686904907, 0.28480756282806396, 1.5860482454299927, 2.1596364974975586, 0.8598084449768066, 0.3794736862182617, 1.222220540046692, -0.17757585644721985, -0.3599865734577179, 1.8026059865951538, -0.4534657895565033, 0.47513720393180847, 1.016982078552246, -0.3851357102394104, -1.1340386867523193, -0.7848055362701416, -1.202734112739563, -0.6874877214431763, 1.1500524282455444, 0.03897497057914734, -1.04349684715271, 0.3317060172557831, 1.5761052370071411, 0.09875281900167465, -0.27545905113220215, 0.6620684266090393, 0.5523686408996582, -0.7759783864021301, -0.0032351547852158546, -0.8367592692375183, 0.4890207350254059, -0.18936927616596222, -0.3369750678539276, 0.4466787576675415, 0.5739209651947021, 1.3337597846984863, 0.02413843385875225, 0.07254065573215485, 1.1296833753585815, -1.4486263990402222, 1.4137057065963745, -0.6325852274894714, 0.31917914748191833, -2.412545919418335, 1.4106651544570923, -0.8127795457839966, 1.9012768268585205, -2.629444122314453, 0.5167897939682007, -0.6235647201538086, -0.4466809928417206, 0.3026890158653259, -0.3517169952392578, 0.14599739015102386, -0.09288158267736435, -1.1843596696853638, 0.007936572656035423, -0.7389466166496277, 0.596488356590271, 1.174062967300415, 1.376112937927246, -1.144347906112671, -0.2294553965330124, -1.702418327331543, -0.13695403933525085, -0.6767116189002991, 0.30303630232810974, -1.9994480609893799, -0.1863507330417633, -2.05863094329834, -2.3606131076812744, -1.3082910776138306, -0.7910561561584473, 1.0736358165740967, 0.21304835379123688, -0.9706153273582458, 1.2005261182785034, -0.4526057243347168, -1.8560433387756348, 1.0423169136047363, -2.0999605655670166 ]
https://github.com/huggingface/datasets/issues/5505
PyTorch BatchSampler still loads from Dataset one-by-one
Yeah I figured this was the sort of thing that probably once worked. I can confirm that you no longer need the batch sampler, just `batch_size=n` in the `DataLoader`. I'll pass on the PR, I'm flat out right now, sorry.
### Describe the bug In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue. I'm not sure if this is a mistake in the docs or the code, but it seems that the only way for a Dataset to be passed a list of indexes by PyTorch (instead of one index at a time) is to define a `__getitems__` method (note the plural) on the Dataset object, and since the HF Dataset doesn't have this, PyTorch executes [this line of code](https://github.com/pytorch/pytorch/blob/master/torch/utils/data/_utils/fetch.py#L58), reverting to fetching one-by-one. ### Steps to reproduce the bug You can put a breakpoint in `Dataset.__getitem__()` or just print the args from there and see that it's called multiple times for a single `next(iter(dataloader))`, even when using the code from the docs: ```py from torch.utils.data.sampler import BatchSampler, RandomSampler batch_sampler = BatchSampler(RandomSampler(ds), batch_size=32, drop_last=False) dataloader = DataLoader(ds, batch_sampler=batch_sampler) ``` ### Expected behavior The expected behaviour would be for it to fetch batches from the dataset, rather than one-by-one. To demonstrate that there is room for improvement: once I have a HF dataset `ds`, if I just add this line: ```py ds.__getitems__ = ds.__getitem__ ``` ...then the time taken to loop over the dataset improves considerably (for wikitext-103, from one minute to 13 seconds with batch size 32). Probably not a big deal in the grand scheme of things, but seems like an easy win. ### 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: 10.0.1 - Pandas version: 1.5.3
308
40
PyTorch BatchSampler still loads from Dataset one-by-one ### Describe the bug In [the docs here](https://huggingface.co/docs/datasets/use_with_pytorch#use-a-batchsampler), it mentions the issue of the Dataset being read one-by-one, then states that using a BatchSampler resolves the issue. I'm not sure if this is a mistake in the docs or the code, but it seems that the only way for a Dataset to be passed a list of indexes by PyTorch (instead of one index at a time) is to define a `__getitems__` method (note the plural) on the Dataset object, and since the HF Dataset doesn't have this, PyTorch executes [this line of code](https://github.com/pytorch/pytorch/blob/master/torch/utils/data/_utils/fetch.py#L58), reverting to fetching one-by-one. ### Steps to reproduce the bug You can put a breakpoint in `Dataset.__getitem__()` or just print the args from there and see that it's called multiple times for a single `next(iter(dataloader))`, even when using the code from the docs: ```py from torch.utils.data.sampler import BatchSampler, RandomSampler batch_sampler = BatchSampler(RandomSampler(ds), batch_size=32, drop_last=False) dataloader = DataLoader(ds, batch_sampler=batch_sampler) ``` ### Expected behavior The expected behaviour would be for it to fetch batches from the dataset, rather than one-by-one. To demonstrate that there is room for improvement: once I have a HF dataset `ds`, if I just add this line: ```py ds.__getitems__ = ds.__getitem__ ``` ...then the time taken to loop over the dataset improves considerably (for wikitext-103, from one minute to 13 seconds with batch size 32). Probably not a big deal in the grand scheme of things, but seems like an easy win. ### 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: 10.0.1 - Pandas version: 1.5.3 Yeah I figured this was the sort of thing that probably once worked. I can confirm that you no longer need the batch sampler, just `batch_size=n` in the `DataLoader`. I'll pass on the PR, I'm flat out right now, sorry.
[ -1.2740635871887207, -0.9522457718849182, -0.8109618425369263, 1.4744322299957275, -0.08666042983531952, -1.3567854166030884, 0.14825250208377838, -1.0554382801055908, 1.7112696170806885, -0.830684244632721, 0.2660365104675293, -1.6319947242736816, 0.12265457957983017, -0.5992708206176758, -0.7478147149085999, -0.8951549530029297, -0.37660232186317444, -0.8387705683708191, 1.1057120561599731, 2.4588546752929688, 1.200115442276001, -1.3629870414733887, 2.743192672729492, 0.7375364899635315, -0.22646303474903107, -1.0628576278686523, 0.43522143363952637, -0.1086094006896019, -1.27439546585083, -0.5231581330299377, -0.928102433681488, -0.08268439024686813, -0.5579121708869934, -0.555807888507843, 0.009571431204676628, 0.5018447041511536, -0.32252395153045654, -0.38289159536361694, -0.5343741178512573, -0.7667842507362366, 0.42678436636924744, -0.36741557717323303, 0.9075946807861328, -0.266249418258667, 1.8445138931274414, -0.5153849720954895, 0.4646424353122711, 0.6626330018043518, 1.4087300300598145, 0.21303635835647583, -0.05918680131435394, 0.26779845356941223, 0.24414968490600586, -0.07042588293552399, 0.5640941262245178, 1.1659376621246338, 0.6699814796447754, 0.5366984009742737, 0.6808018088340759, -2.234917640686035, 1.3316537141799927, -0.9917369484901428, 0.3291182518005371, 1.3851304054260254, -0.9752345085144043, 0.3347621262073517, -1.7391161918640137, -0.05103299021720886, 0.5839574933052063, -2.199469804763794, 0.27437087893486023, -1.2558517456054688, -0.473392128944397, 1.002955436706543, 0.343257337808609, -1.2500094175338745, 0.1638839989900589, -0.4395078420639038, 1.1157740354537964, 0.4504551887512207, 1.1670804023742676, -1.69745671749115, -0.05766848474740982, -0.22063884139060974, 0.13288713991641998, -1.2878628969192505, -1.5699670314788818, 0.5896463990211487, 0.5892331600189209, 0.5841555595397949, -0.1051604300737381, 1.0988144874572754, -0.9882992506027222, 0.7716488242149353, -0.9553697109222412, -1.6829802989959717, -1.3714542388916016, -2.2802093029022217, -2.3544561862945557, 0.7835457921028137, -0.4675610363483429, -0.5929284691810608, 2.140148401260376, -1.0414129495620728, -1.7741363048553467, 1.1597689390182495, 0.2980054020881653, 0.03598646819591522, 2.3972442150115967, 0.22368064522743225, -0.7579838037490845, 0.455863356590271, -0.6752174496650696, 0.8334265351295471, -0.42640072107315063, 1.2976938486099243, 0.4403837025165558, -1.0103707313537598, 1.5471900701522827, -0.4097543954849243, 0.5947389602661133, -0.73686283826828, -0.4724524915218353, -0.7444366812705994, 0.425898939371109, 1.8849031925201416, -0.3791537582874298, 1.5971418619155884, -0.3977747857570648, -1.44391667842865, -1.5796059370040894, 0.9301976561546326, 0.44265151023864746, -0.8273853659629822, 0.14707909524440765, -0.46063634753227234, 0.1631147861480713, -0.1023315042257309, 1.0934251546859741, 1.3024883270263672, 0.5815829634666443, -0.4432256817817688, -0.9012848138809204, 0.19492687284946442, -0.1457810401916504, -0.6948109865188599, -1.7445749044418335, -0.291905015707016, 0.17188258469104767, 0.6202013492584229, -1.1408494710922241, 1.798446774482727, 0.7870254516601562, 1.9769741296768188, 0.9817028641700745, -0.37184011936187744, 1.4906806945800781, 0.12238388508558273, 1.8646609783172607, -0.5397392511367798, 0.6292708516120911, -0.3143942952156067, -1.1170562505722046, 0.8478955030441284, -0.33742591738700867, -2.0115203857421875, -0.6669330596923828, -0.7484644651412964, -0.18713244795799255, -0.7762133479118347, 0.8605181574821472, -0.307270884513855, -1.4605497121810913, 0.26820024847984314, -0.7191405296325684, 0.17223285138607025, -1.242845058441162, 0.29304078221321106, 0.6973569393157959, -0.5607688426971436, 0.056279994547367096, -0.28005969524383545, -1.3071209192276, -0.49957549571990967, 0.30387571454048157, 1.8087877035140991, -0.7189295887947083, 0.91794353723526, 1.0525161027908325, -0.6856940984725952, -0.03346103057265282, 0.34726086258888245, -0.3026522696018219, 0.9203453660011292, -1.047333836555481, -0.4414862394332886, 1.22523832321167, -0.22786898910999298, -0.6274656057357788, 1.468371868133545, 0.763728141784668, -1.011174201965332, -0.14003631472587585, -0.11608366668224335, -0.8892926573753357, 0.08325967192649841, -1.640421748161316, -0.12108343094587326, 0.4164283573627472, -1.4705092906951904, -0.4265669286251068, -0.15916435420513153, 1.1863455772399902, -0.19058510661125183, 1.44981050491333, -0.4253881573677063, -0.1387040913105011, -0.3381805717945099, -0.3761996328830719, 0.08372920751571655, -0.16809310019016266, -0.5076242685317993, 0.1679603010416031, -0.7502735257148743, 0.3403640389442444, 1.396533489227295, 0.3557499051094055, 0.10628048330545425, 0.4982295632362366, 1.1565598249435425, 0.3525013327598572, 0.002172280102968216, -0.8718411326408386, -1.5225775241851807, 1.9240913391113281, -1.4548574686050415, 2.0268466472625732, 0.8479447364807129, -0.01946156471967697, -1.6812405586242676, -1.8399524688720703, 1.3618192672729492, 1.1298860311508179, 2.322103977203369, 0.5059617161750793, 0.3866996467113495, -0.8309767842292786, -0.7101361155509949, 0.35604700446128845, -0.9180920720100403, -0.7001097798347473, 0.12094248086214066, 2.384086847305298, 1.8442809581756592, -0.3563074767589569, -0.19460894167423248, -0.9694173336029053, 1.4047640562057495, -0.2858293056488037, 0.20846329629421234, 1.9858676195144653, -0.24711717665195465, -0.9565303325653076, 1.2843066453933716, -2.4244513511657715, 0.1564331352710724, 2.004772901535034, 0.24131089448928833, 0.06690522283315659, -1.3287255764007568, -0.6235535144805908, -0.22107483446598053, -0.3699009120464325, -1.2014055252075195, 0.47281014919281006, -0.3364977240562439, -0.6936852931976318, -1.4355677366256714, 0.192454531788826, -1.1090885400772095, -1.644214391708374, 0.21891459822654724, 1.9184478521347046, 2.035004138946533, -0.7440891861915588, 1.5304025411605835, -0.3306836187839508, 0.1675363928079605, 1.2128204107284546, 1.240361213684082, 3.0792973041534424, 1.8919779062271118, -1.3756223917007446, 0.5817863941192627, -0.15290364623069763, -0.5299694538116455, 1.1858186721801758, -1.16386079788208, 1.2581571340560913, -0.12506423890590668, -1.2472620010375977, -1.3223322629928589, 1.0263159275054932, 0.4995742440223694, 0.10217524319887161, -0.5481563210487366, 1.2429733276367188, 0.03501302748918533, 1.2763971090316772, 0.5649321675300598, -0.42886340618133545, 0.6272503733634949, -0.3364138901233673, -0.5488088726997375, 1.5562344789505005, 0.195983424782753, -1.376570224761963, -2.2220494747161865, -0.2576596736907959, -0.8220540285110474, 0.023031482473015785, -0.7197508215904236, -1.0392619371414185, 1.6149346828460693, 0.37899723649024963, -1.232386589050293, -0.29984551668167114, -0.36858299374580383, -0.6260860562324524, 2.6427371501922607, -1.3570077419281006, -0.2196405827999115, -1.029685139656067, -0.5516490936279297, 1.5893892049789429, -1.1793566942214966, -0.2243673950433731, -1.05022394657135, -0.6384265422821045, -1.1956241130828857, -0.47701796889305115, -0.05894693732261658, -0.887900173664093, 0.8075908422470093, 0.18914252519607544, -1.223759651184082, -0.2738598883152008, -0.8240053057670593, 0.9391671419143677, -0.21352656185626984, 0.14573733508586884, 1.879694938659668, 0.3669651448726654, -0.46825385093688965, 0.7754479646682739, 1.1509991884231567, 0.5668382048606873, -0.6151524782180786, 0.21079406142234802, -0.6869995594024658, 0.3972768187522888, -1.2859432697296143, 0.26928582787513733, -2.8728480339050293, 0.6246635913848877, -0.05817801505327225, -0.07007205486297607, -0.07108509540557861, -1.3892663717269897, 1.0170284509658813, 2.6696128845214844, -1.0802525281906128, 0.465665340423584, 0.3449766933917999, 1.2842200994491577, -1.69900381565094, 0.25382354855537415, -0.45578429102897644, 2.046024799346924, 0.16290876269340515, 1.218258261680603, -0.5124916434288025, -2.338203191757202, 0.5797174572944641, -1.2899049520492554, -1.1084712743759155, 0.8623931407928467, -0.8786172866821289, 0.14638246595859528, -1.4057241678237915, -0.29322654008865356, -0.7882171869277954, -1.2049007415771484, 0.7030226588249207, 0.09112157672643661, 0.44867584109306335, -0.6743871569633484, 0.2786233127117157, -2.2303647994995117, -1.362052321434021, -0.14128190279006958, -0.8985534310340881, 0.4407421946525574, -0.4322947859764099, 0.6504974365234375, -0.1677868813276291, 0.005124752409756184, 0.32501891255378723, 1.4683934450149536, 3.418454170227051, 0.2363092005252838, 0.379033625125885, -0.26679351925849915, -0.8835205435752869, 1.4316221475601196, 0.8425948619842529, -0.19387948513031006, -0.5691258907318115, -1.0294501781463623, 1.3444969654083252, 1.921874761581421, 1.054653286933899, 0.054890528321266174, -0.8620245456695557, -0.7353792190551758, -0.040377385914325714, 0.14779117703437805, 0.4105221927165985, 0.9412869215011597, 0.13072480261325836, 0.138734832406044, 1.4061572551727295, 1.150992512702942, -0.4701003134250641, 0.41835978627204895, -0.8407310843467712, -0.4608680009841919, 0.448714017868042, 0.2878858745098114, -0.0520271435379982, 0.32454466819763184, -0.9601494669914246, -0.2753016948699951, -0.445639431476593, -0.8303312659263611, -0.7426245212554932, -0.39847421646118164, -0.3298834264278412, 1.6998076438903809, 0.12105273455381393, -0.5141693949699402, -0.06416204571723938, -0.7169559597969055, -0.1303582787513733, -1.0987099409103394, 0.24144059419631958, -0.06459096074104309, -0.16285718977451324, -0.08260294049978256, 1.6401703357696533, -0.9394636750221252, -2.092493772506714, 0.18632516264915466, 0.22053393721580505, -0.2923354208469391, 0.18040511012077332, 1.746738076210022, 0.46912428736686707, 1.4191206693649292, 1.399525761604309, 0.9801839590072632, -0.7636554837226868, -1.2921217679977417, 0.7242516875267029, 0.9444621205329895, -1.4080901145935059, 0.9029137492179871, -0.06757556647062302, -0.5874285101890564, 0.6091387271881104, 1.3118857145309448, 0.506217896938324, -2.064427614212036, 0.872459888458252, -1.0051172971725464, 0.8108908534049988, 0.7104528546333313, 0.7113982439041138, 0.22609642148017883, 0.7854163646697998, -1.2453662157058716, -1.2640570402145386, -0.7099898457527161, -0.697694718837738, 1.95268976688385, -0.23227772116661072, 0.595029354095459, -0.2110988199710846, -1.3953269720077515, -0.0441528782248497, 0.7434700131416321, 0.3889816999435425, -0.4489248991012573, 0.7964587807655334, -0.6762043237686157, -1.0406618118286133, -1.3822423219680786, -0.45307663083076477, -1.0953363180160522, -0.9051775932312012, 1.0461620092391968, 0.7934074997901917, 0.2618548274040222, 1.8503376245498657, 0.6292128562927246, 0.30634409189224243, -2.532674789428711, 0.9444088339805603, 0.3502754271030426, -0.12931546568870544, 0.8311838507652283, 0.3679483234882355, 1.039289116859436, 0.051169753074645996, 0.5313554406166077, -2.3647396564483643, 2.2819948196411133, -0.1920522004365921, 0.6449334621429443, -0.08011873811483383, -0.211617112159729, 1.1174461841583252, 0.5667018294334412, 0.5902444124221802, -1.0402072668075562, 0.7322150468826294, -0.5860462188720703, 1.2103421688079834, 0.8870367407798767, -0.8056502938270569, -0.062060125172138214, 1.4380375146865845, 0.4055982828140259, -0.5411310791969299, -0.9538847208023071, -0.9792271852493286, 0.9319744110107422, 1.7888752222061157, 0.018129926174879074, 0.018427712842822075, 0.8155366778373718, 0.7143733501434326, -1.2124372720718384, 0.11777567118406296, -0.7537164092063904, -0.7861184477806091, 1.670318365097046, 1.9796137809753418, -0.17733262479305267, -0.17926013469696045, -0.6586657166481018, -1.251983404159546, 0.770878791809082, -0.08777114003896713, 0.08411506563425064, 0.6995328068733215, -0.6717637181282043, 1.0643064975738525, 0.8690910339355469, 0.9355872273445129, 0.07147236913442612, 0.1826789677143097, 0.33744385838508606, -0.367917537689209, -1.1274635791778564, -0.23838186264038086, -1.0794042348861694, -2.520390748977661, 0.4627947211265564, -0.17551298439502716, -1.4298969507217407, 0.008653882890939713, -0.9623713493347168, 0.9352016448974609, -0.5474686026573181, -1.133797526359558, -1.4774982929229736, 0.2872264087200165, -0.1299583464860916, 0.8868012428283691, -1.5905725955963135, -0.09530990570783615, 1.1856539249420166, 0.8097959160804749, -0.6511030793190002, 1.0110775232315063, 0.16881583631038666, 0.9891083240509033, 0.8515189290046692, -0.33243808150291443, 0.4746020436286926, 0.00374717079102993, -1.3884131908416748, 0.5068013668060303, 1.1471073627471924, 0.20019285380840302, 1.533097743988037, -0.498272567987442, -0.023431088775396347, 0.36263352632522583, -0.4996091425418854, -0.42346975207328796, -0.556814432144165, 0.7652143239974976, -0.0063200099393725395, -0.8456575870513916, 0.06536456942558289, -0.1017485111951828, -0.2870310842990875, 0.11313538253307343, -1.4828225374221802, -0.13036437332630157, -0.4247745871543884, -0.5949143767356873, -1.26466965675354, 0.0038202516734600067, 1.484503149986267, -0.7614838480949402, -0.22684508562088013, 0.44123974442481995, 0.39934417605400085, 0.47996214032173157, 0.6684027910232544, -0.6005746126174927, -0.2723878026008606, -0.2032383382320404, -0.3669339120388031, 0.33075088262557983, 1.3420909643173218, -0.12993879616260529, -0.9487149715423584, 0.7425758838653564, -0.41756078600883484, 0.010136693716049194, 1.8880102634429932, 0.12943097949028015, -0.7598791718482971, 0.3856702148914337, -0.7006841897964478, 1.8779691457748413, 1.8029075860977173, 1.4219433069229126, -0.0835268422961235, -1.0313209295272827, 0.660347044467926, -0.36839863657951355, -0.3941434621810913, 0.9841081500053406, 0.3217256963253021, -0.2748287320137024, -1.4849307537078857, 0.7108253836631775, 1.1565570831298828, -0.7945437431335449, -0.8257076740264893, 0.05433093011379242, -0.7656852006912231, 1.1495124101638794, 0.6084834337234497, 0.3421464264392853, 0.22942540049552917, 1.6174134016036987, 0.6872047185897827, -0.4845116436481476, 0.5112789869308472, 0.496343731880188, -0.16095711290836334, -2.1334338188171387, -1.1017509698867798, 0.25624364614486694, -0.4492165744304657, -1.5742048025131226, 1.3702056407928467, -1.1876168251037598, -0.9173092842102051, 0.5166133046150208, 0.07243318110704422, 1.4505878686904907, 0.28480756282806396, 1.5860482454299927, 2.1596364974975586, 0.8598084449768066, 0.3794736862182617, 1.222220540046692, -0.17757585644721985, -0.3599865734577179, 1.8026059865951538, -0.4534657895565033, 0.47513720393180847, 1.016982078552246, -0.3851357102394104, -1.1340386867523193, -0.7848055362701416, -1.202734112739563, -0.6874877214431763, 1.1500524282455444, 0.03897497057914734, -1.04349684715271, 0.3317060172557831, 1.5761052370071411, 0.09875281900167465, -0.27545905113220215, 0.6620684266090393, 0.5523686408996582, -0.7759783864021301, -0.0032351547852158546, -0.8367592692375183, 0.4890207350254059, -0.18936927616596222, -0.3369750678539276, 0.4466787576675415, 0.5739209651947021, 1.3337597846984863, 0.02413843385875225, 0.07254065573215485, 1.1296833753585815, -1.4486263990402222, 1.4137057065963745, -0.6325852274894714, 0.31917914748191833, -2.412545919418335, 1.4106651544570923, -0.8127795457839966, 1.9012768268585205, -2.629444122314453, 0.5167897939682007, -0.6235647201538086, -0.4466809928417206, 0.3026890158653259, -0.3517169952392578, 0.14599739015102386, -0.09288158267736435, -1.1843596696853638, 0.007936572656035423, -0.7389466166496277, 0.596488356590271, 1.174062967300415, 1.376112937927246, -1.144347906112671, -0.2294553965330124, -1.702418327331543, -0.13695403933525085, -0.6767116189002991, 0.30303630232810974, -1.9994480609893799, -0.1863507330417633, -2.05863094329834, -2.3606131076812744, -1.3082910776138306, -0.7910561561584473, 1.0736358165740967, 0.21304835379123688, -0.9706153273582458, 1.2005261182785034, -0.4526057243347168, -1.8560433387756348, 1.0423169136047363, -2.0999605655670166 ]
https://github.com/huggingface/datasets/issues/5499
`load_dataset` has ~4 seconds of overhead for cached data
Hi ! To skip the verification step that checks if newer data exist, you can enable offline mode with `HF_DATASETS_OFFLINE=1`. Although I agree this step should be much faster for datasets hosted on the HF Hub - we could just compare the commit hash from the local data and the remote git repository. We're not been leveraging the git commit hashes, since the library was built before we even had git repositories for each dataset on HF.
### Feature request When loading a dataset that has been cached locally, the `load_dataset` function takes a lot longer than it should take to fetch the dataset from disk (or memory). This is particularly noticeable for smaller datasets. For example, wikitext-2, comparing `load_data` (once cached) and `load_from_disk`, the `load_dataset` method takes 40 times longer. ⏱ 4.84s ⮜ load_dataset ⏱ 119ms ⮜ load_from_disk ### Motivation I assume this is doing something like checking for a newer version. If so, that's an age old problem: do you make the user wait _every single time they load from cache_ or do you do something like load from cache always, _then_ check for a newer version and alert if they have stale data. The decision usually revolves around what percentage of the time the data will have been updated, and how dangerous old data is. For most datasets it's extremely unlikely that there will be a newer version on any given run, so 99% of the time this is just wasted time. Maybe you don't want to make that decision for all users, but at least having the _option_ to not wait for checks would be an improvement. ### Your contribution .
310
77
`load_dataset` has ~4 seconds of overhead for cached data ### Feature request When loading a dataset that has been cached locally, the `load_dataset` function takes a lot longer than it should take to fetch the dataset from disk (or memory). This is particularly noticeable for smaller datasets. For example, wikitext-2, comparing `load_data` (once cached) and `load_from_disk`, the `load_dataset` method takes 40 times longer. ⏱ 4.84s ⮜ load_dataset ⏱ 119ms ⮜ load_from_disk ### Motivation I assume this is doing something like checking for a newer version. If so, that's an age old problem: do you make the user wait _every single time they load from cache_ or do you do something like load from cache always, _then_ check for a newer version and alert if they have stale data. The decision usually revolves around what percentage of the time the data will have been updated, and how dangerous old data is. For most datasets it's extremely unlikely that there will be a newer version on any given run, so 99% of the time this is just wasted time. Maybe you don't want to make that decision for all users, but at least having the _option_ to not wait for checks would be an improvement. ### Your contribution . Hi ! To skip the verification step that checks if newer data exist, you can enable offline mode with `HF_DATASETS_OFFLINE=1`. Although I agree this step should be much faster for datasets hosted on the HF Hub - we could just compare the commit hash from the local data and the remote git repository. We're not been leveraging the git commit hashes, since the library was built before we even had git repositories for each dataset on HF.
[ -1.2485748529434204, -0.9309433698654175, -0.7487165331840515, 1.4467313289642334, -0.19418032467365265, -1.2446805238723755, 0.14992734789848328, -1.0850646495819092, 1.6498594284057617, -0.8785093426704407, 0.2918948233127594, -1.6871237754821777, 0.08295769989490509, -0.5667169690132141, -0.6867974400520325, -0.9570186138153076, -0.34041064977645874, -0.7729476094245911, 1.0469374656677246, 2.485031843185425, 1.1613714694976807, -1.3532962799072266, 2.667541742324829, 0.6757051944732666, -0.22247223556041718, -0.9941613674163818, 0.454672247171402, 0.009572440758347511, -1.247947335243225, -0.4945186972618103, -0.9391915798187256, -0.05153501033782959, -0.5847755074501038, -0.48849087953567505, -0.02208917960524559, 0.4049185514450073, -0.34269383549690247, -0.40001368522644043, -0.5855850577354431, -0.8566917777061462, 0.41149771213531494, -0.35995587706565857, 0.94354647397995, -0.38669392466545105, 1.879193902015686, -0.5150315761566162, 0.40170150995254517, 0.7172327041625977, 1.3033559322357178, 0.1503470093011856, -0.04656929150223732, 0.17872926592826843, 0.3726353943347931, -0.01731635257601738, 0.45217204093933105, 1.1158571243286133, 0.6563467979431152, 0.5752471685409546, 0.6405861973762512, -2.1851484775543213, 1.336181402206421, -1.105353832244873, 0.2940617501735687, 1.4289911985397339, -0.9525391459465027, 0.42123568058013916, -1.7131836414337158, -0.0949845016002655, 0.533905029296875, -2.2381904125213623, 0.207284078001976, -1.2737197875976562, -0.434507817029953, 1.0318423509597778, 0.29438018798828125, -1.2466363906860352, 0.19315281510353088, -0.462054580450058, 1.1255191564559937, 0.460383802652359, 1.0983376502990723, -1.7449092864990234, -0.014668639749288559, -0.3410724401473999, 0.053737569600343704, -1.3775864839553833, -1.5116487741470337, 0.5337258577346802, 0.7300462126731873, 0.5273901224136353, -0.1160423755645752, 1.1194978952407837, -1.0241714715957642, 0.7785112857818604, -1.006783366203308, -1.5781229734420776, -1.4215673208236694, -2.340350866317749, -2.3336453437805176, 0.7702293992042542, -0.5079010725021362, -0.602342963218689, 2.083813428878784, -1.106406807899475, -1.7186859846115112, 1.1813615560531616, 0.24622106552124023, -0.023502778261899948, 2.4575817584991455, 0.24361154437065125, -0.6574573516845703, 0.40988802909851074, -0.7198842763900757, 0.8037958145141602, -0.44524431228637695, 1.3433575630187988, 0.48958393931388855, -1.1402910947799683, 1.5586100816726685, -0.41660231351852417, 0.5451261401176453, -0.6206060647964478, -0.5965890288352966, -0.872999370098114, 0.37546560168266296, 1.8356964588165283, -0.291743665933609, 1.6152312755584717, -0.40029531717300415, -1.5053703784942627, -1.5974375009536743, 0.9379839301109314, 0.398274302482605, -0.8169031739234924, 0.09790216386318207, -0.2944120466709137, 0.09358243644237518, -0.10955314338207245, 1.1187047958374023, 1.2642302513122559, 0.7190868258476257, -0.43583008646965027, -0.8754204511642456, 0.1928938925266266, -0.06001735478639603, -0.7444952726364136, -1.7620676755905151, -0.36245831847190857, 0.05217428877949715, 0.6299552321434021, -1.1796926259994507, 1.6971489191055298, 0.9205337762832642, 1.8960630893707275, 1.0418226718902588, -0.35446080565452576, 1.426511526107788, 0.14744481444358826, 1.8465880155563354, -0.590237557888031, 0.7112600207328796, -0.27737998962402344, -1.1628586053848267, 0.7914931774139404, -0.3070227801799774, -2.017055034637451, -0.7484281659126282, -0.8347698450088501, -0.2235533595085144, -0.785290539264679, 0.9101417064666748, -0.25675898790359497, -1.4468659162521362, 0.3277265727519989, -0.5939403772354126, 0.18102341890335083, -1.1960583925247192, 0.3657073974609375, 0.7709134817123413, -0.5884974002838135, 0.017352309077978134, -0.18433433771133423, -1.2509936094284058, -0.39137858152389526, 0.32802313566207886, 1.8323935270309448, -0.7118183970451355, 0.9096959829330444, 1.0039541721343994, -0.6861723065376282, -0.10197484493255615, 0.2844417989253998, -0.24718177318572998, 0.8796949982643127, -1.0086504220962524, -0.455621600151062, 1.2155628204345703, -0.2754693627357483, -0.5470837354660034, 1.4148908853530884, 0.68632572889328, -0.9823054671287537, -0.1532220095396042, -0.22966520488262177, -0.8987061977386475, -0.007929809391498566, -1.566119909286499, -0.0981128066778183, 0.4011269807815552, -1.5128692388534546, -0.4061031937599182, -0.17308779060840607, 1.3403184413909912, -0.17164485156536102, 1.4357699155807495, -0.40741202235221863, -0.25963741540908813, -0.3669932782649994, -0.3733786940574646, 0.2003704160451889, -0.20064900815486908, -0.5033522844314575, 0.1496700942516327, -0.7614331841468811, 0.2930671274662018, 1.3729197978973389, 0.34395110607147217, 0.06947202980518341, 0.43171656131744385, 1.0878962278366089, 0.3593982756137848, -0.03606469929218292, -0.8580465912818909, -1.527377963066101, 1.9659433364868164, -1.4228986501693726, 1.9212193489074707, 0.7921857237815857, -0.015357631258666515, -1.8312125205993652, -1.8255960941314697, 1.3233542442321777, 1.1949973106384277, 2.2617545127868652, 0.49156442284584045, 0.3465093970298767, -0.8596714735031128, -0.7110226154327393, 0.42317768931388855, -1.0477505922317505, -0.6883102059364319, 0.0796535313129425, 2.354977607727051, 1.774933934211731, -0.40952107310295105, -0.27351999282836914, -1.0722150802612305, 1.391434669494629, -0.13502907752990723, 0.17265665531158447, 1.970779538154602, -0.37814751267433167, -1.0362118482589722, 1.2705844640731812, -2.350766897201538, 0.18280810117721558, 2.0330429077148438, 0.3029283881187439, 0.04980791360139847, -1.4440971612930298, -0.6068024635314941, -0.27918410301208496, -0.2996499240398407, -1.2863883972167969, 0.5766295790672302, -0.31705909967422485, -0.710008442401886, -1.5302987098693848, 0.1569133996963501, -1.0949749946594238, -1.6638405323028564, 0.29499080777168274, 1.8733943700790405, 1.9892972707748413, -0.7375229597091675, 1.5332533121109009, -0.3183263838291168, 0.18897686898708344, 1.2816723585128784, 1.1836446523666382, 3.127220392227173, 1.9169358015060425, -1.321895956993103, 0.6240837574005127, -0.11792561411857605, -0.44497770071029663, 1.1982622146606445, -1.1441594362258911, 1.4325330257415771, -0.11789104342460632, -1.1355496644973755, -1.2359395027160645, 0.9596014022827148, 0.41546326875686646, 0.06886132061481476, -0.5090154409408569, 1.258863925933838, 0.11815166473388672, 1.3075318336486816, 0.5135334134101868, -0.42546266317367554, 0.6492764949798584, -0.5034154057502747, -0.5849257707595825, 1.4947478771209717, 0.26410266757011414, -1.3857777118682861, -2.2632713317871094, -0.29963424801826477, -0.7104941010475159, 0.08679351210594177, -0.6016122102737427, -1.0098298788070679, 1.645423173904419, 0.43905213475227356, -1.3200844526290894, -0.29565685987472534, -0.37885332107543945, -0.5833547115325928, 2.6689727306365967, -1.4096428155899048, -0.1575957089662552, -0.9998019337654114, -0.6270926594734192, 1.5760048627853394, -1.2525883913040161, -0.19048455357551575, -1.0508848428726196, -0.5944833159446716, -1.3224823474884033, -0.5458143949508667, -0.002338229678571224, -0.8953874707221985, 0.7708132266998291, 0.22853882610797882, -1.1632400751113892, -0.3524490296840668, -0.8173967599868774, 0.8476704359054565, -0.14289695024490356, 0.2989703118801117, 1.8051745891571045, 0.358125776052475, -0.4535800814628601, 0.7062491774559021, 1.1097710132598877, 0.6692869067192078, -0.673566460609436, 0.1873747557401657, -0.7135078310966492, 0.2774443030357361, -1.2591674327850342, 0.275668203830719, -2.943793773651123, 0.5908344388008118, -0.08645351231098175, -0.08550342917442322, -0.024573644623160362, -1.3478277921676636, 1.0370765924453735, 2.535984992980957, -1.1498750448226929, 0.4503241777420044, 0.3529096841812134, 1.1515302658081055, -1.5893603563308716, 0.39352357387542725, -0.3962760865688324, 2.1070616245269775, 0.20108209550380707, 1.2296515703201294, -0.5202522277832031, -2.2811062335968018, 0.5424599051475525, -1.228183388710022, -1.2486242055892944, 0.8997148871421814, -0.869460940361023, 0.06709404289722443, -1.4491651058197021, -0.28552141785621643, -0.8269665241241455, -1.321285367012024, 0.7681415677070618, 0.09003978967666626, 0.47423696517944336, -0.6396405696868896, 0.3282589316368103, -2.1136796474456787, -1.3776321411132812, -0.21973714232444763, -0.9463356137275696, 0.4211253821849823, -0.39122655987739563, 0.6696153879165649, -0.20464929938316345, 0.08516453206539154, 0.3446482717990875, 1.4701011180877686, 3.426132917404175, 0.28201186656951904, 0.3634287416934967, -0.15262046456336975, -0.9270607829093933, 1.429427981376648, 0.9156751036643982, -0.03445272892713547, -0.48730674386024475, -1.010604739189148, 1.19801926612854, 1.9044641256332397, 0.964339017868042, 0.042413633316755295, -0.7768422961235046, -0.6840924620628357, -0.030148427933454514, 0.14387276768684387, 0.4590434432029724, 0.875659167766571, 0.06430606544017792, 0.1632509082555771, 1.4425745010375977, 1.1916632652282715, -0.4635954797267914, 0.33385220170021057, -0.8175358772277832, -0.5344696044921875, 0.5272004008293152, 0.3508656322956085, -0.044693510979413986, 0.3736622929573059, -0.9224841594696045, -0.2936040163040161, -0.48775985836982727, -0.9810918569564819, -0.6478546261787415, -0.4708661735057831, -0.39400947093963623, 1.6046584844589233, 0.1223469227552414, -0.5551061630249023, -0.03902195394039154, -0.8140345811843872, -0.13592776656150818, -1.1054505109786987, 0.2705947160720825, -0.0625162273645401, -0.14230187237262726, -0.00439111515879631, 1.8100239038467407, -0.9373917579650879, -2.0170321464538574, 0.25678542256355286, 0.30575552582740784, -0.266781747341156, 0.13692016899585724, 1.6215611696243286, 0.48395785689353943, 1.4842911958694458, 1.3066686391830444, 0.995772123336792, -0.6513477563858032, -1.328694224357605, 0.7646152973175049, 0.9354796409606934, -1.4573298692703247, 0.8563015460968018, 0.035030875355005264, -0.5235887169837952, 0.685969889163971, 1.284500241279602, 0.47193920612335205, -1.9687719345092773, 0.811793327331543, -0.9264321327209473, 0.7617464065551758, 0.7699360251426697, 0.727382242679596, 0.20766876637935638, 0.7865373492240906, -1.1989620923995972, -1.2159496545791626, -0.749562680721283, -0.5786471962928772, 1.952000617980957, -0.3419368863105774, 0.6972596645355225, -0.15652154386043549, -1.318453311920166, -0.11711330711841583, 0.7832439541816711, 0.36201930046081543, -0.46158015727996826, 0.8060122728347778, -0.678984522819519, -1.0710315704345703, -1.4514344930648804, -0.3915359675884247, -1.0927094221115112, -0.9738608002662659, 1.0468100309371948, 0.8581587672233582, 0.19571323692798615, 1.8815137147903442, 0.6326423287391663, 0.26766717433929443, -2.6015875339508057, 0.930817186832428, 0.2789406478404999, -0.04249273240566254, 0.8788071870803833, 0.28742101788520813, 0.9859415888786316, 0.08695423603057861, 0.5181721448898315, -2.4202911853790283, 2.307213544845581, -0.21864287555217743, 0.6364796757698059, -0.08751855790615082, -0.3008573353290558, 1.1791516542434692, 0.6251736879348755, 0.5890612006187439, -1.0809859037399292, 0.7824357151985168, -0.5101833343505859, 1.2458233833312988, 0.9586318135261536, -0.8099209666252136, -0.11960271000862122, 1.4550648927688599, 0.5521517395973206, -0.5038114190101624, -0.873536229133606, -0.9600456953048706, 0.8776540756225586, 1.7094953060150146, -0.0038926354609429836, -0.09020647406578064, 0.8119803071022034, 0.7356039881706238, -1.2937179803848267, 0.21257548034191132, -0.7280678153038025, -0.8228749632835388, 1.6415979862213135, 2.0250449180603027, -0.12822450697422028, -0.17343206703662872, -0.7197788953781128, -1.1305466890335083, 0.7440631985664368, -0.019823387265205383, 0.06615296006202698, 0.6197596192359924, -0.6594356298446655, 1.0839544534683228, 0.8508014678955078, 0.8173099160194397, 0.20018833875656128, 0.3112289309501648, 0.3905012905597687, -0.3065473735332489, -1.202144742012024, -0.178911030292511, -1.1217671632766724, -2.555429697036743, 0.4603455364704132, -0.27690455317497253, -1.4715323448181152, 0.008111311122775078, -1.0237547159194946, 0.9755589962005615, -0.5647345185279846, -1.187877893447876, -1.6131235361099243, 0.21908451616764069, -0.02158507890999317, 0.9888458251953125, -1.5787019729614258, -0.02637612819671631, 1.1707592010498047, 0.9141796827316284, -0.6176983714103699, 1.0773415565490723, 0.24013100564479828, 1.0931788682937622, 0.8650175929069519, -0.44674503803253174, 0.5046204924583435, 0.07130220532417297, -1.4052659273147583, 0.47008615732192993, 1.133112907409668, 0.27838262915611267, 1.4920408725738525, -0.5011471509933472, 0.11661702394485474, 0.4613851308822632, -0.5385448932647705, -0.4183964431285858, -0.4747774302959442, 0.715369462966919, 0.09992055594921112, -0.7596163749694824, 0.08559495210647583, -0.13850773870944977, -0.3513249456882477, 0.2063077837228775, -1.5524414777755737, -0.2204361855983734, -0.4540512263774872, -0.6289506554603577, -1.3119765520095825, -0.07178273797035217, 1.4610196352005005, -0.6982492208480835, -0.17086869478225708, 0.49930134415626526, 0.3989317715167999, 0.521431028842926, 0.6619386672973633, -0.5740920901298523, -0.3146272301673889, -0.30375635623931885, -0.3439299464225769, 0.3658134937286377, 1.2657040357589722, -0.1713438481092453, -0.9045891761779785, 0.6822502017021179, -0.3393193185329437, 0.026765935122966766, 1.941178798675537, 0.20220492780208588, -0.8187932968139648, 0.4050019681453705, -0.6980921626091003, 1.9139039516448975, 1.7756456136703491, 1.338189959526062, -0.05260106548666954, -0.9617648720741272, 0.6329734325408936, -0.3137873113155365, -0.401719331741333, 1.013428807258606, 0.41435325145721436, -0.11965766549110413, -1.35518479347229, 0.686486542224884, 1.1767710447311401, -0.8831952214241028, -0.8119073510169983, 0.17521171271800995, -0.8019790053367615, 1.045335054397583, 0.6606013178825378, 0.41937559843063354, 0.2790745496749878, 1.6425832509994507, 0.7651571035385132, -0.44160017371177673, 0.6438925266265869, 0.48530423641204834, -0.20092101395130157, -2.136282444000244, -1.129798173904419, 0.35907483100891113, -0.5533503890037537, -1.5380511283874512, 1.4077411890029907, -1.2181020975112915, -1.0545223951339722, 0.5540134906768799, 0.028938960283994675, 1.397569179534912, 0.3086410462856293, 1.5704368352890015, 2.113952875137329, 0.8828554153442383, 0.3752812445163727, 1.3521995544433594, -0.10539987683296204, -0.42638251185417175, 1.8852843046188354, -0.45322662591934204, 0.4415149688720703, 1.2033144235610962, -0.32008466124534607, -1.048659086227417, -0.774029016494751, -1.1227078437805176, -0.6357893347740173, 1.1098928451538086, 0.06171184405684471, -1.0913574695587158, 0.30083853006362915, 1.5341604948043823, 0.09724077582359314, -0.35194218158721924, 0.6361615657806396, 0.4722941517829895, -0.7202200889587402, -0.10149559378623962, -0.9321990013122559, 0.5104556679725647, -0.29234588146209717, -0.3027588427066803, 0.34120646119117737, 0.4544025659561157, 1.2814536094665527, -0.06653092801570892, 0.14918050169944763, 1.0794260501861572, -1.4474173784255981, 1.3874109983444214, -0.5648859143257141, 0.21217863261699677, -2.3819870948791504, 1.389649510383606, -0.7143123745918274, 1.9348371028900146, -2.6233506202697754, 0.44730401039123535, -0.6388044357299805, -0.4957026541233063, 0.47548773884773254, -0.4176889955997467, 0.12401033937931061, -0.12292669713497162, -1.0911203622817993, 0.008172489702701569, -0.7272244095802307, 0.6537606716156006, 1.1331638097763062, 1.3098324537277222, -1.1689866781234741, -0.29314061999320984, -1.6614325046539307, -0.10094909369945526, -0.7212995886802673, 0.3603551685810089, -1.988922119140625, -0.22651734948158264, -1.9885375499725342, -2.408447265625, -1.2827597856521606, -0.784613847732544, 1.0177661180496216, 0.14155004918575287, -0.9418655037879944, 1.1941155195236206, -0.3419230580329895, -1.8813326358795166, 1.0604474544525146, -2.1145782470703125 ]
https://github.com/huggingface/datasets/issues/5498
TypeError: 'bool' object is not iterable when filtering a datasets.arrow_dataset.Dataset
Hi! Instead of a single boolean, your filter function should return an iterable (of booleans) in the batched mode like so: ```python train_dataset = train_dataset.filter( function=lambda batch: [image is not None for image in batch["image"]], batched=True, batch_size=10) ``` PS: You can make this operation much faster by operating directly on the arrow data to skip the decoding part: ```python train_dataset = train_dataset.with_format("arrow") train_dataset = train_dataset.filter( function=lambda table: table["image"].is_valid().to_pylist(), batched=True, batch_size=100) train_dataset = train_dataset.with_format(None) ```
### Describe the bug Hi, Thanks for the amazing work on the library! **Describe the bug** I think I might have noticed a small bug in the filter method. Having loaded a dataset using `load_dataset`, when I try to filter out empty entries with `batched=True`, I get a TypeError. ### Steps to reproduce the bug ``` train_dataset = train_dataset.filter( function=lambda example: example["image"] is not None, batched=True, batch_size=10) ``` Error message: ``` File .../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) ... -> 5666 indices_array = [i for i, to_keep in zip(indices, mask) if to_keep] 5667 if indices_mapping is not None: 5668 indices_array = pa.array(indices_array, type=pa.uint64()) TypeError: 'bool' object is not iterable ``` **Removing batched=True allows to bypass the issue.** ### Expected behavior According to the doc, "[batch_size corresponds to the] number of examples per batch provided to function if batched = True", so we shouldn't need to remove the batchd=True arg? source: https://huggingface.co/docs/datasets/v2.9.0/en/package_reference/main_classes#datasets.Dataset.filter ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.31 - Python version: 3.9.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.3
311
74
TypeError: 'bool' object is not iterable when filtering a datasets.arrow_dataset.Dataset ### Describe the bug Hi, Thanks for the amazing work on the library! **Describe the bug** I think I might have noticed a small bug in the filter method. Having loaded a dataset using `load_dataset`, when I try to filter out empty entries with `batched=True`, I get a TypeError. ### Steps to reproduce the bug ``` train_dataset = train_dataset.filter( function=lambda example: example["image"] is not None, batched=True, batch_size=10) ``` Error message: ``` File .../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) ... -> 5666 indices_array = [i for i, to_keep in zip(indices, mask) if to_keep] 5667 if indices_mapping is not None: 5668 indices_array = pa.array(indices_array, type=pa.uint64()) TypeError: 'bool' object is not iterable ``` **Removing batched=True allows to bypass the issue.** ### Expected behavior According to the doc, "[batch_size corresponds to the] number of examples per batch provided to function if batched = True", so we shouldn't need to remove the batchd=True arg? source: https://huggingface.co/docs/datasets/v2.9.0/en/package_reference/main_classes#datasets.Dataset.filter ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.31 - Python version: 3.9.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 Hi! Instead of a single boolean, your filter function should return an iterable (of booleans) in the batched mode like so: ```python train_dataset = train_dataset.filter( function=lambda batch: [image is not None for image in batch["image"]], batched=True, batch_size=10) ``` PS: You can make this operation much faster by operating directly on the arrow data to skip the decoding part: ```python train_dataset = train_dataset.with_format("arrow") train_dataset = train_dataset.filter( function=lambda table: table["image"].is_valid().to_pylist(), batched=True, batch_size=100) train_dataset = train_dataset.with_format(None) ```
[ -1.216828465461731, -0.9283676147460938, -0.6916117072105408, 1.3856755495071411, -0.16936609148979187, -1.228087306022644, 0.19421380758285522, -1.0567854642868042, 1.6992367506027222, -0.7671883702278137, 0.27118659019470215, -1.6829215288162231, 0.00794027466326952, -0.5832213759422302, -0.6963408589363098, -0.8381827473640442, -0.4585152864456177, -0.7332831025123596, 1.0281774997711182, 2.5355350971221924, 1.213575005531311, -1.3951736688613892, 2.720257520675659, 0.7389076352119446, -0.23507624864578247, -0.9938099384307861, 0.48181235790252686, -0.020647533237934113, -1.3541176319122314, -0.45352160930633545, -0.877416729927063, -0.019903842359781265, -0.5762143731117249, -0.5152333974838257, 0.09182098507881165, 0.45346689224243164, -0.22165712714195251, -0.4485275447368622, -0.5270278453826904, -0.6695809960365295, 0.45769619941711426, -0.379594624042511, 0.9053128957748413, -0.33353832364082336, 1.7857133150100708, -0.556124746799469, 0.5512714385986328, 0.738622784614563, 1.3514622449874878, 0.18883341550827026, -0.053961846977472305, 0.36563044786453247, 0.3668203353881836, -0.06421470642089844, 0.46249520778656006, 1.1119824647903442, 0.6544666886329651, 0.4799899756908417, 0.6742650270462036, -2.2312190532684326, 1.3109006881713867, -0.9683672189712524, 0.36831963062286377, 1.3479182720184326, -0.9847097396850586, 0.3605354130268097, -1.8061065673828125, -0.03532659262418747, 0.6114025712013245, -2.282970666885376, 0.22896914184093475, -1.352368712425232, -0.5406307578086853, 1.0115727186203003, 0.32054537534713745, -1.264665126800537, 0.15118396282196045, -0.47024327516555786, 1.0231003761291504, 0.4664420187473297, 1.1121459007263184, -1.7636020183563232, -0.06795987486839294, -0.23716877400875092, 0.14588619768619537, -1.249971866607666, -1.575202465057373, 0.6480676531791687, 0.6221184730529785, 0.6392273306846619, -0.11701596528291702, 0.9677449464797974, -0.9766226410865784, 0.7801380753517151, -1.0043264627456665, -1.8069801330566406, -1.4258501529693604, -2.2650246620178223, -2.2728676795959473, 0.6893400549888611, -0.45732200145721436, -0.48006269335746765, 2.081486463546753, -1.0080353021621704, -1.7317911386489868, 1.1078765392303467, 0.26147598028182983, 0.0017760740593075752, 2.3530333042144775, 0.22619573771953583, -0.66363525390625, 0.3781086504459381, -0.7646228671073914, 0.7931948900222778, -0.35627421736717224, 1.3195139169692993, 0.37447136640548706, -1.0252196788787842, 1.5664833784103394, -0.3990512788295746, 0.5455949902534485, -0.6650766730308533, -0.44277986884117126, -0.71200031042099, 0.3048669695854187, 1.9077197313308716, -0.29793697595596313, 1.4623171091079712, -0.3876904845237732, -1.56327223777771, -1.5994181632995605, 0.834491491317749, 0.5153121948242188, -0.8197133541107178, 0.13506998121738434, -0.3931395709514618, 0.09460034221410751, -0.027614764869213104, 1.101789116859436, 1.2567497491836548, 0.740958034992218, -0.28557848930358887, -0.8942056894302368, 0.2082565575838089, -0.1130177229642868, -0.7484866976737976, -1.8232241868972778, -0.4095195233821869, 0.15957029163837433, 0.6833000183105469, -1.2119797468185425, 1.772107720375061, 0.8695865869522095, 1.950552225112915, 1.030210018157959, -0.42861244082450867, 1.4360958337783813, 0.15405236184597015, 1.8549268245697021, -0.5311676859855652, 0.668423593044281, -0.3488319516181946, -1.0779236555099487, 0.8137611150741577, -0.37683913111686707, -2.056356191635132, -0.6724308729171753, -0.7738747000694275, -0.2216343879699707, -0.7866385579109192, 0.9065017700195312, -0.22970542311668396, -1.3989585638046265, 0.19127514958381653, -0.7263708114624023, 0.15321952104568481, -1.2465400695800781, 0.28001701831817627, 0.7670970559120178, -0.6218445301055908, 0.07787102460861206, -0.3532350957393646, -1.3314343690872192, -0.5565451383590698, 0.3449494540691376, 1.8538250923156738, -0.684967041015625, 0.953834593296051, 0.9626742005348206, -0.6499956846237183, -0.033755481243133545, 0.30479538440704346, -0.28831979632377625, 0.8832216262817383, -1.1134952306747437, -0.42477044463157654, 1.1416374444961548, -0.25444772839546204, -0.6252413988113403, 1.4818499088287354, 0.6831672787666321, -1.0504339933395386, -0.24883125722408295, -0.22230277955532074, -0.8904320597648621, 0.09667746722698212, -1.6835640668869019, -0.15627938508987427, 0.3443138897418976, -1.5673320293426514, -0.5103260278701782, -0.20240621268749237, 1.337194800376892, -0.12720666825771332, 1.3623442649841309, -0.2927101254463196, -0.17029136419296265, -0.3972073495388031, -0.3615550398826599, 0.1919916421175003, -0.19232994318008423, -0.6132643818855286, 0.2024068385362625, -0.8587853312492371, 0.3619793653488159, 1.4833683967590332, 0.3500101864337921, 0.052950169891119, 0.5062978863716125, 1.0494085550308228, 0.3534758985042572, -0.1373467743396759, -0.9042237997055054, -1.5736689567565918, 2.0501773357391357, -1.4990154504776, 1.9293321371078491, 0.8201096653938293, -0.0800788477063179, -1.8040440082550049, -1.8200159072875977, 1.3836147785186768, 1.1092666387557983, 2.352020025253296, 0.5912997126579285, 0.4307596981525421, -0.7846174240112305, -0.6305075287818909, 0.2606492340564728, -0.9903253316879272, -0.7942695021629333, 0.18617036938667297, 2.4164681434631348, 1.8087642192840576, -0.487395316362381, -0.17020376026630402, -1.0064046382904053, 1.3614006042480469, -0.20486849546432495, 0.22313907742500305, 1.970055103302002, -0.24510814249515533, -0.9927564263343811, 1.2950451374053955, -2.382502794265747, 0.1513940542936325, 2.00313401222229, 0.24573014676570892, 0.15103395283222198, -1.3432888984680176, -0.6735419631004333, -0.29198113083839417, -0.41803231835365295, -1.2657496929168701, 0.5492125749588013, -0.23263531923294067, -0.774738609790802, -1.4777392148971558, 0.17748434841632843, -1.1493020057678223, -1.6263319253921509, 0.20207913219928741, 1.9339470863342285, 1.992689609527588, -0.7150472402572632, 1.5156705379486084, -0.3724038302898407, 0.1873655766248703, 1.20761239528656, 1.2446339130401611, 3.1095259189605713, 1.9507564306259155, -1.2937746047973633, 0.6775415539741516, -0.13923776149749756, -0.4805777370929718, 1.0823003053665161, -1.1252676248550415, 1.1984648704528809, -0.1690378189086914, -1.2351372241973877, -1.2345306873321533, 0.9529232382774353, 0.5252651572227478, 0.08447055518627167, -0.5213229656219482, 1.2059484720230103, 0.15162691473960876, 1.395767331123352, 0.6027489304542542, -0.3817462623119354, 0.6350866556167603, -0.4529288709163666, -0.4731934368610382, 1.572557806968689, 0.22602246701717377, -1.4384703636169434, -2.3045942783355713, -0.24067813158035278, -0.9380021095275879, 0.08302952349185944, -0.6476722359657288, -1.0212907791137695, 1.6125391721725464, 0.3891173005104065, -1.1939077377319336, -0.2827024459838867, -0.29977044463157654, -0.6460791826248169, 2.66778826713562, -1.333107352256775, -0.20639491081237793, -0.9512882232666016, -0.6175584197044373, 1.5846683979034424, -1.2489473819732666, -0.18174809217453003, -1.0890029668807983, -0.5798820853233337, -1.2714433670043945, -0.5239964723587036, -0.026388201862573624, -0.9031464457511902, 0.8723850250244141, 0.13184967637062073, -1.1907241344451904, -0.3277736008167267, -0.8983002305030823, 0.8809739351272583, -0.1553063541650772, 0.11891604959964752, 1.8572245836257935, 0.39607110619544983, -0.36249467730522156, 0.7615950107574463, 1.1698201894760132, 0.6291902661323547, -0.6406679153442383, 0.1906307488679886, -0.6487024426460266, 0.33268123865127563, -1.2695388793945312, 0.2582089304924011, -2.905461311340332, 0.6516646146774292, -0.0334271565079689, -0.03938347473740578, -0.010817023925483227, -1.311564326286316, 1.11528480052948, 2.6340718269348145, -1.192756175994873, 0.5178938508033752, 0.3542693257331848, 1.194861650466919, -1.5302115678787231, 0.3153870701789856, -0.4680643081665039, 2.1220333576202393, 0.20267373323440552, 1.217012643814087, -0.48450228571891785, -2.2838919162750244, 0.6050761938095093, -1.2297378778457642, -1.209963321685791, 0.7082784175872803, -0.8023006319999695, 0.12744073569774628, -1.3917826414108276, -0.19760087132453918, -0.8576911091804504, -1.1704750061035156, 0.6583186388015747, 0.12412115931510925, 0.4048027992248535, -0.6604400277137756, 0.3466844856739044, -2.1865246295928955, -1.337910771369934, -0.2435215711593628, -0.9274364709854126, 0.45520251989364624, -0.3155860900878906, 0.7105732560157776, -0.13095726072788239, 0.012563914991915226, 0.329692542552948, 1.371168851852417, 3.3475611209869385, 0.21046075224876404, 0.2663572132587433, -0.15829233825206757, -0.9376994967460632, 1.4448961019515991, 0.9102728366851807, -0.11703786998987198, -0.5569217205047607, -1.0718291997909546, 1.2507590055465698, 1.970414400100708, 1.0103806257247925, 0.0585189126431942, -0.8160260319709778, -0.7464473843574524, 0.012500551529228687, 0.19353526830673218, 0.46815991401672363, 0.9295114874839783, 0.09069859981536865, 0.0926293283700943, 1.4451040029525757, 1.162367820739746, -0.4021531343460083, 0.44222480058670044, -0.8121984601020813, -0.4730759859085083, 0.5086433291435242, 0.3419221043586731, 0.032490141689777374, 0.3171008229255676, -1.056781530380249, -0.17662487924098969, -0.3341993987560272, -0.9008561372756958, -0.6749021410942078, -0.3394274413585663, -0.3757033348083496, 1.6759432554244995, 0.10883545875549316, -0.45356738567352295, -0.02329185977578163, -0.733648419380188, -0.05017920210957527, -1.047163963317871, 0.33503180742263794, -0.11235456168651581, -0.05611375719308853, -0.1527753621339798, 1.793094515800476, -0.9121176600456238, -2.09877347946167, 0.2308596670627594, 0.19074848294258118, -0.39242860674858093, 0.19502541422843933, 1.675816535949707, 0.5295779705047607, 1.494443655014038, 1.342188835144043, 0.9598598480224609, -0.6178582906723022, -1.256724238395691, 0.6530647873878479, 0.9450623989105225, -1.3492779731750488, 0.7509811520576477, 0.0027024606242775917, -0.5239594578742981, 0.6641003489494324, 1.3036565780639648, 0.46176090836524963, -2.0073964595794678, 0.8503156900405884, -0.961915910243988, 0.8323978781700134, 0.7841724753379822, 0.7251726388931274, 0.2413892298936844, 0.8481544256210327, -1.2652283906936646, -1.1419697999954224, -0.7407118678092957, -0.6580350399017334, 2.048738479614258, -0.2706007957458496, 0.5760332345962524, -0.19499894976615906, -1.3071287870407104, -0.05150637775659561, 0.6499909162521362, 0.38996946811676025, -0.4564342200756073, 0.8308478593826294, -0.6237707734107971, -1.1486001014709473, -1.3553482294082642, -0.5023888945579529, -0.9723576903343201, -0.9588450789451599, 1.0402694940567017, 0.8259130120277405, 0.3908748924732208, 1.8579264879226685, 0.6048937439918518, 0.21834638714790344, -2.6083903312683105, 0.8461423516273499, 0.3139599859714508, -0.06775222718715668, 0.8707057237625122, 0.407014399766922, 1.0755103826522827, 0.00912195909768343, 0.5699355006217957, -2.412187099456787, 2.3029720783233643, -0.24527427554130554, 0.7169018387794495, -0.017732340842485428, -0.137162446975708, 1.1109026670455933, 0.5777063369750977, 0.5976341366767883, -1.0010802745819092, 0.7266353368759155, -0.58841472864151, 1.2528730630874634, 0.8689425587654114, -0.8146342039108276, -0.0044837212190032005, 1.2980908155441284, 0.46182572841644287, -0.4893980622291565, -0.9732076525688171, -0.9738272428512573, 0.9603329300880432, 1.7709671258926392, -0.09191371500492096, -0.006585567258298397, 0.7707675695419312, 0.6871392130851746, -1.3001508712768555, -0.002328891307115555, -0.6966729760169983, -0.7271468639373779, 1.6294760704040527, 2.080692768096924, -0.06974893808364868, -0.19332079589366913, -0.706211268901825, -1.2949867248535156, 0.7885424494743347, -0.03570504114031792, 0.1095522940158844, 0.7287330031394958, -0.572095513343811, 1.0881731510162354, 0.8346217274665833, 0.9848513007164001, 0.20644904673099518, 0.28222888708114624, 0.2897230088710785, -0.370680034160614, -1.2049837112426758, -0.22952724993228912, -1.1105537414550781, -2.463313579559326, 0.4458635449409485, -0.2279237061738968, -1.461830973625183, 0.0368150994181633, -0.9893704056739807, 0.8914469480514526, -0.5943705439567566, -1.1167640686035156, -1.4724608659744263, 0.19758974015712738, -0.08187058568000793, 0.9335942268371582, -1.5994548797607422, -0.1148153692483902, 1.192549705505371, 0.8467246294021606, -0.6720306873321533, 0.961123526096344, 0.23756760358810425, 1.0271282196044922, 0.8390194773674011, -0.3071747124195099, 0.4875969886779785, 0.027057364583015442, -1.4048714637756348, 0.42314907908439636, 1.2078907489776611, 0.16641083359718323, 1.42666494846344, -0.5362945199012756, -0.017762865871191025, 0.4144507050514221, -0.4788382947444916, -0.45425641536712646, -0.5308172106742859, 0.6818007826805115, 0.04837857931852341, -0.9723261594772339, -0.043821800500154495, -0.07011082768440247, -0.21768292784690857, 0.20164242386817932, -1.4776729345321655, -0.12802034616470337, -0.40630900859832764, -0.5844860672950745, -1.1950222253799438, -0.11420921236276627, 1.4049934148788452, -0.7336491346359253, -0.18241870403289795, 0.4964424967765808, 0.39868414402008057, 0.4924885034561157, 0.6964594125747681, -0.7633241415023804, -0.3240451216697693, -0.2420760542154312, -0.3897882103919983, 0.30782273411750793, 1.415723204612732, -0.10950896888971329, -0.9661831855773926, 0.6058146953582764, -0.37449249625205994, 0.0639241635799408, 2.000312328338623, 0.07347013056278229, -0.8138848543167114, 0.3025304079055786, -0.7811228632926941, 1.926469326019287, 1.6882057189941406, 1.314178466796875, -0.09443073719739914, -0.9904345273971558, 0.5899550914764404, -0.33164140582084656, -0.4124295711517334, 0.8974063992500305, 0.45318323373794556, -0.23412440717220306, -1.3759280443191528, 0.6372862458229065, 1.2951263189315796, -0.9061608910560608, -0.8922784924507141, 0.16173426806926727, -0.8099329471588135, 1.1733677387237549, 0.6586269736289978, 0.3787539005279541, 0.19238649308681488, 1.6345150470733643, 0.7359878420829773, -0.4742313325405121, 0.5430356860160828, 0.515007495880127, -0.212242990732193, -2.100660800933838, -1.203763723373413, 0.2238641232252121, -0.5016613006591797, -1.6136804819107056, 1.380342721939087, -1.170303463935852, -0.9553601145744324, 0.5214148759841919, 0.11135256290435791, 1.410213589668274, 0.37439045310020447, 1.5719661712646484, 2.0622923374176025, 0.8878819346427917, 0.3956598937511444, 1.3427302837371826, -0.11688730120658875, -0.48123660683631897, 1.7671245336532593, -0.3997489809989929, 0.4754267930984497, 1.1330196857452393, -0.33936527371406555, -1.1177642345428467, -0.8183873295783997, -1.199225664138794, -0.7481231093406677, 1.1862996816635132, 0.049636874347925186, -1.131528615951538, 0.3019151985645294, 1.573968768119812, 0.09189053624868393, -0.25471019744873047, 0.6002499461174011, 0.3726136386394501, -0.7569348812103271, -0.08346964418888092, -0.9494214653968811, 0.513240396976471, -0.24165689945220947, -0.3675757050514221, 0.287923127412796, 0.49244487285614014, 1.3374695777893066, -0.03716374933719635, 0.17441406846046448, 1.2136950492858887, -1.3636287450790405, 1.4002071619033813, -0.634294867515564, 0.31608569622039795, -2.396103620529175, 1.38608717918396, -0.7571443915367126, 1.8969122171401978, -2.694218635559082, 0.3737570643424988, -0.5309740900993347, -0.43770459294319153, 0.29173117876052856, -0.3065294027328491, 0.13943830132484436, -0.146872878074646, -1.1545695066452026, -0.09062909334897995, -0.7029271721839905, 0.5367258787155151, 1.171446681022644, 1.3562718629837036, -1.0804855823516846, -0.20141613483428955, -1.7246822118759155, -0.14574173092842102, -0.7670347094535828, 0.3802131414413452, -1.9005616903305054, -0.1575905829668045, -1.8938790559768677, -2.4034111499786377, -1.2713664770126343, -0.8407133221626282, 1.1162694692611694, 0.1501682847738266, -0.913112461566925, 1.2028560638427734, -0.39854323863983154, -1.8143337965011597, 1.0798372030258179, -2.1941332817077637 ]
https://github.com/huggingface/datasets/issues/5496
Add a `reduce` method
Hi! Sure, feel free to open a PR, so we can see the API you have in mind.
### Feature request Right now the `Dataset` class implements `map()` and `filter()`, but leaves out the third functional idiom popular among Python users: `reduce`. ### Motivation A `reduce` method is often useful when calculating dataset statistics, for example, the occurrence of a particular n-gram or the average line length of a code dataset. ### Your contribution I haven't contributed to `datasets` before, but I don't expect this will be too difficult, since the implementation will closely follow that of `map` and `filter`. I could have a crack over the weekend.
312
18
Add a `reduce` method ### Feature request Right now the `Dataset` class implements `map()` and `filter()`, but leaves out the third functional idiom popular among Python users: `reduce`. ### Motivation A `reduce` method is often useful when calculating dataset statistics, for example, the occurrence of a particular n-gram or the average line length of a code dataset. ### Your contribution I haven't contributed to `datasets` before, but I don't expect this will be too difficult, since the implementation will closely follow that of `map` and `filter`. I could have a crack over the weekend. Hi! Sure, feel free to open a PR, so we can see the API you have in mind.
[ -1.073635220527649, -0.8911888599395752, -0.8345375061035156, 1.4596879482269287, -0.22490829229354858, -1.426038384437561, 0.18532468378543854, -1.1373742818832397, 1.819708228111267, -0.8317157626152039, 0.34981077909469604, -1.7550373077392578, 0.06418803334236145, -0.774227499961853, -0.7348341345787048, -0.8538731336593628, -0.46129897236824036, -0.7025423645973206, 0.924616813659668, 2.521218776702881, 1.0934593677520752, -1.2691136598587036, 2.59325909614563, 0.7172994613647461, -0.17300458252429962, -0.9526934623718262, 0.507442057132721, -0.1142675131559372, -1.2108125686645508, -0.471426397562027, -1.0485564470291138, -0.17779618501663208, -0.5368714332580566, -0.7010327577590942, -0.1371738612651825, 0.5023811459541321, -0.4007081091403961, -0.5084829926490784, -0.362031489610672, -0.8947464227676392, 0.426893025636673, -0.33665788173675537, 0.9375494718551636, -0.38395872712135315, 1.8481810092926025, -0.5129979252815247, 0.3557027578353882, 0.6790458559989929, 1.4380054473876953, 0.2097616046667099, -0.1467185914516449, 0.3149406313896179, 0.37955713272094727, -0.08167791366577148, 0.4221455752849579, 1.052417278289795, 0.5862260460853577, 0.6850274205207825, 0.7667703032493591, -2.226435661315918, 1.334167242050171, -1.1214559078216553, 0.4031086266040802, 1.3468348979949951, -1.0275259017944336, 0.27731019258499146, -1.6866482496261597, 0.01086980290710926, 0.4789789021015167, -2.224412679672241, 0.30253151059150696, -1.2037138938903809, -0.451384574174881, 1.0034511089324951, 0.37135395407676697, -1.2469490766525269, 0.058761779218912125, -0.2698756754398346, 0.9949517250061035, 0.4364914000034332, 1.0026482343673706, -1.7773679494857788, 0.03082216903567314, -0.4264470338821411, 0.05269753560423851, -1.2775797843933105, -1.3472117185592651, 0.5780078172683716, 0.7550104260444641, 0.5669910907745361, -0.15925239026546478, 1.0179880857467651, -0.8852972388267517, 0.6492013335227966, -0.889747679233551, -1.7628294229507446, -1.257362961769104, -2.143893241882324, -2.362973928451538, 0.740623950958252, -0.5083319544792175, -0.5285431742668152, 1.990094780921936, -0.9245578646659851, -1.8536124229431152, 1.1425472497940063, 0.27700528502464294, -0.11761821806430817, 2.2897796630859375, 0.26708829402923584, -0.6518031358718872, 0.46693482995033264, -0.6971455812454224, 0.7972767353057861, -0.6302337646484375, 1.431699514389038, 0.34876829385757446, -1.0782078504562378, 1.6656646728515625, -0.4288408160209656, 0.5563568472862244, -0.7074926495552063, -0.4509722888469696, -0.8656893372535706, 0.5542007088661194, 1.8776530027389526, -0.3123491704463959, 1.4879587888717651, -0.2714448571205139, -1.5632587671279907, -1.6463418006896973, 0.8952614665031433, 0.37089189887046814, -0.7651804089546204, 0.27949345111846924, -0.23392082750797272, 0.19687260687351227, -0.0452452227473259, 1.1800695657730103, 1.2928593158721924, 0.7800638675689697, -0.19988524913787842, -0.8590747714042664, 0.3809836804866791, -0.04929029941558838, -0.7763612270355225, -1.6527546644210815, -0.4086604714393616, 0.09261642396450043, 0.5440866947174072, -1.010253667831421, 1.9041544198989868, 0.8758668899536133, 1.9436726570129395, 1.0286564826965332, -0.29557737708091736, 1.4219971895217896, 0.11977772414684296, 1.9368393421173096, -0.44240134954452515, 0.659122884273529, -0.3657357394695282, -1.1618112325668335, 0.9993475675582886, -0.39590513706207275, -1.9115824699401855, -0.7002463936805725, -0.9952431321144104, -0.19990411400794983, -0.7208526730537415, 1.0329008102416992, -0.31454113125801086, -1.3333323001861572, 0.3089766204357147, -0.7542206048965454, 0.14046154916286469, -1.2549529075622559, 0.34202811121940613, 0.7635710835456848, -0.6451641321182251, 0.1499277949333191, -0.2787780463695526, -1.2564705610275269, -0.4518533945083618, 0.24672991037368774, 1.9293404817581177, -0.7877217531204224, 0.8823522925376892, 0.9833506345748901, -0.7472192645072937, -0.19979822635650635, 0.44711872935295105, -0.18514622747898102, 0.7663533091545105, -1.0925108194351196, -0.32846808433532715, 1.2424496412277222, -0.13571617007255554, -0.660591185092926, 1.3739734888076782, 0.6794565916061401, -0.9667286276817322, 0.009464871138334274, -0.2958979308605194, -0.8671181201934814, 0.01351892575621605, -1.5803629159927368, 0.08954134583473206, 0.48822125792503357, -1.518990397453308, -0.5640183091163635, -0.06991364806890488, 1.1770225763320923, -0.1156596690416336, 1.246102213859558, -0.40060269832611084, -0.3597036302089691, -0.4997117817401886, -0.3993270695209503, 0.12555688619613647, -0.33010080456733704, -0.6361687779426575, 0.102937251329422, -0.6475480198860168, 0.387485146522522, 1.3888963460922241, 0.10688704252243042, 0.07516531646251678, 0.7025389075279236, 1.124772548675537, 0.27768033742904663, -0.08811207115650177, -0.9239069223403931, -1.4501879215240479, 1.9241474866867065, -1.3835006952285767, 1.836380958557129, 0.6413050293922424, 0.03984547033905983, -1.7834094762802124, -1.9152013063430786, 1.4931867122650146, 1.2436203956604004, 2.2541420459747314, 0.7730631828308105, 0.42537978291511536, -0.9109129309654236, -0.5397471189498901, 0.2696792483329773, -1.1853156089782715, -0.799471378326416, 0.15601761639118195, 2.3504562377929688, 1.8200609683990479, -0.5076040625572205, -0.2983964681625366, -1.1722843647003174, 1.3963369131088257, -0.17134729027748108, 0.10334841907024384, 1.9580323696136475, -0.4719052314758301, -1.0420507192611694, 1.164817214012146, -2.3540737628936768, -0.013800254091620445, 1.9641475677490234, 0.17949247360229492, 0.176428884267807, -1.3700157403945923, -0.6986044049263, -0.06064378470182419, -0.38138845562934875, -1.2707595825195312, 0.509630560874939, -0.24711617827415466, -0.6278404593467712, -1.412013053894043, 0.38051292300224304, -0.9804551601409912, -1.6286529302597046, 0.18276657164096832, 1.82624351978302, 2.001516103744507, -0.7679781913757324, 1.7208805084228516, -0.20860421657562256, 0.31189751625061035, 1.366363763809204, 1.10319185256958, 3.107144832611084, 2.06792950630188, -1.1645076274871826, 0.7135255336761475, -0.05107271671295166, -0.46614736318588257, 1.324851632118225, -1.153151273727417, 1.2669930458068848, -0.16746191680431366, -1.151342749595642, -1.2599927186965942, 0.7156261205673218, 0.4870592951774597, 0.1471989005804062, -0.4825149178504944, 1.2046359777450562, 0.06429329514503479, 1.232551097869873, 0.5253547430038452, -0.34990760684013367, 0.7853479385375977, -0.35801640152931213, -0.45625802874565125, 1.5608439445495605, 0.392568439245224, -1.2521750926971436, -2.2435109615325928, -0.15153968334197998, -0.8291783332824707, 0.025852933526039124, -0.5905254483222961, -0.8732724785804749, 1.7238365411758423, 0.469478040933609, -1.2195698022842407, -0.2330046147108078, -0.23150189220905304, -0.6315093040466309, 2.8180618286132812, -1.4350292682647705, -0.37468284368515015, -1.0045359134674072, -0.7016960382461548, 1.6972975730895996, -1.3248569965362549, -0.16835832595825195, -1.0672990083694458, -0.5188739895820618, -1.2953426837921143, -0.5722991824150085, -0.0730057954788208, -0.8827136158943176, 0.9519014358520508, 0.1916102021932602, -1.2866768836975098, -0.26141107082366943, -0.9099621772766113, 0.7228835225105286, -0.21070347726345062, 0.3635658323764801, 1.9003736972808838, 0.45100855827331543, -0.31332623958587646, 0.6121225953102112, 1.1181303262710571, 0.5576017498970032, -0.592750608921051, 0.3770720064640045, -0.6929492354393005, 0.2549341917037964, -1.251065969467163, 0.24184748530387878, -2.8791751861572266, 0.5899966359138489, -0.0944366604089737, -0.07051974534988403, -0.03405981510877609, -1.3624277114868164, 1.0601017475128174, 2.5282599925994873, -1.2478708028793335, 0.4172934889793396, 0.21651454269886017, 1.3783059120178223, -1.5170412063598633, 0.3380998969078064, -0.42231956124305725, 2.1674773693084717, 0.14808885753154755, 1.1332560777664185, -0.3337571918964386, -2.234099864959717, 0.6380332112312317, -1.2810566425323486, -1.3313915729522705, 0.7713065147399902, -0.7147597074508667, -0.14639955759048462, -1.3624358177185059, -0.1502208560705185, -0.7174456715583801, -1.3218172788619995, 0.8613107800483704, 0.14067573845386505, 0.4984476566314697, -0.6950441002845764, 0.3905980587005615, -2.0104928016662598, -1.3416266441345215, -0.2555634677410126, -0.9116514921188354, 0.2297852635383606, -0.30217495560646057, 0.6854143142700195, -0.38294917345046997, -0.0026317937299609184, 0.3012044429779053, 1.5412540435791016, 3.437830686569214, 0.17870885133743286, 0.5056887865066528, -0.15817180275917053, -0.866461455821991, 1.4077712297439575, 0.956805944442749, -0.056131478399038315, -0.5448452830314636, -1.0396342277526855, 1.2117640972137451, 1.946745753288269, 0.9337612986564636, 0.10112060606479645, -0.8037713170051575, -0.6157949566841125, -0.060046348720788956, 0.171651691198349, 0.3421148657798767, 0.818938672542572, 0.25406402349472046, -0.025225838646292686, 1.2456166744232178, 1.1177722215652466, -0.3672521710395813, 0.4855176508426666, -0.7229894399642944, -0.43833187222480774, 0.5649662613868713, 0.4410053491592407, 0.057735126465559006, 0.1445668488740921, -0.9948321580886841, -0.24116934835910797, -0.36761611700057983, -0.9777700901031494, -0.7088202834129333, -0.4896831810474396, -0.28154027462005615, 1.7301050424575806, 0.03344713896512985, -0.6345948576927185, -0.10643456876277924, -0.8179733753204346, 0.050475720316171646, -1.0219687223434448, 0.2051379382610321, -0.19192489981651306, -0.1650121808052063, 0.039760347455739975, 1.799946665763855, -0.9869844317436218, -2.1275527477264404, 0.323239803314209, 0.25874316692352295, -0.3689182996749878, 0.19043903052806854, 1.510573148727417, 0.5036892294883728, 1.4549473524093628, 1.453607439994812, 1.1283615827560425, -0.8631175756454468, -1.3606303930282593, 0.7313592433929443, 0.9339939951896667, -1.4413537979125977, 0.703472375869751, 0.20258715748786926, -0.5325735807418823, 0.64950031042099, 1.163272738456726, 0.49515944719314575, -1.9684261083602905, 0.6112852096557617, -0.9248356223106384, 0.7792020440101624, 0.7770357728004456, 0.6840946674346924, 0.25435489416122437, 0.7114080190658569, -1.2185587882995605, -1.2580463886260986, -0.7061375975608826, -0.6922222971916199, 1.9055230617523193, -0.18895256519317627, 0.7081097364425659, -0.11508452892303467, -1.4243589639663696, -0.16332796216011047, 0.8419399857521057, 0.35097622871398926, -0.5138394832611084, 0.6604207754135132, -0.6536440849304199, -1.0661239624023438, -1.4470099210739136, -0.5644499063491821, -1.1229124069213867, -1.0481255054473877, 1.0476635694503784, 0.8926694393157959, 0.16718947887420654, 1.879608154296875, 0.8128234148025513, 0.2017877697944641, -2.5390069484710693, 0.8520851135253906, 0.3590600788593292, 0.05448242649435997, 0.7359814047813416, 0.4884323477745056, 0.914524257183075, -0.09056463837623596, 0.5256618857383728, -2.383610486984253, 2.379476308822632, -0.27811333537101746, 0.5311467051506042, -0.05210554599761963, -0.1984507292509079, 1.0386520624160767, 0.3368365466594696, 0.49417877197265625, -1.0241228342056274, 0.6278294920921326, -0.730586051940918, 1.3474268913269043, 0.9121124148368835, -0.9252508282661438, -0.08930878341197968, 1.3208509683609009, 0.5607158541679382, -0.5995696783065796, -0.9930189847946167, -1.106934666633606, 1.0277814865112305, 1.7358747720718384, -0.04560833424329758, -0.009403198957443237, 0.8756487965583801, 0.5864762663841248, -1.3008354902267456, 0.016043050214648247, -0.7539750933647156, -0.7842413187026978, 1.678332805633545, 1.9054741859436035, -0.2598988711833954, -0.16012632846832275, -0.9624315500259399, -1.238623857498169, 0.7713315486907959, 0.18833597004413605, -0.0680832788348198, 0.7034815549850464, -0.616493821144104, 1.0816380977630615, 1.0224761962890625, 0.8640220165252686, 0.36431437730789185, 0.38865983486175537, 0.41700053215026855, -0.3646610677242279, -1.199466347694397, -0.1802988350391388, -1.1340734958648682, -2.6444461345672607, 0.4654029607772827, -0.29003095626831055, -1.449454665184021, -0.008750809356570244, -1.110129952430725, 0.8656443953514099, -0.5125106573104858, -1.0133631229400635, -1.537016749382019, 0.24904301762580872, -0.004997124429792166, 0.9196024537086487, -1.4653836488723755, -0.025210650637745857, 1.1955945491790771, 0.8959164023399353, -0.8733375668525696, 0.9833114147186279, 0.1439332813024521, 1.1315873861312866, 1.0133440494537354, -0.4219948947429657, 0.5356159210205078, 0.04772188514471054, -1.4225654602050781, 0.5187554955482483, 1.2131050825119019, 0.09749710559844971, 1.4557280540466309, -0.5772676467895508, -0.06865693628787994, 0.4044509828090668, -0.4022740125656128, -0.5243697762489319, -0.654334306716919, 0.6350451111793518, 0.0786302238702774, -0.8065811395645142, 0.14557945728302002, 0.052597206085920334, -0.27286046743392944, 0.24639436602592468, -1.5661758184432983, -0.17719711363315582, -0.33664292097091675, -0.688593327999115, -1.1018146276474, -0.08854354918003082, 1.387006402015686, -0.4990626871585846, -0.1665755659341812, 0.6617345809936523, 0.3092641234397888, 0.44701337814331055, 0.49442964792251587, -0.6194725036621094, -0.3548276424407959, -0.199728861451149, -0.4660758376121521, 0.5210857391357422, 1.3760159015655518, -0.19575916230678558, -0.9880698323249817, 0.7904586791992188, -0.26869091391563416, -0.00046361424028873444, 1.8861700296401978, 0.17480002343654633, -1.010573148727417, 0.20005492866039276, -0.645980179309845, 1.9481066465377808, 1.7335009574890137, 1.2077401876449585, -0.012327129021286964, -0.9951171278953552, 0.6547824144363403, -0.20180197060108185, -0.40682587027549744, 0.9408625364303589, 0.35367026925086975, -0.17884069681167603, -1.4294695854187012, 0.7203995585441589, 1.2382444143295288, -0.7994159460067749, -1.028010368347168, 0.045793235301971436, -0.7918622493743896, 1.0190682411193848, 0.7878605127334595, 0.5218216776847839, 0.34210869669914246, 1.6421891450881958, 0.7593826055526733, -0.40201833844184875, 0.4859137237071991, 0.5060139298439026, -0.03410620987415314, -2.0617589950561523, -1.2161813974380493, 0.31018301844596863, -0.5312081575393677, -1.6765636205673218, 1.3562166690826416, -1.2496532201766968, -0.9097612500190735, 0.5740005373954773, 0.1734953373670578, 1.625584602355957, 0.31813350319862366, 1.3974435329437256, 2.033454418182373, 0.8482598066329956, 0.28780174255371094, 1.3092306852340698, -0.25299668312072754, -0.4215453565120697, 1.8182272911071777, -0.47221291065216064, 0.40377485752105713, 1.1324750185012817, -0.32468220591545105, -1.1160084009170532, -0.6878858208656311, -1.2788575887680054, -0.6656851768493652, 1.1117093563079834, 0.06074005737900734, -1.1712812185287476, 0.3742579519748688, 1.4946357011795044, 0.0327669121325016, -0.3565230071544647, 0.5916740298271179, 0.4393152594566345, -0.8288502097129822, 0.08845774829387665, -0.8561690449714661, 0.5358777642250061, -0.15145576000213623, -0.37696999311447144, 0.6010042428970337, 0.4501258432865143, 1.2333704233169556, 0.07355011999607086, 0.19017469882965088, 1.0537759065628052, -1.4729584455490112, 1.4850513935089111, -0.654981791973114, 0.22857993841171265, -2.3408474922180176, 1.3137515783309937, -0.71461421251297, 1.8408130407333374, -2.6953818798065186, 0.319851279258728, -0.5523688197135925, -0.43722519278526306, 0.43548765778541565, -0.41693779826164246, 0.13933144509792328, -0.18428193032741547, -1.1845449209213257, -0.07002903521060944, -0.6315032243728638, 0.5274518728256226, 1.1101561784744263, 1.3791416883468628, -1.065140962600708, -0.3193327784538269, -1.774266242980957, -0.0823095291852951, -0.5756725668907166, 0.3107866942882538, -2.101491689682007, -0.21113701164722443, -1.8865604400634766, -2.2995386123657227, -1.2561112642288208, -0.743259847164154, 1.1201584339141846, 0.07891404628753662, -0.8404800295829773, 1.2240484952926636, -0.39679959416389465, -1.8346723318099976, 1.07213294506073, -2.179797649383545 ]
https://github.com/huggingface/datasets/issues/5495
to_tf_dataset fails with datetime UTC columns even if not included in columns argument
Hi! This is indeed a bug in our zero-copy logic. To fix it, instead of the line: https://github.com/huggingface/datasets/blob/7cfac43b980ab9e4a69c2328f085770996323005/src/datasets/features/features.py#L702 we should have: ```python return pa.types.is_primitive(pa_type) and not (pa.types.is_boolean(pa_type) or pa.types.is_temporal(pa_type)) ```
### Describe the bug There appears to be some eager behavior in `to_tf_dataset` that runs against every column in a dataset even if they aren't included in the columns argument. This is problematic with datetime UTC columns due to them not working with zero copy. If I don't have UTC information in my datetime column, then everything works as expected. ### Steps to reproduce the bug ```python import numpy as np import pandas as pd from datasets import Dataset df = pd.DataFrame(np.random.rand(2, 1), columns=["x"]) # df["dt"] = pd.to_datetime(["2023-01-01", "2023-01-01"]) # works fine df["dt"] = pd.to_datetime(["2023-01-01 00:00:00.00000+00:00", "2023-01-01 00:00:00.00000+00:00"]) df.to_parquet("test.pq") ds = Dataset.from_parquet("test.pq") tf_ds = ds.to_tf_dataset(columns=["x"], batch_size=2, shuffle=True) ``` ``` ArrowInvalid Traceback (most recent call last) Cell In[1], line 12 8 df.to_parquet("test.pq") 11 ds = Dataset.from_parquet("test.pq") ---> 12 tf_ds = ds.to_tf_dataset(columns=["r"], batch_size=2, shuffle=True) File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:411, in TensorflowDatasetMixin.to_tf_dataset(self, batch_size, columns, shuffle, collate_fn, drop_remainder, collate_fn_args, label_cols, prefetch, num_workers) 407 dataset = self 409 # TODO(Matt, QL): deprecate the retention of label_ids and label --> 411 output_signature, columns_to_np_types = dataset._get_output_signature( 412 dataset, 413 collate_fn=collate_fn, 414 collate_fn_args=collate_fn_args, 415 cols_to_retain=cols_to_retain, 416 batch_size=batch_size if drop_remainder else None, 417 ) 419 if "labels" in output_signature: 420 if ("label_ids" in columns or "label" in columns) and "labels" not in columns: File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:254, in TensorflowDatasetMixin._get_output_signature(dataset, collate_fn, collate_fn_args, cols_to_retain, batch_size, num_test_batches) 252 for _ in range(num_test_batches): 253 indices = sample(range(len(dataset)), test_batch_size) --> 254 test_batch = dataset[indices] 255 if cols_to_retain is not None: 256 test_batch = {key: value for key, value in test_batch.items() if key in cols_to_retain} File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2590, in Dataset.__getitem__(self, key) 2588 def __getitem__(self, key): # noqa: F811 2589 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2590 return self._getitem( 2591 key, 2592 ) File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2575, in Dataset._getitem(self, key, **kwargs) 2573 formatter = get_formatter(format_type, features=self.features, **format_kwargs) 2574 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2575 formatted_output = format_table( 2576 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2577 ) 2578 return formatted_output File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:634, in format_table(table, key, formatter, format_columns, output_all_columns) 632 python_formatter = PythonFormatter(features=None) 633 if format_columns is None: --> 634 return formatter(pa_table, query_type=query_type) 635 elif query_type == "column": 636 if key in format_columns: File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:410, in Formatter.__call__(self, pa_table, query_type) 408 return self.format_column(pa_table) 409 elif query_type == "batch": --> 410 return self.format_batch(pa_table) File ~/venv/lib/python3.8/site-packages/datasets/formatting/np_formatter.py:78, in NumpyFormatter.format_batch(self, pa_table) 77 def format_batch(self, pa_table: pa.Table) -> Mapping: ---> 78 batch = self.numpy_arrow_extractor().extract_batch(pa_table) 79 batch = self.python_features_decoder.decode_batch(batch) 80 batch = self.recursive_tensorize(batch) File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:164, in NumpyArrowExtractor.extract_batch(self, pa_table) 163 def extract_batch(self, pa_table: pa.Table) -> dict: --> 164 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:164, in <dictcomp>(.0) 163 def extract_batch(self, pa_table: pa.Table) -> dict: --> 164 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:185, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 181 else: 182 zero_copy_only = _is_zero_copy_only(pa_array.type) and all( 183 not _is_array_with_nulls(chunk) for chunk in pa_array.chunks 184 ) --> 185 array: List = [ 186 row for chunk in pa_array.chunks for row in chunk.to_numpy(zero_copy_only=zero_copy_only) 187 ] 188 else: 189 if isinstance(pa_array.type, _ArrayXDExtensionType): 190 # don't call to_pylist() to preserve dtype of the fixed-size array File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:186, in <listcomp>(.0) 181 else: 182 zero_copy_only = _is_zero_copy_only(pa_array.type) and all( 183 not _is_array_with_nulls(chunk) for chunk in pa_array.chunks 184 ) 185 array: List = [ --> 186 row for chunk in pa_array.chunks for row in chunk.to_numpy(zero_copy_only=zero_copy_only) 187 ] 188 else: 189 if isinstance(pa_array.type, _ArrayXDExtensionType): 190 # don't call to_pylist() to preserve dtype of the fixed-size array File ~/venv/lib/python3.8/site-packages/pyarrow/array.pxi:1475, in pyarrow.lib.Array.to_numpy() File ~/venv/lib/python3.8/site-packages/pyarrow/error.pxi:100, in pyarrow.lib.check_status() ArrowInvalid: Needed to copy 1 chunks with 0 nulls, but zero_copy_only was True ``` ### Expected behavior I think there are two potential issues/fixes 1. Proper handling of datetime UTC columns (perhaps there is something incorrect with zero copy handling here) 2. Not eagerly running against every column in a dataset when the columns argument of `to_tf_dataset` specifies a subset of columns (although I'm not sure if this is unavoidable) ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-13.2-x86_64-i386-64bit - Python version: 3.8.12 - PyArrow version: 11.0.0 - Pandas version: 1.5.3
313
30
to_tf_dataset fails with datetime UTC columns even if not included in columns argument ### Describe the bug There appears to be some eager behavior in `to_tf_dataset` that runs against every column in a dataset even if they aren't included in the columns argument. This is problematic with datetime UTC columns due to them not working with zero copy. If I don't have UTC information in my datetime column, then everything works as expected. ### Steps to reproduce the bug ```python import numpy as np import pandas as pd from datasets import Dataset df = pd.DataFrame(np.random.rand(2, 1), columns=["x"]) # df["dt"] = pd.to_datetime(["2023-01-01", "2023-01-01"]) # works fine df["dt"] = pd.to_datetime(["2023-01-01 00:00:00.00000+00:00", "2023-01-01 00:00:00.00000+00:00"]) df.to_parquet("test.pq") ds = Dataset.from_parquet("test.pq") tf_ds = ds.to_tf_dataset(columns=["x"], batch_size=2, shuffle=True) ``` ``` ArrowInvalid Traceback (most recent call last) Cell In[1], line 12 8 df.to_parquet("test.pq") 11 ds = Dataset.from_parquet("test.pq") ---> 12 tf_ds = ds.to_tf_dataset(columns=["r"], batch_size=2, shuffle=True) File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:411, in TensorflowDatasetMixin.to_tf_dataset(self, batch_size, columns, shuffle, collate_fn, drop_remainder, collate_fn_args, label_cols, prefetch, num_workers) 407 dataset = self 409 # TODO(Matt, QL): deprecate the retention of label_ids and label --> 411 output_signature, columns_to_np_types = dataset._get_output_signature( 412 dataset, 413 collate_fn=collate_fn, 414 collate_fn_args=collate_fn_args, 415 cols_to_retain=cols_to_retain, 416 batch_size=batch_size if drop_remainder else None, 417 ) 419 if "labels" in output_signature: 420 if ("label_ids" in columns or "label" in columns) and "labels" not in columns: File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:254, in TensorflowDatasetMixin._get_output_signature(dataset, collate_fn, collate_fn_args, cols_to_retain, batch_size, num_test_batches) 252 for _ in range(num_test_batches): 253 indices = sample(range(len(dataset)), test_batch_size) --> 254 test_batch = dataset[indices] 255 if cols_to_retain is not None: 256 test_batch = {key: value for key, value in test_batch.items() if key in cols_to_retain} File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2590, in Dataset.__getitem__(self, key) 2588 def __getitem__(self, key): # noqa: F811 2589 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 2590 return self._getitem( 2591 key, 2592 ) File ~/venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2575, in Dataset._getitem(self, key, **kwargs) 2573 formatter = get_formatter(format_type, features=self.features, **format_kwargs) 2574 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 2575 formatted_output = format_table( 2576 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 2577 ) 2578 return formatted_output File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:634, in format_table(table, key, formatter, format_columns, output_all_columns) 632 python_formatter = PythonFormatter(features=None) 633 if format_columns is None: --> 634 return formatter(pa_table, query_type=query_type) 635 elif query_type == "column": 636 if key in format_columns: File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:410, in Formatter.__call__(self, pa_table, query_type) 408 return self.format_column(pa_table) 409 elif query_type == "batch": --> 410 return self.format_batch(pa_table) File ~/venv/lib/python3.8/site-packages/datasets/formatting/np_formatter.py:78, in NumpyFormatter.format_batch(self, pa_table) 77 def format_batch(self, pa_table: pa.Table) -> Mapping: ---> 78 batch = self.numpy_arrow_extractor().extract_batch(pa_table) 79 batch = self.python_features_decoder.decode_batch(batch) 80 batch = self.recursive_tensorize(batch) File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:164, in NumpyArrowExtractor.extract_batch(self, pa_table) 163 def extract_batch(self, pa_table: pa.Table) -> dict: --> 164 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:164, in <dictcomp>(.0) 163 def extract_batch(self, pa_table: pa.Table) -> dict: --> 164 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:185, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 181 else: 182 zero_copy_only = _is_zero_copy_only(pa_array.type) and all( 183 not _is_array_with_nulls(chunk) for chunk in pa_array.chunks 184 ) --> 185 array: List = [ 186 row for chunk in pa_array.chunks for row in chunk.to_numpy(zero_copy_only=zero_copy_only) 187 ] 188 else: 189 if isinstance(pa_array.type, _ArrayXDExtensionType): 190 # don't call to_pylist() to preserve dtype of the fixed-size array File ~/venv/lib/python3.8/site-packages/datasets/formatting/formatting.py:186, in <listcomp>(.0) 181 else: 182 zero_copy_only = _is_zero_copy_only(pa_array.type) and all( 183 not _is_array_with_nulls(chunk) for chunk in pa_array.chunks 184 ) 185 array: List = [ --> 186 row for chunk in pa_array.chunks for row in chunk.to_numpy(zero_copy_only=zero_copy_only) 187 ] 188 else: 189 if isinstance(pa_array.type, _ArrayXDExtensionType): 190 # don't call to_pylist() to preserve dtype of the fixed-size array File ~/venv/lib/python3.8/site-packages/pyarrow/array.pxi:1475, in pyarrow.lib.Array.to_numpy() File ~/venv/lib/python3.8/site-packages/pyarrow/error.pxi:100, in pyarrow.lib.check_status() ArrowInvalid: Needed to copy 1 chunks with 0 nulls, but zero_copy_only was True ``` ### Expected behavior I think there are two potential issues/fixes 1. Proper handling of datetime UTC columns (perhaps there is something incorrect with zero copy handling here) 2. Not eagerly running against every column in a dataset when the columns argument of `to_tf_dataset` specifies a subset of columns (although I'm not sure if this is unavoidable) ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-13.2-x86_64-i386-64bit - Python version: 3.8.12 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 Hi! This is indeed a bug in our zero-copy logic. To fix it, instead of the line: https://github.com/huggingface/datasets/blob/7cfac43b980ab9e4a69c2328f085770996323005/src/datasets/features/features.py#L702 we should have: ```python return pa.types.is_primitive(pa_type) and not (pa.types.is_boolean(pa_type) or pa.types.is_temporal(pa_type)) ```
[ -1.2224701642990112, -0.8903769850730896, -0.6871119737625122, 1.498617172241211, -0.20761793851852417, -1.198106288909912, 0.25135576725006104, -1.1399424076080322, 1.5775479078292847, -0.847285807132721, 0.34940415620803833, -1.6227664947509766, 0.07213814556598663, -0.6189757585525513, -0.7099882960319519, -0.8267179131507874, -0.3923599123954773, -0.6704677939414978, 1.118797779083252, 2.4913065433502197, 1.2443149089813232, -1.3269466161727905, 2.7384607791900635, 0.7087112069129944, -0.11676093190908432, -0.9565237760543823, 0.4722405672073364, 0.15064112842082977, -1.3101789951324463, -0.4222906231880188, -0.9766923189163208, -0.14444543421268463, -0.5639457702636719, -0.46537190675735474, -0.014811776578426361, 0.41705745458602905, -0.3660052418708801, -0.4321252703666687, -0.6323581337928772, -0.7484861612319946, 0.4536205530166626, -0.3530784249305725, 0.9482245445251465, -0.34213751554489136, 1.8575801849365234, -0.5866840481758118, 0.5431259870529175, 0.7238275408744812, 1.2016593217849731, 0.20225843787193298, -0.08096936345100403, 0.4081670045852661, 0.3501747250556946, -0.061549536883831024, 0.5822056531906128, 1.20321524143219, 0.6524139642715454, 0.5411604642868042, 0.7597072124481201, -2.1520817279815674, 1.309154987335205, -1.0773013830184937, 0.31004559993743896, 1.3457226753234863, -0.8641717433929443, 0.35125118494033813, -1.685957670211792, -0.14930592477321625, 0.5731263160705566, -2.2246882915496826, 0.345314621925354, -1.3336695432662964, -0.5967288017272949, 1.014262318611145, 0.4124577045440674, -1.1516313552856445, 0.1277364194393158, -0.5639286637306213, 0.9906706213951111, 0.3668525815010071, 1.0910052061080933, -1.6760228872299194, -0.004494354594498873, -0.2569974660873413, 0.14306381344795227, -1.2917064428329468, -1.5257432460784912, 0.6555244326591492, 0.6493420600891113, 0.5593931078910828, -0.08558700978755951, 1.0892970561981201, -1.2118221521377563, 0.7740890383720398, -1.0458029508590698, -1.652362585067749, -1.4436390399932861, -2.3427188396453857, -2.288912773132324, 0.7001535892486572, -0.40929877758026123, -0.576595664024353, 2.078831434249878, -1.0153634548187256, -1.6037647724151611, 1.190887451171875, 0.26464569568634033, -0.052945930510759354, 2.4917802810668945, 0.22890202701091766, -0.710792601108551, 0.5683674812316895, -0.7920562624931335, 0.7927059531211853, -0.33341795206069946, 1.3189979791641235, 0.34778571128845215, -1.106824517250061, 1.6391499042510986, -0.391831636428833, 0.5614992380142212, -0.6307002902030945, -0.4649118185043335, -0.6893872618675232, 0.24562107026576996, 1.9134680032730103, -0.29628628492355347, 1.5632448196411133, -0.3006933927536011, -1.4663374423980713, -1.5528820753097534, 0.8876962065696716, 0.4559628963470459, -0.8003650307655334, 0.08135195821523666, -0.4608060121536255, 0.17781144380569458, -0.0576055608689785, 1.1740336418151855, 1.3842779397964478, 0.6982277631759644, -0.34716087579727173, -0.7809441089630127, 0.12785817682743073, -0.20155870914459229, -0.7444400787353516, -1.7824896574020386, -0.31568652391433716, 0.06274379789829254, 0.5911427736282349, -1.2474509477615356, 1.8113229274749756, 0.8635615706443787, 1.8304805755615234, 1.054777979850769, -0.3796626329421997, 1.43217933177948, 0.14775320887565613, 1.7686402797698975, -0.4890710711479187, 0.7078127861022949, -0.3600326180458069, -1.108683705329895, 0.871220588684082, -0.2947123050689697, -2.0406506061553955, -0.7967551350593567, -0.6762820482254028, -0.20267537236213684, -0.8338546752929688, 0.8822550177574158, -0.284900963306427, -1.453445553779602, 0.26618266105651855, -0.697285532951355, 0.13772279024124146, -1.2234996557235718, 0.3368681073188782, 0.7056422829627991, -0.6618009805679321, 0.11523309350013733, -0.2034488022327423, -1.321243405342102, -0.38420528173446655, 0.2926067113876343, 1.904932975769043, -0.782296359539032, 0.8092293739318848, 1.0961406230926514, -0.7130030393600464, -0.01714656502008438, 0.3155757188796997, -0.39348262548446655, 0.8041750192642212, -1.0927666425704956, -0.526680052280426, 1.1466294527053833, -0.17933742702007294, -0.5927711129188538, 1.5061956644058228, 0.6561000943183899, -1.0317425727844238, -0.2250663936138153, -0.06598260998725891, -0.8900626301765442, 0.11381660401821136, -1.592185616493225, -0.13137641549110413, 0.4587489366531372, -1.5224038362503052, -0.45870131254196167, -0.13773755729198456, 1.3194620609283447, -0.22143372893333435, 1.4916733503341675, -0.3724361062049866, -0.18508438766002655, -0.3517603278160095, -0.39550143480300903, 0.12039288878440857, -0.12499003112316132, -0.6122679114341736, 0.1764374077320099, -0.7490880489349365, 0.3782922029495239, 1.4486138820648193, 0.2671520709991455, 0.03367098793387413, 0.4896484613418579, 1.053743839263916, 0.3728283643722534, -0.09532609581947327, -0.8206165432929993, -1.543002963066101, 1.9058586359024048, -1.4745805263519287, 2.0681111812591553, 0.7851943373680115, -0.037737246602773666, -1.8745343685150146, -1.8444430828094482, 1.3243608474731445, 1.164652943611145, 2.3050320148468018, 0.4371141791343689, 0.39464497566223145, -0.8203323483467102, -0.6637856960296631, 0.3168181777000427, -0.9869109988212585, -0.6891496777534485, 0.2450632005929947, 2.3806979656219482, 1.7752095460891724, -0.46887582540512085, -0.11822477728128433, -0.9812707304954529, 1.399750828742981, -0.323564350605011, 0.24322344362735748, 2.0058512687683105, -0.31059426069259644, -1.0825613737106323, 1.3900463581085205, -2.388300657272339, 0.14206691086292267, 1.988681674003601, 0.2601237893104553, 0.022866297513246536, -1.3139232397079468, -0.595456600189209, -0.3370087146759033, -0.38253873586654663, -1.2951208353042603, 0.5319358110427856, -0.21623067557811737, -0.8261669278144836, -1.4153269529342651, 0.13723930716514587, -1.1763843297958374, -1.6061985492706299, 0.2591891288757324, 1.885010838508606, 2.0526440143585205, -0.7615495920181274, 1.4907634258270264, -0.38343173265457153, 0.12970563769340515, 1.1228525638580322, 1.2916674613952637, 3.0822513103485107, 1.9678311347961426, -1.285232663154602, 0.6513225436210632, -0.19000835716724396, -0.5130174160003662, 1.1462754011154175, -1.2161195278167725, 1.3292980194091797, -0.0966571569442749, -1.2572901248931885, -1.1911746263504028, 0.9992327094078064, 0.4113672971725464, 0.09206335991621017, -0.47605931758880615, 1.1624523401260376, 0.12077949941158295, 1.3580586910247803, 0.561677873134613, -0.3018342852592468, 0.6042380332946777, -0.4613967537879944, -0.46753615140914917, 1.5555322170257568, 0.17140498757362366, -1.5080721378326416, -2.2607028484344482, -0.17558950185775757, -0.8691582083702087, 0.11997370421886444, -0.5963453650474548, -1.0232305526733398, 1.6683050394058228, 0.35176974534988403, -1.1781286001205444, -0.2428407073020935, -0.31642985343933105, -0.5589728355407715, 2.7352471351623535, -1.3545724153518677, -0.2520703375339508, -0.9953246712684631, -0.7558120489120483, 1.6765694618225098, -1.137535810470581, -0.22534097731113434, -0.9588243365287781, -0.4959690570831299, -1.276332974433899, -0.5388017892837524, 0.03632573410868645, -0.9392691254615784, 0.8635970950126648, 0.13863392174243927, -1.173413634300232, -0.4301444888114929, -0.9145873785018921, 0.9023449420928955, -0.15811701118946075, 0.15167804062366486, 1.835585117340088, 0.2324625700712204, -0.47086483240127563, 0.7399821877479553, 1.3016366958618164, 0.6352360248565674, -0.6124488115310669, 0.15868547558784485, -0.6377093195915222, 0.3362603187561035, -1.2808117866516113, 0.26543575525283813, -2.8782873153686523, 0.6269354820251465, -0.012245911173522472, -0.07707508653402328, 0.012616109102964401, -1.3106597661972046, 1.120281457901001, 2.5724356174468994, -1.1238563060760498, 0.5201475024223328, 0.3194478750228882, 1.1738744974136353, -1.5244412422180176, 0.2809690237045288, -0.4872669577598572, 1.9992982149124146, 0.21228240430355072, 1.1363511085510254, -0.5609524250030518, -2.2882230281829834, 0.6568349003791809, -1.2641631364822388, -1.1658661365509033, 0.8246281743049622, -0.9614402651786804, 0.19753916561603546, -1.402205228805542, -0.27988648414611816, -0.9136963486671448, -1.1354475021362305, 0.500004768371582, 0.13632601499557495, 0.46226024627685547, -0.5476143956184387, 0.3305400609970093, -2.302565097808838, -1.310071587562561, -0.1738600879907608, -1.032763957977295, 0.4885219931602478, -0.38438916206359863, 0.6893401145935059, -0.16838926076889038, 0.05131441354751587, 0.358436644077301, 1.516344666481018, 3.3783421516418457, 0.1375133991241455, 0.27396440505981445, -0.2470817118883133, -1.024053692817688, 1.4785500764846802, 0.9455410242080688, -0.046260301023721695, -0.571165919303894, -1.0372496843338013, 1.2222439050674438, 1.924777865409851, 1.0056170225143433, -0.0743836984038353, -0.9346093535423279, -0.6756625771522522, -0.09825422614812851, 0.1667603850364685, 0.43320131301879883, 1.0376452207565308, 0.05939985811710358, 0.026928313076496124, 1.4546414613723755, 1.1900193691253662, -0.4334535598754883, 0.3121946454048157, -0.8541983366012573, -0.37761062383651733, 0.5144973397254944, 0.25383758544921875, 0.018367312848567963, 0.34589719772338867, -1.0190269947052002, -0.2795291543006897, -0.3630695343017578, -0.9178720116615295, -0.7137392163276672, -0.4144144654273987, -0.4129447937011719, 1.614627718925476, 0.15429642796516418, -0.4367694854736328, 0.029723461717367172, -0.8233135938644409, -0.08608070015907288, -1.0793266296386719, 0.219639390707016, -0.07806568592786789, -0.1856941431760788, -0.18439048528671265, 1.8150731325149536, -0.8669670224189758, -1.9945124387741089, 0.08353327959775925, 0.18644878268241882, -0.1524616926908493, 0.24235199391841888, 1.6438883543014526, 0.48887622356414795, 1.4606574773788452, 1.2648117542266846, 0.9194482564926147, -0.5948114395141602, -1.3397456407546997, 0.7352481484413147, 1.0219029188156128, -1.3735883235931396, 0.7940594553947449, -0.08563681691884995, -0.4974464178085327, 0.6260709762573242, 1.2838386297225952, 0.5239320397377014, -1.9272353649139404, 0.8078216910362244, -1.044867992401123, 0.7823355197906494, 0.7434071898460388, 0.6073765158653259, 0.26831376552581787, 0.8708930015563965, -1.1667193174362183, -1.0846681594848633, -0.7029829025268555, -0.6855857968330383, 1.9967859983444214, -0.40670907497406006, 0.6263186931610107, -0.24296927452087402, -1.3053784370422363, 0.01781211793422699, 0.7442477941513062, 0.3830384612083435, -0.46064406633377075, 0.7691012024879456, -0.586137592792511, -1.0611438751220703, -1.3341121673583984, -0.3867507576942444, -1.1069145202636719, -0.9113849997520447, 1.057420015335083, 0.7683935165405273, 0.3294544816017151, 1.8411866426467896, 0.6981091499328613, 0.3264648914337158, -2.550861120223999, 0.9523695111274719, 0.26885098218917847, -0.12922172248363495, 0.8036239147186279, 0.3897389769554138, 1.0634911060333252, -0.031370971351861954, 0.5248614549636841, -2.491081714630127, 2.333678960800171, -0.19001880288124084, 0.6830089092254639, 0.023277543485164642, -0.1101524755358696, 1.134056806564331, 0.6393705606460571, 0.5131847858428955, -1.034824252128601, 0.5832425951957703, -0.5552898645401001, 1.2617169618606567, 0.9403453469276428, -0.7654740810394287, -0.02751808799803257, 1.3382606506347656, 0.3854690194129944, -0.4985795021057129, -0.9022732973098755, -0.9748192429542542, 0.9874082207679749, 1.7437149286270142, -0.056133169680833817, 0.036838434636592865, 0.826655924320221, 0.7353388071060181, -1.2940516471862793, 0.051042743027210236, -0.7573515176773071, -0.7301201820373535, 1.6798971891403198, 2.113459825515747, -0.19001473486423492, -0.14112716913223267, -0.6496891975402832, -1.3647794723510742, 0.8264226317405701, -0.10192617774009705, 0.15795087814331055, 0.6289519667625427, -0.5875751972198486, 1.040906310081482, 0.8346947431564331, 0.9219523668289185, 0.2734745740890503, 0.26444095373153687, 0.38451164960861206, -0.43085813522338867, -1.1910039186477661, -0.30879175662994385, -0.9905354976654053, -2.6075026988983154, 0.38615405559539795, -0.30400359630584717, -1.450857400894165, 0.004262175410985947, -1.0141288042068481, 0.9073185324668884, -0.5129121541976929, -1.0777735710144043, -1.5714603662490845, 0.20824293792247772, -0.0075888317078351974, 1.0137146711349487, -1.6090497970581055, -0.21630354225635529, 1.2078722715377808, 0.8735818862915039, -0.623034656047821, 0.9958809018135071, 0.2928059697151184, 1.0701686143875122, 0.7370241284370422, -0.3888695240020752, 0.5454249382019043, -0.046721599996089935, -1.318467378616333, 0.4440067410469055, 1.2009217739105225, 0.15814197063446045, 1.445912480354309, -0.46382570266723633, 0.02081560343503952, 0.3821291923522949, -0.6112842559814453, -0.4331299662590027, -0.5233668684959412, 0.6431713700294495, 0.036602746695280075, -0.9084847569465637, -0.17382460832595825, -0.06410546600818634, -0.2995160222053528, 0.13293522596359253, -1.4160760641098022, -0.08130721747875214, -0.38197416067123413, -0.6480360627174377, -1.2180932760238647, -0.0707937702536583, 1.3779131174087524, -0.8335733413696289, -0.14600591361522675, 0.44177955389022827, 0.32774871587753296, 0.586585283279419, 0.6227828860282898, -0.7409648895263672, -0.3286517858505249, -0.16515487432479858, -0.2994757294654846, 0.3231947422027588, 1.4271540641784668, -0.07360943406820297, -0.9588678479194641, 0.6767776608467102, -0.338591992855072, 0.11299437284469604, 1.9273971319198608, 0.08453555405139923, -0.7858967781066895, 0.3551980257034302, -0.7384862303733826, 1.9357637166976929, 1.7131659984588623, 1.2833545207977295, -0.18582086265087128, -0.8530033826828003, 0.6379039287567139, -0.4117327332496643, -0.3452723026275635, 0.7481950521469116, 0.3197749853134155, -0.21653398871421814, -1.4362168312072754, 0.8126775622367859, 1.289565920829773, -0.8354024887084961, -0.7992939352989197, 0.1431392878293991, -0.8269727230072021, 1.1874475479125977, 0.5754496455192566, 0.36402255296707153, 0.31879985332489014, 1.5720502138137817, 0.7855023145675659, -0.49957287311553955, 0.4575265645980835, 0.6337140798568726, -0.16677986085414886, -2.1593852043151855, -1.1524320840835571, 0.30278104543685913, -0.5948848724365234, -1.6340173482894897, 1.4586138725280762, -1.1198650598526, -1.0486236810684204, 0.5289031267166138, 0.0748043954372406, 1.2625600099563599, 0.35636138916015625, 1.584507942199707, 2.0207982063293457, 0.847005307674408, 0.463259756565094, 1.280242681503296, -0.18906043469905853, -0.48446017503738403, 1.8239924907684326, -0.46346163749694824, 0.44994258880615234, 1.0935304164886475, -0.322407066822052, -1.0731956958770752, -0.7745097875595093, -1.2393728494644165, -0.7907468676567078, 1.1492218971252441, 0.08422032743692398, -1.0673710107803345, 0.11527709662914276, 1.5401859283447266, 0.12085029482841492, -0.34834080934524536, 0.6573909521102905, 0.4190472364425659, -0.728297233581543, -0.11574769020080566, -0.8690518736839294, 0.6381518840789795, -0.33070242404937744, -0.3485409617424011, 0.28773564100265503, 0.4946422576904297, 1.3480734825134277, -0.10498793423175812, 0.12998390197753906, 1.0487911701202393, -1.4748539924621582, 1.5327699184417725, -0.6910797953605652, 0.2945899963378906, -2.39678955078125, 1.3768961429595947, -0.6276130080223083, 1.9341771602630615, -2.6543474197387695, 0.4952501058578491, -0.5166826248168945, -0.471618115901947, 0.2623744010925293, -0.3011227250099182, 0.13978762924671173, -0.09795797616243362, -1.1197021007537842, -0.06368914246559143, -0.6724947094917297, 0.5563149452209473, 1.0989207029342651, 1.3634318113327026, -1.1416329145431519, -0.2912886142730713, -1.6436445713043213, -0.10583917796611786, -0.671594500541687, 0.23377491533756256, -1.9692895412445068, -0.24821507930755615, -1.952987551689148, -2.3634419441223145, -1.3124079704284668, -0.8302269577980042, 1.2036948204040527, 0.11687211692333221, -0.9107341766357422, 1.2902824878692627, -0.3976418972015381, -1.8963682651519775, 1.1953861713409424, -2.1080689430236816 ]
https://github.com/huggingface/datasets/issues/5494
Update audio installation doc page
Totally agree, the docs should be in sync with our code. Indeed to avoid confusing users, I think we should have updated the docs at the same time as this PR: - #5167
Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a custom ubuntu repo for it, we have insctructions in the code: https://github.com/huggingface/datasets/blob/main/src/datasets/features/audio.py#L327 So we should update the doc page. But first investigate [this issue](5488).
314
33
Update audio installation doc page Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a custom ubuntu repo for it, we have insctructions in the code: https://github.com/huggingface/datasets/blob/main/src/datasets/features/audio.py#L327 So we should update the doc page. But first investigate [this issue](5488). Totally agree, the docs should be in sync with our code. Indeed to avoid confusing users, I think we should have updated the docs at the same time as this PR: - #5167
[ -1.1686840057373047, -0.8682674765586853, -0.8277369737625122, 1.3871928453445435, -0.02029503881931305, -1.3370705842971802, 0.0879618376493454, -1.0775885581970215, 1.6758482456207275, -0.8146716952323914, 0.37178805470466614, -1.7299107313156128, -0.059250444173812866, -0.5536136031150818, -0.8259539604187012, -0.8901426196098328, -0.374956339597702, -0.8640999794006348, 0.9081048369407654, 2.6056461334228516, 1.2668354511260986, -1.3701180219650269, 2.769423246383667, 0.69777512550354, -0.2777714729309082, -1.063340663909912, 0.6004967093467712, -0.03517473489046097, -1.3492672443389893, -0.4696016311645508, -0.9051395058631897, 0.011171501129865646, -0.4600469172000885, -0.5114924311637878, -0.011235084384679794, 0.3562467694282532, -0.178167462348938, -0.31068506836891174, -0.5152154564857483, -0.7990415692329407, 0.41679802536964417, -0.3524046242237091, 0.917827844619751, -0.3430666923522949, 1.8845584392547607, -0.5236151814460754, 0.3312993347644806, 0.683196485042572, 1.3886290788650513, 0.13990436494350433, -0.08224456012248993, 0.22088614106178284, 0.371309369802475, -0.04861809313297272, 0.4657290577888489, 1.1746395826339722, 0.6332207322120667, 0.4996455907821655, 0.6469714045524597, -2.1827383041381836, 1.3305314779281616, -0.9295560717582703, 0.22810731828212738, 1.4127024412155151, -0.9591782093048096, 0.3059914708137512, -1.7713205814361572, -0.06405165791511536, 0.6027806401252747, -2.3597514629364014, 0.18312816321849823, -1.2354196310043335, -0.5369946956634521, 0.9796494841575623, 0.28564077615737915, -1.2598981857299805, 0.22333142161369324, -0.43178436160087585, 1.0140748023986816, 0.5465499758720398, 1.1473432779312134, -1.6234440803527832, -0.0017649517394602299, -0.30937689542770386, -0.03828901797533035, -1.304227352142334, -1.546539306640625, 0.5093168020248413, 0.6415002942085266, 0.6828832030296326, -0.07690517604351044, 0.9494162201881409, -0.9281522631645203, 0.8407825231552124, -0.8594958186149597, -1.7434532642364502, -1.4393855333328247, -2.280614137649536, -2.2456469535827637, 0.8068299293518066, -0.5058197379112244, -0.5468858480453491, 1.9726492166519165, -1.0737894773483276, -1.872838020324707, 1.1134047508239746, 0.2363232523202896, 0.026758819818496704, 2.4558136463165283, 0.3093738555908203, -0.6603989005088806, 0.32209670543670654, -0.6863166093826294, 0.7832498550415039, -0.4209977984428406, 1.3291374444961548, 0.5023335218429565, -1.0545955896377563, 1.6042096614837646, -0.46336010098457336, 0.4731792211532593, -0.6873785853385925, -0.5081654191017151, -0.8642472624778748, 0.37545910477638245, 1.8543299436569214, -0.3392481803894043, 1.5319626331329346, -0.36063653230667114, -1.5369539260864258, -1.566926121711731, 0.822919487953186, 0.5095500349998474, -0.8399360179901123, 0.11034466326236725, -0.4315381348133087, 0.09833656251430511, -0.031006889417767525, 1.1344469785690308, 1.175895094871521, 0.613347053527832, -0.2744715213775635, -0.9069544672966003, 0.3222494423389435, 0.010116016492247581, -0.663962721824646, -1.7780637741088867, -0.34820130467414856, 0.25852397084236145, 0.6205198764801025, -1.2135173082351685, 1.7313674688339233, 0.8937658071517944, 1.942628264427185, 0.9986026883125305, -0.31884458661079407, 1.493593692779541, 0.0015544407069683075, 1.8737013339996338, -0.5238679051399231, 0.7134962677955627, -0.3075985908508301, -1.0920782089233398, 0.9145038723945618, -0.41584107279777527, -1.9353300333023071, -0.8348762392997742, -0.8658547401428223, -0.20190398395061493, -0.7354816198348999, 1.0317496061325073, -0.3202640414237976, -1.276112675666809, 0.22263279557228088, -0.6884839534759521, 0.07154729962348938, -1.2778586149215698, 0.2583308219909668, 0.7847000360488892, -0.5970102548599243, -0.029133860021829605, -0.24157944321632385, -1.306692123413086, -0.522062361240387, 0.2079901397228241, 1.9422467947006226, -0.6785365343093872, 0.8544573783874512, 0.9939315915107727, -0.757144033908844, 0.024252627044916153, 0.39291125535964966, -0.2917516529560089, 0.8689695000648499, -1.0441888570785522, -0.2563866972923279, 1.1617454290390015, -0.19241614639759064, -0.6312429904937744, 1.4808987379074097, 0.8007148504257202, -1.0196797847747803, -0.1820518970489502, -0.21350358426570892, -0.8449792861938477, -0.029667511582374573, -1.5870835781097412, -0.1256808340549469, 0.3190819025039673, -1.436165452003479, -0.4107029139995575, -0.17166663706302643, 1.4187602996826172, -0.18870042264461517, 1.4032979011535645, -0.3043118715286255, -0.16935139894485474, -0.41368475556373596, -0.3687480092048645, 0.16269288957118988, -0.2056884765625, -0.6209654211997986, 0.3820533752441406, -0.7933036088943481, 0.3265898823738098, 1.4127074480056763, 0.3726831376552582, 0.09383144974708557, 0.46543657779693604, 1.0315380096435547, 0.32326051592826843, -0.047253914177417755, -0.9155102968215942, -1.595810890197754, 2.1202545166015625, -1.4112365245819092, 1.8469171524047852, 0.8066179156303406, -0.02577231265604496, -1.7239322662353516, -1.8662563562393188, 1.4243838787078857, 1.1261978149414062, 2.2769339084625244, 0.5641014575958252, 0.31762588024139404, -0.7356365919113159, -0.6966435313224792, 0.32112541794776917, -1.0298815965652466, -0.7002232074737549, 0.10982279479503632, 2.3355579376220703, 1.809462070465088, -0.5724862217903137, -0.18660297989845276, -0.9793736934661865, 1.2019963264465332, -0.1805025190114975, 0.09518632292747498, 2.054196357727051, -0.35303619503974915, -1.0820506811141968, 1.2646101713180542, -2.425575017929077, 0.18359389901161194, 2.029466390609741, 0.2656572759151459, 0.08821700513362885, -1.4659299850463867, -0.65670245885849, -0.2720297574996948, -0.4508218765258789, -1.2132927179336548, 0.6741219758987427, -0.29703500866889954, -0.9276933073997498, -1.503562092781067, 0.12032176554203033, -1.1266967058181763, -1.7469152212142944, 0.49885886907577515, 1.8262856006622314, 2.1177098751068115, -0.7375009655952454, 1.5568110942840576, -0.1672433465719223, 0.159668430685997, 1.2893526554107666, 1.249902606010437, 3.1606452465057373, 1.8365237712860107, -1.2141684293746948, 0.7233709692955017, -0.15861424803733826, -0.497184157371521, 1.1953529119491577, -1.1205569505691528, 1.181120753288269, -0.16606946289539337, -1.2607090473175049, -1.2853128910064697, 0.99162358045578, 0.48443347215652466, 0.07348242402076721, -0.6469500660896301, 1.256557822227478, 0.08730702102184296, 1.2843247652053833, 0.48378270864486694, -0.2793872654438019, 0.5432308912277222, -0.36146923899650574, -0.4909406900405884, 1.5934772491455078, 0.2269945740699768, -1.4726542234420776, -2.385629892349243, -0.2015412300825119, -0.7485085129737854, -0.0552397146821022, -0.6118804216384888, -1.0138143301010132, 1.6867989301681519, 0.4035734534263611, -1.3318524360656738, -0.3105332553386688, -0.34119218587875366, -0.5681765675544739, 2.59548282623291, -1.4126852750778198, -0.1929718554019928, -0.9836140871047974, -0.45567184686660767, 1.6702202558517456, -1.2273694276809692, -0.0773468017578125, -1.0090569257736206, -0.7041787505149841, -1.3297275304794312, -0.5486012697219849, 0.0035061687231063843, -0.9234566688537598, 0.7237623333930969, 0.1245775818824768, -1.0331600904464722, -0.2502388060092926, -0.9355523586273193, 0.874449610710144, -0.16864705085754395, 0.3450678884983063, 1.8761036396026611, 0.44359710812568665, -0.44880759716033936, 0.6554017663002014, 1.1500065326690674, 0.6491724252700806, -0.6453144550323486, 0.2030831277370453, -0.6808162927627563, 0.23607699573040009, -1.3511704206466675, 0.294981449842453, -2.891313076019287, 0.6646699905395508, -0.12829804420471191, -0.15473267436027527, -0.04769072309136391, -1.1918784379959106, 1.2464386224746704, 2.5314548015594482, -1.1387031078338623, 0.48369070887565613, 0.3027005195617676, 1.1739088296890259, -1.5546995401382446, 0.3414326310157776, -0.39964044094085693, 2.1690680980682373, 0.13915051519870758, 1.204302191734314, -0.4466557204723358, -2.1453866958618164, 0.6581231355667114, -1.2546888589859009, -1.0278664827346802, 0.8138663172721863, -0.7847950458526611, 0.0565902404487133, -1.4632054567337036, -0.037765488028526306, -0.937799870967865, -1.2283354997634888, 0.9082301259040833, 0.09052310883998871, 0.38876450061798096, -0.6570640206336975, 0.32898351550102234, -2.0789854526519775, -1.3839589357376099, -0.12773488461971283, -0.9516093134880066, 0.41582778096199036, -0.26947543025016785, 0.6160983443260193, -0.17643852531909943, 0.04553031548857689, 0.3916967809200287, 1.3792563676834106, 3.4017295837402344, 0.20330782234668732, 0.4309585690498352, -0.04786275699734688, -0.9430431127548218, 1.4709804058074951, 0.9359285831451416, -0.08118091523647308, -0.522276759147644, -1.0075739622116089, 1.2809748649597168, 1.9163919687271118, 1.02639639377594, 0.16537335515022278, -0.8676245808601379, -0.7944379448890686, -0.0031358925625681877, 0.25668707489967346, 0.42792657017707825, 0.902527391910553, -0.06703949719667435, 0.020547164604067802, 1.4305185079574585, 1.229682445526123, -0.4548041820526123, 0.5210961103439331, -0.9453504681587219, -0.4286554455757141, 0.39693939685821533, 0.2904622256755829, 0.042547982186079025, 0.48397499322891235, -0.9775397777557373, -0.2936466634273529, -0.2835076153278351, -0.9222886562347412, -0.7661545872688293, -0.49090802669525146, -0.4204014241695404, 1.640289306640625, 0.03334531933069229, -0.5190350413322449, 0.03542681038379669, -0.7977879643440247, -0.16098159551620483, -1.115816593170166, 0.18468964099884033, -0.1318272203207016, -0.061528727412223816, -0.02979455702006817, 1.7479817867279053, -0.9436400532722473, -2.1502583026885986, 0.2730947434902191, 0.2915346324443817, -0.4609072208404541, 0.1888970583677292, 1.6745566129684448, 0.5325301289558411, 1.4095338582992554, 1.3663907051086426, 0.9890207648277283, -0.6089360117912292, -1.3311153650283813, 0.7942508459091187, 0.9029346108436584, -1.479110836982727, 1.009887456893921, -0.11211873590946198, -0.5363384485244751, 0.6552101969718933, 1.2739553451538086, 0.3351712226867676, -1.9537134170532227, 0.8477664589881897, -0.7460036277770996, 0.8641167283058167, 0.6231657266616821, 0.8014634251594543, 0.19887003302574158, 0.8437851071357727, -1.2659862041473389, -1.2475948333740234, -0.8462581634521484, -0.5563344359397888, 1.928802251815796, -0.1642395555973053, 0.5538799166679382, -0.2041277140378952, -1.2514057159423828, -0.1603832244873047, 0.6767896413803101, 0.29769468307495117, -0.4250212609767914, 0.8664682507514954, -0.6659685373306274, -1.1492416858673096, -1.4030505418777466, -0.484355628490448, -0.9738653302192688, -0.9087892770767212, 1.0821070671081543, 0.8139374256134033, 0.3844347596168518, 1.920662522315979, 0.48857492208480835, 0.2766905426979065, -2.6562862396240234, 0.8966679573059082, 0.2373048961162567, 0.029282864183187485, 0.9550911784172058, 0.23165473341941833, 1.1220719814300537, -0.05233648419380188, 0.47405463457107544, -2.341031312942505, 2.2261269092559814, -0.27921262383461, 0.6276068091392517, 0.024474717676639557, -0.19438536465168, 1.138609766960144, 0.5609326362609863, 0.6577330827713013, -1.1958396434783936, 0.7648209929466248, -0.5726192593574524, 1.1778252124786377, 1.002732515335083, -0.9206694960594177, -0.01546238362789154, 1.3846853971481323, 0.5780590772628784, -0.45752784609794617, -0.8112853169441223, -0.9240865707397461, 0.904536783695221, 1.68692147731781, 0.03823824226856232, -0.052033498883247375, 0.9491714835166931, 0.6321548819541931, -1.255652666091919, 0.09833326935768127, -0.6837956309318542, -0.6858047246932983, 1.7314200401306152, 2.0927391052246094, -0.0542231984436512, -0.2064446657896042, -0.7801337242126465, -1.2365959882736206, 0.7459564805030823, -0.03197697550058365, 0.09567420184612274, 0.7377675771713257, -0.6531141996383667, 1.16635000705719, 0.8271923661231995, 0.9582034349441528, 0.1040138304233551, 0.3454660177230835, 0.3985024690628052, -0.30907106399536133, -1.1731441020965576, -0.3639827370643616, -1.1756701469421387, -2.5321238040924072, 0.481973797082901, -0.34398791193962097, -1.4252846240997314, 0.0020586028695106506, -1.1236591339111328, 0.9013687372207642, -0.6317939758300781, -0.9716156721115112, -1.378645420074463, 0.25415802001953125, -0.14960341155529022, 0.8709109425544739, -1.5412222146987915, -0.08811397850513458, 1.2985228300094604, 0.8899771571159363, -0.5795995593070984, 0.9633033871650696, 0.26633456349372864, 1.0104916095733643, 0.8254945278167725, -0.4632279872894287, 0.4942188262939453, 0.14567287266254425, -1.3779525756835938, 0.4144480526447296, 1.127179741859436, 0.17986270785331726, 1.37871253490448, -0.44696158170700073, 0.07958671450614929, 0.45422109961509705, -0.5664181709289551, -0.492325097322464, -0.5640699863433838, 0.7288632392883301, 0.15866631269454956, -0.9628756046295166, -0.030861511826515198, -0.13587431609630585, -0.20394474267959595, 0.20626914501190186, -1.5719337463378906, -0.29727688431739807, -0.3247824013233185, -0.4540642201900482, -1.3410322666168213, -0.0015349877066910267, 1.3497138023376465, -0.7538713216781616, -0.10626474022865295, 0.4365546405315399, 0.311402291059494, 0.47843095660209656, 0.6589316129684448, -0.638367235660553, -0.3423968255519867, -0.34436750411987305, -0.35848042368888855, 0.3152428865432739, 1.1902202367782593, -0.13292279839515686, -0.9518082141876221, 0.6370996832847595, -0.33326447010040283, 0.06953820586204529, 2.0189552307128906, 0.004984695464372635, -0.8782544136047363, 0.33373239636421204, -0.6455769538879395, 1.9473930597305298, 1.6933060884475708, 1.3536665439605713, -0.1016874611377716, -0.9006931185722351, 0.5909292101860046, -0.23644697666168213, -0.31459909677505493, 0.9392821192741394, 0.44803449511528015, -0.19912977516651154, -1.405634880065918, 0.49408459663391113, 1.2837697267532349, -0.9216773509979248, -0.8136375546455383, 0.09689509868621826, -0.8321095108985901, 1.0881088972091675, 0.7854164838790894, 0.36973878741264343, 0.23938074707984924, 1.5256704092025757, 0.6751833558082581, -0.5294971466064453, 0.42831847071647644, 0.45785486698150635, -0.10892067849636078, -2.069498300552368, -0.9894774556159973, 0.3123360574245453, -0.30218249559402466, -1.5200995206832886, 1.3152704238891602, -1.2323546409606934, -0.8754505515098572, 0.4955657720565796, 0.15602238476276398, 1.4001652002334595, 0.2920037806034088, 1.6975098848342896, 2.0575673580169678, 0.842302143573761, 0.18755508959293365, 1.3614928722381592, -0.09948667883872986, -0.37759244441986084, 1.8050012588500977, -0.4015210270881653, 0.5757575035095215, 0.9893796443939209, -0.33396849036216736, -1.0739820003509521, -0.8672159314155579, -1.1678972244262695, -0.6803717017173767, 1.2034913301467896, 0.15600574016571045, -1.225143313407898, 0.2593257427215576, 1.5031236410140991, 0.0003955187276005745, -0.2156204730272293, 0.5486582517623901, 0.5392672419548035, -0.6573667526245117, -0.07195135951042175, -0.9244958162307739, 0.5273587703704834, -0.043868254870176315, -0.37000706791877747, 0.35149478912353516, 0.4166731536388397, 1.2990622520446777, -0.04307498782873154, 0.136198490858078, 1.1637110710144043, -1.384731411933899, 1.4669256210327148, -0.6167218685150146, 0.19403871893882751, -2.386218786239624, 1.4595222473144531, -0.8246797323226929, 1.937996745109558, -2.619755268096924, 0.34762251377105713, -0.5615785121917725, -0.5210605263710022, 0.2922252416610718, -0.41134119033813477, 0.20211449265480042, -0.2268495261669159, -1.0346590280532837, -0.13505691289901733, -0.7858406901359558, 0.514868974685669, 1.1116420030593872, 1.2928612232208252, -1.0335646867752075, -0.30074936151504517, -1.7634148597717285, -0.2342708557844162, -0.7710171341896057, 0.3524802625179291, -2.0060982704162598, -0.19178926944732666, -2.019615888595581, -2.400195837020874, -1.4740321636199951, -0.809221088886261, 1.031434178352356, 0.2037193775177002, -0.8902887105941772, 1.0977143049240112, -0.366665780544281, -1.7716940641403198, 0.9851740598678589, -2.104825019836426 ]
https://github.com/huggingface/datasets/issues/5494
Update audio installation doc page
No, @polinaeterna, nothing to be sorry about. My comment was for all of us datasets team, as a reminder: when making a PR, but also when reviewing some other's PR, we should not forget to update the corresponding docstring and doc pages. It is something we can improve if we help each other in reminding about it... :hugs:
Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a custom ubuntu repo for it, we have insctructions in the code: https://github.com/huggingface/datasets/blob/main/src/datasets/features/audio.py#L327 So we should update the doc page. But first investigate [this issue](5488).
314
58
Update audio installation doc page Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a custom ubuntu repo for it, we have insctructions in the code: https://github.com/huggingface/datasets/blob/main/src/datasets/features/audio.py#L327 So we should update the doc page. But first investigate [this issue](5488). No, @polinaeterna, nothing to be sorry about. My comment was for all of us datasets team, as a reminder: when making a PR, but also when reviewing some other's PR, we should not forget to update the corresponding docstring and doc pages. It is something we can improve if we help each other in reminding about it... :hugs:
[ -1.161424160003662, -0.8929922580718994, -0.7799407839775085, 1.3978607654571533, -0.04185804724693298, -1.3138270378112793, 0.07529287785291672, -1.076865792274475, 1.648038387298584, -0.7778950333595276, 0.37946653366088867, -1.7578752040863037, -0.005315739661455154, -0.5952066779136658, -0.7876390814781189, -0.8643065690994263, -0.37547117471694946, -0.8132228255271912, 0.9068121314048767, 2.624319076538086, 1.2465717792510986, -1.4285186529159546, 2.705716133117676, 0.7025358080863953, -0.2709536552429199, -1.0825175046920776, 0.6256251931190491, -0.02619844302535057, -1.3023689985275269, -0.46698009967803955, -0.8808942437171936, -0.022797245532274246, -0.46378862857818604, -0.5043836236000061, -0.017026733607053757, 0.3637537956237793, -0.20410673320293427, -0.3093598783016205, -0.5369297862052917, -0.7715058326721191, 0.46123042702674866, -0.3572803735733032, 0.943467915058136, -0.28678232431411743, 1.7956899404525757, -0.5265519618988037, 0.3875882923603058, 0.6557982563972473, 1.384220838546753, 0.2099132537841797, -0.05747561156749725, 0.2016332745552063, 0.40211349725723267, -0.056217603385448456, 0.43941763043403625, 1.1258819103240967, 0.6801484227180481, 0.5063091516494751, 0.7035349607467651, -2.1908023357391357, 1.3726754188537598, -1.0001602172851562, 0.20828083157539368, 1.4183613061904907, -0.8899029493331909, 0.3321056663990021, -1.7637615203857422, -0.06557019799947739, 0.6026984453201294, -2.283994674682617, 0.20057527720928192, -1.2096742391586304, -0.4959394633769989, 0.8838541507720947, 0.2996315658092499, -1.1980154514312744, 0.26815807819366455, -0.4052194654941559, 0.9774894118309021, 0.5471529960632324, 1.1341404914855957, -1.6548779010772705, -0.028351930901408195, -0.2937173545360565, 0.022607101127505302, -1.3285387754440308, -1.5446043014526367, 0.5569368600845337, 0.6752114295959473, 0.6546549797058105, -0.08828075230121613, 0.909722089767456, -0.891333281993866, 0.7997256517410278, -0.9676458239555359, -1.6774370670318604, -1.4348329305648804, -2.264045476913452, -2.3077309131622314, 0.7637169361114502, -0.4945225417613983, -0.5736125707626343, 2.0068514347076416, -1.0363742113113403, -1.8375993967056274, 1.1466671228408813, 0.28324028849601746, 0.0012874975800514221, 2.481549024581909, 0.21164412796497345, -0.6351904273033142, 0.38495588302612305, -0.7136457562446594, 0.7926092147827148, -0.4426652491092682, 1.3993967771530151, 0.5115748643875122, -1.0052860975265503, 1.6204066276550293, -0.4803631007671356, 0.47939956188201904, -0.662046492099762, -0.51677006483078, -0.8363057971000671, 0.41421711444854736, 1.8692129850387573, -0.31518641114234924, 1.563974142074585, -0.40991368889808655, -1.51291823387146, -1.5548957586288452, 0.8505306243896484, 0.5155110359191895, -0.885528028011322, 0.10257396847009659, -0.3973744213581085, 0.13777942955493927, -0.05535120517015457, 1.066678524017334, 1.198868989944458, 0.6094884872436523, -0.2656898498535156, -0.9329838752746582, 0.32283586263656616, -0.08888322860002518, -0.7260184288024902, -1.8022106885910034, -0.35928910970687866, 0.24415287375450134, 0.6545235514640808, -1.2643027305603027, 1.7002718448638916, 0.9136841893196106, 1.9694384336471558, 0.9667612314224243, -0.3934820890426636, 1.4490830898284912, 0.006112708710134029, 1.8634790182113647, -0.5393664240837097, 0.7251753211021423, -0.3462560772895813, -1.0984303951263428, 0.9121378660202026, -0.3860757052898407, -1.9637119770050049, -0.7917608618736267, -0.8910492062568665, -0.23484006524085999, -0.7845728397369385, 1.0224331617355347, -0.2931842505931854, -1.2952361106872559, 0.29065534472465515, -0.6489135026931763, 0.10727085918188095, -1.265903353691101, 0.2899382412433624, 0.7706553339958191, -0.5638510584831238, -0.030402861535549164, -0.17766599357128143, -1.3405450582504272, -0.5120863318443298, 0.19921864569187164, 1.894334077835083, -0.6802416443824768, 0.8515282273292542, 1.0123405456542969, -0.6979484558105469, 0.026456477120518684, 0.37293460965156555, -0.2585165798664093, 0.8230553865432739, -1.015507698059082, -0.32698163390159607, 1.1900384426116943, -0.17741557955741882, -0.587451159954071, 1.5187031030654907, 0.7748978137969971, -1.0065466165542603, -0.17945457994937897, -0.20048905909061432, -0.7927545309066772, 0.012429047375917435, -1.6105009317398071, -0.16162461042404175, 0.3382779061794281, -1.4346261024475098, -0.3962087631225586, -0.1769298017024994, 1.3646034002304077, -0.2142035961151123, 1.4102668762207031, -0.36720535159111023, -0.19645902514457703, -0.4042159616947174, -0.3373047113418579, 0.11793863028287888, -0.25294333696365356, -0.6026446223258972, 0.3428029716014862, -0.8220699429512024, 0.37807342410087585, 1.4481496810913086, 0.3618321418762207, 0.14933323860168457, 0.43177515268325806, 1.0374056100845337, 0.3647317588329315, -0.008823154494166374, -0.9126660823822021, -1.5352336168289185, 2.128669261932373, -1.4241642951965332, 1.8819081783294678, 0.8066096305847168, 0.01820984296500683, -1.7033573389053345, -1.8408071994781494, 1.3614420890808105, 1.118199348449707, 2.3192617893218994, 0.582272469997406, 0.2993595600128174, -0.7491526007652283, -0.6455249190330505, 0.3101790249347687, -1.0405590534210205, -0.680245041847229, 0.16120438277721405, 2.362600326538086, 1.7960100173950195, -0.5615392327308655, -0.15053711831569672, -0.9766919612884521, 1.2435911893844604, -0.14728200435638428, 0.14533141255378723, 2.042229652404785, -0.2854342758655548, -1.1371036767959595, 1.2820091247558594, -2.4329442977905273, 0.18479007482528687, 2.0010271072387695, 0.32913661003112793, 0.08160480856895447, -1.4554730653762817, -0.6736320853233337, -0.2957805395126343, -0.47107574343681335, -1.1880683898925781, 0.6451235413551331, -0.2668106257915497, -0.9145320057868958, -1.4764599800109863, 0.13229304552078247, -1.1496949195861816, -1.735122561454773, 0.4376184940338135, 1.8115381002426147, 2.098853826522827, -0.7717387080192566, 1.5364147424697876, -0.15674374997615814, 0.14523839950561523, 1.2904986143112183, 1.195546269416809, 3.1189842224121094, 1.8696398735046387, -1.2399044036865234, 0.7422821521759033, -0.18427635729312897, -0.47700777649879456, 1.1616623401641846, -1.1633504629135132, 1.1713606119155884, -0.1521885246038437, -1.2698931694030762, -1.3173493146896362, 1.0027462244033813, 0.41731947660446167, 0.05232173949480057, -0.6366913318634033, 1.2132854461669922, 0.08820242434740067, 1.2767558097839355, 0.4939481019973755, -0.266522079706192, 0.5218863487243652, -0.3756985366344452, -0.5097720623016357, 1.5801984071731567, 0.2741726338863373, -1.5258275270462036, -2.3557522296905518, -0.2442391961812973, -0.7698002457618713, -0.06942397356033325, -0.5944416522979736, -1.0157570838928223, 1.711086630821228, 0.33893635869026184, -1.3552753925323486, -0.2624472975730896, -0.31380173563957214, -0.598120927810669, 2.643495559692383, -1.4424587488174438, -0.2283279448747635, -1.0154069662094116, -0.536471962928772, 1.6657018661499023, -1.2660536766052246, -0.1244601160287857, -1.0027011632919312, -0.6911086440086365, -1.306020736694336, -0.5251308083534241, -0.004328541923314333, -0.8750333189964294, 0.6973557472229004, 0.16444510221481323, -1.0389763116836548, -0.29544463753700256, -0.8876526355743408, 0.8770788311958313, -0.1414993852376938, 0.35576876997947693, 1.913097620010376, 0.4774662256240845, -0.39606690406799316, 0.5940264463424683, 1.134456992149353, 0.624017059803009, -0.6484506130218506, 0.15039950609207153, -0.6894429922103882, 0.2352830022573471, -1.3170297145843506, 0.33564460277557373, -2.8096983432769775, 0.64974045753479, -0.09068445861339569, -0.1595795601606369, -0.06429927051067352, -1.24237060546875, 1.2504944801330566, 2.5864059925079346, -1.133125901222229, 0.5312564969062805, 0.3249644339084625, 1.2199968099594116, -1.5608093738555908, 0.36417439579963684, -0.3462841212749481, 2.2017858028411865, 0.1979503184556961, 1.184099793434143, -0.4553505778312683, -2.2323248386383057, 0.6499159336090088, -1.2720998525619507, -1.044152021408081, 0.7464107275009155, -0.8516614437103271, 0.018957998603582382, -1.4591740369796753, -0.0820174366235733, -0.9384312629699707, -1.226103663444519, 0.8928992748260498, 0.07143149524927139, 0.4236368238925934, -0.6224216818809509, 0.3634960353374481, -2.150951623916626, -1.4258735179901123, -0.1718350201845169, -0.9347164630889893, 0.45322468876838684, -0.28421878814697266, 0.6433604955673218, -0.1507740467786789, 0.0014104805886745453, 0.3755401372909546, 1.3967008590698242, 3.409074306488037, 0.26745763421058655, 0.4495217800140381, -0.11897622793912888, -0.9561606049537659, 1.4457751512527466, 0.925950288772583, -0.0811733677983284, -0.518808901309967, -0.9988847374916077, 1.3262451887130737, 1.9644932746887207, 1.028404951095581, 0.08281858265399933, -0.8355458378791809, -0.8167415857315063, 0.021192314103245735, 0.2145395427942276, 0.418239951133728, 0.9288978576660156, -0.08388424664735794, 0.03908925503492355, 1.446205735206604, 1.273388385772705, -0.42132559418678284, 0.4202732741832733, -0.9008210897445679, -0.4056232273578644, 0.38406994938850403, 0.2813178598880768, 0.0640576034784317, 0.5556682348251343, -0.944783627986908, -0.32491225004196167, -0.2746453583240509, -0.9256181120872498, -0.7940068244934082, -0.5299771428108215, -0.4229862093925476, 1.6294233798980713, 0.07836589217185974, -0.5048356652259827, 0.04601652920246124, -0.8267701864242554, -0.18069763481616974, -1.1195331811904907, 0.18748606741428375, -0.08437342196702957, -0.13481999933719635, -0.049903929233551025, 1.7597484588623047, -0.9537089467048645, -2.0975615978240967, 0.2868100106716156, 0.2858361303806305, -0.47523748874664307, 0.22294625639915466, 1.650545597076416, 0.5409391522407532, 1.4133341312408447, 1.3628531694412231, 0.9691154956817627, -0.6543283462524414, -1.3495609760284424, 0.7896715402603149, 0.8974253535270691, -1.468516230583191, 1.0002803802490234, -0.0750504583120346, -0.4826805591583252, 0.6308587193489075, 1.2694096565246582, 0.3368179500102997, -1.9827730655670166, 0.7675799131393433, -0.796545147895813, 0.8326064944267273, 0.6121950149536133, 0.791437566280365, 0.1775963008403778, 0.7141692042350769, -1.31443190574646, -1.1983006000518799, -0.8449567556381226, -0.5822882056236267, 1.9349784851074219, -0.18628408014774323, 0.5653262734413147, -0.19860036671161652, -1.2689491510391235, -0.16190937161445618, 0.6720207929611206, 0.282561331987381, -0.47610682249069214, 0.8404417634010315, -0.6499518752098083, -1.1942273378372192, -1.3696810007095337, -0.5196260809898376, -0.9137301445007324, -0.9343127012252808, 1.0793263912200928, 0.8265320062637329, 0.3486792743206024, 1.8842765092849731, 0.5070198178291321, 0.23753568530082703, -2.64475679397583, 0.9437685012817383, 0.21723315119743347, -0.0011529247276484966, 0.9142602682113647, 0.2287754863500595, 1.049133062362671, -0.03756619244813919, 0.5299038887023926, -2.3891966342926025, 2.2667367458343506, -0.33117300271987915, 0.705190896987915, 0.002531459555029869, -0.20492857694625854, 1.094225525856018, 0.5943589210510254, 0.6338680982589722, -1.2573940753936768, 0.7089672088623047, -0.5762127637863159, 1.1792593002319336, 0.9528940320014954, -0.8755854368209839, -0.019218046218156815, 1.3360531330108643, 0.53091961145401, -0.4407523274421692, -0.8696980476379395, -0.911541759967804, 0.9288499355316162, 1.6926119327545166, -0.050177499651908875, -0.012942496687173843, 0.9994353652000427, 0.6291874647140503, -1.2646859884262085, 0.06097438186407089, -0.7187745571136475, -0.690903902053833, 1.7147626876831055, 2.0771501064300537, -0.07371786236763, -0.19432662427425385, -0.7058470249176025, -1.2271668910980225, 0.7580305337905884, -0.021167714148759842, 0.1325903832912445, 0.6980432868003845, -0.6468522548675537, 1.144150972366333, 0.8367164731025696, 0.9825611114501953, 0.14599348604679108, 0.33468592166900635, 0.3855888843536377, -0.3324515223503113, -1.1237010955810547, -0.2953026294708252, -1.1407831907272339, -2.5308756828308105, 0.49876827001571655, -0.3027859628200531, -1.4058139324188232, 0.02850770764052868, -1.0984081029891968, 0.8932603597640991, -0.6356858611106873, -0.946807861328125, -1.4086356163024902, 0.27240270376205444, -0.17507869005203247, 0.899742841720581, -1.5636519193649292, -0.09499827027320862, 1.2819769382476807, 0.8804440498352051, -0.5538868308067322, 1.010581374168396, 0.22097903490066528, 1.0353355407714844, 0.8387816548347473, -0.4166804254055023, 0.5043660998344421, 0.13946251571178436, -1.3533357381820679, 0.42587265372276306, 1.1170843839645386, 0.21787534654140472, 1.3920397758483887, -0.4710172116756439, 0.09168851375579834, 0.41138550639152527, -0.5590744018554688, -0.42887207865715027, -0.6132415533065796, 0.7697027921676636, 0.1715300977230072, -0.9494268298149109, -0.029753979295492172, -0.1384560465812683, -0.17490193247795105, 0.19104869663715363, -1.5322986841201782, -0.2670634686946869, -0.3481135964393616, -0.4600609838962555, -1.306621789932251, -0.08329559117555618, 1.3812012672424316, -0.7758763432502747, -0.10322358459234238, 0.401675283908844, 0.357195109128952, 0.4930538535118103, 0.6542607545852661, -0.6168171763420105, -0.3663918375968933, -0.34446778893470764, -0.380720317363739, 0.31843018531799316, 1.2526310682296753, -0.12930841743946075, -0.9893933534622192, 0.7168851494789124, -0.36398252844810486, 0.08821575343608856, 1.977602243423462, -0.0020274603739380836, -0.8074690699577332, 0.3195665180683136, -0.6433559060096741, 1.9521644115447998, 1.747105360031128, 1.3150222301483154, -0.12911272048950195, -0.9319844245910645, 0.6359336972236633, -0.251084566116333, -0.3016304075717926, 0.9356729984283447, 0.42016634345054626, -0.23313768208026886, -1.4155149459838867, 0.49406111240386963, 1.2922964096069336, -0.8849407434463501, -0.7784979343414307, 0.04892644286155701, -0.8098863363265991, 1.1418418884277344, 0.7141587734222412, 0.3624015152454376, 0.2744557857513428, 1.5648293495178223, 0.7101975083351135, -0.546531617641449, 0.4148978292942047, 0.47747036814689636, -0.1405266374349594, -2.067086696624756, -1.0297918319702148, 0.2879016399383545, -0.3246203064918518, -1.5363435745239258, 1.3143129348754883, -1.2208331823349, -0.8808446526527405, 0.52749103307724, 0.15815852582454681, 1.4062278270721436, 0.3366681933403015, 1.663105845451355, 2.0917623043060303, 0.8048569560050964, 0.20576435327529907, 1.3248729705810547, -0.11065208911895752, -0.4003463089466095, 1.820276141166687, -0.35485363006591797, 0.5469831824302673, 1.0391403436660767, -0.3320293724536896, -1.0237599611282349, -0.8623751401901245, -1.2380828857421875, -0.6600431203842163, 1.235474944114685, 0.14553925395011902, -1.2375731468200684, 0.27424511313438416, 1.5679270029067993, -0.048844993114471436, -0.26445844769477844, 0.5340810418128967, 0.492332398891449, -0.6764511466026306, -0.07167894393205643, -0.8971656560897827, 0.5216272473335266, -0.07506668567657471, -0.349662184715271, 0.3880620300769806, 0.404950886964798, 1.2712241411209106, -0.02435692958533764, 0.11388089507818222, 1.1380858421325684, -1.4055391550064087, 1.505845069885254, -0.6232754588127136, 0.14866870641708374, -2.3451333045959473, 1.3928059339523315, -0.7474656701087952, 1.9795856475830078, -2.6453652381896973, 0.3641239404678345, -0.5705516934394836, -0.5619125366210938, 0.3376989960670471, -0.47073444724082947, 0.1864507645368576, -0.200629323720932, -1.0304325819015503, -0.10092537850141525, -0.7543492317199707, 0.4865480661392212, 1.0879818201065063, 1.3140662908554077, -1.0462101697921753, -0.30262675881385803, -1.765429139137268, -0.2109251618385315, -0.7582584023475647, 0.3400315046310425, -1.9806897640228271, -0.160918727517128, -2.0267493724823, -2.3251590728759766, -1.5202406644821167, -0.8146877884864807, 1.000638484954834, 0.1582508087158203, -0.9177812337875366, 1.0824297666549683, -0.369091659784317, -1.7895671129226685, 0.9852069616317749, -2.1285524368286133 ]
https://github.com/huggingface/datasets/issues/5494
Update audio installation doc page
@polinaeterna I think we can close this issue now as we no longer use `torchaudio` for decoding.
Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a custom ubuntu repo for it, we have insctructions in the code: https://github.com/huggingface/datasets/blob/main/src/datasets/features/audio.py#L327 So we should update the doc page. But first investigate [this issue](5488).
314
17
Update audio installation doc page Our [installation documentation page](https://huggingface.co/docs/datasets/installation#audio) says that one can use Datasets for mp3 only with `torchaudio<0.12`. `torchaudio>0.12` is actually supported too but requires a specific version of ffmpeg which is not easily installed on all linux versions but there is a custom ubuntu repo for it, we have insctructions in the code: https://github.com/huggingface/datasets/blob/main/src/datasets/features/audio.py#L327 So we should update the doc page. But first investigate [this issue](5488). @polinaeterna I think we can close this issue now as we no longer use `torchaudio` for decoding.
[ -1.1674246788024902, -0.8407456278800964, -0.7989696860313416, 1.3934714794158936, -0.024220071732997894, -1.3427902460098267, 0.12882566452026367, -1.08321213722229, 1.6402385234832764, -0.8051636219024658, 0.40123072266578674, -1.7056013345718384, -0.048283278942108154, -0.5451642274856567, -0.8056716918945312, -0.9198321104049683, -0.35843291878700256, -0.7915911078453064, 0.9140580296516418, 2.583221912384033, 1.2794121503829956, -1.3352681398391724, 2.8058388233184814, 0.6754545569419861, -0.3066194951534271, -1.1446748971939087, 0.5855474472045898, -0.005054187029600143, -1.3202451467514038, -0.43217936158180237, -0.9029636979103088, -0.013637421652674675, -0.46187689900398254, -0.5079774260520935, -0.009716488420963287, 0.3727690279483795, -0.20031069219112396, -0.3645126223564148, -0.4890889823436737, -0.7564346790313721, 0.43617454171180725, -0.3497408628463745, 0.892280101776123, -0.32912304997444153, 1.7922762632369995, -0.5631935596466064, 0.3351818323135376, 0.6810497045516968, 1.4065302610397339, 0.17937833070755005, -0.08047893643379211, 0.2468835413455963, 0.41735896468162537, -0.0726887583732605, 0.42144784331321716, 1.2054966688156128, 0.6514303684234619, 0.5210860967636108, 0.5980267524719238, -2.1899514198303223, 1.3185186386108398, -0.9498490691184998, 0.19878371059894562, 1.4272512197494507, -0.9358351230621338, 0.29492560029029846, -1.7751047611236572, -0.08827076107263565, 0.5424476861953735, -2.332293748855591, 0.1412346363067627, -1.2592936754226685, -0.5479865670204163, 0.9006436467170715, 0.31328698992729187, -1.2749847173690796, 0.24896609783172607, -0.4114408791065216, 0.9935429692268372, 0.5771343111991882, 1.1380401849746704, -1.5671402215957642, -0.009980420581996441, -0.3060689866542816, -0.026236828416585922, -1.2589081525802612, -1.5397042036056519, 0.5153585076332092, 0.6644574999809265, 0.697803795337677, -0.09436223655939102, 0.9298679828643799, -0.9045419096946716, 0.8618239760398865, -0.9150369763374329, -1.7350327968597412, -1.4596152305603027, -2.2452709674835205, -2.2431278228759766, 0.82030189037323, -0.5023731589317322, -0.5691850185394287, 1.9638203382492065, -1.0590804815292358, -1.8980741500854492, 1.1319249868392944, 0.24376899003982544, 0.0013251760974526405, 2.4474167823791504, 0.2912076711654663, -0.6604478359222412, 0.3340742886066437, -0.7022715210914612, 0.7400673031806946, -0.4162302315235138, 1.395298957824707, 0.48297959566116333, -1.026468276977539, 1.627017617225647, -0.4110938012599945, 0.4926407039165497, -0.6893065571784973, -0.4998753070831299, -0.8645731806755066, 0.4157193601131439, 1.8793370723724365, -0.32199040055274963, 1.5849586725234985, -0.4281701147556305, -1.5642051696777344, -1.5641815662384033, 0.8237776756286621, 0.5534228682518005, -0.8373365998268127, 0.18606869876384735, -0.41770464181900024, 0.09056757390499115, 0.019560571759939194, 1.1009653806686401, 1.1639143228530884, 0.6652985215187073, -0.24654251337051392, -0.8744243383407593, 0.37487855553627014, 0.0780874714255333, -0.7004613280296326, -1.772072196006775, -0.3591305613517761, 0.3101099133491516, 0.5955977439880371, -1.2351397275924683, 1.7223124504089355, 0.8394190073013306, 1.9529401063919067, 1.0020806789398193, -0.3624216914176941, 1.4769924879074097, -0.00853856559842825, 1.8170057535171509, -0.5151488184928894, 0.7222009897232056, -0.3194909691810608, -1.1018826961517334, 0.8781100511550903, -0.40313807129859924, -1.930078387260437, -0.8545938730239868, -0.8704646825790405, -0.1507151871919632, -0.8248720169067383, 1.0252054929733276, -0.3057171106338501, -1.2981919050216675, 0.1871817708015442, -0.6718023419380188, 0.07465731352567673, -1.3260397911071777, 0.28002962470054626, 0.8304005265235901, -0.6238434314727783, -0.014339353889226913, -0.2193712294101715, -1.297946810722351, -0.5116901993751526, 0.19773216545581818, 1.9207009077072144, -0.6842767000198364, 0.8611712455749512, 0.972162127494812, -0.8036144375801086, 0.05257581174373627, 0.3497580885887146, -0.2949618697166443, 0.8100041151046753, -0.9941971898078918, -0.23782266676425934, 1.1791051626205444, -0.18685276806354523, -0.6132895350456238, 1.471405267715454, 0.8128401041030884, -0.9914983510971069, -0.20443318784236908, -0.20640569925308228, -0.7929348349571228, -0.052798423916101456, -1.5874305963516235, -0.16142041981220245, 0.35730189085006714, -1.4175361394882202, -0.397647887468338, -0.19504176080226898, 1.3965957164764404, -0.24193160235881805, 1.3602111339569092, -0.3315766155719757, -0.17082831263542175, -0.45931875705718994, -0.3366719186306, 0.11898152530193329, -0.2656468152999878, -0.6846200227737427, 0.38723665475845337, -0.7915475964546204, 0.3829987347126007, 1.4297049045562744, 0.37160512804985046, 0.09643600881099701, 0.47859272360801697, 1.0430257320404053, 0.31162944436073303, -0.06284980475902557, -0.9204732775688171, -1.5875908136367798, 2.125004768371582, -1.386013388633728, 1.8689985275268555, 0.8161692023277283, -0.051317278295755386, -1.729334831237793, -1.8743374347686768, 1.4104586839675903, 1.1617317199707031, 2.2882652282714844, 0.5882904529571533, 0.3444862961769104, -0.720331072807312, -0.7014447450637817, 0.2765733599662781, -1.044539451599121, -0.680987536907196, 0.17419788241386414, 2.341745138168335, 1.8148492574691772, -0.6049405336380005, -0.228463277220726, -1.0295405387878418, 1.1646839380264282, -0.18423999845981598, 0.12250395119190216, 2.0563926696777344, -0.3501734435558319, -1.0736273527145386, 1.2571572065353394, -2.381084680557251, 0.21825845539569855, 2.0517988204956055, 0.28088003396987915, 0.027998637408018112, -1.468139410018921, -0.623763382434845, -0.29886341094970703, -0.4567679166793823, -1.2066559791564941, 0.6593148112297058, -0.2797739505767822, -0.9237661957740784, -1.50473952293396, 0.09276445209980011, -1.0983245372772217, -1.710843563079834, 0.4914151728153229, 1.8406134843826294, 2.0672919750213623, -0.7684658765792847, 1.5302215814590454, -0.1375066339969635, 0.12285615503787994, 1.2530885934829712, 1.1683598756790161, 3.1321630477905273, 1.8193484544754028, -1.2116601467132568, 0.7412627935409546, -0.1580955535173416, -0.5289343595504761, 1.1793898344039917, -1.1430108547210693, 1.1849943399429321, -0.1838618367910385, -1.2802456617355347, -1.3189938068389893, 0.9710006713867188, 0.40241768956184387, 0.06892549991607666, -0.637671947479248, 1.2298551797866821, 0.1172785758972168, 1.28327476978302, 0.4767163097858429, -0.22527071833610535, 0.5782868266105652, -0.33166247606277466, -0.4543166160583496, 1.5623356103897095, 0.26514914631843567, -1.488267183303833, -2.37947678565979, -0.1815858781337738, -0.722961962223053, -0.06614688783884048, -0.5819007754325867, -1.0077866315841675, 1.6766278743743896, 0.4232175052165985, -1.3204355239868164, -0.25235238671302795, -0.3543352484703064, -0.5716432332992554, 2.6656081676483154, -1.398316502571106, -0.16973155736923218, -1.003645658493042, -0.5030006170272827, 1.7218449115753174, -1.2191107273101807, -0.03376820683479309, -0.9980194568634033, -0.6614064574241638, -1.3495644330978394, -0.5527538061141968, 0.028994083404541016, -0.8756405115127563, 0.6628233194351196, 0.1517179012298584, -1.0260082483291626, -0.29181137681007385, -0.8978092670440674, 0.8798977136611938, -0.1989145129919052, 0.31620535254478455, 1.9118553400039673, 0.4833455979824066, -0.42045027017593384, 0.6740027666091919, 1.0948898792266846, 0.5779033899307251, -0.6105886101722717, 0.21901917457580566, -0.6766554117202759, 0.17316584289073944, -1.3824201822280884, 0.2683131992816925, -2.8780603408813477, 0.6550077795982361, -0.13581325113773346, -0.18069638311862946, -0.07467202842235565, -1.2757267951965332, 1.2753039598464966, 2.5422728061676025, -1.1505526304244995, 0.5578016638755798, 0.3430710732936859, 1.194101095199585, -1.5163545608520508, 0.3474605083465576, -0.3740304708480835, 2.2038931846618652, 0.17687149345874786, 1.2635012865066528, -0.48151057958602905, -2.1272528171539307, 0.686252772808075, -1.2198232412338257, -1.035016417503357, 0.7818017601966858, -0.8590545654296875, 0.07926645129919052, -1.4298802614212036, -0.0729488953948021, -0.9571864604949951, -1.2040636539459229, 0.9363759160041809, 0.059798743575811386, 0.4002194404602051, -0.6323833465576172, 0.3623611629009247, -2.1190550327301025, -1.4081062078475952, -0.14059041440486908, -0.9736713171005249, 0.40849509835243225, -0.22824585437774658, 0.5784724354743958, -0.16928409039974213, 0.011267024092376232, 0.36360597610473633, 1.3791041374206543, 3.3773910999298096, 0.2787420153617859, 0.4218292236328125, -0.08254524320363998, -0.9598298668861389, 1.4838120937347412, 0.917610764503479, -0.083665631711483, -0.5064038038253784, -0.978698194026947, 1.2972074747085571, 1.92587411403656, 1.0349164009094238, 0.15749166905879974, -0.8767191171646118, -0.8288001418113708, -0.006519760936498642, 0.23086026310920715, 0.41924959421157837, 0.8948585987091064, -0.07966707646846771, 0.05020584538578987, 1.4258233308792114, 1.1986559629440308, -0.5023689866065979, 0.5253398418426514, -0.9811434149742126, -0.41345539689064026, 0.3537655472755432, 0.29271256923675537, 0.03751998022198677, 0.5222519040107727, -0.9468221068382263, -0.31292998790740967, -0.25228092074394226, -0.8863617181777954, -0.7898749113082886, -0.48800769448280334, -0.4166058599948883, 1.6300603151321411, 0.02967679873108864, -0.5256599187850952, 0.026684287935495377, -0.8258274793624878, -0.19978845119476318, -1.0676690340042114, 0.15091323852539062, -0.09375908970832825, -0.05886596068739891, -0.024632073938846588, 1.782430648803711, -0.9549559950828552, -2.133547782897949, 0.27637791633605957, 0.28334689140319824, -0.47915786504745483, 0.19711801409721375, 1.6953493356704712, 0.5042240023612976, 1.4125252962112427, 1.3787778615951538, 1.006691336631775, -0.5736722946166992, -1.3246771097183228, 0.7614074945449829, 0.8754621744155884, -1.4254605770111084, 0.9750967025756836, -0.07930409163236618, -0.48163625597953796, 0.5926694273948669, 1.2654120922088623, 0.374771386384964, -1.9584472179412842, 0.8147494792938232, -0.7256767153739929, 0.805072009563446, 0.6841376423835754, 0.8098136782646179, 0.21465900540351868, 0.8116191625595093, -1.2665027379989624, -1.2415121793746948, -0.8926568031311035, -0.5510396957397461, 1.9394570589065552, -0.19937589764595032, 0.600563108921051, -0.1980140507221222, -1.2661336660385132, -0.18128931522369385, 0.6655126214027405, 0.31415098905563354, -0.46746811270713806, 0.897851824760437, -0.611610472202301, -1.1649173498153687, -1.4001357555389404, -0.47371307015419006, -0.9472154378890991, -0.930125892162323, 1.0996909141540527, 0.8321959972381592, 0.3610650300979614, 1.9131437540054321, 0.4712178707122803, 0.2752981185913086, -2.688838005065918, 0.9298117756843567, 0.20733642578125, 0.0639207661151886, 0.906643807888031, 0.27994513511657715, 1.0997653007507324, -0.06107661500573158, 0.4809015393257141, -2.395829439163208, 2.2556121349334717, -0.26407620310783386, 0.668276846408844, 0.027272358536720276, -0.16856521368026733, 1.1432908773422241, 0.5332436561584473, 0.6408020257949829, -1.2887935638427734, 0.7750558853149414, -0.541278600692749, 1.1836165189743042, 0.9878703951835632, -0.895571768283844, 0.019774921238422394, 1.40629243850708, 0.5553439855575562, -0.45980599522590637, -0.8392106294631958, -0.9142538905143738, 0.9402174353599548, 1.59694242477417, 0.03278307244181633, -0.047702353447675705, 0.9751921892166138, 0.6383596062660217, -1.3124727010726929, 0.08943571895360947, -0.6611605286598206, -0.6704846620559692, 1.7787468433380127, 2.1185495853424072, -0.06876964122056961, -0.21139858663082123, -0.7383190393447876, -1.1856580972671509, 0.7322351932525635, -0.014125734567642212, 0.11814233660697937, 0.7581934928894043, -0.6408777832984924, 1.2036383152008057, 0.8257741332054138, 0.9499182105064392, 0.13594882190227509, 0.3477570414543152, 0.3578062355518341, -0.2734014093875885, -1.1851259469985962, -0.3270476460456848, -1.1727354526519775, -2.5166354179382324, 0.45530983805656433, -0.3517257869243622, -1.3525933027267456, 0.03854004293680191, -1.143894076347351, 0.8460514545440674, -0.7022045850753784, -0.936052680015564, -1.3752782344818115, 0.24366819858551025, -0.16757997870445251, 0.8586854934692383, -1.551351547241211, -0.08768418431282043, 1.2596306800842285, 0.9467180967330933, -0.5893194079399109, 0.9819188714027405, 0.22911931574344635, 1.027532935142517, 0.8455938696861267, -0.47951021790504456, 0.4731289744377136, 0.1300404667854309, -1.3749126195907593, 0.417415052652359, 1.127808928489685, 0.22482329607009888, 1.3991544246673584, -0.43411463499069214, 0.11490241438150406, 0.4933289587497711, -0.5952894687652588, -0.4911738634109497, -0.5794496536254883, 0.7609235048294067, 0.18908683955669403, -1.0060268640518188, -0.04569132626056671, -0.16122326254844666, -0.19360657036304474, 0.2137138694524765, -1.576086163520813, -0.29447245597839355, -0.27489960193634033, -0.4904727637767792, -1.301167607307434, -0.012345677241683006, 1.3404215574264526, -0.7958662509918213, -0.12263713032007217, 0.43801960349082947, 0.28985273838043213, 0.4904177784919739, 0.6271547079086304, -0.6648467183113098, -0.2963603734970093, -0.33994847536087036, -0.3805995583534241, 0.3322543501853943, 1.2250350713729858, -0.12434747070074081, -1.0007333755493164, 0.6465272307395935, -0.38038715720176697, 0.06537404656410217, 2.0352163314819336, -0.022588161751627922, -0.8624169826507568, 0.2951102554798126, -0.6611456871032715, 1.964219331741333, 1.695069670677185, 1.3700323104858398, -0.06816890090703964, -0.9496253132820129, 0.5884486436843872, -0.18165038526058197, -0.27704885601997375, 0.9025992155075073, 0.42905908823013306, -0.21240739524364471, -1.402426838874817, 0.5013275146484375, 1.3031758069992065, -0.9236107468605042, -0.7778176665306091, 0.03492147475481033, -0.8930371999740601, 1.1299669742584229, 0.7546504139900208, 0.3344544470310211, 0.285228431224823, 1.5407676696777344, 0.7162058353424072, -0.48583564162254333, 0.4408183693885803, 0.4448945224285126, -0.1186659038066864, -2.0675315856933594, -0.9787327647209167, 0.3278034031391144, -0.2832871675491333, -1.541548728942871, 1.3155927658081055, -1.2254012823104858, -0.8878756165504456, 0.5215873122215271, 0.2027502954006195, 1.4533183574676514, 0.3028211295604706, 1.6753411293029785, 2.0500385761260986, 0.8421851396560669, 0.15016469359397888, 1.3308840990066528, -0.11140663176774979, -0.43496909737586975, 1.803452491760254, -0.39543089270591736, 0.548849880695343, 0.9995669722557068, -0.3382386565208435, -1.0809693336486816, -0.9081753492355347, -1.222038984298706, -0.711169421672821, 1.2397925853729248, 0.16603155434131622, -1.2742667198181152, 0.2676064372062683, 1.5036593675613403, 0.0015345700085163116, -0.22075997292995453, 0.5461599826812744, 0.564003050327301, -0.6236456036567688, -0.03194919601082802, -0.8828505873680115, 0.5359891653060913, -0.0583912618458271, -0.352887362241745, 0.3508111536502838, 0.3572441041469574, 1.266226887702942, -0.04429559409618378, 0.10609149932861328, 1.1631568670272827, -1.3854039907455444, 1.4804959297180176, -0.643650233745575, 0.17058376967906952, -2.3983592987060547, 1.4687702655792236, -0.8127254843711853, 1.9234728813171387, -2.621673583984375, 0.3998997211456299, -0.5866712331771851, -0.5156707763671875, 0.32623690366744995, -0.4782809317111969, 0.1803378462791443, -0.19545739889144897, -1.0689886808395386, -0.15943104028701782, -0.8572568893432617, 0.493745356798172, 1.06914484500885, 1.26730215549469, -1.0342010259628296, -0.3349566161632538, -1.757239580154419, -0.17082172632217407, -0.7321757078170776, 0.37243711948394775, -2.006438970565796, -0.17819932103157043, -2.041240930557251, -2.348118305206299, -1.4402347803115845, -0.7575322985649109, 0.9401515126228333, 0.12970927357673645, -0.8701830506324768, 1.0866622924804688, -0.3665273189544678, -1.7757381200790405, 0.9818376302719116, -2.124560594558716 ]
https://github.com/huggingface/datasets/issues/5492
Push_to_hub in a pull request
Assigned to myself and will get to it in the next week, but if someone finds this issue annoying and wants to submit a PR before I do, just ping me here and I'll reassign :).
Right now `ds.push_to_hub()` can push a dataset on `main` or on a new branch with `branch=`, but there is no way to open a pull request. Even passing `branch=refs/pr/x` doesn't seem to work: it tries to create a branch with that name cc @nateraw It should be possible to tweak the use of `huggingface_hub` in `push_to_hub` to make it open a PR or push to an existing PR
315
36
Push_to_hub in a pull request Right now `ds.push_to_hub()` can push a dataset on `main` or on a new branch with `branch=`, but there is no way to open a pull request. Even passing `branch=refs/pr/x` doesn't seem to work: it tries to create a branch with that name cc @nateraw It should be possible to tweak the use of `huggingface_hub` in `push_to_hub` to make it open a PR or push to an existing PR Assigned to myself and will get to it in the next week, but if someone finds this issue annoying and wants to submit a PR before I do, just ping me here and I'll reassign :).
[ -1.1209107637405396, -0.8946842551231384, -0.8350309729576111, 1.5535743236541748, -0.20843717455863953, -1.2693958282470703, 0.1250711977481842, -1.1027363538742065, 1.681578516960144, -0.9570409655570984, 0.4714111387729645, -1.5528804063796997, 0.0343179851770401, -0.6533536314964294, -0.7973254323005676, -0.946940004825592, -0.44062671065330505, -0.7167252898216248, 0.9256404042243958, 2.440124273300171, 1.161197304725647, -1.6019001007080078, 2.63936448097229, 0.7584103345870972, -0.19945287704467773, -1.1310144662857056, 0.4276459217071533, 0.07581169903278351, -1.0340180397033691, -0.5544416904449463, -0.8086118102073669, -0.17381206154823303, -0.6284990310668945, -0.509928286075592, -0.02943439409136772, 0.4628255367279053, -0.24377961456775665, -0.4191981554031372, -0.5380402207374573, -0.7533037662506104, 0.584564208984375, -0.520871639251709, 0.9560351967811584, -0.38044339418411255, 1.8238003253936768, -0.49669814109802246, 0.4239930212497711, 0.7123704552650452, 1.4903934001922607, 0.21591994166374207, 0.0032278532162308693, 0.22592727839946747, 0.3602125942707062, -0.1610240787267685, 0.43020954728126526, 1.096421480178833, 0.539508581161499, 0.8142886757850647, 0.6271504759788513, -2.267155647277832, 1.3935900926589966, -1.1450819969177246, 0.3966411352157593, 1.2692207098007202, -0.881162166595459, 0.36806195974349976, -1.7120164632797241, -0.11580704897642136, 0.6185117959976196, -2.2296254634857178, 0.35192394256591797, -1.162015676498413, -0.5129042863845825, 1.0178711414337158, 0.3084845244884491, -1.320838451385498, 0.1445123702287674, -0.370584636926651, 1.0517295598983765, 0.47358110547065735, 0.9701031446456909, -1.6503180265426636, 0.12495536357164383, -0.3786107301712036, -0.054838038980960846, -1.4235563278198242, -1.4073306322097778, 0.5324426889419556, 0.6215397119522095, 0.593532919883728, 0.028644120320677757, 1.0711075067520142, -0.9927895665168762, 0.7226705551147461, -0.9396258592605591, -1.4975289106369019, -1.3928086757659912, -2.2041382789611816, -2.3090152740478516, 0.6732655763626099, -0.3719814121723175, -0.6878865957260132, 2.064098358154297, -0.97841477394104, -1.7308635711669922, 1.188040018081665, 0.3145054876804352, 0.03907161206007004, 2.45733642578125, 0.1287352740764618, -0.6396899223327637, 0.523953914642334, -0.7926399111747742, 0.8942490816116333, -0.6516153216362, 1.3899815082550049, 0.4536591172218323, -1.1217554807662964, 1.657820463180542, -0.3257322311401367, 0.5732200741767883, -0.784136950969696, -0.5760969519615173, -0.9802515506744385, 0.3840835988521576, 1.8352329730987549, -0.27030399441719055, 1.5395455360412598, -0.3415253758430481, -1.4286363124847412, -1.6485143899917603, 1.0168969631195068, 0.41309040784835815, -0.7985750436782837, 0.13595399260520935, -0.42302680015563965, 0.12127669900655746, -0.10091152042150497, 1.163581371307373, 1.2313157320022583, 0.6495964527130127, -0.23068010807037354, -0.8497459888458252, 0.24127796292304993, -0.07672780752182007, -0.665417492389679, -1.8645380735397339, -0.4359815716743469, 0.14457008242607117, 0.4789235293865204, -1.0027446746826172, 1.8083423376083374, 1.0061919689178467, 1.9908936023712158, 0.9937975406646729, -0.1878574788570404, 1.4545114040374756, -0.06336517632007599, 1.8196887969970703, -0.3888595998287201, 0.7917535901069641, -0.4233088195323944, -1.0758825540542603, 0.9137109518051147, -0.4168955385684967, -2.062513828277588, -0.7177326083183289, -0.783720076084137, -0.2422884702682495, -0.7319064140319824, 0.9331992268562317, -0.3613032102584839, -1.2567706108093262, 0.2486295998096466, -0.5826794505119324, 0.24202552437782288, -1.1410962343215942, 0.39999350905418396, 0.757870614528656, -0.6301474571228027, 0.05512366443872452, -0.16830790042877197, -1.2135883569717407, -0.5368474721908569, 0.387737900018692, 1.9332923889160156, -0.7790164947509766, 0.7617354393005371, 1.003747820854187, -0.6983913779258728, -0.08742067962884903, 0.3786204755306244, -0.3020981252193451, 0.7521528601646423, -1.1016309261322021, -0.38457566499710083, 1.3311423063278198, -0.2245028018951416, -0.7251446843147278, 1.566290259361267, 0.7288447618484497, -0.8882032632827759, -0.0849672183394432, -0.28171131014823914, -0.795823872089386, 0.09851586818695068, -1.4848761558532715, 0.04996250569820404, 0.36708393692970276, -1.4403890371322632, -0.40750038623809814, -0.16039837896823883, 1.2695807218551636, -0.2861619293689728, 1.4165987968444824, -0.3625098764896393, -0.31055086851119995, -0.358920693397522, -0.43511971831321716, 0.027444997802376747, -0.12706109881401062, -0.5403921008110046, 0.1993459165096283, -0.6953890919685364, 0.5397593975067139, 1.4090673923492432, 0.2350841611623764, 0.14535126090049744, 0.502773106098175, 1.106313705444336, 0.32291051745414734, 0.04399007558822632, -0.8214772939682007, -1.5616034269332886, 1.840268611907959, -1.4869132041931152, 2.0886240005493164, 0.8577613830566406, -0.009323306381702423, -1.6479979753494263, -1.7559404373168945, 1.4271018505096436, 1.1582976579666138, 2.3107545375823975, 0.6223439574241638, 0.30864450335502625, -1.0190041065216064, -0.6145020723342896, 0.44756829738616943, -1.2188403606414795, -0.7068696022033691, 0.1352267563343048, 2.3281025886535645, 1.8176349401474, -0.47501611709594727, -0.1357608288526535, -1.0003530979156494, 1.3940201997756958, -0.15609130263328552, 0.25547322630882263, 2.087064266204834, -0.3106235861778259, -1.1968718767166138, 1.2327609062194824, -2.437136650085449, 0.014287566766142845, 2.0418648719787598, 0.28776901960372925, 0.10489340126514435, -1.4267406463623047, -0.49716779589653015, -0.1278425008058548, -0.35464245080947876, -1.317167043685913, 0.5585564970970154, -0.2094331532716751, -0.7075205445289612, -1.3636474609375, 0.3485986590385437, -1.1813745498657227, -1.5405373573303223, 0.3259582221508026, 1.8699054718017578, 2.0175693035125732, -0.6800016164779663, 1.6461812257766724, -0.20146647095680237, 0.228361114859581, 1.190201759338379, 1.1555300951004028, 3.0331013202667236, 1.9747583866119385, -1.155758023262024, 0.6014008522033691, -0.18794941902160645, -0.65323406457901, 1.0867745876312256, -1.1806808710098267, 1.2983248233795166, -0.1241108775138855, -1.0521578788757324, -1.4629387855529785, 0.9355159997940063, 0.5252077579498291, 0.13940837979316711, -0.5342861413955688, 1.2596404552459717, 0.16257601976394653, 1.180729866027832, 0.4306451082229614, -0.3936515152454376, 0.6106407046318054, -0.43674013018608093, -0.5962741374969482, 1.5747261047363281, 0.3188035786151886, -1.3394157886505127, -2.1832401752471924, -0.15885429084300995, -0.7685310244560242, -0.05533139407634735, -0.6012021899223328, -0.9549216628074646, 1.7511972188949585, 0.3213563561439514, -1.367186427116394, -0.2834421694278717, -0.15542449057102203, -0.6974057555198669, 2.699129104614258, -1.2328568696975708, -0.3326736390590668, -0.8880227208137512, -0.6331785321235657, 1.6819157600402832, -1.2723565101623535, -0.28777071833610535, -0.9697802066802979, -0.5361746549606323, -1.2272169589996338, -0.487886518239975, -0.02551460638642311, -0.9051377773284912, 0.8074479699134827, 0.282504677772522, -1.209242582321167, -0.3191831111907959, -0.7626882791519165, 0.7976033687591553, -0.061454854905605316, 0.3023989200592041, 1.7818232774734497, 0.2747517228126526, -0.23531462252140045, 0.7622662782669067, 1.168621301651001, 0.613640546798706, -0.6963990926742554, 0.3400494158267975, -0.5867102742195129, 0.26676028966903687, -1.197539210319519, 0.45032769441604614, -2.931417226791382, 0.6026161909103394, -0.019376706331968307, -0.15294694900512695, -0.02576434798538685, -1.261572003364563, 1.0038959980010986, 2.6603050231933594, -1.1411399841308594, 0.46778374910354614, 0.22081777453422546, 1.2562514543533325, -1.6421736478805542, 0.36273831129074097, -0.3729638159275055, 2.181774377822876, 0.09119857102632523, 1.150163173675537, -0.5138891339302063, -2.4601376056671143, 0.4805815815925598, -1.2825957536697388, -1.2590301036834717, 0.7611066699028015, -0.9029805064201355, -0.18673303723335266, -1.4395246505737305, -0.2357502281665802, -1.0148669481277466, -1.2634775638580322, 0.7434266209602356, 0.10872595012187958, 0.5383016467094421, -0.6200062036514282, 0.25788062810897827, -2.329195976257324, -1.4177027940750122, -0.27645769715309143, -0.8681698441505432, 0.3719763159751892, -0.38807469606399536, 0.618811309337616, -0.2560604214668274, 0.09851003438234329, 0.35829445719718933, 1.586116075515747, 3.3484230041503906, 0.2554432451725006, 0.6123377680778503, -0.22325052320957184, -0.793363094329834, 1.4165558815002441, 0.8880682587623596, -0.030673358589410782, -0.6532781720161438, -0.9622592329978943, 1.2662675380706787, 1.9620119333267212, 0.8600771427154541, 0.08837198466062546, -0.8430185317993164, -0.6018924117088318, -0.2223776876926422, 0.14037247002124786, 0.3743622303009033, 0.8807498812675476, 0.09909367561340332, 0.07366210967302322, 1.2378695011138916, 1.3074607849121094, -0.4396604299545288, 0.3085486590862274, -0.7809149622917175, -0.3468566834926605, 0.4271295964717865, 0.2993624210357666, -0.039200037717819214, 0.23687055706977844, -0.8779010772705078, -0.2449282854795456, -0.4362298846244812, -0.9605526924133301, -0.7758328914642334, -0.5137102007865906, -0.3679552376270294, 1.6986534595489502, 0.0726105123758316, -0.5519580841064453, 0.041776202619075775, -0.7679349780082703, -0.18698616325855255, -1.0568965673446655, 0.13756680488586426, -0.05344270169734955, -0.23246152698993683, -0.10872243344783783, 1.725306510925293, -1.0509744882583618, -2.131788969039917, 0.1763160228729248, 0.15114082396030426, -0.3598536550998688, 0.3098480701446533, 1.5976756811141968, 0.40414777398109436, 1.4427794218063354, 1.4098238945007324, 0.9930284023284912, -0.7449988722801208, -1.34563148021698, 0.6985680460929871, 0.9528197050094604, -1.4215748310089111, 0.8295422792434692, 0.033711329102516174, -0.4697088599205017, 0.7177907228469849, 1.116564393043518, 0.5225358009338379, -2.0297067165374756, 0.6685684323310852, -1.006608247756958, 0.8481120467185974, 0.7183931469917297, 0.5756308436393738, 0.32922372221946716, 0.8173043727874756, -1.0345534086227417, -1.1163469552993774, -0.7820181846618652, -0.7356631755828857, 2.0270578861236572, -0.3808608949184418, 0.7907922267913818, -0.07727541774511337, -1.4732366800308228, -0.0801907628774643, 0.7071001529693604, 0.5490007996559143, -0.4323486089706421, 0.6657004952430725, -0.6796053051948547, -1.0451691150665283, -1.419140338897705, -0.4558064043521881, -1.214156985282898, -0.9886712431907654, 1.0760935544967651, 0.7824332118034363, 0.09734316915273666, 1.8670313358306885, 0.7693547010421753, 0.27940282225608826, -2.662909984588623, 0.8496140837669373, 0.38194701075553894, -0.018618430942296982, 0.8104978799819946, 0.4007423222064972, 0.9422966837882996, -0.01737240143120289, 0.5602826476097107, -2.4770660400390625, 2.428396463394165, -0.23438066244125366, 0.6318617463111877, -0.043855346739292145, -0.28019675612449646, 1.1246469020843506, 0.45880162715911865, 0.5378265380859375, -1.0765727758407593, 0.5684939026832581, -0.5803665518760681, 1.2552045583724976, 0.8423509001731873, -0.7608327865600586, -0.09857403486967087, 1.3463460206985474, 0.37945953011512756, -0.60700923204422, -0.8924270868301392, -0.9601883888244629, 0.8106582164764404, 1.7116670608520508, -0.06071974337100983, -0.006601345259696245, 0.8324333429336548, 0.5434598326683044, -1.2415647506713867, 0.10691680759191513, -0.698442816734314, -0.9346389770507812, 1.6505250930786133, 1.8861182928085327, -0.17188486456871033, -0.08591720461845398, -0.7870530486106873, -1.2635717391967773, 0.7867149710655212, -0.01887732371687889, 0.009110687300562859, 0.4348353445529938, -0.6078157424926758, 1.0825165510177612, 1.0058971643447876, 0.9822681546211243, 0.04325824975967407, 0.3568010628223419, 0.5472956895828247, -0.5009152293205261, -1.0644041299819946, -0.22092516720294952, -1.080161690711975, -2.6528379917144775, 0.38957616686820984, -0.3002389669418335, -1.3592432737350464, -0.0740731880068779, -1.1245150566101074, 0.9696025252342224, -0.5794180035591125, -0.9942706823348999, -1.5431426763534546, 0.08456128090620041, -0.13361695408821106, 0.9107543230056763, -1.5064935684204102, -0.028967441990971565, 1.1332765817642212, 0.8263325691223145, -0.8578910827636719, 1.0510138273239136, 0.0960690900683403, 1.1088017225265503, 0.8113980293273926, -0.4558217525482178, 0.5534562468528748, 0.11147317290306091, -1.3045276403427124, 0.46092459559440613, 1.0856958627700806, 0.07850288599729538, 1.4179186820983887, -0.5421649813652039, -0.0948447585105896, 0.3006637394428253, -0.6032085418701172, -0.35554173588752747, -0.6819489598274231, 0.7983426451683044, 0.06238516420125961, -0.8054829239845276, 0.1246754452586174, -0.15434280037879944, -0.2303745001554489, 0.0516439825296402, -1.5911786556243896, -0.21787813305854797, -0.39650991559028625, -0.47890326380729675, -1.2064294815063477, 0.0989890992641449, 1.324420690536499, -0.5229325294494629, -0.209319069981575, 0.4888177812099457, 0.5147082209587097, 0.5324046015739441, 0.6773179769515991, -0.6918355226516724, -0.4196418523788452, -0.17811040580272675, -0.24993650615215302, 0.4371659755706787, 1.3830020427703857, -0.1530333310365677, -0.8170667886734009, 0.7772266268730164, -0.4545760154724121, 0.03108011744916439, 1.8994139432907104, 0.2338755577802658, -0.7999352812767029, 0.34571540355682373, -0.6265431642532349, 2.0342133045196533, 1.7780570983886719, 1.3274563550949097, -0.039849378168582916, -0.7851106524467468, 0.7570707201957703, -0.4193301200866699, -0.4036935567855835, 0.9127990007400513, 0.4309210777282715, -0.18639007210731506, -1.4502551555633545, 0.6106560826301575, 1.2238019704818726, -0.6634528040885925, -0.9865117073059082, -0.00864713080227375, -0.7345788478851318, 1.0752925872802734, 0.6137632727622986, 0.564898669719696, 0.2792855501174927, 1.5518964529037476, 0.7467440366744995, -0.5354733467102051, 0.6140547394752502, 0.470801442861557, -0.12952376902103424, -2.0297343730926514, -1.2406865358352661, 0.33528751134872437, -0.595380425453186, -1.6447445154190063, 1.3250969648361206, -1.1171385049819946, -0.9335819482803345, 0.5989528894424438, 0.08543786406517029, 1.5852867364883423, 0.2607661783695221, 1.5213605165481567, 2.013993501663208, 0.8098233342170715, 0.4173107147216797, 1.441743016242981, -0.2648055851459503, -0.5000297427177429, 1.922272801399231, -0.571382462978363, 0.4142785966396332, 1.1720969676971436, -0.2914488613605499, -1.0622366666793823, -0.7307615876197815, -1.159643530845642, -0.6161073446273804, 1.199767827987671, 0.15966379642486572, -1.1594479084014893, 0.25719356536865234, 1.673699975013733, 0.08598180115222931, -0.2680165767669678, 0.5551111698150635, 0.39254534244537354, -0.8395068645477295, 0.0909610316157341, -0.8031001091003418, 0.6448933482170105, -0.19909045100212097, -0.3811471462249756, 0.47059276700019836, 0.49775370955467224, 1.1731544733047485, -0.10420861095190048, 0.009222608059644699, 1.0606317520141602, -1.4733201265335083, 1.4596598148345947, -0.5736331939697266, 0.16351981461048126, -2.3251888751983643, 1.364296317100525, -0.6177412271499634, 2.0192649364471436, -2.702777147293091, 0.32563847303390503, -0.6160456538200378, -0.5399699211120605, 0.4511914551258087, -0.38989466428756714, 0.08436485379934311, -0.23591020703315735, -1.1510624885559082, -0.06309427320957184, -0.5584338903427124, 0.5088516473770142, 1.1117639541625977, 1.2248871326446533, -1.0607082843780518, -0.2927241325378418, -1.7612972259521484, -0.14965210855007172, -0.6166550517082214, 0.28787681460380554, -2.166278839111328, -0.2477850466966629, -2.0251240730285645, -2.21347713470459, -1.4092284440994263, -0.714879035949707, 1.046429991722107, 0.12596718966960907, -0.7531675100326538, 1.245787262916565, -0.3066067099571228, -1.777072548866272, 1.0076637268066406, -2.037332057952881 ]
https://github.com/huggingface/datasets/issues/5488
Error loading MP3 files from CommonVoice
Hi @kradonneoh, thanks for reporting. Please note that to work with audio datasets (and specifically with MP3 files) we have detailed installation instructions in our docs: https://huggingface.co/docs/datasets/installation#audio - one of the requirements is torchaudio<0.12.0 Let us know if the problem persists after having followed them.
### Describe the bug When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays: ```python --------------------------------------------------------------------------- LibsndfileError Traceback (most recent call last) ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3(self, path_or_file) 310 try: # try torchaudio anyway because sometimes it works (depending on the os and os packages installed) --> 311 array, sampling_rate = self._decode_mp3_torchaudio(path_or_file) 312 except RuntimeError: ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3_torchaudio(self, path_or_file) 351 --> 352 array, sampling_rate = torchaudio.load(path_or_file, format="mp3") 353 if self.sampling_rate and self.sampling_rate != sampling_rate: ~/.local/lib/python3.8/site-packages/torchaudio/backend/soundfile_backend.py in load(filepath, frame_offset, num_frames, normalize, channels_first, format) 204 """ --> 205 with soundfile.SoundFile(filepath, "r") as file_: 206 if file_.format != "WAV" or normalize: ~/.local/lib/python3.8/site-packages/soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd) 654 format, subtype, endian) --> 655 self._file = self._open(file, mode_int, closefd) 656 if set(mode).issuperset('r+') and self.seekable(): ~/.local/lib/python3.8/site-packages/soundfile.py in _open(self, file, mode_int, closefd) 1212 err = _snd.sf_error(file_ptr) -> 1213 raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) 1214 if mode_int == _snd.SFM_WRITE: LibsndfileError: Error opening <_io.BytesIO object at 0x7fa539462090>: File contains data in an unknown format. ``` I assume this is because there's some issue with the mp3 decoding process. I've verified that I have `ffmpeg>=4` (on a Linux distro), which appears to be the fallback backend for `torchaudio,` (at least according to #4889). ### Steps to reproduce the bug ```python dataset = load_dataset("mozilla-foundation/common_voice_11_0", "be", split="train") dataset[0] ``` ### Expected behavior Similar behavior to `torchaudio<0.12.0`, which doesn't result in a `LibsndfileError` ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.1
316
45
Error loading MP3 files from CommonVoice ### Describe the bug When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays: ```python --------------------------------------------------------------------------- LibsndfileError Traceback (most recent call last) ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3(self, path_or_file) 310 try: # try torchaudio anyway because sometimes it works (depending on the os and os packages installed) --> 311 array, sampling_rate = self._decode_mp3_torchaudio(path_or_file) 312 except RuntimeError: ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3_torchaudio(self, path_or_file) 351 --> 352 array, sampling_rate = torchaudio.load(path_or_file, format="mp3") 353 if self.sampling_rate and self.sampling_rate != sampling_rate: ~/.local/lib/python3.8/site-packages/torchaudio/backend/soundfile_backend.py in load(filepath, frame_offset, num_frames, normalize, channels_first, format) 204 """ --> 205 with soundfile.SoundFile(filepath, "r") as file_: 206 if file_.format != "WAV" or normalize: ~/.local/lib/python3.8/site-packages/soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd) 654 format, subtype, endian) --> 655 self._file = self._open(file, mode_int, closefd) 656 if set(mode).issuperset('r+') and self.seekable(): ~/.local/lib/python3.8/site-packages/soundfile.py in _open(self, file, mode_int, closefd) 1212 err = _snd.sf_error(file_ptr) -> 1213 raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) 1214 if mode_int == _snd.SFM_WRITE: LibsndfileError: Error opening <_io.BytesIO object at 0x7fa539462090>: File contains data in an unknown format. ``` I assume this is because there's some issue with the mp3 decoding process. I've verified that I have `ffmpeg>=4` (on a Linux distro), which appears to be the fallback backend for `torchaudio,` (at least according to #4889). ### Steps to reproduce the bug ```python dataset = load_dataset("mozilla-foundation/common_voice_11_0", "be", split="train") dataset[0] ``` ### Expected behavior Similar behavior to `torchaudio<0.12.0`, which doesn't result in a `LibsndfileError` ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.1 Hi @kradonneoh, thanks for reporting. Please note that to work with audio datasets (and specifically with MP3 files) we have detailed installation instructions in our docs: https://huggingface.co/docs/datasets/installation#audio - one of the requirements is torchaudio<0.12.0 Let us know if the problem persists after having followed them.
[ -1.2167824506759644, -0.7806340456008911, -0.4928833842277527, 1.4399757385253906, -0.05507618933916092, -1.3829612731933594, 0.13091428577899933, -0.8968741297721863, 1.5224993228912354, -0.8785139322280884, 0.40658533573150635, -1.6223372220993042, 0.05925789102911949, -0.6105026006698608, -0.6277257204055786, -0.7339280843734741, -0.31209278106689453, -0.6920957565307617, 1.1645374298095703, 2.429537534713745, 1.27672278881073, -1.2726619243621826, 2.8008577823638916, 0.6076871752738953, -0.3416002690792084, -0.8071643710136414, 0.41848224401474, 0.0733361691236496, -1.457970380783081, -0.3760242462158203, -1.006481409072876, -0.04962979257106781, -0.6660559773445129, -0.428045392036438, 0.05752931162714958, 0.42988353967666626, -0.18940196931362152, -0.2704603970050812, -0.473066508769989, -0.7410366535186768, 0.593429684638977, -0.25698500871658325, 0.9045193791389465, -0.2721996307373047, 1.7185652256011963, -0.7257424592971802, 0.5073739886283875, 0.5568673014640808, 1.2513201236724854, 0.22622139751911163, -0.037417806684970856, 0.4068102240562439, 0.27132517099380493, 0.030931878834962845, 0.6265794634819031, 1.180953860282898, 0.6531679034233093, 0.49079301953315735, 0.6800881028175354, -2.1640045642852783, 1.3948181867599487, -0.7975453734397888, 0.13448664546012878, 1.3928241729736328, -1.0331119298934937, 0.40671825408935547, -1.8156821727752686, -0.12218821048736572, 0.4170926511287689, -2.295135259628296, 0.17914220690727234, -1.341623067855835, -0.5747102499008179, 0.9538405537605286, 0.4225088059902191, -1.267378807067871, 0.050875190645456314, -0.47057855129241943, 0.891940712928772, 0.35019227862358093, 1.032036542892456, -1.618220567703247, 0.05387578532099724, -0.17833685874938965, 0.29382914304733276, -1.1437537670135498, -1.6206310987472534, 0.5762374997138977, 0.6104308366775513, 0.6370325684547424, -0.14254768192768097, 0.9756954312324524, -1.1695269346237183, 0.8708965182304382, -1.0027974843978882, -1.7082571983337402, -1.3668138980865479, -2.485663414001465, -2.3943145275115967, 0.846729576587677, -0.4541817903518677, -0.43348923325538635, 2.1120352745056152, -1.1592566967010498, -1.6193259954452515, 0.9983881711959839, 0.22839325666427612, -0.06556206941604614, 2.4030284881591797, 0.1912359744310379, -0.8590396046638489, 0.6990774869918823, -0.9228437542915344, 0.7022764682769775, -0.39989614486694336, 1.2049174308776855, 0.438616007566452, -1.1417820453643799, 1.5419621467590332, -0.40664926171302795, 0.48512524366378784, -0.6804004907608032, -0.4355182945728302, -0.6276846528053284, 0.21155256032943726, 1.8921321630477905, -0.16308504343032837, 1.5143160820007324, -0.06513114273548126, -1.4504270553588867, -1.3927531242370605, 0.7498433589935303, 0.40676990151405334, -0.907418429851532, 0.1769607961177826, -0.45009899139404297, 0.21414032578468323, 0.16568097472190857, 1.051269292831421, 1.3727529048919678, 0.790019690990448, -0.23874260485172272, -0.8828639984130859, 0.048900850117206573, -0.14993174374103546, -0.5612703561782837, -1.7734909057617188, -0.2852464020252228, 0.01765485294163227, 0.6715001463890076, -1.2181811332702637, 2.012622594833374, 0.8956661224365234, 2.0156893730163574, 0.9341422319412231, -0.4202083349227905, 1.59078848361969, 0.04306020215153694, 1.8801666498184204, -0.3816322386264801, 0.6555348038673401, -0.5650693774223328, -1.2150007486343384, 0.6882467865943909, -0.3409573435783386, -1.9211163520812988, -0.4518699049949646, -0.7343736886978149, -0.15103137493133545, -0.927570641040802, 1.0145992040634155, -0.18560923635959625, -1.4146318435668945, 0.17378617823123932, -0.637981653213501, 0.1341838389635086, -1.3922061920166016, 0.27549830079078674, 0.726692259311676, -0.6862877607345581, 0.02958635613322258, -0.4003949761390686, -1.3400779962539673, -0.6033106446266174, 0.5154628753662109, 1.7710847854614258, -0.5928492546081543, 1.0771563053131104, 1.0198084115982056, -0.5946114659309387, -0.01720692589879036, 0.4669216573238373, -0.34863173961639404, 0.8269618153572083, -1.0039705038070679, -0.4867863655090332, 1.1707465648651123, -0.40093672275543213, -0.501782238483429, 1.293054223060608, 0.7346691489219666, -1.0675421953201294, -0.35636505484580994, -0.1104353666305542, -0.8482250571250916, 0.09633445739746094, -1.591299295425415, -0.12975478172302246, 0.3677789270877838, -1.4869071245193481, -0.3193420469760895, -0.01629650592803955, 1.3348726034164429, -0.08766151964664459, 1.4409245252609253, -0.25323182344436646, -0.1497412770986557, -0.4472029209136963, -0.5511499047279358, 0.2065410017967224, -0.08375059068202972, -0.5152653455734253, 0.32454144954681396, -0.7686370611190796, 0.2166718989610672, 1.47645103931427, 0.12033319473266602, 0.11733493208885193, 0.38465529680252075, 1.1364063024520874, 0.31254416704177856, -0.20140713453292847, -0.907166600227356, -1.6647311449050903, 2.048609972000122, -1.56205415725708, 1.9560405015945435, 0.8655769228935242, -0.0395975336432457, -1.8058429956436157, -1.8357243537902832, 1.336069107055664, 1.0619252920150757, 2.4378623962402344, 0.4497641324996948, 0.3857855200767517, -0.80279541015625, -0.7180294990539551, 0.5090383887290955, -0.8169839978218079, -0.8171773552894592, 0.16791999340057373, 2.396623373031616, 1.6759246587753296, -0.27538564801216125, -0.2274913340806961, -0.9225137829780579, 1.3209922313690186, -0.28749045729637146, 0.23048317432403564, 1.9567646980285645, -0.392255038022995, -1.048776388168335, 1.3272591829299927, -2.455953598022461, 0.3517369329929352, 2.062195062637329, 0.35282257199287415, 0.09023028612136841, -1.1917332410812378, -0.765584409236908, -0.20585015416145325, -0.5074917078018188, -1.2575528621673584, 0.4090786278247833, -0.22954010963439941, -0.8376931548118591, -1.365532636642456, -0.011865084990859032, -1.1973398923873901, -1.785840630531311, 0.36467307806015015, 1.8508918285369873, 2.213313341140747, -0.7880328893661499, 1.2856080532073975, -0.30224743485450745, 0.13514629006385803, 1.1694517135620117, 1.3184300661087036, 3.1588220596313477, 1.904396653175354, -1.2619414329528809, 0.6919528245925903, -0.23493613302707672, -0.43375176191329956, 1.1385183334350586, -1.0550322532653809, 1.183877944946289, -0.24284179508686066, -1.381720781326294, -1.2008118629455566, 0.9460617303848267, 0.3513392508029938, -0.09608982503414154, -0.5038174986839294, 1.1278494596481323, 0.2919398546218872, 1.3641737699508667, 0.6682263016700745, -0.22983449697494507, 0.4801992177963257, -0.34563693404197693, -0.6121640801429749, 1.6688838005065918, 0.12939678132534027, -1.571293592453003, -2.4224295616149902, -0.19509924948215485, -1.0073844194412231, 0.028995703905820847, -0.7918688058853149, -1.0620099306106567, 1.5723865032196045, 0.41088828444480896, -0.930203914642334, -0.12725749611854553, -0.32436996698379517, -0.4297976493835449, 2.7267537117004395, -1.3006271123886108, -0.15181784331798553, -0.9172080755233765, -0.6461308598518372, 1.5178712606430054, -1.21833074092865, -0.2805858254432678, -1.0271944999694824, -0.5108410120010376, -1.1787781715393066, -0.30076855421066284, -0.029112257063388824, -0.9258217215538025, 0.6358910799026489, 0.06773856282234192, -1.2949113845825195, -0.37998658418655396, -1.0720202922821045, 0.9172482490539551, -0.1420382857322693, 0.08734214305877686, 1.691348910331726, 0.2332780957221985, -0.43247729539871216, 0.8705185651779175, 1.2586835622787476, 0.6413259506225586, -0.59102463722229, 0.07599599659442902, -0.6342174410820007, 0.5249295830726624, -1.1152559518814087, 0.3354594111442566, -2.9512174129486084, 0.6614649295806885, -0.08609168231487274, -0.0715380609035492, -0.2454560101032257, -1.4537689685821533, 1.0109891891479492, 2.4069130420684814, -1.0677810907363892, 0.6816638112068176, 0.2845524251461029, 1.165517807006836, -1.5855284929275513, 0.11281943321228027, -0.6512613892555237, 2.102238416671753, 0.10253764688968658, 1.1045331954956055, -0.549903154373169, -2.394796848297119, 0.5828855633735657, -1.2135943174362183, -0.9109033942222595, 0.788411557674408, -0.8640283942222595, 0.2753071188926697, -1.142844796180725, -0.13129910826683044, -0.8393533825874329, -1.1207853555679321, 0.4851120412349701, 0.052973564714193344, 0.6562663912773132, -0.5478920340538025, 0.25591742992401123, -2.318822145462036, -1.3699637651443481, -0.1015639454126358, -0.951211154460907, 0.4751977324485779, -0.49908751249313354, 0.6749014258384705, -0.05750153213739395, -0.0006923265755176544, 0.28804996609687805, 1.5658177137374878, 3.230250120162964, -0.060467492789030075, 0.30785417556762695, -0.26210305094718933, -1.0534461736679077, 1.4831000566482544, 0.8978145122528076, -0.1990039348602295, -0.6921951174736023, -0.9953104853630066, 1.329508900642395, 1.9014898538589478, 1.0288176536560059, 0.07048636674880981, -0.908552885055542, -0.7977813482284546, 0.06954945623874664, 0.09572616219520569, 0.5469532608985901, 0.9906294345855713, 0.06800660490989685, 0.05301470682024956, 1.3582510948181152, 1.0653222799301147, -0.2885171175003052, 0.38779106736183167, -0.8531044721603394, -0.31345638632774353, 0.45013412833213806, 0.2909647822380066, -0.02107180282473564, 0.3704007863998413, -0.9673536419868469, -0.20342609286308289, -0.23688076436519623, -0.7990050911903381, -0.8021644949913025, -0.3845307230949402, -0.5058690309524536, 1.8089375495910645, -0.05870502442121506, -0.5036213994026184, 0.01672721467912197, -0.6853042840957642, -0.13145877420902252, -1.0564578771591187, 0.25893527269363403, -0.06560549139976501, 0.09559501707553864, -0.15367548167705536, 1.6680809259414673, -0.9051851630210876, -2.19454026222229, 0.10302387177944183, 0.22025693953037262, -0.2775801718235016, -0.011343740858137608, 1.8059098720550537, 0.5198895931243896, 1.3883295059204102, 1.4846973419189453, 1.09446382522583, -0.6038609147071838, -1.3260669708251953, 0.7723634243011475, 0.9648560285568237, -1.3675332069396973, 0.9922118186950684, -0.2720513343811035, -0.5839540362358093, 0.5017874240875244, 1.2500723600387573, 0.4446134567260742, -1.998586654663086, 0.9799869060516357, -1.1371532678604126, 0.97578364610672, 0.8036125302314758, 0.8215143084526062, 0.12032996118068695, 0.8725559711456299, -1.2759455442428589, -1.0430495738983154, -0.5386418700218201, -0.6416472792625427, 1.9099513292312622, -0.3736681640148163, 0.39868950843811035, -0.29382652044296265, -1.2448680400848389, 0.07835964858531952, 0.6605485081672668, 0.31017088890075684, -0.33346256613731384, 0.8003480434417725, -0.7239014506340027, -1.0817127227783203, -1.3498867750167847, -0.5604171752929688, -1.0510114431381226, -0.8106276988983154, 1.0597363710403442, 0.6640663146972656, 0.545446515083313, 1.936590313911438, 0.6643019914627075, 0.30766141414642334, -2.5979714393615723, 0.8913268446922302, 0.34231728315353394, -0.08464807271957397, 0.8154277801513672, 0.2220165878534317, 1.2469596862792969, -0.15110374987125397, 0.5916708707809448, -2.425204277038574, 2.2865262031555176, -0.30390775203704834, 0.7604508996009827, 0.12496793270111084, 0.032474055886268616, 1.0423589944839478, 0.6266504526138306, 0.5425649881362915, -1.1032540798187256, 0.8952736258506775, -0.561526894569397, 1.1693190336227417, 0.899853527545929, -0.8827940225601196, 0.12287388741970062, 1.2369307279586792, 0.35267865657806396, -0.5256840586662292, -0.9729490280151367, -0.8839105367660522, 0.9559512138366699, 1.776655912399292, 0.008206494152545929, 0.11361081898212433, 0.7714608311653137, 0.749536395072937, -1.2116392850875854, 0.03118988499045372, -0.5768704414367676, -0.6893613934516907, 1.7697293758392334, 2.057579517364502, -0.06673510372638702, -0.06582967936992645, -0.7087001800537109, -1.4635201692581177, 0.912136971950531, 0.08309745788574219, -0.06339982151985168, 0.6749147772789001, -0.6525916457176208, 1.0913318395614624, 0.6945734024047852, 0.8992181420326233, 0.2931455373764038, 0.035042744129896164, 0.2681671679019928, -0.347148597240448, -1.1528112888336182, -0.3898121416568756, -1.0435373783111572, -2.697704315185547, 0.3244968354701996, -0.2728766202926636, -1.4652471542358398, 0.16235752403736115, -0.9810061454772949, 0.6856727004051208, -0.5217048525810242, -1.1647236347198486, -1.3232263326644897, 0.28339332342147827, -0.2205149233341217, 0.8253699541091919, -1.6814870834350586, -0.26108935475349426, 1.139821171760559, 0.8994338512420654, -0.6289244890213013, 0.9054100513458252, 0.2516081631183624, 0.8846681118011475, 0.8624312281608582, -0.4029196500778198, 0.49944308400154114, 0.23697839677333832, -1.3379822969436646, 0.3717847168445587, 1.4072262048721313, 0.08556421101093292, 1.4113154411315918, -0.41726407408714294, -0.028374703601002693, 0.3958281874656677, -0.3850599229335785, -0.5396254658699036, -0.617965042591095, 0.6880974769592285, -0.1152009516954422, -1.0331134796142578, -0.16658355295658112, 0.02042088471353054, -0.17861507833003998, 0.21766147017478943, -1.4434852600097656, -0.10325680673122406, -0.40365496277809143, -0.545663058757782, -1.529299020767212, -0.11435991525650024, 1.2504132986068726, -0.7648661732673645, -0.024815117940306664, 0.5072551965713501, 0.22660937905311584, 0.5772274732589722, 0.6958402395248413, -0.7938845157623291, -0.2575697600841522, -0.20201027393341064, -0.4176405072212219, 0.3555768132209778, 1.2579985857009888, -0.08809582889080048, -0.8993930220603943, 0.44731006026268005, -0.2113264501094818, 0.2931731641292572, 2.017796039581299, 0.024524807929992676, -0.8064436316490173, 0.4512542486190796, -0.7831608653068542, 1.8115733861923218, 1.622467279434204, 1.1984630823135376, -0.07395559549331665, -0.9459813833236694, 0.6409927010536194, -0.32846570014953613, -0.36059218645095825, 0.823815107345581, 0.3161170482635498, -0.31561464071273804, -1.4383609294891357, 0.8038802742958069, 1.2236344814300537, -0.723939836025238, -0.7844421863555908, 0.1406356543302536, -0.8268490433692932, 1.2804152965545654, 0.5790635347366333, 0.29841816425323486, 0.33617812395095825, 1.658614158630371, 0.7617747783660889, -0.5833021402359009, 0.49790599942207336, 0.4017387628555298, -0.20999133586883545, -2.0047507286071777, -1.1043946743011475, 0.26280075311660767, -0.46546944975852966, -1.4722263813018799, 1.4917426109313965, -1.2281854152679443, -1.0338999032974243, 0.6069153547286987, 0.1752621978521347, 1.293994665145874, 0.3007092773914337, 1.7506566047668457, 2.094064474105835, 0.9319840669631958, 0.5494791865348816, 1.102270245552063, -0.22665849328041077, -0.3182680904865265, 1.6883361339569092, -0.46088024973869324, 0.6249909996986389, 1.0416959524154663, -0.437671959400177, -1.1297109127044678, -0.8683621883392334, -1.179491639137268, -0.765349268913269, 1.0416874885559082, 0.14112545549869537, -1.0620118379592896, 0.31868377327919006, 1.6180976629257202, 0.03580588847398758, -0.06182646006345749, 0.6981592774391174, 0.4473799765110016, -0.6040476560592651, -0.12978115677833557, -1.087355613708496, 0.5576618909835815, -0.33679813146591187, -0.4308983087539673, 0.19076630473136902, 0.5871543884277344, 1.2740525007247925, 0.13248762488365173, 0.09264962375164032, 1.1908624172210693, -1.4501152038574219, 1.2876375913619995, -0.8817722797393799, 0.39955535531044006, -2.2175185680389404, 1.4551129341125488, -0.9363393783569336, 1.9978755712509155, -2.6553611755371094, 0.47315678000450134, -0.4500114619731903, -0.6468991041183472, 0.19869934022426605, -0.21352824568748474, 0.14231915771961212, -0.10712133347988129, -1.0392215251922607, -0.11408944427967072, -0.8880060911178589, 0.43476152420043945, 1.1994130611419678, 1.3668241500854492, -0.9698665738105774, -0.2716396152973175, -1.5580202341079712, -0.1155296266078949, -0.5201099514961243, 0.19416563212871552, -1.760345697402954, -0.13933376967906952, -2.0934507846832275, -2.4196999073028564, -1.36098313331604, -1.004810094833374, 1.336512804031372, 0.20951533317565918, -0.9671003818511963, 1.1969465017318726, -0.34328946471214294, -1.7828145027160645, 1.2279382944107056, -2.1953234672546387 ]
https://github.com/huggingface/datasets/issues/5488
Error loading MP3 files from CommonVoice
I saw that and have followed it (hence the Expected Behavior section of the bug report). Is there no intention of updating to the latest version? It does limit the version of `torch` I can use, which isn’t ideal.
### Describe the bug When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays: ```python --------------------------------------------------------------------------- LibsndfileError Traceback (most recent call last) ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3(self, path_or_file) 310 try: # try torchaudio anyway because sometimes it works (depending on the os and os packages installed) --> 311 array, sampling_rate = self._decode_mp3_torchaudio(path_or_file) 312 except RuntimeError: ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3_torchaudio(self, path_or_file) 351 --> 352 array, sampling_rate = torchaudio.load(path_or_file, format="mp3") 353 if self.sampling_rate and self.sampling_rate != sampling_rate: ~/.local/lib/python3.8/site-packages/torchaudio/backend/soundfile_backend.py in load(filepath, frame_offset, num_frames, normalize, channels_first, format) 204 """ --> 205 with soundfile.SoundFile(filepath, "r") as file_: 206 if file_.format != "WAV" or normalize: ~/.local/lib/python3.8/site-packages/soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd) 654 format, subtype, endian) --> 655 self._file = self._open(file, mode_int, closefd) 656 if set(mode).issuperset('r+') and self.seekable(): ~/.local/lib/python3.8/site-packages/soundfile.py in _open(self, file, mode_int, closefd) 1212 err = _snd.sf_error(file_ptr) -> 1213 raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) 1214 if mode_int == _snd.SFM_WRITE: LibsndfileError: Error opening <_io.BytesIO object at 0x7fa539462090>: File contains data in an unknown format. ``` I assume this is because there's some issue with the mp3 decoding process. I've verified that I have `ffmpeg>=4` (on a Linux distro), which appears to be the fallback backend for `torchaudio,` (at least according to #4889). ### Steps to reproduce the bug ```python dataset = load_dataset("mozilla-foundation/common_voice_11_0", "be", split="train") dataset[0] ``` ### Expected behavior Similar behavior to `torchaudio<0.12.0`, which doesn't result in a `LibsndfileError` ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.1
316
39
Error loading MP3 files from CommonVoice ### Describe the bug When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays: ```python --------------------------------------------------------------------------- LibsndfileError Traceback (most recent call last) ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3(self, path_or_file) 310 try: # try torchaudio anyway because sometimes it works (depending on the os and os packages installed) --> 311 array, sampling_rate = self._decode_mp3_torchaudio(path_or_file) 312 except RuntimeError: ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3_torchaudio(self, path_or_file) 351 --> 352 array, sampling_rate = torchaudio.load(path_or_file, format="mp3") 353 if self.sampling_rate and self.sampling_rate != sampling_rate: ~/.local/lib/python3.8/site-packages/torchaudio/backend/soundfile_backend.py in load(filepath, frame_offset, num_frames, normalize, channels_first, format) 204 """ --> 205 with soundfile.SoundFile(filepath, "r") as file_: 206 if file_.format != "WAV" or normalize: ~/.local/lib/python3.8/site-packages/soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd) 654 format, subtype, endian) --> 655 self._file = self._open(file, mode_int, closefd) 656 if set(mode).issuperset('r+') and self.seekable(): ~/.local/lib/python3.8/site-packages/soundfile.py in _open(self, file, mode_int, closefd) 1212 err = _snd.sf_error(file_ptr) -> 1213 raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) 1214 if mode_int == _snd.SFM_WRITE: LibsndfileError: Error opening <_io.BytesIO object at 0x7fa539462090>: File contains data in an unknown format. ``` I assume this is because there's some issue with the mp3 decoding process. I've verified that I have `ffmpeg>=4` (on a Linux distro), which appears to be the fallback backend for `torchaudio,` (at least according to #4889). ### Steps to reproduce the bug ```python dataset = load_dataset("mozilla-foundation/common_voice_11_0", "be", split="train") dataset[0] ``` ### Expected behavior Similar behavior to `torchaudio<0.12.0`, which doesn't result in a `LibsndfileError` ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.1 I saw that and have followed it (hence the Expected Behavior section of the bug report). Is there no intention of updating to the latest version? It does limit the version of `torch` I can use, which isn’t ideal.
[ -1.2167824506759644, -0.7806340456008911, -0.4928833842277527, 1.4399757385253906, -0.05507618933916092, -1.3829612731933594, 0.13091428577899933, -0.8968741297721863, 1.5224993228912354, -0.8785139322280884, 0.40658533573150635, -1.6223372220993042, 0.05925789102911949, -0.6105026006698608, -0.6277257204055786, -0.7339280843734741, -0.31209278106689453, -0.6920957565307617, 1.1645374298095703, 2.429537534713745, 1.27672278881073, -1.2726619243621826, 2.8008577823638916, 0.6076871752738953, -0.3416002690792084, -0.8071643710136414, 0.41848224401474, 0.0733361691236496, -1.457970380783081, -0.3760242462158203, -1.006481409072876, -0.04962979257106781, -0.6660559773445129, -0.428045392036438, 0.05752931162714958, 0.42988353967666626, -0.18940196931362152, -0.2704603970050812, -0.473066508769989, -0.7410366535186768, 0.593429684638977, -0.25698500871658325, 0.9045193791389465, -0.2721996307373047, 1.7185652256011963, -0.7257424592971802, 0.5073739886283875, 0.5568673014640808, 1.2513201236724854, 0.22622139751911163, -0.037417806684970856, 0.4068102240562439, 0.27132517099380493, 0.030931878834962845, 0.6265794634819031, 1.180953860282898, 0.6531679034233093, 0.49079301953315735, 0.6800881028175354, -2.1640045642852783, 1.3948181867599487, -0.7975453734397888, 0.13448664546012878, 1.3928241729736328, -1.0331119298934937, 0.40671825408935547, -1.8156821727752686, -0.12218821048736572, 0.4170926511287689, -2.295135259628296, 0.17914220690727234, -1.341623067855835, -0.5747102499008179, 0.9538405537605286, 0.4225088059902191, -1.267378807067871, 0.050875190645456314, -0.47057855129241943, 0.891940712928772, 0.35019227862358093, 1.032036542892456, -1.618220567703247, 0.05387578532099724, -0.17833685874938965, 0.29382914304733276, -1.1437537670135498, -1.6206310987472534, 0.5762374997138977, 0.6104308366775513, 0.6370325684547424, -0.14254768192768097, 0.9756954312324524, -1.1695269346237183, 0.8708965182304382, -1.0027974843978882, -1.7082571983337402, -1.3668138980865479, -2.485663414001465, -2.3943145275115967, 0.846729576587677, -0.4541817903518677, -0.43348923325538635, 2.1120352745056152, -1.1592566967010498, -1.6193259954452515, 0.9983881711959839, 0.22839325666427612, -0.06556206941604614, 2.4030284881591797, 0.1912359744310379, -0.8590396046638489, 0.6990774869918823, -0.9228437542915344, 0.7022764682769775, -0.39989614486694336, 1.2049174308776855, 0.438616007566452, -1.1417820453643799, 1.5419621467590332, -0.40664926171302795, 0.48512524366378784, -0.6804004907608032, -0.4355182945728302, -0.6276846528053284, 0.21155256032943726, 1.8921321630477905, -0.16308504343032837, 1.5143160820007324, -0.06513114273548126, -1.4504270553588867, -1.3927531242370605, 0.7498433589935303, 0.40676990151405334, -0.907418429851532, 0.1769607961177826, -0.45009899139404297, 0.21414032578468323, 0.16568097472190857, 1.051269292831421, 1.3727529048919678, 0.790019690990448, -0.23874260485172272, -0.8828639984130859, 0.048900850117206573, -0.14993174374103546, -0.5612703561782837, -1.7734909057617188, -0.2852464020252228, 0.01765485294163227, 0.6715001463890076, -1.2181811332702637, 2.012622594833374, 0.8956661224365234, 2.0156893730163574, 0.9341422319412231, -0.4202083349227905, 1.59078848361969, 0.04306020215153694, 1.8801666498184204, -0.3816322386264801, 0.6555348038673401, -0.5650693774223328, -1.2150007486343384, 0.6882467865943909, -0.3409573435783386, -1.9211163520812988, -0.4518699049949646, -0.7343736886978149, -0.15103137493133545, -0.927570641040802, 1.0145992040634155, -0.18560923635959625, -1.4146318435668945, 0.17378617823123932, -0.637981653213501, 0.1341838389635086, -1.3922061920166016, 0.27549830079078674, 0.726692259311676, -0.6862877607345581, 0.02958635613322258, -0.4003949761390686, -1.3400779962539673, -0.6033106446266174, 0.5154628753662109, 1.7710847854614258, -0.5928492546081543, 1.0771563053131104, 1.0198084115982056, -0.5946114659309387, -0.01720692589879036, 0.4669216573238373, -0.34863173961639404, 0.8269618153572083, -1.0039705038070679, -0.4867863655090332, 1.1707465648651123, -0.40093672275543213, -0.501782238483429, 1.293054223060608, 0.7346691489219666, -1.0675421953201294, -0.35636505484580994, -0.1104353666305542, -0.8482250571250916, 0.09633445739746094, -1.591299295425415, -0.12975478172302246, 0.3677789270877838, -1.4869071245193481, -0.3193420469760895, -0.01629650592803955, 1.3348726034164429, -0.08766151964664459, 1.4409245252609253, -0.25323182344436646, -0.1497412770986557, -0.4472029209136963, -0.5511499047279358, 0.2065410017967224, -0.08375059068202972, -0.5152653455734253, 0.32454144954681396, -0.7686370611190796, 0.2166718989610672, 1.47645103931427, 0.12033319473266602, 0.11733493208885193, 0.38465529680252075, 1.1364063024520874, 0.31254416704177856, -0.20140713453292847, -0.907166600227356, -1.6647311449050903, 2.048609972000122, -1.56205415725708, 1.9560405015945435, 0.8655769228935242, -0.0395975336432457, -1.8058429956436157, -1.8357243537902832, 1.336069107055664, 1.0619252920150757, 2.4378623962402344, 0.4497641324996948, 0.3857855200767517, -0.80279541015625, -0.7180294990539551, 0.5090383887290955, -0.8169839978218079, -0.8171773552894592, 0.16791999340057373, 2.396623373031616, 1.6759246587753296, -0.27538564801216125, -0.2274913340806961, -0.9225137829780579, 1.3209922313690186, -0.28749045729637146, 0.23048317432403564, 1.9567646980285645, -0.392255038022995, -1.048776388168335, 1.3272591829299927, -2.455953598022461, 0.3517369329929352, 2.062195062637329, 0.35282257199287415, 0.09023028612136841, -1.1917332410812378, -0.765584409236908, -0.20585015416145325, -0.5074917078018188, -1.2575528621673584, 0.4090786278247833, -0.22954010963439941, -0.8376931548118591, -1.365532636642456, -0.011865084990859032, -1.1973398923873901, -1.785840630531311, 0.36467307806015015, 1.8508918285369873, 2.213313341140747, -0.7880328893661499, 1.2856080532073975, -0.30224743485450745, 0.13514629006385803, 1.1694517135620117, 1.3184300661087036, 3.1588220596313477, 1.904396653175354, -1.2619414329528809, 0.6919528245925903, -0.23493613302707672, -0.43375176191329956, 1.1385183334350586, -1.0550322532653809, 1.183877944946289, -0.24284179508686066, -1.381720781326294, -1.2008118629455566, 0.9460617303848267, 0.3513392508029938, -0.09608982503414154, -0.5038174986839294, 1.1278494596481323, 0.2919398546218872, 1.3641737699508667, 0.6682263016700745, -0.22983449697494507, 0.4801992177963257, -0.34563693404197693, -0.6121640801429749, 1.6688838005065918, 0.12939678132534027, -1.571293592453003, -2.4224295616149902, -0.19509924948215485, -1.0073844194412231, 0.028995703905820847, -0.7918688058853149, -1.0620099306106567, 1.5723865032196045, 0.41088828444480896, -0.930203914642334, -0.12725749611854553, -0.32436996698379517, -0.4297976493835449, 2.7267537117004395, -1.3006271123886108, -0.15181784331798553, -0.9172080755233765, -0.6461308598518372, 1.5178712606430054, -1.21833074092865, -0.2805858254432678, -1.0271944999694824, -0.5108410120010376, -1.1787781715393066, -0.30076855421066284, -0.029112257063388824, -0.9258217215538025, 0.6358910799026489, 0.06773856282234192, -1.2949113845825195, -0.37998658418655396, -1.0720202922821045, 0.9172482490539551, -0.1420382857322693, 0.08734214305877686, 1.691348910331726, 0.2332780957221985, -0.43247729539871216, 0.8705185651779175, 1.2586835622787476, 0.6413259506225586, -0.59102463722229, 0.07599599659442902, -0.6342174410820007, 0.5249295830726624, -1.1152559518814087, 0.3354594111442566, -2.9512174129486084, 0.6614649295806885, -0.08609168231487274, -0.0715380609035492, -0.2454560101032257, -1.4537689685821533, 1.0109891891479492, 2.4069130420684814, -1.0677810907363892, 0.6816638112068176, 0.2845524251461029, 1.165517807006836, -1.5855284929275513, 0.11281943321228027, -0.6512613892555237, 2.102238416671753, 0.10253764688968658, 1.1045331954956055, -0.549903154373169, -2.394796848297119, 0.5828855633735657, -1.2135943174362183, -0.9109033942222595, 0.788411557674408, -0.8640283942222595, 0.2753071188926697, -1.142844796180725, -0.13129910826683044, -0.8393533825874329, -1.1207853555679321, 0.4851120412349701, 0.052973564714193344, 0.6562663912773132, -0.5478920340538025, 0.25591742992401123, -2.318822145462036, -1.3699637651443481, -0.1015639454126358, -0.951211154460907, 0.4751977324485779, -0.49908751249313354, 0.6749014258384705, -0.05750153213739395, -0.0006923265755176544, 0.28804996609687805, 1.5658177137374878, 3.230250120162964, -0.060467492789030075, 0.30785417556762695, -0.26210305094718933, -1.0534461736679077, 1.4831000566482544, 0.8978145122528076, -0.1990039348602295, -0.6921951174736023, -0.9953104853630066, 1.329508900642395, 1.9014898538589478, 1.0288176536560059, 0.07048636674880981, -0.908552885055542, -0.7977813482284546, 0.06954945623874664, 0.09572616219520569, 0.5469532608985901, 0.9906294345855713, 0.06800660490989685, 0.05301470682024956, 1.3582510948181152, 1.0653222799301147, -0.2885171175003052, 0.38779106736183167, -0.8531044721603394, -0.31345638632774353, 0.45013412833213806, 0.2909647822380066, -0.02107180282473564, 0.3704007863998413, -0.9673536419868469, -0.20342609286308289, -0.23688076436519623, -0.7990050911903381, -0.8021644949913025, -0.3845307230949402, -0.5058690309524536, 1.8089375495910645, -0.05870502442121506, -0.5036213994026184, 0.01672721467912197, -0.6853042840957642, -0.13145877420902252, -1.0564578771591187, 0.25893527269363403, -0.06560549139976501, 0.09559501707553864, -0.15367548167705536, 1.6680809259414673, -0.9051851630210876, -2.19454026222229, 0.10302387177944183, 0.22025693953037262, -0.2775801718235016, -0.011343740858137608, 1.8059098720550537, 0.5198895931243896, 1.3883295059204102, 1.4846973419189453, 1.09446382522583, -0.6038609147071838, -1.3260669708251953, 0.7723634243011475, 0.9648560285568237, -1.3675332069396973, 0.9922118186950684, -0.2720513343811035, -0.5839540362358093, 0.5017874240875244, 1.2500723600387573, 0.4446134567260742, -1.998586654663086, 0.9799869060516357, -1.1371532678604126, 0.97578364610672, 0.8036125302314758, 0.8215143084526062, 0.12032996118068695, 0.8725559711456299, -1.2759455442428589, -1.0430495738983154, -0.5386418700218201, -0.6416472792625427, 1.9099513292312622, -0.3736681640148163, 0.39868950843811035, -0.29382652044296265, -1.2448680400848389, 0.07835964858531952, 0.6605485081672668, 0.31017088890075684, -0.33346256613731384, 0.8003480434417725, -0.7239014506340027, -1.0817127227783203, -1.3498867750167847, -0.5604171752929688, -1.0510114431381226, -0.8106276988983154, 1.0597363710403442, 0.6640663146972656, 0.545446515083313, 1.936590313911438, 0.6643019914627075, 0.30766141414642334, -2.5979714393615723, 0.8913268446922302, 0.34231728315353394, -0.08464807271957397, 0.8154277801513672, 0.2220165878534317, 1.2469596862792969, -0.15110374987125397, 0.5916708707809448, -2.425204277038574, 2.2865262031555176, -0.30390775203704834, 0.7604508996009827, 0.12496793270111084, 0.032474055886268616, 1.0423589944839478, 0.6266504526138306, 0.5425649881362915, -1.1032540798187256, 0.8952736258506775, -0.561526894569397, 1.1693190336227417, 0.899853527545929, -0.8827940225601196, 0.12287388741970062, 1.2369307279586792, 0.35267865657806396, -0.5256840586662292, -0.9729490280151367, -0.8839105367660522, 0.9559512138366699, 1.776655912399292, 0.008206494152545929, 0.11361081898212433, 0.7714608311653137, 0.749536395072937, -1.2116392850875854, 0.03118988499045372, -0.5768704414367676, -0.6893613934516907, 1.7697293758392334, 2.057579517364502, -0.06673510372638702, -0.06582967936992645, -0.7087001800537109, -1.4635201692581177, 0.912136971950531, 0.08309745788574219, -0.06339982151985168, 0.6749147772789001, -0.6525916457176208, 1.0913318395614624, 0.6945734024047852, 0.8992181420326233, 0.2931455373764038, 0.035042744129896164, 0.2681671679019928, -0.347148597240448, -1.1528112888336182, -0.3898121416568756, -1.0435373783111572, -2.697704315185547, 0.3244968354701996, -0.2728766202926636, -1.4652471542358398, 0.16235752403736115, -0.9810061454772949, 0.6856727004051208, -0.5217048525810242, -1.1647236347198486, -1.3232263326644897, 0.28339332342147827, -0.2205149233341217, 0.8253699541091919, -1.6814870834350586, -0.26108935475349426, 1.139821171760559, 0.8994338512420654, -0.6289244890213013, 0.9054100513458252, 0.2516081631183624, 0.8846681118011475, 0.8624312281608582, -0.4029196500778198, 0.49944308400154114, 0.23697839677333832, -1.3379822969436646, 0.3717847168445587, 1.4072262048721313, 0.08556421101093292, 1.4113154411315918, -0.41726407408714294, -0.028374703601002693, 0.3958281874656677, -0.3850599229335785, -0.5396254658699036, -0.617965042591095, 0.6880974769592285, -0.1152009516954422, -1.0331134796142578, -0.16658355295658112, 0.02042088471353054, -0.17861507833003998, 0.21766147017478943, -1.4434852600097656, -0.10325680673122406, -0.40365496277809143, -0.545663058757782, -1.529299020767212, -0.11435991525650024, 1.2504132986068726, -0.7648661732673645, -0.024815117940306664, 0.5072551965713501, 0.22660937905311584, 0.5772274732589722, 0.6958402395248413, -0.7938845157623291, -0.2575697600841522, -0.20201027393341064, -0.4176405072212219, 0.3555768132209778, 1.2579985857009888, -0.08809582889080048, -0.8993930220603943, 0.44731006026268005, -0.2113264501094818, 0.2931731641292572, 2.017796039581299, 0.024524807929992676, -0.8064436316490173, 0.4512542486190796, -0.7831608653068542, 1.8115733861923218, 1.622467279434204, 1.1984630823135376, -0.07395559549331665, -0.9459813833236694, 0.6409927010536194, -0.32846570014953613, -0.36059218645095825, 0.823815107345581, 0.3161170482635498, -0.31561464071273804, -1.4383609294891357, 0.8038802742958069, 1.2236344814300537, -0.723939836025238, -0.7844421863555908, 0.1406356543302536, -0.8268490433692932, 1.2804152965545654, 0.5790635347366333, 0.29841816425323486, 0.33617812395095825, 1.658614158630371, 0.7617747783660889, -0.5833021402359009, 0.49790599942207336, 0.4017387628555298, -0.20999133586883545, -2.0047507286071777, -1.1043946743011475, 0.26280075311660767, -0.46546944975852966, -1.4722263813018799, 1.4917426109313965, -1.2281854152679443, -1.0338999032974243, 0.6069153547286987, 0.1752621978521347, 1.293994665145874, 0.3007092773914337, 1.7506566047668457, 2.094064474105835, 0.9319840669631958, 0.5494791865348816, 1.102270245552063, -0.22665849328041077, -0.3182680904865265, 1.6883361339569092, -0.46088024973869324, 0.6249909996986389, 1.0416959524154663, -0.437671959400177, -1.1297109127044678, -0.8683621883392334, -1.179491639137268, -0.765349268913269, 1.0416874885559082, 0.14112545549869537, -1.0620118379592896, 0.31868377327919006, 1.6180976629257202, 0.03580588847398758, -0.06182646006345749, 0.6981592774391174, 0.4473799765110016, -0.6040476560592651, -0.12978115677833557, -1.087355613708496, 0.5576618909835815, -0.33679813146591187, -0.4308983087539673, 0.19076630473136902, 0.5871543884277344, 1.2740525007247925, 0.13248762488365173, 0.09264962375164032, 1.1908624172210693, -1.4501152038574219, 1.2876375913619995, -0.8817722797393799, 0.39955535531044006, -2.2175185680389404, 1.4551129341125488, -0.9363393783569336, 1.9978755712509155, -2.6553611755371094, 0.47315678000450134, -0.4500114619731903, -0.6468991041183472, 0.19869934022426605, -0.21352824568748474, 0.14231915771961212, -0.10712133347988129, -1.0392215251922607, -0.11408944427967072, -0.8880060911178589, 0.43476152420043945, 1.1994130611419678, 1.3668241500854492, -0.9698665738105774, -0.2716396152973175, -1.5580202341079712, -0.1155296266078949, -0.5201099514961243, 0.19416563212871552, -1.760345697402954, -0.13933376967906952, -2.0934507846832275, -2.4196999073028564, -1.36098313331604, -1.004810094833374, 1.336512804031372, 0.20951533317565918, -0.9671003818511963, 1.1969465017318726, -0.34328946471214294, -1.7828145027160645, 1.2279382944107056, -2.1953234672546387 ]
https://github.com/huggingface/datasets/issues/5488
Error loading MP3 files from CommonVoice
@kradonneoh hey! actually with `ffmpeg4` loading of mp3 files should work, so this is a not expected behavior and we need to investigate it. It works on my side with `torchaudio==0.13` and `ffmpeg==4.2.7`. Which `torchaudio` version do you use? `datasets` should support decoding of mp3 files with `torchaudio` when its version is `>0.12` but as you noted it requires `ffmpeg>4`, we need to fix this in the documentation, thank you for pointing to this! But according to your traceback it seems that it tries to use [`libsndfile`](https://github.com/libsndfile/libsndfile) backend for mp3 decoding. And `libsndfile` library supports mp3 decoding starting from version 1.1.0 which on Linux has to be compiled from source for now afaik. fyi - we are aiming at getting rid of `torchaudio` dependency at all by the next major library release in favor of `libsndfile` too.
### Describe the bug When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays: ```python --------------------------------------------------------------------------- LibsndfileError Traceback (most recent call last) ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3(self, path_or_file) 310 try: # try torchaudio anyway because sometimes it works (depending on the os and os packages installed) --> 311 array, sampling_rate = self._decode_mp3_torchaudio(path_or_file) 312 except RuntimeError: ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3_torchaudio(self, path_or_file) 351 --> 352 array, sampling_rate = torchaudio.load(path_or_file, format="mp3") 353 if self.sampling_rate and self.sampling_rate != sampling_rate: ~/.local/lib/python3.8/site-packages/torchaudio/backend/soundfile_backend.py in load(filepath, frame_offset, num_frames, normalize, channels_first, format) 204 """ --> 205 with soundfile.SoundFile(filepath, "r") as file_: 206 if file_.format != "WAV" or normalize: ~/.local/lib/python3.8/site-packages/soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd) 654 format, subtype, endian) --> 655 self._file = self._open(file, mode_int, closefd) 656 if set(mode).issuperset('r+') and self.seekable(): ~/.local/lib/python3.8/site-packages/soundfile.py in _open(self, file, mode_int, closefd) 1212 err = _snd.sf_error(file_ptr) -> 1213 raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) 1214 if mode_int == _snd.SFM_WRITE: LibsndfileError: Error opening <_io.BytesIO object at 0x7fa539462090>: File contains data in an unknown format. ``` I assume this is because there's some issue with the mp3 decoding process. I've verified that I have `ffmpeg>=4` (on a Linux distro), which appears to be the fallback backend for `torchaudio,` (at least according to #4889). ### Steps to reproduce the bug ```python dataset = load_dataset("mozilla-foundation/common_voice_11_0", "be", split="train") dataset[0] ``` ### Expected behavior Similar behavior to `torchaudio<0.12.0`, which doesn't result in a `LibsndfileError` ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.1
316
137
Error loading MP3 files from CommonVoice ### Describe the bug When loading a CommonVoice dataset with `datasets==2.9.0` and `torchaudio>=0.12.0`, I get an error reading the audio arrays: ```python --------------------------------------------------------------------------- LibsndfileError Traceback (most recent call last) ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3(self, path_or_file) 310 try: # try torchaudio anyway because sometimes it works (depending on the os and os packages installed) --> 311 array, sampling_rate = self._decode_mp3_torchaudio(path_or_file) 312 except RuntimeError: ~/.local/lib/python3.8/site-packages/datasets/features/audio.py in _decode_mp3_torchaudio(self, path_or_file) 351 --> 352 array, sampling_rate = torchaudio.load(path_or_file, format="mp3") 353 if self.sampling_rate and self.sampling_rate != sampling_rate: ~/.local/lib/python3.8/site-packages/torchaudio/backend/soundfile_backend.py in load(filepath, frame_offset, num_frames, normalize, channels_first, format) 204 """ --> 205 with soundfile.SoundFile(filepath, "r") as file_: 206 if file_.format != "WAV" or normalize: ~/.local/lib/python3.8/site-packages/soundfile.py in __init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd) 654 format, subtype, endian) --> 655 self._file = self._open(file, mode_int, closefd) 656 if set(mode).issuperset('r+') and self.seekable(): ~/.local/lib/python3.8/site-packages/soundfile.py in _open(self, file, mode_int, closefd) 1212 err = _snd.sf_error(file_ptr) -> 1213 raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name)) 1214 if mode_int == _snd.SFM_WRITE: LibsndfileError: Error opening <_io.BytesIO object at 0x7fa539462090>: File contains data in an unknown format. ``` I assume this is because there's some issue with the mp3 decoding process. I've verified that I have `ffmpeg>=4` (on a Linux distro), which appears to be the fallback backend for `torchaudio,` (at least according to #4889). ### Steps to reproduce the bug ```python dataset = load_dataset("mozilla-foundation/common_voice_11_0", "be", split="train") dataset[0] ``` ### Expected behavior Similar behavior to `torchaudio<0.12.0`, which doesn't result in a `LibsndfileError` ### Environment info - `datasets` version: 2.9.0 - Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29 - Python version: 3.8.10 - PyArrow version: 10.0.1 - Pandas version: 1.5.1 @kradonneoh hey! actually with `ffmpeg4` loading of mp3 files should work, so this is a not expected behavior and we need to investigate it. It works on my side with `torchaudio==0.13` and `ffmpeg==4.2.7`. Which `torchaudio` version do you use? `datasets` should support decoding of mp3 files with `torchaudio` when its version is `>0.12` but as you noted it requires `ffmpeg>4`, we need to fix this in the documentation, thank you for pointing to this! But according to your traceback it seems that it tries to use [`libsndfile`](https://github.com/libsndfile/libsndfile) backend for mp3 decoding. And `libsndfile` library supports mp3 decoding starting from version 1.1.0 which on Linux has to be compiled from source for now afaik. fyi - we are aiming at getting rid of `torchaudio` dependency at all by the next major library release in favor of `libsndfile` too.
[ -1.2167824506759644, -0.7806340456008911, -0.4928833842277527, 1.4399757385253906, -0.05507618933916092, -1.3829612731933594, 0.13091428577899933, -0.8968741297721863, 1.5224993228912354, -0.8785139322280884, 0.40658533573150635, -1.6223372220993042, 0.05925789102911949, -0.6105026006698608, -0.6277257204055786, -0.7339280843734741, -0.31209278106689453, -0.6920957565307617, 1.1645374298095703, 2.429537534713745, 1.27672278881073, -1.2726619243621826, 2.8008577823638916, 0.6076871752738953, -0.3416002690792084, -0.8071643710136414, 0.41848224401474, 0.0733361691236496, -1.457970380783081, -0.3760242462158203, -1.006481409072876, -0.04962979257106781, -0.6660559773445129, -0.428045392036438, 0.05752931162714958, 0.42988353967666626, -0.18940196931362152, -0.2704603970050812, -0.473066508769989, -0.7410366535186768, 0.593429684638977, -0.25698500871658325, 0.9045193791389465, -0.2721996307373047, 1.7185652256011963, -0.7257424592971802, 0.5073739886283875, 0.5568673014640808, 1.2513201236724854, 0.22622139751911163, -0.037417806684970856, 0.4068102240562439, 0.27132517099380493, 0.030931878834962845, 0.6265794634819031, 1.180953860282898, 0.6531679034233093, 0.49079301953315735, 0.6800881028175354, -2.1640045642852783, 1.3948181867599487, -0.7975453734397888, 0.13448664546012878, 1.3928241729736328, -1.0331119298934937, 0.40671825408935547, -1.8156821727752686, -0.12218821048736572, 0.4170926511287689, -2.295135259628296, 0.17914220690727234, -1.341623067855835, -0.5747102499008179, 0.9538405537605286, 0.4225088059902191, -1.267378807067871, 0.050875190645456314, -0.47057855129241943, 0.891940712928772, 0.35019227862358093, 1.032036542892456, -1.618220567703247, 0.05387578532099724, -0.17833685874938965, 0.29382914304733276, -1.1437537670135498, -1.6206310987472534, 0.5762374997138977, 0.6104308366775513, 0.6370325684547424, -0.14254768192768097, 0.9756954312324524, -1.1695269346237183, 0.8708965182304382, -1.0027974843978882, -1.7082571983337402, -1.3668138980865479, -2.485663414001465, -2.3943145275115967, 0.846729576587677, -0.4541817903518677, -0.43348923325538635, 2.1120352745056152, -1.1592566967010498, -1.6193259954452515, 0.9983881711959839, 0.22839325666427612, -0.06556206941604614, 2.4030284881591797, 0.1912359744310379, -0.8590396046638489, 0.6990774869918823, -0.9228437542915344, 0.7022764682769775, -0.39989614486694336, 1.2049174308776855, 0.438616007566452, -1.1417820453643799, 1.5419621467590332, -0.40664926171302795, 0.48512524366378784, -0.6804004907608032, -0.4355182945728302, -0.6276846528053284, 0.21155256032943726, 1.8921321630477905, -0.16308504343032837, 1.5143160820007324, -0.06513114273548126, -1.4504270553588867, -1.3927531242370605, 0.7498433589935303, 0.40676990151405334, -0.907418429851532, 0.1769607961177826, -0.45009899139404297, 0.21414032578468323, 0.16568097472190857, 1.051269292831421, 1.3727529048919678, 0.790019690990448, -0.23874260485172272, -0.8828639984130859, 0.048900850117206573, -0.14993174374103546, -0.5612703561782837, -1.7734909057617188, -0.2852464020252228, 0.01765485294163227, 0.6715001463890076, -1.2181811332702637, 2.012622594833374, 0.8956661224365234, 2.0156893730163574, 0.9341422319412231, -0.4202083349227905, 1.59078848361969, 0.04306020215153694, 1.8801666498184204, -0.3816322386264801, 0.6555348038673401, -0.5650693774223328, -1.2150007486343384, 0.6882467865943909, -0.3409573435783386, -1.9211163520812988, -0.4518699049949646, -0.7343736886978149, -0.15103137493133545, -0.927570641040802, 1.0145992040634155, -0.18560923635959625, -1.4146318435668945, 0.17378617823123932, -0.637981653213501, 0.1341838389635086, -1.3922061920166016, 0.27549830079078674, 0.726692259311676, -0.6862877607345581, 0.02958635613322258, -0.4003949761390686, -1.3400779962539673, -0.6033106446266174, 0.5154628753662109, 1.7710847854614258, -0.5928492546081543, 1.0771563053131104, 1.0198084115982056, -0.5946114659309387, -0.01720692589879036, 0.4669216573238373, -0.34863173961639404, 0.8269618153572083, -1.0039705038070679, -0.4867863655090332, 1.1707465648651123, -0.40093672275543213, -0.501782238483429, 1.293054223060608, 0.7346691489219666, -1.0675421953201294, -0.35636505484580994, -0.1104353666305542, -0.8482250571250916, 0.09633445739746094, -1.591299295425415, -0.12975478172302246, 0.3677789270877838, -1.4869071245193481, -0.3193420469760895, -0.01629650592803955, 1.3348726034164429, -0.08766151964664459, 1.4409245252609253, -0.25323182344436646, -0.1497412770986557, -0.4472029209136963, -0.5511499047279358, 0.2065410017967224, -0.08375059068202972, -0.5152653455734253, 0.32454144954681396, -0.7686370611190796, 0.2166718989610672, 1.47645103931427, 0.12033319473266602, 0.11733493208885193, 0.38465529680252075, 1.1364063024520874, 0.31254416704177856, -0.20140713453292847, -0.907166600227356, -1.6647311449050903, 2.048609972000122, -1.56205415725708, 1.9560405015945435, 0.8655769228935242, -0.0395975336432457, -1.8058429956436157, -1.8357243537902832, 1.336069107055664, 1.0619252920150757, 2.4378623962402344, 0.4497641324996948, 0.3857855200767517, -0.80279541015625, -0.7180294990539551, 0.5090383887290955, -0.8169839978218079, -0.8171773552894592, 0.16791999340057373, 2.396623373031616, 1.6759246587753296, -0.27538564801216125, -0.2274913340806961, -0.9225137829780579, 1.3209922313690186, -0.28749045729637146, 0.23048317432403564, 1.9567646980285645, -0.392255038022995, -1.048776388168335, 1.3272591829299927, -2.455953598022461, 0.3517369329929352, 2.062195062637329, 0.35282257199287415, 0.09023028612136841, -1.1917332410812378, -0.765584409236908, -0.20585015416145325, -0.5074917078018188, -1.2575528621673584, 0.4090786278247833, -0.22954010963439941, -0.8376931548118591, -1.365532636642456, -0.011865084990859032, -1.1973398923873901, -1.785840630531311, 0.36467307806015015, 1.8508918285369873, 2.213313341140747, -0.7880328893661499, 1.2856080532073975, -0.30224743485450745, 0.13514629006385803, 1.1694517135620117, 1.3184300661087036, 3.1588220596313477, 1.904396653175354, -1.2619414329528809, 0.6919528245925903, -0.23493613302707672, -0.43375176191329956, 1.1385183334350586, -1.0550322532653809, 1.183877944946289, -0.24284179508686066, -1.381720781326294, -1.2008118629455566, 0.9460617303848267, 0.3513392508029938, -0.09608982503414154, -0.5038174986839294, 1.1278494596481323, 0.2919398546218872, 1.3641737699508667, 0.6682263016700745, -0.22983449697494507, 0.4801992177963257, -0.34563693404197693, -0.6121640801429749, 1.6688838005065918, 0.12939678132534027, -1.571293592453003, -2.4224295616149902, -0.19509924948215485, -1.0073844194412231, 0.028995703905820847, -0.7918688058853149, -1.0620099306106567, 1.5723865032196045, 0.41088828444480896, -0.930203914642334, -0.12725749611854553, -0.32436996698379517, -0.4297976493835449, 2.7267537117004395, -1.3006271123886108, -0.15181784331798553, -0.9172080755233765, -0.6461308598518372, 1.5178712606430054, -1.21833074092865, -0.2805858254432678, -1.0271944999694824, -0.5108410120010376, -1.1787781715393066, -0.30076855421066284, -0.029112257063388824, -0.9258217215538025, 0.6358910799026489, 0.06773856282234192, -1.2949113845825195, -0.37998658418655396, -1.0720202922821045, 0.9172482490539551, -0.1420382857322693, 0.08734214305877686, 1.691348910331726, 0.2332780957221985, -0.43247729539871216, 0.8705185651779175, 1.2586835622787476, 0.6413259506225586, -0.59102463722229, 0.07599599659442902, -0.6342174410820007, 0.5249295830726624, -1.1152559518814087, 0.3354594111442566, -2.9512174129486084, 0.6614649295806885, -0.08609168231487274, -0.0715380609035492, -0.2454560101032257, -1.4537689685821533, 1.0109891891479492, 2.4069130420684814, -1.0677810907363892, 0.6816638112068176, 0.2845524251461029, 1.165517807006836, -1.5855284929275513, 0.11281943321228027, -0.6512613892555237, 2.102238416671753, 0.10253764688968658, 1.1045331954956055, -0.549903154373169, -2.394796848297119, 0.5828855633735657, -1.2135943174362183, -0.9109033942222595, 0.788411557674408, -0.8640283942222595, 0.2753071188926697, -1.142844796180725, -0.13129910826683044, -0.8393533825874329, -1.1207853555679321, 0.4851120412349701, 0.052973564714193344, 0.6562663912773132, -0.5478920340538025, 0.25591742992401123, -2.318822145462036, -1.3699637651443481, -0.1015639454126358, -0.951211154460907, 0.4751977324485779, -0.49908751249313354, 0.6749014258384705, -0.05750153213739395, -0.0006923265755176544, 0.28804996609687805, 1.5658177137374878, 3.230250120162964, -0.060467492789030075, 0.30785417556762695, -0.26210305094718933, -1.0534461736679077, 1.4831000566482544, 0.8978145122528076, -0.1990039348602295, -0.6921951174736023, -0.9953104853630066, 1.329508900642395, 1.9014898538589478, 1.0288176536560059, 0.07048636674880981, -0.908552885055542, -0.7977813482284546, 0.06954945623874664, 0.09572616219520569, 0.5469532608985901, 0.9906294345855713, 0.06800660490989685, 0.05301470682024956, 1.3582510948181152, 1.0653222799301147, -0.2885171175003052, 0.38779106736183167, -0.8531044721603394, -0.31345638632774353, 0.45013412833213806, 0.2909647822380066, -0.02107180282473564, 0.3704007863998413, -0.9673536419868469, -0.20342609286308289, -0.23688076436519623, -0.7990050911903381, -0.8021644949913025, -0.3845307230949402, -0.5058690309524536, 1.8089375495910645, -0.05870502442121506, -0.5036213994026184, 0.01672721467912197, -0.6853042840957642, -0.13145877420902252, -1.0564578771591187, 0.25893527269363403, -0.06560549139976501, 0.09559501707553864, -0.15367548167705536, 1.6680809259414673, -0.9051851630210876, -2.19454026222229, 0.10302387177944183, 0.22025693953037262, -0.2775801718235016, -0.011343740858137608, 1.8059098720550537, 0.5198895931243896, 1.3883295059204102, 1.4846973419189453, 1.09446382522583, -0.6038609147071838, -1.3260669708251953, 0.7723634243011475, 0.9648560285568237, -1.3675332069396973, 0.9922118186950684, -0.2720513343811035, -0.5839540362358093, 0.5017874240875244, 1.2500723600387573, 0.4446134567260742, -1.998586654663086, 0.9799869060516357, -1.1371532678604126, 0.97578364610672, 0.8036125302314758, 0.8215143084526062, 0.12032996118068695, 0.8725559711456299, -1.2759455442428589, -1.0430495738983154, -0.5386418700218201, -0.6416472792625427, 1.9099513292312622, -0.3736681640148163, 0.39868950843811035, -0.29382652044296265, -1.2448680400848389, 0.07835964858531952, 0.6605485081672668, 0.31017088890075684, -0.33346256613731384, 0.8003480434417725, -0.7239014506340027, -1.0817127227783203, -1.3498867750167847, -0.5604171752929688, -1.0510114431381226, -0.8106276988983154, 1.0597363710403442, 0.6640663146972656, 0.545446515083313, 1.936590313911438, 0.6643019914627075, 0.30766141414642334, -2.5979714393615723, 0.8913268446922302, 0.34231728315353394, -0.08464807271957397, 0.8154277801513672, 0.2220165878534317, 1.2469596862792969, -0.15110374987125397, 0.5916708707809448, -2.425204277038574, 2.2865262031555176, -0.30390775203704834, 0.7604508996009827, 0.12496793270111084, 0.032474055886268616, 1.0423589944839478, 0.6266504526138306, 0.5425649881362915, -1.1032540798187256, 0.8952736258506775, -0.561526894569397, 1.1693190336227417, 0.899853527545929, -0.8827940225601196, 0.12287388741970062, 1.2369307279586792, 0.35267865657806396, -0.5256840586662292, -0.9729490280151367, -0.8839105367660522, 0.9559512138366699, 1.776655912399292, 0.008206494152545929, 0.11361081898212433, 0.7714608311653137, 0.749536395072937, -1.2116392850875854, 0.03118988499045372, -0.5768704414367676, -0.6893613934516907, 1.7697293758392334, 2.057579517364502, -0.06673510372638702, -0.06582967936992645, -0.7087001800537109, -1.4635201692581177, 0.912136971950531, 0.08309745788574219, -0.06339982151985168, 0.6749147772789001, -0.6525916457176208, 1.0913318395614624, 0.6945734024047852, 0.8992181420326233, 0.2931455373764038, 0.035042744129896164, 0.2681671679019928, -0.347148597240448, -1.1528112888336182, -0.3898121416568756, -1.0435373783111572, -2.697704315185547, 0.3244968354701996, -0.2728766202926636, -1.4652471542358398, 0.16235752403736115, -0.9810061454772949, 0.6856727004051208, -0.5217048525810242, -1.1647236347198486, -1.3232263326644897, 0.28339332342147827, -0.2205149233341217, 0.8253699541091919, -1.6814870834350586, -0.26108935475349426, 1.139821171760559, 0.8994338512420654, -0.6289244890213013, 0.9054100513458252, 0.2516081631183624, 0.8846681118011475, 0.8624312281608582, -0.4029196500778198, 0.49944308400154114, 0.23697839677333832, -1.3379822969436646, 0.3717847168445587, 1.4072262048721313, 0.08556421101093292, 1.4113154411315918, -0.41726407408714294, -0.028374703601002693, 0.3958281874656677, -0.3850599229335785, -0.5396254658699036, -0.617965042591095, 0.6880974769592285, -0.1152009516954422, -1.0331134796142578, -0.16658355295658112, 0.02042088471353054, -0.17861507833003998, 0.21766147017478943, -1.4434852600097656, -0.10325680673122406, -0.40365496277809143, -0.545663058757782, -1.529299020767212, -0.11435991525650024, 1.2504132986068726, -0.7648661732673645, -0.024815117940306664, 0.5072551965713501, 0.22660937905311584, 0.5772274732589722, 0.6958402395248413, -0.7938845157623291, -0.2575697600841522, -0.20201027393341064, -0.4176405072212219, 0.3555768132209778, 1.2579985857009888, -0.08809582889080048, -0.8993930220603943, 0.44731006026268005, -0.2113264501094818, 0.2931731641292572, 2.017796039581299, 0.024524807929992676, -0.8064436316490173, 0.4512542486190796, -0.7831608653068542, 1.8115733861923218, 1.622467279434204, 1.1984630823135376, -0.07395559549331665, -0.9459813833236694, 0.6409927010536194, -0.32846570014953613, -0.36059218645095825, 0.823815107345581, 0.3161170482635498, -0.31561464071273804, -1.4383609294891357, 0.8038802742958069, 1.2236344814300537, -0.723939836025238, -0.7844421863555908, 0.1406356543302536, -0.8268490433692932, 1.2804152965545654, 0.5790635347366333, 0.29841816425323486, 0.33617812395095825, 1.658614158630371, 0.7617747783660889, -0.5833021402359009, 0.49790599942207336, 0.4017387628555298, -0.20999133586883545, -2.0047507286071777, -1.1043946743011475, 0.26280075311660767, -0.46546944975852966, -1.4722263813018799, 1.4917426109313965, -1.2281854152679443, -1.0338999032974243, 0.6069153547286987, 0.1752621978521347, 1.293994665145874, 0.3007092773914337, 1.7506566047668457, 2.094064474105835, 0.9319840669631958, 0.5494791865348816, 1.102270245552063, -0.22665849328041077, -0.3182680904865265, 1.6883361339569092, -0.46088024973869324, 0.6249909996986389, 1.0416959524154663, -0.437671959400177, -1.1297109127044678, -0.8683621883392334, -1.179491639137268, -0.765349268913269, 1.0416874885559082, 0.14112545549869537, -1.0620118379592896, 0.31868377327919006, 1.6180976629257202, 0.03580588847398758, -0.06182646006345749, 0.6981592774391174, 0.4473799765110016, -0.6040476560592651, -0.12978115677833557, -1.087355613708496, 0.5576618909835815, -0.33679813146591187, -0.4308983087539673, 0.19076630473136902, 0.5871543884277344, 1.2740525007247925, 0.13248762488365173, 0.09264962375164032, 1.1908624172210693, -1.4501152038574219, 1.2876375913619995, -0.8817722797393799, 0.39955535531044006, -2.2175185680389404, 1.4551129341125488, -0.9363393783569336, 1.9978755712509155, -2.6553611755371094, 0.47315678000450134, -0.4500114619731903, -0.6468991041183472, 0.19869934022426605, -0.21352824568748474, 0.14231915771961212, -0.10712133347988129, -1.0392215251922607, -0.11408944427967072, -0.8880060911178589, 0.43476152420043945, 1.1994130611419678, 1.3668241500854492, -0.9698665738105774, -0.2716396152973175, -1.5580202341079712, -0.1155296266078949, -0.5201099514961243, 0.19416563212871552, -1.760345697402954, -0.13933376967906952, -2.0934507846832275, -2.4196999073028564, -1.36098313331604, -1.004810094833374, 1.336512804031372, 0.20951533317565918, -0.9671003818511963, 1.1969465017318726, -0.34328946471214294, -1.7828145027160645, 1.2279382944107056, -2.1953234672546387 ]
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
Hi! The correct path is still `dill._dill.XXXX` in the latest release. What do you get when you run `python -c "import dill; print(dill.__version__)"` in your environment?
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4
317
26
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4 Hi! The correct path is still `dill._dill.XXXX` in the latest release. What do you get when you run `python -c "import dill; print(dill.__version__)"` in your environment?
[ -1.1599488258361816, -0.8837870359420776, -0.7099396586418152, 1.3716564178466797, -0.08292015641927719, -1.3277747631072998, 0.0947943702340126, -1.1010955572128296, 1.5574061870574951, -0.6909691095352173, 0.2057599425315857, -1.688206672668457, -0.19245323538780212, -0.4060768485069275, -0.6863471269607544, -0.93545001745224, -0.36366304755210876, -1.006789207458496, 0.9752193689346313, 2.5131161212921143, 1.4287742376327515, -1.3019462823867798, 2.796297550201416, 0.6501778960227966, -0.36052799224853516, -0.9295034408569336, 0.5855237245559692, -0.01977519877254963, -1.2403284311294556, -0.4821670949459076, -0.9120622873306274, 0.02795284613966942, -0.5791834592819214, -0.33486407995224, 0.0841706246137619, 0.4527825713157654, -0.3076794147491455, -0.1892685741186142, -0.6364888548851013, -0.7426725625991821, 0.4843207895755768, -0.3225354552268982, 1.0054774284362793, -0.2716929018497467, 1.7356138229370117, -0.5733333230018616, 0.4068160951137543, 0.7564837336540222, 1.2677698135375977, 0.12119825929403305, 0.08089578151702881, 0.21176916360855103, 0.3278254270553589, -0.05626846104860306, 0.594719409942627, 1.2334603071212769, 0.5346507430076599, 0.5517169833183289, 0.6752236485481262, -2.1787564754486084, 1.2591843605041504, -0.8328648209571838, 0.19212153553962708, 1.3566317558288574, -0.74741530418396, 0.30409038066864014, -1.828865885734558, -0.037708912044763565, 0.6335675716400146, -2.3341357707977295, 0.26683923602104187, -1.3179391622543335, -0.5082676410675049, 0.8633751273155212, 0.26668593287467957, -1.2124035358428955, 0.21132901310920715, -0.5097116827964783, 1.1111516952514648, 0.5151857733726501, 1.195163369178772, -1.6769906282424927, -0.012120884843170643, -0.12489454448223114, 0.11162197589874268, -1.2962636947631836, -1.7074259519577026, 0.5384920239448547, 0.5179530382156372, 0.8185365200042725, -0.06582620739936829, 1.0382025241851807, -1.07541024684906, 0.7994019389152527, -0.9083600044250488, -1.602870225906372, -1.4061307907104492, -2.398646116256714, -2.346127510070801, 0.7497532367706299, -0.5903266072273254, -0.48450323939323425, 1.9694074392318726, -1.0044411420822144, -1.7575613260269165, 0.9731139540672302, 0.3660074770450592, 0.09131890535354614, 2.350916624069214, 0.23673228919506073, -0.696050226688385, 0.42169633507728577, -0.6541216969490051, 0.8154435157775879, -0.33128246665000916, 1.238525390625, 0.49327096343040466, -0.9606022834777832, 1.642964482307434, -0.5399861931800842, 0.6208182573318481, -0.6467443108558655, -0.46141642332077026, -0.850908637046814, 0.18564841151237488, 1.7838696241378784, -0.3673206865787506, 1.5328716039657593, -0.2171548455953598, -1.5978046655654907, -1.5236183404922485, 0.8073318600654602, 0.5156146287918091, -1.0030412673950195, 0.033993471413850784, -0.5412747263908386, 0.13973285257816315, -0.052948422729969025, 1.091795802116394, 1.1979557275772095, 0.6983343362808228, -0.2785475552082062, -0.8186383247375488, 0.3130657374858856, -0.17172901332378387, -0.670808732509613, -1.811333179473877, -0.2924917936325073, 0.2544487714767456, 0.6437063813209534, -1.2119038105010986, 1.9155290126800537, 0.883121907711029, 2.0424251556396484, 0.9321510791778564, -0.4587997794151306, 1.4156854152679443, 0.01188488956540823, 1.8229910135269165, -0.48412132263183594, 0.6129494905471802, -0.33435526490211487, -1.1112463474273682, 0.851797878742218, -0.42972108721733093, -1.8749611377716064, -0.811150312423706, -0.7710875868797302, -0.09862663596868515, -0.7405455112457275, 0.8478069305419922, -0.3334246873855591, -1.496289610862732, 0.03641219809651375, -0.6618224382400513, 0.16144859790802002, -1.3188910484313965, 0.1845884919166565, 0.7044689059257507, -0.6867625713348389, -0.06900946795940399, -0.3068287670612335, -1.2868388891220093, -0.4862041473388672, 0.36333489418029785, 2.000610828399658, -0.4690867066383362, 0.9786139130592346, 0.9142124056816101, -0.7756486535072327, 0.16986095905303955, 0.2480684518814087, -0.34578388929367065, 0.7417734861373901, -1.0764038562774658, -0.4269997477531433, 1.0909192562103271, -0.3053681552410126, -0.7122635245323181, 1.4627436399459839, 0.803393542766571, -1.1433271169662476, -0.28068608045578003, -0.29358115792274475, -0.8624725341796875, 0.03238889202475548, -1.3976361751556396, -0.1138940379023552, 0.3664042353630066, -1.4710805416107178, -0.3359999358654022, -0.1965693086385727, 1.3895666599273682, -0.3487950265407562, 1.513117790222168, -0.33214256167411804, -0.1569763869047165, -0.32137981057167053, -0.52364581823349, 0.27055624127388, -0.21901623904705048, -0.6160565614700317, 0.1861957311630249, -0.8083435297012329, 0.3266949951648712, 1.520471453666687, 0.2912861704826355, 0.005373500287532806, 0.37209799885749817, 1.1202119588851929, 0.40135136246681213, -0.03693918511271477, -0.926185667514801, -1.4700138568878174, 1.9502661228179932, -1.440173864364624, 1.835654616355896, 0.7800500988960266, -0.13776694238185883, -1.8594805002212524, -1.854907751083374, 1.1771808862686157, 1.1223886013031006, 2.3280937671661377, 0.5233237743377686, 0.48983174562454224, -0.642815351486206, -0.7665420174598694, 0.2770986258983612, -0.9567479491233826, -0.650410532951355, 0.21714358031749725, 2.2662177085876465, 1.8090720176696777, -0.6498310565948486, -0.30854713916778564, -0.8347163200378418, 1.2967406511306763, -0.24151048064231873, 0.24302446842193604, 2.06943941116333, -0.3053973615169525, -1.0112046003341675, 1.3564038276672363, -2.3888676166534424, 0.3502568006515503, 2.08601713180542, 0.2539603114128113, 0.16582484543323517, -1.4535112380981445, -0.703429102897644, -0.2775942385196686, -0.5796284079551697, -1.2909623384475708, 0.5805066227912903, -0.2674022614955902, -0.9049020409584045, -1.465998888015747, 0.039678286761045456, -1.1026077270507812, -1.8112187385559082, 0.33187922835350037, 1.9885857105255127, 2.0718746185302734, -0.8727285265922546, 1.2897735834121704, -0.2239108830690384, -0.036145538091659546, 1.3238577842712402, 1.3910748958587646, 3.1247684955596924, 1.8539984226226807, -1.2774139642715454, 0.803769052028656, -0.25505462288856506, -0.45866018533706665, 1.2036932706832886, -1.121822714805603, 0.9758722186088562, -0.18434908986091614, -1.2501181364059448, -1.2073248624801636, 1.022642970085144, 0.4823034703731537, 0.059348978102207184, -0.5195690989494324, 1.2467231750488281, 0.14044643938541412, 1.4120858907699585, 0.6034265160560608, -0.44148290157318115, 0.5313106179237366, -0.32139942049980164, -0.5802765488624573, 1.7677812576293945, 0.1741228699684143, -1.4973129034042358, -2.4571409225463867, -0.31912046670913696, -0.8938664197921753, -0.02713121846318245, -0.5661182403564453, -1.0410627126693726, 1.5967129468917847, 0.4503351151943207, -1.1405109167099, -0.29636287689208984, -0.27958136796951294, -0.46196115016937256, 2.650040864944458, -1.2519280910491943, -0.05069255456328392, -0.9431505799293518, -0.5005806088447571, 1.6278555393218994, -1.2639477252960205, -0.23022425174713135, -1.0597139596939087, -0.6696259379386902, -1.3930383920669556, -0.5010795593261719, 0.03833916410803795, -0.9275222420692444, 0.7137439846992493, 0.20610176026821136, -1.0529576539993286, -0.338740736246109, -0.967337965965271, 1.1007392406463623, -0.08584979176521301, 0.215028777718544, 1.874253511428833, 0.3497980833053589, -0.43126749992370605, 0.6991668343544006, 1.2347394227981567, 0.5855608582496643, -0.7035847306251526, -0.08519650995731354, -0.7370298504829407, 0.4027189612388611, -1.4409393072128296, 0.10787507891654968, -2.990295648574829, 0.7799752950668335, -0.22205796837806702, -0.18333296477794647, -0.16422894597053528, -1.3185359239578247, 1.0789915323257446, 2.5749387741088867, -1.152164101600647, 0.45380133390426636, 0.45505258440971375, 1.14236319065094, -1.6379306316375732, 0.2532210648059845, -0.5091725587844849, 2.070901870727539, 0.18797913193702698, 1.2657098770141602, -0.5199176669120789, -2.2044284343719482, 0.5906524658203125, -1.1361819505691528, -0.9883687496185303, 0.9234814047813416, -0.8659425377845764, 0.35192444920539856, -1.4246653318405151, -0.09891128540039062, -0.9482637047767639, -1.2591053247451782, 0.7641555666923523, 0.030007243156433105, 0.42398732900619507, -0.5589136481285095, 0.44286251068115234, -2.1241602897644043, -1.4355933666229248, -0.22788868844509125, -1.010978102684021, 0.5314958095550537, -0.3820899426937103, 0.5258074998855591, -0.021693140268325806, 0.17477701604366302, 0.28764694929122925, 1.4896435737609863, 3.4324092864990234, 0.15815187990665436, 0.16354823112487793, -0.05132700130343437, -1.111341118812561, 1.4265178442001343, 0.9094663858413696, -0.09220299124717712, -0.5562323331832886, -1.0087130069732666, 1.3391392230987549, 1.9664534330368042, 1.1467664241790771, 0.1863282173871994, -0.8700392246246338, -0.7876084446907043, -0.03426586464047432, 0.1718640774488449, 0.5675815939903259, 1.0134575366973877, -0.06258145719766617, 0.08624287694692612, 1.393738031387329, 1.1824623346328735, -0.21392570436000824, 0.4758318364620209, -0.9704014658927917, -0.38454779982566833, 0.28687381744384766, 0.17968477308750153, 0.06684769690036774, 0.6032946109771729, -1.0220823287963867, -0.23674450814723969, -0.28643253445625305, -0.8823648691177368, -0.8297863602638245, -0.3679157495498657, -0.4254177510738373, 1.625579833984375, 0.05685886740684509, -0.5529541969299316, 0.12091831117868423, -0.6142204403877258, -0.07531078904867172, -1.1807101964950562, 0.07893018424510956, -0.10267218947410583, -0.07669104635715485, -0.13879403471946716, 1.58999764919281, -0.9156829714775085, -2.0463247299194336, 0.14179500937461853, 0.3685595393180847, -0.39457666873931885, 0.19352328777313232, 1.6959270238876343, 0.4249024987220764, 1.3835830688476562, 1.3117432594299316, 1.0016411542892456, -0.5983616709709167, -1.2265082597732544, 0.8062183260917664, 0.9677982926368713, -1.2724348306655884, 0.9736056923866272, -0.21411047875881195, -0.6203324794769287, 0.679653525352478, 1.3778365850448608, 0.3455025553703308, -1.9796408414840698, 0.9910556077957153, -0.8905925750732422, 0.7705892324447632, 0.6872857213020325, 0.8443225622177124, 0.2690247893333435, 0.8656197786331177, -1.222608208656311, -1.1812390089035034, -0.6801396608352661, -0.6039180159568787, 1.8420547246932983, -0.2389560341835022, 0.576680600643158, -0.21684150397777557, -1.0992566347122192, -0.16686317324638367, 0.8224684000015259, 0.42513346672058105, -0.3672286868095398, 0.9144589304924011, -0.5314339995384216, -0.956037163734436, -1.1477235555648804, -0.41123223304748535, -1.0289089679718018, -0.8324143886566162, 0.981286346912384, 0.7845366597175598, 0.4836106598377228, 1.9647139310836792, 0.6111152768135071, 0.3630829453468323, -2.6067793369293213, 0.8665665984153748, 0.32983362674713135, -0.03332294896245003, 0.9096415638923645, 0.23531557619571686, 1.2070093154907227, -0.038517486304044724, 0.6197673678398132, -2.315084934234619, 2.1459269523620605, -0.23011305928230286, 0.5821312069892883, 0.019935622811317444, -0.2380843311548233, 1.1502069234848022, 0.5674091577529907, 0.5596539378166199, -1.1140639781951904, 0.7513505816459656, -0.6255924701690674, 1.0610625743865967, 0.9511605501174927, -1.0303781032562256, 0.1189407929778099, 1.4527649879455566, 0.4944038689136505, -0.3872908651828766, -1.0028486251831055, -0.8508822917938232, 0.9983333349227905, 1.6111758947372437, -0.08064527064561844, -0.011597814038395882, 0.8504193425178528, 0.7366636395454407, -1.2162061929702759, 0.07323142886161804, -0.6734793186187744, -0.6867654919624329, 1.8133718967437744, 2.0170557498931885, -0.09845031797885895, -0.215764120221138, -0.7783092856407166, -1.3233404159545898, 0.7794981598854065, -0.08895837515592575, 0.05715883523225784, 0.6945441961288452, -0.7166896462440491, 1.117776870727539, 0.5182976126670837, 1.0830078125, 0.0118378521874547, 0.3533167243003845, 0.3085145652294159, -0.4029957950115204, -1.1777379512786865, -0.3526730239391327, -1.1426953077316284, -2.467252254486084, 0.4185640513896942, -0.25631916522979736, -1.4788835048675537, 0.10127884149551392, -1.0889194011688232, 0.8638964891433716, -0.653269350528717, -1.0984327793121338, -1.3940513134002686, 0.3816235661506653, -0.22882269322872162, 0.8676075339317322, -1.5832105875015259, -0.21951380372047424, 1.248184084892273, 0.8894801139831543, -0.5732361078262329, 0.948897123336792, 0.23952917754650116, 0.9982262849807739, 0.7420241832733154, -0.4762682616710663, 0.6253864765167236, -0.05023309588432312, -1.3510103225708008, 0.37040582299232483, 1.2258906364440918, 0.2500663995742798, 1.376737356185913, -0.4804900586605072, 0.1712404042482376, 0.44831374287605286, -0.6340606808662415, -0.5159826278686523, -0.3548094928264618, 0.6842718720436096, 0.02229715883731842, -1.112005591392517, -0.1619672030210495, -0.24627819657325745, -0.28045645356178284, 0.22201359272003174, -1.4730781316757202, -0.32015514373779297, -0.3789444863796234, -0.3937576711177826, -1.3405842781066895, 0.09565041214227676, 1.3335591554641724, -0.7969592809677124, -0.24541400372982025, 0.3945843577384949, 0.40581491589546204, 0.514306902885437, 0.5305090546607971, -0.7810714244842529, -0.2696571946144104, -0.4093950688838959, -0.2744959890842438, 0.25448015332221985, 1.1515474319458008, -0.05170179903507233, -0.9746144413948059, 0.5580492615699768, -0.34085172414779663, 0.20853419601917267, 2.0415515899658203, 0.012753312475979328, -0.6842272281646729, 0.34751948714256287, -0.6668720841407776, 1.6746056079864502, 1.7301647663116455, 1.2268002033233643, -0.06650562584400177, -0.7272427678108215, 0.48542729020118713, -0.3038334250450134, -0.3023045063018799, 0.9180356860160828, 0.4103759229183197, -0.18503877520561218, -1.4168202877044678, 0.596779465675354, 1.2988191843032837, -0.7409714460372925, -0.7349827289581299, 0.05572985112667084, -0.9521865248680115, 1.3228189945220947, 0.4964389503002167, 0.2737754285335541, 0.2662857174873352, 1.5473040342330933, 0.7238453030586243, -0.43233367800712585, 0.5258410573005676, 0.5384107828140259, -0.26258641481399536, -2.090447425842285, -0.982645571231842, 0.23652571439743042, -0.357409805059433, -1.6424121856689453, 1.4133825302124023, -1.1444770097732544, -0.9849513173103333, 0.5234098434448242, 0.18887370824813843, 1.241275668144226, 0.40139874815940857, 1.734646201133728, 2.1465003490448, 0.9379764199256897, 0.32768529653549194, 1.1687567234039307, -0.09625048190355301, -0.45758292078971863, 1.8541624546051025, -0.4231643080711365, 0.5249621868133545, 0.9902523756027222, -0.3985787034034729, -1.1032696962356567, -0.9001369476318359, -1.117645263671875, -0.6486197113990784, 1.2273054122924805, 0.10898609459400177, -1.09407377243042, 0.19388537108898163, 1.5658632516860962, 0.12872657179832458, -0.20610088109970093, 0.7878947257995605, 0.404712051153183, -0.6931031346321106, -0.08427245914936066, -0.825354814529419, 0.49748632311820984, -0.055495116859674454, -0.3205012083053589, 0.21736453473567963, 0.6082059144973755, 1.327815055847168, -0.057314589619636536, 0.051983222365379333, 1.1990268230438232, -1.3428608179092407, 1.54330575466156, -0.5359097719192505, 0.28860926628112793, -2.441169023513794, 1.3914415836334229, -0.7682392001152039, 1.9599710702896118, -2.5401711463928223, 0.38234201073646545, -0.45250847935676575, -0.4935259222984314, 0.28108730912208557, -0.4660293459892273, 0.16316089034080505, -0.18833832442760468, -0.8805756568908691, -0.07877539843320847, -0.7615410685539246, 0.581209123134613, 1.163956880569458, 1.5157334804534912, -1.1417115926742554, -0.29341936111450195, -1.7419344186782837, -0.17337091267108917, -0.8581814169883728, 0.3504190444946289, -1.9411581754684448, -0.23930145800113678, -1.9917405843734741, -2.3847105503082275, -1.3898541927337646, -0.8484546542167664, 1.0016977787017822, 0.1659039407968521, -0.9493661522865295, 1.2692344188690186, -0.33493873476982117, -1.8012518882751465, 1.1802664995193481, -2.27402663230896 ]
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
`0.3.6` I feel like that's bad news, because it's probably not the issue. My mistake, about the wrong path guess. I think I didn't notice that the first `dill` in the path isn't supposed to be included in the path specification in python. <img width="146" alt="Screen Shot 2023-01-31 at 12 58 32 PM" src="https://user-images.githubusercontent.com/35349273/215844209-74af6a8f-9bff-4c75-9495-44c658c8e9f7.png">
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4
317
54
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4 `0.3.6` I feel like that's bad news, because it's probably not the issue. My mistake, about the wrong path guess. I think I didn't notice that the first `dill` in the path isn't supposed to be included in the path specification in python. <img width="146" alt="Screen Shot 2023-01-31 at 12 58 32 PM" src="https://user-images.githubusercontent.com/35349273/215844209-74af6a8f-9bff-4c75-9495-44c658c8e9f7.png">
[ -1.1599488258361816, -0.8837870359420776, -0.7099396586418152, 1.3716564178466797, -0.08292015641927719, -1.3277747631072998, 0.0947943702340126, -1.1010955572128296, 1.5574061870574951, -0.6909691095352173, 0.2057599425315857, -1.688206672668457, -0.19245323538780212, -0.4060768485069275, -0.6863471269607544, -0.93545001745224, -0.36366304755210876, -1.006789207458496, 0.9752193689346313, 2.5131161212921143, 1.4287742376327515, -1.3019462823867798, 2.796297550201416, 0.6501778960227966, -0.36052799224853516, -0.9295034408569336, 0.5855237245559692, -0.01977519877254963, -1.2403284311294556, -0.4821670949459076, -0.9120622873306274, 0.02795284613966942, -0.5791834592819214, -0.33486407995224, 0.0841706246137619, 0.4527825713157654, -0.3076794147491455, -0.1892685741186142, -0.6364888548851013, -0.7426725625991821, 0.4843207895755768, -0.3225354552268982, 1.0054774284362793, -0.2716929018497467, 1.7356138229370117, -0.5733333230018616, 0.4068160951137543, 0.7564837336540222, 1.2677698135375977, 0.12119825929403305, 0.08089578151702881, 0.21176916360855103, 0.3278254270553589, -0.05626846104860306, 0.594719409942627, 1.2334603071212769, 0.5346507430076599, 0.5517169833183289, 0.6752236485481262, -2.1787564754486084, 1.2591843605041504, -0.8328648209571838, 0.19212153553962708, 1.3566317558288574, -0.74741530418396, 0.30409038066864014, -1.828865885734558, -0.037708912044763565, 0.6335675716400146, -2.3341357707977295, 0.26683923602104187, -1.3179391622543335, -0.5082676410675049, 0.8633751273155212, 0.26668593287467957, -1.2124035358428955, 0.21132901310920715, -0.5097116827964783, 1.1111516952514648, 0.5151857733726501, 1.195163369178772, -1.6769906282424927, -0.012120884843170643, -0.12489454448223114, 0.11162197589874268, -1.2962636947631836, -1.7074259519577026, 0.5384920239448547, 0.5179530382156372, 0.8185365200042725, -0.06582620739936829, 1.0382025241851807, -1.07541024684906, 0.7994019389152527, -0.9083600044250488, -1.602870225906372, -1.4061307907104492, -2.398646116256714, -2.346127510070801, 0.7497532367706299, -0.5903266072273254, -0.48450323939323425, 1.9694074392318726, -1.0044411420822144, -1.7575613260269165, 0.9731139540672302, 0.3660074770450592, 0.09131890535354614, 2.350916624069214, 0.23673228919506073, -0.696050226688385, 0.42169633507728577, -0.6541216969490051, 0.8154435157775879, -0.33128246665000916, 1.238525390625, 0.49327096343040466, -0.9606022834777832, 1.642964482307434, -0.5399861931800842, 0.6208182573318481, -0.6467443108558655, -0.46141642332077026, -0.850908637046814, 0.18564841151237488, 1.7838696241378784, -0.3673206865787506, 1.5328716039657593, -0.2171548455953598, -1.5978046655654907, -1.5236183404922485, 0.8073318600654602, 0.5156146287918091, -1.0030412673950195, 0.033993471413850784, -0.5412747263908386, 0.13973285257816315, -0.052948422729969025, 1.091795802116394, 1.1979557275772095, 0.6983343362808228, -0.2785475552082062, -0.8186383247375488, 0.3130657374858856, -0.17172901332378387, -0.670808732509613, -1.811333179473877, -0.2924917936325073, 0.2544487714767456, 0.6437063813209534, -1.2119038105010986, 1.9155290126800537, 0.883121907711029, 2.0424251556396484, 0.9321510791778564, -0.4587997794151306, 1.4156854152679443, 0.01188488956540823, 1.8229910135269165, -0.48412132263183594, 0.6129494905471802, -0.33435526490211487, -1.1112463474273682, 0.851797878742218, -0.42972108721733093, -1.8749611377716064, -0.811150312423706, -0.7710875868797302, -0.09862663596868515, -0.7405455112457275, 0.8478069305419922, -0.3334246873855591, -1.496289610862732, 0.03641219809651375, -0.6618224382400513, 0.16144859790802002, -1.3188910484313965, 0.1845884919166565, 0.7044689059257507, -0.6867625713348389, -0.06900946795940399, -0.3068287670612335, -1.2868388891220093, -0.4862041473388672, 0.36333489418029785, 2.000610828399658, -0.4690867066383362, 0.9786139130592346, 0.9142124056816101, -0.7756486535072327, 0.16986095905303955, 0.2480684518814087, -0.34578388929367065, 0.7417734861373901, -1.0764038562774658, -0.4269997477531433, 1.0909192562103271, -0.3053681552410126, -0.7122635245323181, 1.4627436399459839, 0.803393542766571, -1.1433271169662476, -0.28068608045578003, -0.29358115792274475, -0.8624725341796875, 0.03238889202475548, -1.3976361751556396, -0.1138940379023552, 0.3664042353630066, -1.4710805416107178, -0.3359999358654022, -0.1965693086385727, 1.3895666599273682, -0.3487950265407562, 1.513117790222168, -0.33214256167411804, -0.1569763869047165, -0.32137981057167053, -0.52364581823349, 0.27055624127388, -0.21901623904705048, -0.6160565614700317, 0.1861957311630249, -0.8083435297012329, 0.3266949951648712, 1.520471453666687, 0.2912861704826355, 0.005373500287532806, 0.37209799885749817, 1.1202119588851929, 0.40135136246681213, -0.03693918511271477, -0.926185667514801, -1.4700138568878174, 1.9502661228179932, -1.440173864364624, 1.835654616355896, 0.7800500988960266, -0.13776694238185883, -1.8594805002212524, -1.854907751083374, 1.1771808862686157, 1.1223886013031006, 2.3280937671661377, 0.5233237743377686, 0.48983174562454224, -0.642815351486206, -0.7665420174598694, 0.2770986258983612, -0.9567479491233826, -0.650410532951355, 0.21714358031749725, 2.2662177085876465, 1.8090720176696777, -0.6498310565948486, -0.30854713916778564, -0.8347163200378418, 1.2967406511306763, -0.24151048064231873, 0.24302446842193604, 2.06943941116333, -0.3053973615169525, -1.0112046003341675, 1.3564038276672363, -2.3888676166534424, 0.3502568006515503, 2.08601713180542, 0.2539603114128113, 0.16582484543323517, -1.4535112380981445, -0.703429102897644, -0.2775942385196686, -0.5796284079551697, -1.2909623384475708, 0.5805066227912903, -0.2674022614955902, -0.9049020409584045, -1.465998888015747, 0.039678286761045456, -1.1026077270507812, -1.8112187385559082, 0.33187922835350037, 1.9885857105255127, 2.0718746185302734, -0.8727285265922546, 1.2897735834121704, -0.2239108830690384, -0.036145538091659546, 1.3238577842712402, 1.3910748958587646, 3.1247684955596924, 1.8539984226226807, -1.2774139642715454, 0.803769052028656, -0.25505462288856506, -0.45866018533706665, 1.2036932706832886, -1.121822714805603, 0.9758722186088562, -0.18434908986091614, -1.2501181364059448, -1.2073248624801636, 1.022642970085144, 0.4823034703731537, 0.059348978102207184, -0.5195690989494324, 1.2467231750488281, 0.14044643938541412, 1.4120858907699585, 0.6034265160560608, -0.44148290157318115, 0.5313106179237366, -0.32139942049980164, -0.5802765488624573, 1.7677812576293945, 0.1741228699684143, -1.4973129034042358, -2.4571409225463867, -0.31912046670913696, -0.8938664197921753, -0.02713121846318245, -0.5661182403564453, -1.0410627126693726, 1.5967129468917847, 0.4503351151943207, -1.1405109167099, -0.29636287689208984, -0.27958136796951294, -0.46196115016937256, 2.650040864944458, -1.2519280910491943, -0.05069255456328392, -0.9431505799293518, -0.5005806088447571, 1.6278555393218994, -1.2639477252960205, -0.23022425174713135, -1.0597139596939087, -0.6696259379386902, -1.3930383920669556, -0.5010795593261719, 0.03833916410803795, -0.9275222420692444, 0.7137439846992493, 0.20610176026821136, -1.0529576539993286, -0.338740736246109, -0.967337965965271, 1.1007392406463623, -0.08584979176521301, 0.215028777718544, 1.874253511428833, 0.3497980833053589, -0.43126749992370605, 0.6991668343544006, 1.2347394227981567, 0.5855608582496643, -0.7035847306251526, -0.08519650995731354, -0.7370298504829407, 0.4027189612388611, -1.4409393072128296, 0.10787507891654968, -2.990295648574829, 0.7799752950668335, -0.22205796837806702, -0.18333296477794647, -0.16422894597053528, -1.3185359239578247, 1.0789915323257446, 2.5749387741088867, -1.152164101600647, 0.45380133390426636, 0.45505258440971375, 1.14236319065094, -1.6379306316375732, 0.2532210648059845, -0.5091725587844849, 2.070901870727539, 0.18797913193702698, 1.2657098770141602, -0.5199176669120789, -2.2044284343719482, 0.5906524658203125, -1.1361819505691528, -0.9883687496185303, 0.9234814047813416, -0.8659425377845764, 0.35192444920539856, -1.4246653318405151, -0.09891128540039062, -0.9482637047767639, -1.2591053247451782, 0.7641555666923523, 0.030007243156433105, 0.42398732900619507, -0.5589136481285095, 0.44286251068115234, -2.1241602897644043, -1.4355933666229248, -0.22788868844509125, -1.010978102684021, 0.5314958095550537, -0.3820899426937103, 0.5258074998855591, -0.021693140268325806, 0.17477701604366302, 0.28764694929122925, 1.4896435737609863, 3.4324092864990234, 0.15815187990665436, 0.16354823112487793, -0.05132700130343437, -1.111341118812561, 1.4265178442001343, 0.9094663858413696, -0.09220299124717712, -0.5562323331832886, -1.0087130069732666, 1.3391392230987549, 1.9664534330368042, 1.1467664241790771, 0.1863282173871994, -0.8700392246246338, -0.7876084446907043, -0.03426586464047432, 0.1718640774488449, 0.5675815939903259, 1.0134575366973877, -0.06258145719766617, 0.08624287694692612, 1.393738031387329, 1.1824623346328735, -0.21392570436000824, 0.4758318364620209, -0.9704014658927917, -0.38454779982566833, 0.28687381744384766, 0.17968477308750153, 0.06684769690036774, 0.6032946109771729, -1.0220823287963867, -0.23674450814723969, -0.28643253445625305, -0.8823648691177368, -0.8297863602638245, -0.3679157495498657, -0.4254177510738373, 1.625579833984375, 0.05685886740684509, -0.5529541969299316, 0.12091831117868423, -0.6142204403877258, -0.07531078904867172, -1.1807101964950562, 0.07893018424510956, -0.10267218947410583, -0.07669104635715485, -0.13879403471946716, 1.58999764919281, -0.9156829714775085, -2.0463247299194336, 0.14179500937461853, 0.3685595393180847, -0.39457666873931885, 0.19352328777313232, 1.6959270238876343, 0.4249024987220764, 1.3835830688476562, 1.3117432594299316, 1.0016411542892456, -0.5983616709709167, -1.2265082597732544, 0.8062183260917664, 0.9677982926368713, -1.2724348306655884, 0.9736056923866272, -0.21411047875881195, -0.6203324794769287, 0.679653525352478, 1.3778365850448608, 0.3455025553703308, -1.9796408414840698, 0.9910556077957153, -0.8905925750732422, 0.7705892324447632, 0.6872857213020325, 0.8443225622177124, 0.2690247893333435, 0.8656197786331177, -1.222608208656311, -1.1812390089035034, -0.6801396608352661, -0.6039180159568787, 1.8420547246932983, -0.2389560341835022, 0.576680600643158, -0.21684150397777557, -1.0992566347122192, -0.16686317324638367, 0.8224684000015259, 0.42513346672058105, -0.3672286868095398, 0.9144589304924011, -0.5314339995384216, -0.956037163734436, -1.1477235555648804, -0.41123223304748535, -1.0289089679718018, -0.8324143886566162, 0.981286346912384, 0.7845366597175598, 0.4836106598377228, 1.9647139310836792, 0.6111152768135071, 0.3630829453468323, -2.6067793369293213, 0.8665665984153748, 0.32983362674713135, -0.03332294896245003, 0.9096415638923645, 0.23531557619571686, 1.2070093154907227, -0.038517486304044724, 0.6197673678398132, -2.315084934234619, 2.1459269523620605, -0.23011305928230286, 0.5821312069892883, 0.019935622811317444, -0.2380843311548233, 1.1502069234848022, 0.5674091577529907, 0.5596539378166199, -1.1140639781951904, 0.7513505816459656, -0.6255924701690674, 1.0610625743865967, 0.9511605501174927, -1.0303781032562256, 0.1189407929778099, 1.4527649879455566, 0.4944038689136505, -0.3872908651828766, -1.0028486251831055, -0.8508822917938232, 0.9983333349227905, 1.6111758947372437, -0.08064527064561844, -0.011597814038395882, 0.8504193425178528, 0.7366636395454407, -1.2162061929702759, 0.07323142886161804, -0.6734793186187744, -0.6867654919624329, 1.8133718967437744, 2.0170557498931885, -0.09845031797885895, -0.215764120221138, -0.7783092856407166, -1.3233404159545898, 0.7794981598854065, -0.08895837515592575, 0.05715883523225784, 0.6945441961288452, -0.7166896462440491, 1.117776870727539, 0.5182976126670837, 1.0830078125, 0.0118378521874547, 0.3533167243003845, 0.3085145652294159, -0.4029957950115204, -1.1777379512786865, -0.3526730239391327, -1.1426953077316284, -2.467252254486084, 0.4185640513896942, -0.25631916522979736, -1.4788835048675537, 0.10127884149551392, -1.0889194011688232, 0.8638964891433716, -0.653269350528717, -1.0984327793121338, -1.3940513134002686, 0.3816235661506653, -0.22882269322872162, 0.8676075339317322, -1.5832105875015259, -0.21951380372047424, 1.248184084892273, 0.8894801139831543, -0.5732361078262329, 0.948897123336792, 0.23952917754650116, 0.9982262849807739, 0.7420241832733154, -0.4762682616710663, 0.6253864765167236, -0.05023309588432312, -1.3510103225708008, 0.37040582299232483, 1.2258906364440918, 0.2500663995742798, 1.376737356185913, -0.4804900586605072, 0.1712404042482376, 0.44831374287605286, -0.6340606808662415, -0.5159826278686523, -0.3548094928264618, 0.6842718720436096, 0.02229715883731842, -1.112005591392517, -0.1619672030210495, -0.24627819657325745, -0.28045645356178284, 0.22201359272003174, -1.4730781316757202, -0.32015514373779297, -0.3789444863796234, -0.3937576711177826, -1.3405842781066895, 0.09565041214227676, 1.3335591554641724, -0.7969592809677124, -0.24541400372982025, 0.3945843577384949, 0.40581491589546204, 0.514306902885437, 0.5305090546607971, -0.7810714244842529, -0.2696571946144104, -0.4093950688838959, -0.2744959890842438, 0.25448015332221985, 1.1515474319458008, -0.05170179903507233, -0.9746144413948059, 0.5580492615699768, -0.34085172414779663, 0.20853419601917267, 2.0415515899658203, 0.012753312475979328, -0.6842272281646729, 0.34751948714256287, -0.6668720841407776, 1.6746056079864502, 1.7301647663116455, 1.2268002033233643, -0.06650562584400177, -0.7272427678108215, 0.48542729020118713, -0.3038334250450134, -0.3023045063018799, 0.9180356860160828, 0.4103759229183197, -0.18503877520561218, -1.4168202877044678, 0.596779465675354, 1.2988191843032837, -0.7409714460372925, -0.7349827289581299, 0.05572985112667084, -0.9521865248680115, 1.3228189945220947, 0.4964389503002167, 0.2737754285335541, 0.2662857174873352, 1.5473040342330933, 0.7238453030586243, -0.43233367800712585, 0.5258410573005676, 0.5384107828140259, -0.26258641481399536, -2.090447425842285, -0.982645571231842, 0.23652571439743042, -0.357409805059433, -1.6424121856689453, 1.4133825302124023, -1.1444770097732544, -0.9849513173103333, 0.5234098434448242, 0.18887370824813843, 1.241275668144226, 0.40139874815940857, 1.734646201133728, 2.1465003490448, 0.9379764199256897, 0.32768529653549194, 1.1687567234039307, -0.09625048190355301, -0.45758292078971863, 1.8541624546051025, -0.4231643080711365, 0.5249621868133545, 0.9902523756027222, -0.3985787034034729, -1.1032696962356567, -0.9001369476318359, -1.117645263671875, -0.6486197113990784, 1.2273054122924805, 0.10898609459400177, -1.09407377243042, 0.19388537108898163, 1.5658632516860962, 0.12872657179832458, -0.20610088109970093, 0.7878947257995605, 0.404712051153183, -0.6931031346321106, -0.08427245914936066, -0.825354814529419, 0.49748632311820984, -0.055495116859674454, -0.3205012083053589, 0.21736453473567963, 0.6082059144973755, 1.327815055847168, -0.057314589619636536, 0.051983222365379333, 1.1990268230438232, -1.3428608179092407, 1.54330575466156, -0.5359097719192505, 0.28860926628112793, -2.441169023513794, 1.3914415836334229, -0.7682392001152039, 1.9599710702896118, -2.5401711463928223, 0.38234201073646545, -0.45250847935676575, -0.4935259222984314, 0.28108730912208557, -0.4660293459892273, 0.16316089034080505, -0.18833832442760468, -0.8805756568908691, -0.07877539843320847, -0.7615410685539246, 0.581209123134613, 1.163956880569458, 1.5157334804534912, -1.1417115926742554, -0.29341936111450195, -1.7419344186782837, -0.17337091267108917, -0.8581814169883728, 0.3504190444946289, -1.9411581754684448, -0.23930145800113678, -1.9917405843734741, -2.3847105503082275, -1.3898541927337646, -0.8484546542167664, 1.0016977787017822, 0.1659039407968521, -0.9493661522865295, 1.2692344188690186, -0.33493873476982117, -1.8012518882751465, 1.1802664995193481, -2.27402663230896 ]
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
Hi, @avivbrokman, this issue you report appeared only with old versions of dill. See: - #288 Are you sure you are in the right Python environment? - Please note that Jupyter (where I guess you get the error) may have multiple execution backends (IPython kernels) that might be different from the Python environment your are using to get the dill version - Have you run `import dill; print(dill.__version__)` in the same Jupyter/IPython that you were using when you got the error while executing `import datasets`?
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4
317
85
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4 Hi, @avivbrokman, this issue you report appeared only with old versions of dill. See: - #288 Are you sure you are in the right Python environment? - Please note that Jupyter (where I guess you get the error) may have multiple execution backends (IPython kernels) that might be different from the Python environment your are using to get the dill version - Have you run `import dill; print(dill.__version__)` in the same Jupyter/IPython that you were using when you got the error while executing `import datasets`?
[ -1.1599488258361816, -0.8837870359420776, -0.7099396586418152, 1.3716564178466797, -0.08292015641927719, -1.3277747631072998, 0.0947943702340126, -1.1010955572128296, 1.5574061870574951, -0.6909691095352173, 0.2057599425315857, -1.688206672668457, -0.19245323538780212, -0.4060768485069275, -0.6863471269607544, -0.93545001745224, -0.36366304755210876, -1.006789207458496, 0.9752193689346313, 2.5131161212921143, 1.4287742376327515, -1.3019462823867798, 2.796297550201416, 0.6501778960227966, -0.36052799224853516, -0.9295034408569336, 0.5855237245559692, -0.01977519877254963, -1.2403284311294556, -0.4821670949459076, -0.9120622873306274, 0.02795284613966942, -0.5791834592819214, -0.33486407995224, 0.0841706246137619, 0.4527825713157654, -0.3076794147491455, -0.1892685741186142, -0.6364888548851013, -0.7426725625991821, 0.4843207895755768, -0.3225354552268982, 1.0054774284362793, -0.2716929018497467, 1.7356138229370117, -0.5733333230018616, 0.4068160951137543, 0.7564837336540222, 1.2677698135375977, 0.12119825929403305, 0.08089578151702881, 0.21176916360855103, 0.3278254270553589, -0.05626846104860306, 0.594719409942627, 1.2334603071212769, 0.5346507430076599, 0.5517169833183289, 0.6752236485481262, -2.1787564754486084, 1.2591843605041504, -0.8328648209571838, 0.19212153553962708, 1.3566317558288574, -0.74741530418396, 0.30409038066864014, -1.828865885734558, -0.037708912044763565, 0.6335675716400146, -2.3341357707977295, 0.26683923602104187, -1.3179391622543335, -0.5082676410675049, 0.8633751273155212, 0.26668593287467957, -1.2124035358428955, 0.21132901310920715, -0.5097116827964783, 1.1111516952514648, 0.5151857733726501, 1.195163369178772, -1.6769906282424927, -0.012120884843170643, -0.12489454448223114, 0.11162197589874268, -1.2962636947631836, -1.7074259519577026, 0.5384920239448547, 0.5179530382156372, 0.8185365200042725, -0.06582620739936829, 1.0382025241851807, -1.07541024684906, 0.7994019389152527, -0.9083600044250488, -1.602870225906372, -1.4061307907104492, -2.398646116256714, -2.346127510070801, 0.7497532367706299, -0.5903266072273254, -0.48450323939323425, 1.9694074392318726, -1.0044411420822144, -1.7575613260269165, 0.9731139540672302, 0.3660074770450592, 0.09131890535354614, 2.350916624069214, 0.23673228919506073, -0.696050226688385, 0.42169633507728577, -0.6541216969490051, 0.8154435157775879, -0.33128246665000916, 1.238525390625, 0.49327096343040466, -0.9606022834777832, 1.642964482307434, -0.5399861931800842, 0.6208182573318481, -0.6467443108558655, -0.46141642332077026, -0.850908637046814, 0.18564841151237488, 1.7838696241378784, -0.3673206865787506, 1.5328716039657593, -0.2171548455953598, -1.5978046655654907, -1.5236183404922485, 0.8073318600654602, 0.5156146287918091, -1.0030412673950195, 0.033993471413850784, -0.5412747263908386, 0.13973285257816315, -0.052948422729969025, 1.091795802116394, 1.1979557275772095, 0.6983343362808228, -0.2785475552082062, -0.8186383247375488, 0.3130657374858856, -0.17172901332378387, -0.670808732509613, -1.811333179473877, -0.2924917936325073, 0.2544487714767456, 0.6437063813209534, -1.2119038105010986, 1.9155290126800537, 0.883121907711029, 2.0424251556396484, 0.9321510791778564, -0.4587997794151306, 1.4156854152679443, 0.01188488956540823, 1.8229910135269165, -0.48412132263183594, 0.6129494905471802, -0.33435526490211487, -1.1112463474273682, 0.851797878742218, -0.42972108721733093, -1.8749611377716064, -0.811150312423706, -0.7710875868797302, -0.09862663596868515, -0.7405455112457275, 0.8478069305419922, -0.3334246873855591, -1.496289610862732, 0.03641219809651375, -0.6618224382400513, 0.16144859790802002, -1.3188910484313965, 0.1845884919166565, 0.7044689059257507, -0.6867625713348389, -0.06900946795940399, -0.3068287670612335, -1.2868388891220093, -0.4862041473388672, 0.36333489418029785, 2.000610828399658, -0.4690867066383362, 0.9786139130592346, 0.9142124056816101, -0.7756486535072327, 0.16986095905303955, 0.2480684518814087, -0.34578388929367065, 0.7417734861373901, -1.0764038562774658, -0.4269997477531433, 1.0909192562103271, -0.3053681552410126, -0.7122635245323181, 1.4627436399459839, 0.803393542766571, -1.1433271169662476, -0.28068608045578003, -0.29358115792274475, -0.8624725341796875, 0.03238889202475548, -1.3976361751556396, -0.1138940379023552, 0.3664042353630066, -1.4710805416107178, -0.3359999358654022, -0.1965693086385727, 1.3895666599273682, -0.3487950265407562, 1.513117790222168, -0.33214256167411804, -0.1569763869047165, -0.32137981057167053, -0.52364581823349, 0.27055624127388, -0.21901623904705048, -0.6160565614700317, 0.1861957311630249, -0.8083435297012329, 0.3266949951648712, 1.520471453666687, 0.2912861704826355, 0.005373500287532806, 0.37209799885749817, 1.1202119588851929, 0.40135136246681213, -0.03693918511271477, -0.926185667514801, -1.4700138568878174, 1.9502661228179932, -1.440173864364624, 1.835654616355896, 0.7800500988960266, -0.13776694238185883, -1.8594805002212524, -1.854907751083374, 1.1771808862686157, 1.1223886013031006, 2.3280937671661377, 0.5233237743377686, 0.48983174562454224, -0.642815351486206, -0.7665420174598694, 0.2770986258983612, -0.9567479491233826, -0.650410532951355, 0.21714358031749725, 2.2662177085876465, 1.8090720176696777, -0.6498310565948486, -0.30854713916778564, -0.8347163200378418, 1.2967406511306763, -0.24151048064231873, 0.24302446842193604, 2.06943941116333, -0.3053973615169525, -1.0112046003341675, 1.3564038276672363, -2.3888676166534424, 0.3502568006515503, 2.08601713180542, 0.2539603114128113, 0.16582484543323517, -1.4535112380981445, -0.703429102897644, -0.2775942385196686, -0.5796284079551697, -1.2909623384475708, 0.5805066227912903, -0.2674022614955902, -0.9049020409584045, -1.465998888015747, 0.039678286761045456, -1.1026077270507812, -1.8112187385559082, 0.33187922835350037, 1.9885857105255127, 2.0718746185302734, -0.8727285265922546, 1.2897735834121704, -0.2239108830690384, -0.036145538091659546, 1.3238577842712402, 1.3910748958587646, 3.1247684955596924, 1.8539984226226807, -1.2774139642715454, 0.803769052028656, -0.25505462288856506, -0.45866018533706665, 1.2036932706832886, -1.121822714805603, 0.9758722186088562, -0.18434908986091614, -1.2501181364059448, -1.2073248624801636, 1.022642970085144, 0.4823034703731537, 0.059348978102207184, -0.5195690989494324, 1.2467231750488281, 0.14044643938541412, 1.4120858907699585, 0.6034265160560608, -0.44148290157318115, 0.5313106179237366, -0.32139942049980164, -0.5802765488624573, 1.7677812576293945, 0.1741228699684143, -1.4973129034042358, -2.4571409225463867, -0.31912046670913696, -0.8938664197921753, -0.02713121846318245, -0.5661182403564453, -1.0410627126693726, 1.5967129468917847, 0.4503351151943207, -1.1405109167099, -0.29636287689208984, -0.27958136796951294, -0.46196115016937256, 2.650040864944458, -1.2519280910491943, -0.05069255456328392, -0.9431505799293518, -0.5005806088447571, 1.6278555393218994, -1.2639477252960205, -0.23022425174713135, -1.0597139596939087, -0.6696259379386902, -1.3930383920669556, -0.5010795593261719, 0.03833916410803795, -0.9275222420692444, 0.7137439846992493, 0.20610176026821136, -1.0529576539993286, -0.338740736246109, -0.967337965965271, 1.1007392406463623, -0.08584979176521301, 0.215028777718544, 1.874253511428833, 0.3497980833053589, -0.43126749992370605, 0.6991668343544006, 1.2347394227981567, 0.5855608582496643, -0.7035847306251526, -0.08519650995731354, -0.7370298504829407, 0.4027189612388611, -1.4409393072128296, 0.10787507891654968, -2.990295648574829, 0.7799752950668335, -0.22205796837806702, -0.18333296477794647, -0.16422894597053528, -1.3185359239578247, 1.0789915323257446, 2.5749387741088867, -1.152164101600647, 0.45380133390426636, 0.45505258440971375, 1.14236319065094, -1.6379306316375732, 0.2532210648059845, -0.5091725587844849, 2.070901870727539, 0.18797913193702698, 1.2657098770141602, -0.5199176669120789, -2.2044284343719482, 0.5906524658203125, -1.1361819505691528, -0.9883687496185303, 0.9234814047813416, -0.8659425377845764, 0.35192444920539856, -1.4246653318405151, -0.09891128540039062, -0.9482637047767639, -1.2591053247451782, 0.7641555666923523, 0.030007243156433105, 0.42398732900619507, -0.5589136481285095, 0.44286251068115234, -2.1241602897644043, -1.4355933666229248, -0.22788868844509125, -1.010978102684021, 0.5314958095550537, -0.3820899426937103, 0.5258074998855591, -0.021693140268325806, 0.17477701604366302, 0.28764694929122925, 1.4896435737609863, 3.4324092864990234, 0.15815187990665436, 0.16354823112487793, -0.05132700130343437, -1.111341118812561, 1.4265178442001343, 0.9094663858413696, -0.09220299124717712, -0.5562323331832886, -1.0087130069732666, 1.3391392230987549, 1.9664534330368042, 1.1467664241790771, 0.1863282173871994, -0.8700392246246338, -0.7876084446907043, -0.03426586464047432, 0.1718640774488449, 0.5675815939903259, 1.0134575366973877, -0.06258145719766617, 0.08624287694692612, 1.393738031387329, 1.1824623346328735, -0.21392570436000824, 0.4758318364620209, -0.9704014658927917, -0.38454779982566833, 0.28687381744384766, 0.17968477308750153, 0.06684769690036774, 0.6032946109771729, -1.0220823287963867, -0.23674450814723969, -0.28643253445625305, -0.8823648691177368, -0.8297863602638245, -0.3679157495498657, -0.4254177510738373, 1.625579833984375, 0.05685886740684509, -0.5529541969299316, 0.12091831117868423, -0.6142204403877258, -0.07531078904867172, -1.1807101964950562, 0.07893018424510956, -0.10267218947410583, -0.07669104635715485, -0.13879403471946716, 1.58999764919281, -0.9156829714775085, -2.0463247299194336, 0.14179500937461853, 0.3685595393180847, -0.39457666873931885, 0.19352328777313232, 1.6959270238876343, 0.4249024987220764, 1.3835830688476562, 1.3117432594299316, 1.0016411542892456, -0.5983616709709167, -1.2265082597732544, 0.8062183260917664, 0.9677982926368713, -1.2724348306655884, 0.9736056923866272, -0.21411047875881195, -0.6203324794769287, 0.679653525352478, 1.3778365850448608, 0.3455025553703308, -1.9796408414840698, 0.9910556077957153, -0.8905925750732422, 0.7705892324447632, 0.6872857213020325, 0.8443225622177124, 0.2690247893333435, 0.8656197786331177, -1.222608208656311, -1.1812390089035034, -0.6801396608352661, -0.6039180159568787, 1.8420547246932983, -0.2389560341835022, 0.576680600643158, -0.21684150397777557, -1.0992566347122192, -0.16686317324638367, 0.8224684000015259, 0.42513346672058105, -0.3672286868095398, 0.9144589304924011, -0.5314339995384216, -0.956037163734436, -1.1477235555648804, -0.41123223304748535, -1.0289089679718018, -0.8324143886566162, 0.981286346912384, 0.7845366597175598, 0.4836106598377228, 1.9647139310836792, 0.6111152768135071, 0.3630829453468323, -2.6067793369293213, 0.8665665984153748, 0.32983362674713135, -0.03332294896245003, 0.9096415638923645, 0.23531557619571686, 1.2070093154907227, -0.038517486304044724, 0.6197673678398132, -2.315084934234619, 2.1459269523620605, -0.23011305928230286, 0.5821312069892883, 0.019935622811317444, -0.2380843311548233, 1.1502069234848022, 0.5674091577529907, 0.5596539378166199, -1.1140639781951904, 0.7513505816459656, -0.6255924701690674, 1.0610625743865967, 0.9511605501174927, -1.0303781032562256, 0.1189407929778099, 1.4527649879455566, 0.4944038689136505, -0.3872908651828766, -1.0028486251831055, -0.8508822917938232, 0.9983333349227905, 1.6111758947372437, -0.08064527064561844, -0.011597814038395882, 0.8504193425178528, 0.7366636395454407, -1.2162061929702759, 0.07323142886161804, -0.6734793186187744, -0.6867654919624329, 1.8133718967437744, 2.0170557498931885, -0.09845031797885895, -0.215764120221138, -0.7783092856407166, -1.3233404159545898, 0.7794981598854065, -0.08895837515592575, 0.05715883523225784, 0.6945441961288452, -0.7166896462440491, 1.117776870727539, 0.5182976126670837, 1.0830078125, 0.0118378521874547, 0.3533167243003845, 0.3085145652294159, -0.4029957950115204, -1.1777379512786865, -0.3526730239391327, -1.1426953077316284, -2.467252254486084, 0.4185640513896942, -0.25631916522979736, -1.4788835048675537, 0.10127884149551392, -1.0889194011688232, 0.8638964891433716, -0.653269350528717, -1.0984327793121338, -1.3940513134002686, 0.3816235661506653, -0.22882269322872162, 0.8676075339317322, -1.5832105875015259, -0.21951380372047424, 1.248184084892273, 0.8894801139831543, -0.5732361078262329, 0.948897123336792, 0.23952917754650116, 0.9982262849807739, 0.7420241832733154, -0.4762682616710663, 0.6253864765167236, -0.05023309588432312, -1.3510103225708008, 0.37040582299232483, 1.2258906364440918, 0.2500663995742798, 1.376737356185913, -0.4804900586605072, 0.1712404042482376, 0.44831374287605286, -0.6340606808662415, -0.5159826278686523, -0.3548094928264618, 0.6842718720436096, 0.02229715883731842, -1.112005591392517, -0.1619672030210495, -0.24627819657325745, -0.28045645356178284, 0.22201359272003174, -1.4730781316757202, -0.32015514373779297, -0.3789444863796234, -0.3937576711177826, -1.3405842781066895, 0.09565041214227676, 1.3335591554641724, -0.7969592809677124, -0.24541400372982025, 0.3945843577384949, 0.40581491589546204, 0.514306902885437, 0.5305090546607971, -0.7810714244842529, -0.2696571946144104, -0.4093950688838959, -0.2744959890842438, 0.25448015332221985, 1.1515474319458008, -0.05170179903507233, -0.9746144413948059, 0.5580492615699768, -0.34085172414779663, 0.20853419601917267, 2.0415515899658203, 0.012753312475979328, -0.6842272281646729, 0.34751948714256287, -0.6668720841407776, 1.6746056079864502, 1.7301647663116455, 1.2268002033233643, -0.06650562584400177, -0.7272427678108215, 0.48542729020118713, -0.3038334250450134, -0.3023045063018799, 0.9180356860160828, 0.4103759229183197, -0.18503877520561218, -1.4168202877044678, 0.596779465675354, 1.2988191843032837, -0.7409714460372925, -0.7349827289581299, 0.05572985112667084, -0.9521865248680115, 1.3228189945220947, 0.4964389503002167, 0.2737754285335541, 0.2662857174873352, 1.5473040342330933, 0.7238453030586243, -0.43233367800712585, 0.5258410573005676, 0.5384107828140259, -0.26258641481399536, -2.090447425842285, -0.982645571231842, 0.23652571439743042, -0.357409805059433, -1.6424121856689453, 1.4133825302124023, -1.1444770097732544, -0.9849513173103333, 0.5234098434448242, 0.18887370824813843, 1.241275668144226, 0.40139874815940857, 1.734646201133728, 2.1465003490448, 0.9379764199256897, 0.32768529653549194, 1.1687567234039307, -0.09625048190355301, -0.45758292078971863, 1.8541624546051025, -0.4231643080711365, 0.5249621868133545, 0.9902523756027222, -0.3985787034034729, -1.1032696962356567, -0.9001369476318359, -1.117645263671875, -0.6486197113990784, 1.2273054122924805, 0.10898609459400177, -1.09407377243042, 0.19388537108898163, 1.5658632516860962, 0.12872657179832458, -0.20610088109970093, 0.7878947257995605, 0.404712051153183, -0.6931031346321106, -0.08427245914936066, -0.825354814529419, 0.49748632311820984, -0.055495116859674454, -0.3205012083053589, 0.21736453473567963, 0.6082059144973755, 1.327815055847168, -0.057314589619636536, 0.051983222365379333, 1.1990268230438232, -1.3428608179092407, 1.54330575466156, -0.5359097719192505, 0.28860926628112793, -2.441169023513794, 1.3914415836334229, -0.7682392001152039, 1.9599710702896118, -2.5401711463928223, 0.38234201073646545, -0.45250847935676575, -0.4935259222984314, 0.28108730912208557, -0.4660293459892273, 0.16316089034080505, -0.18833832442760468, -0.8805756568908691, -0.07877539843320847, -0.7615410685539246, 0.581209123134613, 1.163956880569458, 1.5157334804534912, -1.1417115926742554, -0.29341936111450195, -1.7419344186782837, -0.17337091267108917, -0.8581814169883728, 0.3504190444946289, -1.9411581754684448, -0.23930145800113678, -1.9917405843734741, -2.3847105503082275, -1.3898541927337646, -0.8484546542167664, 1.0016977787017822, 0.1659039407968521, -0.9493661522865295, 1.2692344188690186, -0.33493873476982117, -1.8012518882751465, 1.1802664995193481, -2.27402663230896 ]
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
I'm using spyder, and I am still getting `0.3.6` for `dill`, so unfortunately #288 isn't applicable, I think. However, I found something odd that I believe is a clue: ``` import inspect import dill inspect.getfile(dill) >>> '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill/__init__.py' ``` I checked out the directory, and there is no `dill` subdirectory within '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill`, as there should be. Rather, `_dill.py` is in '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill` itself. If I run `pip install dill` or `pip install --upgrade dill`, I get the message `Requirement already satisfied: dill in ./opt/anaconda3/lib/python3.9/site-packages (0.3.6)`. If I run `conda upgrade dill`, I get the message `Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.` a couple of times, followed by ``` Solving environment: failed Solving environment: / Found conflicts! Looking for incompatible packages. ``` And then terminal proceeds to list conflicts between different packages I have. This is all very strange to me because I recently uninstalled and reinstalled `anaconda`.
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4
317
152
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4 I'm using spyder, and I am still getting `0.3.6` for `dill`, so unfortunately #288 isn't applicable, I think. However, I found something odd that I believe is a clue: ``` import inspect import dill inspect.getfile(dill) >>> '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill/__init__.py' ``` I checked out the directory, and there is no `dill` subdirectory within '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill`, as there should be. Rather, `_dill.py` is in '/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/dill` itself. If I run `pip install dill` or `pip install --upgrade dill`, I get the message `Requirement already satisfied: dill in ./opt/anaconda3/lib/python3.9/site-packages (0.3.6)`. If I run `conda upgrade dill`, I get the message `Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.` a couple of times, followed by ``` Solving environment: failed Solving environment: / Found conflicts! Looking for incompatible packages. ``` And then terminal proceeds to list conflicts between different packages I have. This is all very strange to me because I recently uninstalled and reinstalled `anaconda`.
[ -1.1599488258361816, -0.8837870359420776, -0.7099396586418152, 1.3716564178466797, -0.08292015641927719, -1.3277747631072998, 0.0947943702340126, -1.1010955572128296, 1.5574061870574951, -0.6909691095352173, 0.2057599425315857, -1.688206672668457, -0.19245323538780212, -0.4060768485069275, -0.6863471269607544, -0.93545001745224, -0.36366304755210876, -1.006789207458496, 0.9752193689346313, 2.5131161212921143, 1.4287742376327515, -1.3019462823867798, 2.796297550201416, 0.6501778960227966, -0.36052799224853516, -0.9295034408569336, 0.5855237245559692, -0.01977519877254963, -1.2403284311294556, -0.4821670949459076, -0.9120622873306274, 0.02795284613966942, -0.5791834592819214, -0.33486407995224, 0.0841706246137619, 0.4527825713157654, -0.3076794147491455, -0.1892685741186142, -0.6364888548851013, -0.7426725625991821, 0.4843207895755768, -0.3225354552268982, 1.0054774284362793, -0.2716929018497467, 1.7356138229370117, -0.5733333230018616, 0.4068160951137543, 0.7564837336540222, 1.2677698135375977, 0.12119825929403305, 0.08089578151702881, 0.21176916360855103, 0.3278254270553589, -0.05626846104860306, 0.594719409942627, 1.2334603071212769, 0.5346507430076599, 0.5517169833183289, 0.6752236485481262, -2.1787564754486084, 1.2591843605041504, -0.8328648209571838, 0.19212153553962708, 1.3566317558288574, -0.74741530418396, 0.30409038066864014, -1.828865885734558, -0.037708912044763565, 0.6335675716400146, -2.3341357707977295, 0.26683923602104187, -1.3179391622543335, -0.5082676410675049, 0.8633751273155212, 0.26668593287467957, -1.2124035358428955, 0.21132901310920715, -0.5097116827964783, 1.1111516952514648, 0.5151857733726501, 1.195163369178772, -1.6769906282424927, -0.012120884843170643, -0.12489454448223114, 0.11162197589874268, -1.2962636947631836, -1.7074259519577026, 0.5384920239448547, 0.5179530382156372, 0.8185365200042725, -0.06582620739936829, 1.0382025241851807, -1.07541024684906, 0.7994019389152527, -0.9083600044250488, -1.602870225906372, -1.4061307907104492, -2.398646116256714, -2.346127510070801, 0.7497532367706299, -0.5903266072273254, -0.48450323939323425, 1.9694074392318726, -1.0044411420822144, -1.7575613260269165, 0.9731139540672302, 0.3660074770450592, 0.09131890535354614, 2.350916624069214, 0.23673228919506073, -0.696050226688385, 0.42169633507728577, -0.6541216969490051, 0.8154435157775879, -0.33128246665000916, 1.238525390625, 0.49327096343040466, -0.9606022834777832, 1.642964482307434, -0.5399861931800842, 0.6208182573318481, -0.6467443108558655, -0.46141642332077026, -0.850908637046814, 0.18564841151237488, 1.7838696241378784, -0.3673206865787506, 1.5328716039657593, -0.2171548455953598, -1.5978046655654907, -1.5236183404922485, 0.8073318600654602, 0.5156146287918091, -1.0030412673950195, 0.033993471413850784, -0.5412747263908386, 0.13973285257816315, -0.052948422729969025, 1.091795802116394, 1.1979557275772095, 0.6983343362808228, -0.2785475552082062, -0.8186383247375488, 0.3130657374858856, -0.17172901332378387, -0.670808732509613, -1.811333179473877, -0.2924917936325073, 0.2544487714767456, 0.6437063813209534, -1.2119038105010986, 1.9155290126800537, 0.883121907711029, 2.0424251556396484, 0.9321510791778564, -0.4587997794151306, 1.4156854152679443, 0.01188488956540823, 1.8229910135269165, -0.48412132263183594, 0.6129494905471802, -0.33435526490211487, -1.1112463474273682, 0.851797878742218, -0.42972108721733093, -1.8749611377716064, -0.811150312423706, -0.7710875868797302, -0.09862663596868515, -0.7405455112457275, 0.8478069305419922, -0.3334246873855591, -1.496289610862732, 0.03641219809651375, -0.6618224382400513, 0.16144859790802002, -1.3188910484313965, 0.1845884919166565, 0.7044689059257507, -0.6867625713348389, -0.06900946795940399, -0.3068287670612335, -1.2868388891220093, -0.4862041473388672, 0.36333489418029785, 2.000610828399658, -0.4690867066383362, 0.9786139130592346, 0.9142124056816101, -0.7756486535072327, 0.16986095905303955, 0.2480684518814087, -0.34578388929367065, 0.7417734861373901, -1.0764038562774658, -0.4269997477531433, 1.0909192562103271, -0.3053681552410126, -0.7122635245323181, 1.4627436399459839, 0.803393542766571, -1.1433271169662476, -0.28068608045578003, -0.29358115792274475, -0.8624725341796875, 0.03238889202475548, -1.3976361751556396, -0.1138940379023552, 0.3664042353630066, -1.4710805416107178, -0.3359999358654022, -0.1965693086385727, 1.3895666599273682, -0.3487950265407562, 1.513117790222168, -0.33214256167411804, -0.1569763869047165, -0.32137981057167053, -0.52364581823349, 0.27055624127388, -0.21901623904705048, -0.6160565614700317, 0.1861957311630249, -0.8083435297012329, 0.3266949951648712, 1.520471453666687, 0.2912861704826355, 0.005373500287532806, 0.37209799885749817, 1.1202119588851929, 0.40135136246681213, -0.03693918511271477, -0.926185667514801, -1.4700138568878174, 1.9502661228179932, -1.440173864364624, 1.835654616355896, 0.7800500988960266, -0.13776694238185883, -1.8594805002212524, -1.854907751083374, 1.1771808862686157, 1.1223886013031006, 2.3280937671661377, 0.5233237743377686, 0.48983174562454224, -0.642815351486206, -0.7665420174598694, 0.2770986258983612, -0.9567479491233826, -0.650410532951355, 0.21714358031749725, 2.2662177085876465, 1.8090720176696777, -0.6498310565948486, -0.30854713916778564, -0.8347163200378418, 1.2967406511306763, -0.24151048064231873, 0.24302446842193604, 2.06943941116333, -0.3053973615169525, -1.0112046003341675, 1.3564038276672363, -2.3888676166534424, 0.3502568006515503, 2.08601713180542, 0.2539603114128113, 0.16582484543323517, -1.4535112380981445, -0.703429102897644, -0.2775942385196686, -0.5796284079551697, -1.2909623384475708, 0.5805066227912903, -0.2674022614955902, -0.9049020409584045, -1.465998888015747, 0.039678286761045456, -1.1026077270507812, -1.8112187385559082, 0.33187922835350037, 1.9885857105255127, 2.0718746185302734, -0.8727285265922546, 1.2897735834121704, -0.2239108830690384, -0.036145538091659546, 1.3238577842712402, 1.3910748958587646, 3.1247684955596924, 1.8539984226226807, -1.2774139642715454, 0.803769052028656, -0.25505462288856506, -0.45866018533706665, 1.2036932706832886, -1.121822714805603, 0.9758722186088562, -0.18434908986091614, -1.2501181364059448, -1.2073248624801636, 1.022642970085144, 0.4823034703731537, 0.059348978102207184, -0.5195690989494324, 1.2467231750488281, 0.14044643938541412, 1.4120858907699585, 0.6034265160560608, -0.44148290157318115, 0.5313106179237366, -0.32139942049980164, -0.5802765488624573, 1.7677812576293945, 0.1741228699684143, -1.4973129034042358, -2.4571409225463867, -0.31912046670913696, -0.8938664197921753, -0.02713121846318245, -0.5661182403564453, -1.0410627126693726, 1.5967129468917847, 0.4503351151943207, -1.1405109167099, -0.29636287689208984, -0.27958136796951294, -0.46196115016937256, 2.650040864944458, -1.2519280910491943, -0.05069255456328392, -0.9431505799293518, -0.5005806088447571, 1.6278555393218994, -1.2639477252960205, -0.23022425174713135, -1.0597139596939087, -0.6696259379386902, -1.3930383920669556, -0.5010795593261719, 0.03833916410803795, -0.9275222420692444, 0.7137439846992493, 0.20610176026821136, -1.0529576539993286, -0.338740736246109, -0.967337965965271, 1.1007392406463623, -0.08584979176521301, 0.215028777718544, 1.874253511428833, 0.3497980833053589, -0.43126749992370605, 0.6991668343544006, 1.2347394227981567, 0.5855608582496643, -0.7035847306251526, -0.08519650995731354, -0.7370298504829407, 0.4027189612388611, -1.4409393072128296, 0.10787507891654968, -2.990295648574829, 0.7799752950668335, -0.22205796837806702, -0.18333296477794647, -0.16422894597053528, -1.3185359239578247, 1.0789915323257446, 2.5749387741088867, -1.152164101600647, 0.45380133390426636, 0.45505258440971375, 1.14236319065094, -1.6379306316375732, 0.2532210648059845, -0.5091725587844849, 2.070901870727539, 0.18797913193702698, 1.2657098770141602, -0.5199176669120789, -2.2044284343719482, 0.5906524658203125, -1.1361819505691528, -0.9883687496185303, 0.9234814047813416, -0.8659425377845764, 0.35192444920539856, -1.4246653318405151, -0.09891128540039062, -0.9482637047767639, -1.2591053247451782, 0.7641555666923523, 0.030007243156433105, 0.42398732900619507, -0.5589136481285095, 0.44286251068115234, -2.1241602897644043, -1.4355933666229248, -0.22788868844509125, -1.010978102684021, 0.5314958095550537, -0.3820899426937103, 0.5258074998855591, -0.021693140268325806, 0.17477701604366302, 0.28764694929122925, 1.4896435737609863, 3.4324092864990234, 0.15815187990665436, 0.16354823112487793, -0.05132700130343437, -1.111341118812561, 1.4265178442001343, 0.9094663858413696, -0.09220299124717712, -0.5562323331832886, -1.0087130069732666, 1.3391392230987549, 1.9664534330368042, 1.1467664241790771, 0.1863282173871994, -0.8700392246246338, -0.7876084446907043, -0.03426586464047432, 0.1718640774488449, 0.5675815939903259, 1.0134575366973877, -0.06258145719766617, 0.08624287694692612, 1.393738031387329, 1.1824623346328735, -0.21392570436000824, 0.4758318364620209, -0.9704014658927917, -0.38454779982566833, 0.28687381744384766, 0.17968477308750153, 0.06684769690036774, 0.6032946109771729, -1.0220823287963867, -0.23674450814723969, -0.28643253445625305, -0.8823648691177368, -0.8297863602638245, -0.3679157495498657, -0.4254177510738373, 1.625579833984375, 0.05685886740684509, -0.5529541969299316, 0.12091831117868423, -0.6142204403877258, -0.07531078904867172, -1.1807101964950562, 0.07893018424510956, -0.10267218947410583, -0.07669104635715485, -0.13879403471946716, 1.58999764919281, -0.9156829714775085, -2.0463247299194336, 0.14179500937461853, 0.3685595393180847, -0.39457666873931885, 0.19352328777313232, 1.6959270238876343, 0.4249024987220764, 1.3835830688476562, 1.3117432594299316, 1.0016411542892456, -0.5983616709709167, -1.2265082597732544, 0.8062183260917664, 0.9677982926368713, -1.2724348306655884, 0.9736056923866272, -0.21411047875881195, -0.6203324794769287, 0.679653525352478, 1.3778365850448608, 0.3455025553703308, -1.9796408414840698, 0.9910556077957153, -0.8905925750732422, 0.7705892324447632, 0.6872857213020325, 0.8443225622177124, 0.2690247893333435, 0.8656197786331177, -1.222608208656311, -1.1812390089035034, -0.6801396608352661, -0.6039180159568787, 1.8420547246932983, -0.2389560341835022, 0.576680600643158, -0.21684150397777557, -1.0992566347122192, -0.16686317324638367, 0.8224684000015259, 0.42513346672058105, -0.3672286868095398, 0.9144589304924011, -0.5314339995384216, -0.956037163734436, -1.1477235555648804, -0.41123223304748535, -1.0289089679718018, -0.8324143886566162, 0.981286346912384, 0.7845366597175598, 0.4836106598377228, 1.9647139310836792, 0.6111152768135071, 0.3630829453468323, -2.6067793369293213, 0.8665665984153748, 0.32983362674713135, -0.03332294896245003, 0.9096415638923645, 0.23531557619571686, 1.2070093154907227, -0.038517486304044724, 0.6197673678398132, -2.315084934234619, 2.1459269523620605, -0.23011305928230286, 0.5821312069892883, 0.019935622811317444, -0.2380843311548233, 1.1502069234848022, 0.5674091577529907, 0.5596539378166199, -1.1140639781951904, 0.7513505816459656, -0.6255924701690674, 1.0610625743865967, 0.9511605501174927, -1.0303781032562256, 0.1189407929778099, 1.4527649879455566, 0.4944038689136505, -0.3872908651828766, -1.0028486251831055, -0.8508822917938232, 0.9983333349227905, 1.6111758947372437, -0.08064527064561844, -0.011597814038395882, 0.8504193425178528, 0.7366636395454407, -1.2162061929702759, 0.07323142886161804, -0.6734793186187744, -0.6867654919624329, 1.8133718967437744, 2.0170557498931885, -0.09845031797885895, -0.215764120221138, -0.7783092856407166, -1.3233404159545898, 0.7794981598854065, -0.08895837515592575, 0.05715883523225784, 0.6945441961288452, -0.7166896462440491, 1.117776870727539, 0.5182976126670837, 1.0830078125, 0.0118378521874547, 0.3533167243003845, 0.3085145652294159, -0.4029957950115204, -1.1777379512786865, -0.3526730239391327, -1.1426953077316284, -2.467252254486084, 0.4185640513896942, -0.25631916522979736, -1.4788835048675537, 0.10127884149551392, -1.0889194011688232, 0.8638964891433716, -0.653269350528717, -1.0984327793121338, -1.3940513134002686, 0.3816235661506653, -0.22882269322872162, 0.8676075339317322, -1.5832105875015259, -0.21951380372047424, 1.248184084892273, 0.8894801139831543, -0.5732361078262329, 0.948897123336792, 0.23952917754650116, 0.9982262849807739, 0.7420241832733154, -0.4762682616710663, 0.6253864765167236, -0.05023309588432312, -1.3510103225708008, 0.37040582299232483, 1.2258906364440918, 0.2500663995742798, 1.376737356185913, -0.4804900586605072, 0.1712404042482376, 0.44831374287605286, -0.6340606808662415, -0.5159826278686523, -0.3548094928264618, 0.6842718720436096, 0.02229715883731842, -1.112005591392517, -0.1619672030210495, -0.24627819657325745, -0.28045645356178284, 0.22201359272003174, -1.4730781316757202, -0.32015514373779297, -0.3789444863796234, -0.3937576711177826, -1.3405842781066895, 0.09565041214227676, 1.3335591554641724, -0.7969592809677124, -0.24541400372982025, 0.3945843577384949, 0.40581491589546204, 0.514306902885437, 0.5305090546607971, -0.7810714244842529, -0.2696571946144104, -0.4093950688838959, -0.2744959890842438, 0.25448015332221985, 1.1515474319458008, -0.05170179903507233, -0.9746144413948059, 0.5580492615699768, -0.34085172414779663, 0.20853419601917267, 2.0415515899658203, 0.012753312475979328, -0.6842272281646729, 0.34751948714256287, -0.6668720841407776, 1.6746056079864502, 1.7301647663116455, 1.2268002033233643, -0.06650562584400177, -0.7272427678108215, 0.48542729020118713, -0.3038334250450134, -0.3023045063018799, 0.9180356860160828, 0.4103759229183197, -0.18503877520561218, -1.4168202877044678, 0.596779465675354, 1.2988191843032837, -0.7409714460372925, -0.7349827289581299, 0.05572985112667084, -0.9521865248680115, 1.3228189945220947, 0.4964389503002167, 0.2737754285335541, 0.2662857174873352, 1.5473040342330933, 0.7238453030586243, -0.43233367800712585, 0.5258410573005676, 0.5384107828140259, -0.26258641481399536, -2.090447425842285, -0.982645571231842, 0.23652571439743042, -0.357409805059433, -1.6424121856689453, 1.4133825302124023, -1.1444770097732544, -0.9849513173103333, 0.5234098434448242, 0.18887370824813843, 1.241275668144226, 0.40139874815940857, 1.734646201133728, 2.1465003490448, 0.9379764199256897, 0.32768529653549194, 1.1687567234039307, -0.09625048190355301, -0.45758292078971863, 1.8541624546051025, -0.4231643080711365, 0.5249621868133545, 0.9902523756027222, -0.3985787034034729, -1.1032696962356567, -0.9001369476318359, -1.117645263671875, -0.6486197113990784, 1.2273054122924805, 0.10898609459400177, -1.09407377243042, 0.19388537108898163, 1.5658632516860962, 0.12872657179832458, -0.20610088109970093, 0.7878947257995605, 0.404712051153183, -0.6931031346321106, -0.08427245914936066, -0.825354814529419, 0.49748632311820984, -0.055495116859674454, -0.3205012083053589, 0.21736453473567963, 0.6082059144973755, 1.327815055847168, -0.057314589619636536, 0.051983222365379333, 1.1990268230438232, -1.3428608179092407, 1.54330575466156, -0.5359097719192505, 0.28860926628112793, -2.441169023513794, 1.3914415836334229, -0.7682392001152039, 1.9599710702896118, -2.5401711463928223, 0.38234201073646545, -0.45250847935676575, -0.4935259222984314, 0.28108730912208557, -0.4660293459892273, 0.16316089034080505, -0.18833832442760468, -0.8805756568908691, -0.07877539843320847, -0.7615410685539246, 0.581209123134613, 1.163956880569458, 1.5157334804534912, -1.1417115926742554, -0.29341936111450195, -1.7419344186782837, -0.17337091267108917, -0.8581814169883728, 0.3504190444946289, -1.9411581754684448, -0.23930145800113678, -1.9917405843734741, -2.3847105503082275, -1.3898541927337646, -0.8484546542167664, 1.0016977787017822, 0.1659039407968521, -0.9493661522865295, 1.2692344188690186, -0.33493873476982117, -1.8012518882751465, 1.1802664995193481, -2.27402663230896 ]
https://github.com/huggingface/datasets/issues/5487
Incorrect filepath for dill module
As I said above, I guess this is not a problem with `datasets`. I think you have different Python environments: one with the new dill version (the one you get while using pip) and other with the old dill version (the one where you get the AttributeError). You should update `dill` in the Python environment you are using within spyder. Please note that the `_dill` module is present in the `dill` package since their 2.8.0 version.
### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4
317
76
Incorrect filepath for dill module ### Describe the bug I installed the `datasets` package and when I try to `import` it, I get the following error: ``` Traceback (most recent call last): File "/var/folders/jt/zw5g74ln6tqfdzsl8tx378j00000gn/T/ipykernel_3805/3458380017.py", line 1, in <module> import datasets File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/__init__.py", line 43, in <module> from .arrow_dataset import Dataset File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 66, in <module> from .arrow_writer import ArrowWriter, OptimizedTypedSequence File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/arrow_writer.py", line 27, in <module> from .features import Features, Image, Value File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/__init__.py", line 17, in <module> from .audio import Audio File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/features/audio.py", line 12, in <module> from ..download.streaming_download_manager import xopen File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/__init__.py", line 9, in <module> from .download_manager import DownloadManager, DownloadMode File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/download/download_manager.py", line 36, in <module> from ..utils.py_utils import NestedDataStructure, map_nested, size_str File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 602, in <module> class Pickler(dill.Pickler): File "/Users/avivbrokman/opt/anaconda3/lib/python3.9/site-packages/datasets/utils/py_utils.py", line 605, in Pickler dispatch = dill._dill.MetaCatchingDict(dill.Pickler.dispatch.copy()) AttributeError: module 'dill' has no attribute '_dill' ``` Looking at the github source code for dill, it appears that `datasets` has a bug or is not compatible with the latest `dill`. Specifically, rather than `dill._dill.XXXX` it should be `dill.dill._dill.XXXX`. But given the popularity of `datasets` I feel confused about me being the first person to have this issue, so it makes me wonder if I'm misdiagnosing the issue. ### Steps to reproduce the bug Install `dill` and `datasets` packages and then `import datasets` ### Expected behavior I expect `datasets` to import. ### Environment info - `datasets` version: 2.9.0 - Platform: macOS-10.16-x86_64-i386-64bit - Python version: 3.9.13 - PyArrow version: 11.0.0 - Pandas version: 1.4.4 As I said above, I guess this is not a problem with `datasets`. I think you have different Python environments: one with the new dill version (the one you get while using pip) and other with the old dill version (the one where you get the AttributeError). You should update `dill` in the Python environment you are using within spyder. Please note that the `_dill` module is present in the `dill` package since their 2.8.0 version.
[ -1.1599488258361816, -0.8837870359420776, -0.7099396586418152, 1.3716564178466797, -0.08292015641927719, -1.3277747631072998, 0.0947943702340126, -1.1010955572128296, 1.5574061870574951, -0.6909691095352173, 0.2057599425315857, -1.688206672668457, -0.19245323538780212, -0.4060768485069275, -0.6863471269607544, -0.93545001745224, -0.36366304755210876, -1.006789207458496, 0.9752193689346313, 2.5131161212921143, 1.4287742376327515, -1.3019462823867798, 2.796297550201416, 0.6501778960227966, -0.36052799224853516, -0.9295034408569336, 0.5855237245559692, -0.01977519877254963, -1.2403284311294556, -0.4821670949459076, -0.9120622873306274, 0.02795284613966942, -0.5791834592819214, -0.33486407995224, 0.0841706246137619, 0.4527825713157654, -0.3076794147491455, -0.1892685741186142, -0.6364888548851013, -0.7426725625991821, 0.4843207895755768, -0.3225354552268982, 1.0054774284362793, -0.2716929018497467, 1.7356138229370117, -0.5733333230018616, 0.4068160951137543, 0.7564837336540222, 1.2677698135375977, 0.12119825929403305, 0.08089578151702881, 0.21176916360855103, 0.3278254270553589, -0.05626846104860306, 0.594719409942627, 1.2334603071212769, 0.5346507430076599, 0.5517169833183289, 0.6752236485481262, -2.1787564754486084, 1.2591843605041504, -0.8328648209571838, 0.19212153553962708, 1.3566317558288574, -0.74741530418396, 0.30409038066864014, -1.828865885734558, -0.037708912044763565, 0.6335675716400146, -2.3341357707977295, 0.26683923602104187, -1.3179391622543335, -0.5082676410675049, 0.8633751273155212, 0.26668593287467957, -1.2124035358428955, 0.21132901310920715, -0.5097116827964783, 1.1111516952514648, 0.5151857733726501, 1.195163369178772, -1.6769906282424927, -0.012120884843170643, -0.12489454448223114, 0.11162197589874268, -1.2962636947631836, -1.7074259519577026, 0.5384920239448547, 0.5179530382156372, 0.8185365200042725, -0.06582620739936829, 1.0382025241851807, -1.07541024684906, 0.7994019389152527, -0.9083600044250488, -1.602870225906372, -1.4061307907104492, -2.398646116256714, -2.346127510070801, 0.7497532367706299, -0.5903266072273254, -0.48450323939323425, 1.9694074392318726, -1.0044411420822144, -1.7575613260269165, 0.9731139540672302, 0.3660074770450592, 0.09131890535354614, 2.350916624069214, 0.23673228919506073, -0.696050226688385, 0.42169633507728577, -0.6541216969490051, 0.8154435157775879, -0.33128246665000916, 1.238525390625, 0.49327096343040466, -0.9606022834777832, 1.642964482307434, -0.5399861931800842, 0.6208182573318481, -0.6467443108558655, -0.46141642332077026, -0.850908637046814, 0.18564841151237488, 1.7838696241378784, -0.3673206865787506, 1.5328716039657593, -0.2171548455953598, -1.5978046655654907, -1.5236183404922485, 0.8073318600654602, 0.5156146287918091, -1.0030412673950195, 0.033993471413850784, -0.5412747263908386, 0.13973285257816315, -0.052948422729969025, 1.091795802116394, 1.1979557275772095, 0.6983343362808228, -0.2785475552082062, -0.8186383247375488, 0.3130657374858856, -0.17172901332378387, -0.670808732509613, -1.811333179473877, -0.2924917936325073, 0.2544487714767456, 0.6437063813209534, -1.2119038105010986, 1.9155290126800537, 0.883121907711029, 2.0424251556396484, 0.9321510791778564, -0.4587997794151306, 1.4156854152679443, 0.01188488956540823, 1.8229910135269165, -0.48412132263183594, 0.6129494905471802, -0.33435526490211487, -1.1112463474273682, 0.851797878742218, -0.42972108721733093, -1.8749611377716064, -0.811150312423706, -0.7710875868797302, -0.09862663596868515, -0.7405455112457275, 0.8478069305419922, -0.3334246873855591, -1.496289610862732, 0.03641219809651375, -0.6618224382400513, 0.16144859790802002, -1.3188910484313965, 0.1845884919166565, 0.7044689059257507, -0.6867625713348389, -0.06900946795940399, -0.3068287670612335, -1.2868388891220093, -0.4862041473388672, 0.36333489418029785, 2.000610828399658, -0.4690867066383362, 0.9786139130592346, 0.9142124056816101, -0.7756486535072327, 0.16986095905303955, 0.2480684518814087, -0.34578388929367065, 0.7417734861373901, -1.0764038562774658, -0.4269997477531433, 1.0909192562103271, -0.3053681552410126, -0.7122635245323181, 1.4627436399459839, 0.803393542766571, -1.1433271169662476, -0.28068608045578003, -0.29358115792274475, -0.8624725341796875, 0.03238889202475548, -1.3976361751556396, -0.1138940379023552, 0.3664042353630066, -1.4710805416107178, -0.3359999358654022, -0.1965693086385727, 1.3895666599273682, -0.3487950265407562, 1.513117790222168, -0.33214256167411804, -0.1569763869047165, -0.32137981057167053, -0.52364581823349, 0.27055624127388, -0.21901623904705048, -0.6160565614700317, 0.1861957311630249, -0.8083435297012329, 0.3266949951648712, 1.520471453666687, 0.2912861704826355, 0.005373500287532806, 0.37209799885749817, 1.1202119588851929, 0.40135136246681213, -0.03693918511271477, -0.926185667514801, -1.4700138568878174, 1.9502661228179932, -1.440173864364624, 1.835654616355896, 0.7800500988960266, -0.13776694238185883, -1.8594805002212524, -1.854907751083374, 1.1771808862686157, 1.1223886013031006, 2.3280937671661377, 0.5233237743377686, 0.48983174562454224, -0.642815351486206, -0.7665420174598694, 0.2770986258983612, -0.9567479491233826, -0.650410532951355, 0.21714358031749725, 2.2662177085876465, 1.8090720176696777, -0.6498310565948486, -0.30854713916778564, -0.8347163200378418, 1.2967406511306763, -0.24151048064231873, 0.24302446842193604, 2.06943941116333, -0.3053973615169525, -1.0112046003341675, 1.3564038276672363, -2.3888676166534424, 0.3502568006515503, 2.08601713180542, 0.2539603114128113, 0.16582484543323517, -1.4535112380981445, -0.703429102897644, -0.2775942385196686, -0.5796284079551697, -1.2909623384475708, 0.5805066227912903, -0.2674022614955902, -0.9049020409584045, -1.465998888015747, 0.039678286761045456, -1.1026077270507812, -1.8112187385559082, 0.33187922835350037, 1.9885857105255127, 2.0718746185302734, -0.8727285265922546, 1.2897735834121704, -0.2239108830690384, -0.036145538091659546, 1.3238577842712402, 1.3910748958587646, 3.1247684955596924, 1.8539984226226807, -1.2774139642715454, 0.803769052028656, -0.25505462288856506, -0.45866018533706665, 1.2036932706832886, -1.121822714805603, 0.9758722186088562, -0.18434908986091614, -1.2501181364059448, -1.2073248624801636, 1.022642970085144, 0.4823034703731537, 0.059348978102207184, -0.5195690989494324, 1.2467231750488281, 0.14044643938541412, 1.4120858907699585, 0.6034265160560608, -0.44148290157318115, 0.5313106179237366, -0.32139942049980164, -0.5802765488624573, 1.7677812576293945, 0.1741228699684143, -1.4973129034042358, -2.4571409225463867, -0.31912046670913696, -0.8938664197921753, -0.02713121846318245, -0.5661182403564453, -1.0410627126693726, 1.5967129468917847, 0.4503351151943207, -1.1405109167099, -0.29636287689208984, -0.27958136796951294, -0.46196115016937256, 2.650040864944458, -1.2519280910491943, -0.05069255456328392, -0.9431505799293518, -0.5005806088447571, 1.6278555393218994, -1.2639477252960205, -0.23022425174713135, -1.0597139596939087, -0.6696259379386902, -1.3930383920669556, -0.5010795593261719, 0.03833916410803795, -0.9275222420692444, 0.7137439846992493, 0.20610176026821136, -1.0529576539993286, -0.338740736246109, -0.967337965965271, 1.1007392406463623, -0.08584979176521301, 0.215028777718544, 1.874253511428833, 0.3497980833053589, -0.43126749992370605, 0.6991668343544006, 1.2347394227981567, 0.5855608582496643, -0.7035847306251526, -0.08519650995731354, -0.7370298504829407, 0.4027189612388611, -1.4409393072128296, 0.10787507891654968, -2.990295648574829, 0.7799752950668335, -0.22205796837806702, -0.18333296477794647, -0.16422894597053528, -1.3185359239578247, 1.0789915323257446, 2.5749387741088867, -1.152164101600647, 0.45380133390426636, 0.45505258440971375, 1.14236319065094, -1.6379306316375732, 0.2532210648059845, -0.5091725587844849, 2.070901870727539, 0.18797913193702698, 1.2657098770141602, -0.5199176669120789, -2.2044284343719482, 0.5906524658203125, -1.1361819505691528, -0.9883687496185303, 0.9234814047813416, -0.8659425377845764, 0.35192444920539856, -1.4246653318405151, -0.09891128540039062, -0.9482637047767639, -1.2591053247451782, 0.7641555666923523, 0.030007243156433105, 0.42398732900619507, -0.5589136481285095, 0.44286251068115234, -2.1241602897644043, -1.4355933666229248, -0.22788868844509125, -1.010978102684021, 0.5314958095550537, -0.3820899426937103, 0.5258074998855591, -0.021693140268325806, 0.17477701604366302, 0.28764694929122925, 1.4896435737609863, 3.4324092864990234, 0.15815187990665436, 0.16354823112487793, -0.05132700130343437, -1.111341118812561, 1.4265178442001343, 0.9094663858413696, -0.09220299124717712, -0.5562323331832886, -1.0087130069732666, 1.3391392230987549, 1.9664534330368042, 1.1467664241790771, 0.1863282173871994, -0.8700392246246338, -0.7876084446907043, -0.03426586464047432, 0.1718640774488449, 0.5675815939903259, 1.0134575366973877, -0.06258145719766617, 0.08624287694692612, 1.393738031387329, 1.1824623346328735, -0.21392570436000824, 0.4758318364620209, -0.9704014658927917, -0.38454779982566833, 0.28687381744384766, 0.17968477308750153, 0.06684769690036774, 0.6032946109771729, -1.0220823287963867, -0.23674450814723969, -0.28643253445625305, -0.8823648691177368, -0.8297863602638245, -0.3679157495498657, -0.4254177510738373, 1.625579833984375, 0.05685886740684509, -0.5529541969299316, 0.12091831117868423, -0.6142204403877258, -0.07531078904867172, -1.1807101964950562, 0.07893018424510956, -0.10267218947410583, -0.07669104635715485, -0.13879403471946716, 1.58999764919281, -0.9156829714775085, -2.0463247299194336, 0.14179500937461853, 0.3685595393180847, -0.39457666873931885, 0.19352328777313232, 1.6959270238876343, 0.4249024987220764, 1.3835830688476562, 1.3117432594299316, 1.0016411542892456, -0.5983616709709167, -1.2265082597732544, 0.8062183260917664, 0.9677982926368713, -1.2724348306655884, 0.9736056923866272, -0.21411047875881195, -0.6203324794769287, 0.679653525352478, 1.3778365850448608, 0.3455025553703308, -1.9796408414840698, 0.9910556077957153, -0.8905925750732422, 0.7705892324447632, 0.6872857213020325, 0.8443225622177124, 0.2690247893333435, 0.8656197786331177, -1.222608208656311, -1.1812390089035034, -0.6801396608352661, -0.6039180159568787, 1.8420547246932983, -0.2389560341835022, 0.576680600643158, -0.21684150397777557, -1.0992566347122192, -0.16686317324638367, 0.8224684000015259, 0.42513346672058105, -0.3672286868095398, 0.9144589304924011, -0.5314339995384216, -0.956037163734436, -1.1477235555648804, -0.41123223304748535, -1.0289089679718018, -0.8324143886566162, 0.981286346912384, 0.7845366597175598, 0.4836106598377228, 1.9647139310836792, 0.6111152768135071, 0.3630829453468323, -2.6067793369293213, 0.8665665984153748, 0.32983362674713135, -0.03332294896245003, 0.9096415638923645, 0.23531557619571686, 1.2070093154907227, -0.038517486304044724, 0.6197673678398132, -2.315084934234619, 2.1459269523620605, -0.23011305928230286, 0.5821312069892883, 0.019935622811317444, -0.2380843311548233, 1.1502069234848022, 0.5674091577529907, 0.5596539378166199, -1.1140639781951904, 0.7513505816459656, -0.6255924701690674, 1.0610625743865967, 0.9511605501174927, -1.0303781032562256, 0.1189407929778099, 1.4527649879455566, 0.4944038689136505, -0.3872908651828766, -1.0028486251831055, -0.8508822917938232, 0.9983333349227905, 1.6111758947372437, -0.08064527064561844, -0.011597814038395882, 0.8504193425178528, 0.7366636395454407, -1.2162061929702759, 0.07323142886161804, -0.6734793186187744, -0.6867654919624329, 1.8133718967437744, 2.0170557498931885, -0.09845031797885895, -0.215764120221138, -0.7783092856407166, -1.3233404159545898, 0.7794981598854065, -0.08895837515592575, 0.05715883523225784, 0.6945441961288452, -0.7166896462440491, 1.117776870727539, 0.5182976126670837, 1.0830078125, 0.0118378521874547, 0.3533167243003845, 0.3085145652294159, -0.4029957950115204, -1.1777379512786865, -0.3526730239391327, -1.1426953077316284, -2.467252254486084, 0.4185640513896942, -0.25631916522979736, -1.4788835048675537, 0.10127884149551392, -1.0889194011688232, 0.8638964891433716, -0.653269350528717, -1.0984327793121338, -1.3940513134002686, 0.3816235661506653, -0.22882269322872162, 0.8676075339317322, -1.5832105875015259, -0.21951380372047424, 1.248184084892273, 0.8894801139831543, -0.5732361078262329, 0.948897123336792, 0.23952917754650116, 0.9982262849807739, 0.7420241832733154, -0.4762682616710663, 0.6253864765167236, -0.05023309588432312, -1.3510103225708008, 0.37040582299232483, 1.2258906364440918, 0.2500663995742798, 1.376737356185913, -0.4804900586605072, 0.1712404042482376, 0.44831374287605286, -0.6340606808662415, -0.5159826278686523, -0.3548094928264618, 0.6842718720436096, 0.02229715883731842, -1.112005591392517, -0.1619672030210495, -0.24627819657325745, -0.28045645356178284, 0.22201359272003174, -1.4730781316757202, -0.32015514373779297, -0.3789444863796234, -0.3937576711177826, -1.3405842781066895, 0.09565041214227676, 1.3335591554641724, -0.7969592809677124, -0.24541400372982025, 0.3945843577384949, 0.40581491589546204, 0.514306902885437, 0.5305090546607971, -0.7810714244842529, -0.2696571946144104, -0.4093950688838959, -0.2744959890842438, 0.25448015332221985, 1.1515474319458008, -0.05170179903507233, -0.9746144413948059, 0.5580492615699768, -0.34085172414779663, 0.20853419601917267, 2.0415515899658203, 0.012753312475979328, -0.6842272281646729, 0.34751948714256287, -0.6668720841407776, 1.6746056079864502, 1.7301647663116455, 1.2268002033233643, -0.06650562584400177, -0.7272427678108215, 0.48542729020118713, -0.3038334250450134, -0.3023045063018799, 0.9180356860160828, 0.4103759229183197, -0.18503877520561218, -1.4168202877044678, 0.596779465675354, 1.2988191843032837, -0.7409714460372925, -0.7349827289581299, 0.05572985112667084, -0.9521865248680115, 1.3228189945220947, 0.4964389503002167, 0.2737754285335541, 0.2662857174873352, 1.5473040342330933, 0.7238453030586243, -0.43233367800712585, 0.5258410573005676, 0.5384107828140259, -0.26258641481399536, -2.090447425842285, -0.982645571231842, 0.23652571439743042, -0.357409805059433, -1.6424121856689453, 1.4133825302124023, -1.1444770097732544, -0.9849513173103333, 0.5234098434448242, 0.18887370824813843, 1.241275668144226, 0.40139874815940857, 1.734646201133728, 2.1465003490448, 0.9379764199256897, 0.32768529653549194, 1.1687567234039307, -0.09625048190355301, -0.45758292078971863, 1.8541624546051025, -0.4231643080711365, 0.5249621868133545, 0.9902523756027222, -0.3985787034034729, -1.1032696962356567, -0.9001369476318359, -1.117645263671875, -0.6486197113990784, 1.2273054122924805, 0.10898609459400177, -1.09407377243042, 0.19388537108898163, 1.5658632516860962, 0.12872657179832458, -0.20610088109970093, 0.7878947257995605, 0.404712051153183, -0.6931031346321106, -0.08427245914936066, -0.825354814529419, 0.49748632311820984, -0.055495116859674454, -0.3205012083053589, 0.21736453473567963, 0.6082059144973755, 1.327815055847168, -0.057314589619636536, 0.051983222365379333, 1.1990268230438232, -1.3428608179092407, 1.54330575466156, -0.5359097719192505, 0.28860926628112793, -2.441169023513794, 1.3914415836334229, -0.7682392001152039, 1.9599710702896118, -2.5401711463928223, 0.38234201073646545, -0.45250847935676575, -0.4935259222984314, 0.28108730912208557, -0.4660293459892273, 0.16316089034080505, -0.18833832442760468, -0.8805756568908691, -0.07877539843320847, -0.7615410685539246, 0.581209123134613, 1.163956880569458, 1.5157334804534912, -1.1417115926742554, -0.29341936111450195, -1.7419344186782837, -0.17337091267108917, -0.8581814169883728, 0.3504190444946289, -1.9411581754684448, -0.23930145800113678, -1.9917405843734741, -2.3847105503082275, -1.3898541927337646, -0.8484546542167664, 1.0016977787017822, 0.1659039407968521, -0.9493661522865295, 1.2692344188690186, -0.33493873476982117, -1.8012518882751465, 1.1802664995193481, -2.27402663230896 ]
https://github.com/huggingface/datasets/issues/5486
Adding `sep` to TextConfig
Hi @omar-araboghli, thanks for your proposal. Have you tried to use "csv" loader instead of "text"? That already has a `sep` argument.
I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination with `sample_by='paragraph'` to parse a paragraph into an array for each column ? If so, I am happy to contribute! ## Environment * `python 3.8.10` * `datasets 2.9.0` ## Snippet of `train.txt` ```txt Distribution NN O O and NN O O dynamics NN O O of NN O O electron NN O B-RP complexes NN O I-RP in NN O O cyanobacterial NN O B-R membranes NN O I-R The NN O O occurrence NN O O of NN O O prostaglandin NN O B-R F2α NN O I-R in NN O O Pharbitis NN O B-R seedlings NN O I-R grown NN O O under NN O O short NN O B-P days NN O I-P or NN O I-P days NN O I-P ``` ## Current Behaviour ```python # defining 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] here would fail with `ValueError: Length of names (4) does not match length of arrays (1)` dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='line') dataset['train']['tokens'][0] >>> 'Distribution\tNN\tO\tO' ``` ## Expected Behaviour / Suggestion ```python # suppose we defined 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='paragraph', sep='\t') dataset['train']['tokens'][0] >>> ['Distribution', 'and', 'dynamics', ... ] dataset['train']['ner_tags'][0] >>> ['O', 'O', 'O', ... ] ```
318
22
Adding `sep` to TextConfig I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination with `sample_by='paragraph'` to parse a paragraph into an array for each column ? If so, I am happy to contribute! ## Environment * `python 3.8.10` * `datasets 2.9.0` ## Snippet of `train.txt` ```txt Distribution NN O O and NN O O dynamics NN O O of NN O O electron NN O B-RP complexes NN O I-RP in NN O O cyanobacterial NN O B-R membranes NN O I-R The NN O O occurrence NN O O of NN O O prostaglandin NN O B-R F2α NN O I-R in NN O O Pharbitis NN O B-R seedlings NN O I-R grown NN O O under NN O O short NN O B-P days NN O I-P or NN O I-P days NN O I-P ``` ## Current Behaviour ```python # defining 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] here would fail with `ValueError: Length of names (4) does not match length of arrays (1)` dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='line') dataset['train']['tokens'][0] >>> 'Distribution\tNN\tO\tO' ``` ## Expected Behaviour / Suggestion ```python # suppose we defined 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='paragraph', sep='\t') dataset['train']['tokens'][0] >>> ['Distribution', 'and', 'dynamics', ... ] dataset['train']['ner_tags'][0] >>> ['O', 'O', 'O', ... ] ``` Hi @omar-araboghli, thanks for your proposal. Have you tried to use "csv" loader instead of "text"? That already has a `sep` argument.
[ -1.1810396909713745, -0.8709943294525146, -0.7613259553909302, 1.5773694515228271, -0.22678525745868683, -1.1137773990631104, 0.13493561744689941, -1.102150559425354, 1.7744081020355225, -0.763896107673645, 0.3840358853340149, -1.6877012252807617, 0.06789879500865936, -0.7430889010429382, -0.7388447523117065, -0.8579229712486267, -0.28350213170051575, -0.8438918590545654, 1.1500006914138794, 2.3565664291381836, 1.1510194540023804, -1.4412349462509155, 2.652337074279785, 0.7109121680259705, -0.1342584490776062, -0.9941474795341492, 0.4440142810344696, -0.06796608865261078, -1.2158479690551758, -0.39659976959228516, -0.8690181970596313, -0.11905355751514435, -0.6217522025108337, -0.4760938286781311, 0.05764900892972946, 0.3971056044101715, -0.20361298322677612, -0.50417560338974, -0.48319339752197266, -0.7125665545463562, 0.453553706407547, -0.4131482243537903, 0.9089496731758118, -0.3304956555366516, 1.7646751403808594, -0.5070151686668396, 0.3228439688682556, 0.724951446056366, 1.3451447486877441, 0.2006521075963974, 0.005086404271423817, 0.4204663336277008, 0.34139445424079895, -0.0443170927464962, 0.57270747423172, 1.2409096956253052, 0.5797522068023682, 0.5701161623001099, 0.8685693740844727, -2.3419580459594727, 1.2474353313446045, -1.0887538194656372, 0.38227617740631104, 1.3736181259155273, -1.0028499364852905, 0.34102505445480347, -1.8812479972839355, 0.06670286506414413, 0.6269198060035706, -2.2164416313171387, 0.38172563910484314, -1.3784914016723633, -0.4550812542438507, 0.8492947220802307, 0.3228413760662079, -1.418505311012268, 0.196278378367424, -0.40611496567726135, 1.0096579790115356, 0.4593579173088074, 1.1202489137649536, -1.6987987756729126, 0.07984089106321335, -0.4096828103065491, 0.2584770619869232, -1.3582388162612915, -1.4924147129058838, 0.616367518901825, 0.7458270192146301, 0.49039754271507263, -0.18818344175815582, 1.1650971174240112, -1.155640721321106, 0.7500287294387817, -1.0821205377578735, -1.78279447555542, -1.4019614458084106, -2.115609645843506, -2.156984567642212, 0.763214647769928, -0.5129774808883667, -0.45114266872406006, 1.9927256107330322, -0.9745747447013855, -1.738107442855835, 1.1397557258605957, 0.3931494355201721, -0.0039369771257042885, 2.3761730194091797, 0.1927398443222046, -0.7581930756568909, 0.3279234766960144, -0.9395322799682617, 0.7667004466056824, -0.36836686730384827, 1.3135701417922974, 0.436012327671051, -0.9659856557846069, 1.7527923583984375, -0.2240406721830368, 0.6277790665626526, -0.6553882360458374, -0.5504660606384277, -0.8125787377357483, 0.2620794475078583, 1.9929368495941162, -0.2268013209104538, 1.5457653999328613, -0.45371294021606445, -1.5759168863296509, -1.5461511611938477, 0.8785168528556824, 0.3674318492412567, -0.7833213806152344, 0.12069973349571228, -0.36328768730163574, 0.3272128403186798, -0.12965275347232819, 1.1628637313842773, 1.3303313255310059, 0.6340259909629822, -0.3043919503688812, -0.8181691765785217, 0.10616616159677505, -0.09053144603967667, -0.6735369563102722, -1.8232167959213257, -0.36851778626441956, 0.07742807269096375, 0.6747148036956787, -1.1468758583068848, 1.7928447723388672, 0.8598830103874207, 1.953843116760254, 1.028120756149292, -0.4033186137676239, 1.6572798490524292, 0.1545649766921997, 1.7812365293502808, -0.5181543231010437, 0.6039462685585022, -0.4206681251525879, -1.1368144750595093, 0.8352118730545044, -0.21498847007751465, -1.9262408018112183, -0.7281081676483154, -0.9125702977180481, -0.2366071194410324, -0.8406496047973633, 0.9043880701065063, -0.33784326910972595, -1.5096797943115234, 0.21140003204345703, -0.7070679068565369, 0.11489668488502502, -1.1776059865951538, 0.3051241934299469, 0.7031900882720947, -0.6036638617515564, 0.20545436441898346, -0.29995277523994446, -1.210752248764038, -0.5449146032333374, 0.3754420280456543, 1.8164705038070679, -0.7328894734382629, 0.8074805736541748, 1.0641372203826904, -0.7211333513259888, -0.10082224756479263, 0.2955702543258667, -0.059159811586141586, 0.8712852001190186, -1.0506423711776733, -0.47062644362449646, 1.111216425895691, -0.23359166085720062, -0.5706102848052979, 1.3413885831832886, 0.7139652371406555, -1.0058354139328003, -0.3476129174232483, -0.2401440143585205, -0.8396441340446472, 0.03248605132102966, -1.5593231916427612, -0.16714133322238922, 0.5443769693374634, -1.5651443004608154, -0.46447503566741943, -0.2672114372253418, 1.1777197122573853, -0.20466700196266174, 1.4109904766082764, -0.326791912317276, -0.24618937075138092, -0.1779329627752304, -0.3692092299461365, 0.3429054319858551, -0.31268054246902466, -0.8584725856781006, 0.057328976690769196, -0.7540553212165833, 0.3755556046962738, 1.3222484588623047, 0.2993932366371155, 0.06261444091796875, 0.5654563307762146, 1.1547725200653076, 0.34994685649871826, 0.16698694229125977, -0.9228684306144714, -1.4128228425979614, 1.940062403678894, -1.5851860046386719, 1.9486443996429443, 0.6183409690856934, 0.027521759271621704, -1.7887681722640991, -1.8315174579620361, 1.454565405845642, 1.1537728309631348, 2.254328727722168, 0.6859031915664673, 0.37220174074172974, -0.8190003633499146, -0.648933470249176, 0.26920992136001587, -0.9549723863601685, -0.8155967593193054, 0.25620144605636597, 2.3354437351226807, 1.5944539308547974, -0.5512765645980835, -0.19954238831996918, -0.9277682900428772, 1.5292720794677734, -0.20206058025360107, 0.28655144572257996, 2.099320411682129, -0.29467421770095825, -1.0327476263046265, 1.2398700714111328, -2.381770133972168, 0.2222738265991211, 2.0138773918151855, 0.13224218785762787, 0.22081415355205536, -1.293776512145996, -0.6430605053901672, -0.1676573008298874, -0.4811114966869354, -1.2945985794067383, 0.40761759877204895, -0.33283764123916626, -0.6567690372467041, -1.5422773361206055, 0.20510350167751312, -1.0906511545181274, -1.4882699251174927, 0.15823891758918762, 2.1041901111602783, 1.9759197235107422, -0.7062357664108276, 1.5360016822814941, -0.3388237953186035, 0.25907471776008606, 1.3079019784927368, 1.174312710762024, 3.0517754554748535, 1.8561136722564697, -1.0948424339294434, 0.5209858417510986, -0.22400358319282532, -0.5093801617622375, 1.0766452550888062, -1.0547449588775635, 1.1773501634597778, -0.0700274407863617, -1.1017920970916748, -1.1507267951965332, 0.8236136436462402, 0.3993504047393799, 0.006541621871292591, -0.4796241223812103, 1.1502711772918701, 0.09534027427434921, 1.2653629779815674, 0.780876874923706, -0.33538731932640076, 0.6427415609359741, -0.41940590739250183, -0.47489142417907715, 1.570839285850525, 0.07744581252336502, -1.320388913154602, -2.255648612976074, -0.1687302440404892, -0.7305029630661011, 0.07543733716011047, -0.5998774766921997, -1.0290558338165283, 1.6298224925994873, 0.3375890254974365, -1.2504849433898926, -0.056689340621232986, -0.28359508514404297, -0.5974916219711304, 2.695338010787964, -1.3516134023666382, -0.3804602324962616, -0.9872572422027588, -0.727796733379364, 1.6409589052200317, -0.9786532521247864, -0.20358750224113464, -0.949393630027771, -0.43764108419418335, -1.3731001615524292, -0.5489851236343384, 0.010912681929767132, -0.8708226680755615, 0.9005764126777649, 0.23231491446495056, -1.2517309188842773, -0.3472440540790558, -0.8684026598930359, 0.8488052487373352, -0.22288893163204193, 0.40093278884887695, 1.8917686939239502, 0.36889055371284485, -0.3085992932319641, 0.6985769271850586, 1.0428073406219482, 0.686943531036377, -0.5563703775405884, 0.3602341115474701, -0.4793270528316498, 0.34842658042907715, -1.2468918561935425, 0.3773745000362396, -2.837381601333618, 0.549252986907959, 0.0076708486303687096, -0.046321649104356766, -0.016084622591733932, -1.3567485809326172, 1.127177357673645, 2.431931972503662, -1.1824694871902466, 0.5067434310913086, 0.21818581223487854, 1.3340461254119873, -1.6652764081954956, 0.2519828677177429, -0.2875320315361023, 2.2499589920043945, 0.2068617045879364, 1.2733732461929321, -0.4019990861415863, -2.4474987983703613, 0.4781889021396637, -1.2451636791229248, -1.1879985332489014, 0.7683008909225464, -0.8756586909294128, 0.08301980793476105, -1.5190106630325317, -0.3006744682788849, -0.8777449131011963, -1.2025614976882935, 0.8763818144798279, 0.11374560743570328, 0.39876070618629456, -0.7085346579551697, 0.41472557187080383, -2.128150463104248, -1.5057311058044434, -0.200675830245018, -0.9814642071723938, 0.5037502646446228, -0.24097281694412231, 0.6739981174468994, -0.12060407549142838, -0.00953412614762783, 0.1994004249572754, 1.507858157157898, 3.3580105304718018, 0.15918394923210144, 0.37798118591308594, -0.26480621099472046, -0.892741322517395, 1.5918346643447876, 0.875571072101593, -0.0023341341875493526, -0.4421076774597168, -1.109377145767212, 1.3127737045288086, 2.0131475925445557, 0.9209362268447876, 0.0028839604929089546, -0.6648867726325989, -0.6637091040611267, -0.13754475116729736, 0.1462758630514145, 0.5675371885299683, 0.8287867307662964, 0.11708429455757141, 0.12383443117141724, 1.223388910293579, 1.039900302886963, -0.5794724822044373, 0.5162550210952759, -0.835902750492096, -0.45243340730667114, 0.38350239396095276, 0.2172977328300476, -0.06704474985599518, 0.2389001101255417, -1.0721501111984253, -0.3018417954444885, -0.3999677300453186, -0.9296103119850159, -0.6077793836593628, -0.4014136493206024, -0.3599480390548706, 1.593799352645874, 0.13202573359012604, -0.5534145832061768, -0.10886989533901215, -0.7288185954093933, -0.06953360140323639, -1.0934419631958008, 0.17862731218338013, -0.264858603477478, -0.06867502629756927, -0.05435634404420853, 1.750571370124817, -0.9505266547203064, -2.0422608852386475, 0.10097502917051315, 0.27220213413238525, -0.3715929388999939, 0.2349214255809784, 1.7196838855743408, 0.46182483434677124, 1.3989810943603516, 1.331704020500183, 0.9894673228263855, -0.7247021198272705, -1.294862151145935, 0.6233544945716858, 0.9253010749816895, -1.3848203420639038, 0.8396024703979492, 0.11086351424455643, -0.5939213037490845, 0.5647003054618835, 1.3232052326202393, 0.5242472290992737, -2.154252767562866, 0.8652470707893372, -0.9892542958259583, 0.7348645925521851, 0.8267631530761719, 0.8040902614593506, 0.3961922824382782, 0.8965361714363098, -1.3037683963775635, -1.1228313446044922, -0.7768813967704773, -0.7054183483123779, 1.9339336156845093, -0.23006793856620789, 0.5581735372543335, -0.0408051460981369, -1.2938843965530396, -0.15369604527950287, 0.69338458776474, 0.5977866649627686, -0.38566306233406067, 0.7103314399719238, -0.697296142578125, -1.1574475765228271, -1.5555503368377686, -0.45307523012161255, -0.9577971696853638, -1.0245954990386963, 0.8874173760414124, 0.8493701815605164, 0.26451900601387024, 1.8502928018569946, 0.606273889541626, 0.1158304214477539, -2.5455822944641113, 1.0002089738845825, 0.2887043058872223, -0.10563414543867111, 0.7770465612411499, 0.4098759591579437, 1.0556106567382812, 0.08140137791633606, 0.5428485870361328, -2.473653554916382, 2.2405102252960205, -0.25511837005615234, 0.7698444724082947, -0.15203063189983368, -0.24165362119674683, 1.1175004243850708, 0.5231795310974121, 0.5407324433326721, -0.9852754473686218, 0.703758716583252, -0.6801005601882935, 1.249152421951294, 0.9312192797660828, -0.8245142102241516, -0.0778600201010704, 1.3024168014526367, 0.38377687335014343, -0.7891848683357239, -0.9370365142822266, -0.960517168045044, 0.8251468539237976, 1.6898750066757202, -0.07438107579946518, -0.028982505202293396, 0.8987540602684021, 0.6761431694030762, -1.2938084602355957, 0.09365276247262955, -0.5691094994544983, -0.7728861570358276, 1.7109375, 2.008216142654419, -0.31860291957855225, -0.24281875789165497, -0.7429752945899963, -1.2855042219161987, 0.7238950729370117, 0.06550515443086624, -0.02186027728021145, 0.6359730362892151, -0.7425810694694519, 1.0166221857070923, 0.8168265223503113, 0.8810546398162842, 0.20627626776695251, 0.2643043100833893, 0.40173086524009705, -0.45559969544410706, -1.137994647026062, -0.20414938032627106, -1.0745197534561157, -2.5070528984069824, 0.46463921666145325, -0.22304700314998627, -1.2643132209777832, 0.016865964978933334, -0.9811344146728516, 0.8579569458961487, -0.5771055221557617, -1.1052629947662354, -1.4776647090911865, 0.20684590935707092, 0.0048604439944028854, 0.8593677878379822, -1.6018649339675903, -0.08715279400348663, 1.2321444749832153, 1.0372304916381836, -0.7115206122398376, 1.055783748626709, 0.24045708775520325, 1.038085699081421, 0.9516251087188721, -0.429894357919693, 0.5899785161018372, -0.061995189636945724, -1.288887858390808, 0.4545828700065613, 1.1474891901016235, 0.08415580540895462, 1.6366581916809082, -0.5784893035888672, -0.06409305334091187, 0.44574469327926636, -0.5355083346366882, -0.38071030378341675, -0.5654081702232361, 0.6039869785308838, -0.03137117624282837, -0.8668338656425476, 0.12594695389270782, 0.07597660273313522, -0.1732129454612732, 0.18314892053604126, -1.5017975568771362, -0.06804203242063522, -0.3384210169315338, -0.640691339969635, -1.3476163148880005, 0.033457156270742416, 1.3604955673217773, -0.6654701828956604, -0.2905885577201843, 0.5303581953048706, 0.38201773166656494, 0.506892204284668, 0.4761463701725006, -0.6487748622894287, -0.32025524973869324, -0.21436971426010132, -0.3494720757007599, 0.3254060447216034, 1.3716400861740112, -0.1757901906967163, -0.9992902278900146, 0.6334128379821777, -0.31753212213516235, -0.14166662096977234, 1.9944274425506592, 0.07416639477014542, -0.8349291682243347, 0.21916258335113525, -0.6961537599563599, 1.9673961400985718, 1.7229764461517334, 1.3197388648986816, -0.232821986079216, -0.9851245284080505, 0.6747422814369202, -0.4467177987098694, -0.445530503988266, 0.8965359926223755, 0.36888083815574646, -0.16053909063339233, -1.4394420385360718, 0.7322747707366943, 1.3995962142944336, -0.9028626084327698, -0.9252992868423462, 0.2564285099506378, -0.7560504078865051, 1.0321500301361084, 0.7779290080070496, 0.42158302664756775, 0.3346218168735504, 1.6043163537979126, 0.8285657167434692, -0.47620975971221924, 0.6222787499427795, 0.48774629831314087, -0.1628730446100235, -2.153064250946045, -1.3402988910675049, 0.2550995945930481, -0.4208955466747284, -1.6639407873153687, 1.3634308576583862, -1.166906714439392, -0.9398619532585144, 0.6419295072555542, 0.007332188077270985, 1.4003527164459229, 0.4896717965602875, 1.5303274393081665, 2.0437159538269043, 0.7924512624740601, 0.48262229561805725, 1.1853638887405396, -0.1941244751214981, -0.561371386051178, 1.8229765892028809, -0.5968707203865051, 0.4800245463848114, 1.2217004299163818, -0.14624300599098206, -1.2436143159866333, -0.6847885847091675, -1.3565127849578857, -0.6136095523834229, 1.1266368627548218, 0.04866860434412956, -1.1691758632659912, 0.2969045042991638, 1.7271250486373901, 0.008149807341396809, -0.3920848071575165, 0.6641623377799988, 0.49039140343666077, -0.9266068339347839, -0.07412535697221756, -1.0215362310409546, 0.5321140289306641, -0.31396549940109253, -0.3084276616573334, 0.41873788833618164, 0.4293593168258667, 1.4189784526824951, 0.05509015917778015, 0.07969554513692856, 1.149848461151123, -1.3873319625854492, 1.4728024005889893, -0.7432175278663635, 0.35226911306381226, -2.409433364868164, 1.3434895277023315, -0.7807517647743225, 2.1639206409454346, -2.621161460876465, 0.3121089041233063, -0.6257506012916565, -0.39675474166870117, 0.1796921342611313, -0.21187689900398254, 0.045615244656801224, -0.05268910527229309, -1.131371021270752, -0.14668287336826324, -0.7864227890968323, 0.49469056725502014, 1.0369858741760254, 1.318495512008667, -1.0289299488067627, -0.22166435420513153, -1.7707407474517822, -0.10061032325029373, -0.7074251174926758, 0.3274367153644562, -2.016610860824585, -0.30652710795402527, -1.914237380027771, -2.245471239089966, -1.1549875736236572, -0.7463958859443665, 1.1174185276031494, 0.032066669315099716, -0.8044242262840271, 1.3069673776626587, -0.12883029878139496, -1.7706109285354614, 0.9886810183525085, -2.0285749435424805 ]
https://github.com/huggingface/datasets/issues/5486
Adding `sep` to TextConfig
Hi @albertvillanova, thanks for the quick response! Indeed, I have been trying to use `csv` instead of `text`. However I am still not able to define range of rows as one sequence, that is achievable with passing `sample_by='paragraph'` to the `TextConfig` For instance, the below code ```python import datasets dataset = datasets.load_dataset( path='csv', data_files={'train': TRAINING_SET_PATH}, sep='\t', header=None, column_names=['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] ) ``` leads to ```python dataset >>> DatasetDict({ train: Dataset({ features: ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'], num_rows: 62543 }) }) dataset['train'][0] >>> {'tokens': 'Distribution', 'pos_tags': 'NN', 'chunk_tags': 'O', 'ner_tags': 'O' } ``` Is there a way to deal with multiple csv rows as one dataset instance, where each column is a sequence of those rows ?
I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination with `sample_by='paragraph'` to parse a paragraph into an array for each column ? If so, I am happy to contribute! ## Environment * `python 3.8.10` * `datasets 2.9.0` ## Snippet of `train.txt` ```txt Distribution NN O O and NN O O dynamics NN O O of NN O O electron NN O B-RP complexes NN O I-RP in NN O O cyanobacterial NN O B-R membranes NN O I-R The NN O O occurrence NN O O of NN O O prostaglandin NN O B-R F2α NN O I-R in NN O O Pharbitis NN O B-R seedlings NN O I-R grown NN O O under NN O O short NN O B-P days NN O I-P or NN O I-P days NN O I-P ``` ## Current Behaviour ```python # defining 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] here would fail with `ValueError: Length of names (4) does not match length of arrays (1)` dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='line') dataset['train']['tokens'][0] >>> 'Distribution\tNN\tO\tO' ``` ## Expected Behaviour / Suggestion ```python # suppose we defined 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='paragraph', sep='\t') dataset['train']['tokens'][0] >>> ['Distribution', 'and', 'dynamics', ... ] dataset['train']['ner_tags'][0] >>> ['O', 'O', 'O', ... ] ```
318
116
Adding `sep` to TextConfig I have a local a `.txt` file that follows the `CONLL2003` format which I need to load using `load_script`. However, by using `sample_by='line'`, one can only split the dataset into lines without splitting each line into columns. Would it be reasonable to add a `sep` argument in combination with `sample_by='paragraph'` to parse a paragraph into an array for each column ? If so, I am happy to contribute! ## Environment * `python 3.8.10` * `datasets 2.9.0` ## Snippet of `train.txt` ```txt Distribution NN O O and NN O O dynamics NN O O of NN O O electron NN O B-RP complexes NN O I-RP in NN O O cyanobacterial NN O B-R membranes NN O I-R The NN O O occurrence NN O O of NN O O prostaglandin NN O B-R F2α NN O I-R in NN O O Pharbitis NN O B-R seedlings NN O I-R grown NN O O under NN O O short NN O B-P days NN O I-P or NN O I-P days NN O I-P ``` ## Current Behaviour ```python # defining 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] here would fail with `ValueError: Length of names (4) does not match length of arrays (1)` dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='line') dataset['train']['tokens'][0] >>> 'Distribution\tNN\tO\tO' ``` ## Expected Behaviour / Suggestion ```python # suppose we defined 4 features ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] dataset = datasets.load_dataset(path='text', features=features, data_files={'train': 'train.txt'}, sample_by='paragraph', sep='\t') dataset['train']['tokens'][0] >>> ['Distribution', 'and', 'dynamics', ... ] dataset['train']['ner_tags'][0] >>> ['O', 'O', 'O', ... ] ``` Hi @albertvillanova, thanks for the quick response! Indeed, I have been trying to use `csv` instead of `text`. However I am still not able to define range of rows as one sequence, that is achievable with passing `sample_by='paragraph'` to the `TextConfig` For instance, the below code ```python import datasets dataset = datasets.load_dataset( path='csv', data_files={'train': TRAINING_SET_PATH}, sep='\t', header=None, column_names=['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'] ) ``` leads to ```python dataset >>> DatasetDict({ train: Dataset({ features: ['tokens', 'pos_tags', 'chunk_tags', 'ner_tags'], num_rows: 62543 }) }) dataset['train'][0] >>> {'tokens': 'Distribution', 'pos_tags': 'NN', 'chunk_tags': 'O', 'ner_tags': 'O' } ``` Is there a way to deal with multiple csv rows as one dataset instance, where each column is a sequence of those rows ?
[ -1.1810396909713745, -0.8709943294525146, -0.7613259553909302, 1.5773694515228271, -0.22678525745868683, -1.1137773990631104, 0.13493561744689941, -1.102150559425354, 1.7744081020355225, -0.763896107673645, 0.3840358853340149, -1.6877012252807617, 0.06789879500865936, -0.7430889010429382, -0.7388447523117065, -0.8579229712486267, -0.28350213170051575, -0.8438918590545654, 1.1500006914138794, 2.3565664291381836, 1.1510194540023804, -1.4412349462509155, 2.652337074279785, 0.7109121680259705, -0.1342584490776062, -0.9941474795341492, 0.4440142810344696, -0.06796608865261078, -1.2158479690551758, -0.39659976959228516, -0.8690181970596313, -0.11905355751514435, -0.6217522025108337, -0.4760938286781311, 0.05764900892972946, 0.3971056044101715, -0.20361298322677612, -0.50417560338974, -0.48319339752197266, -0.7125665545463562, 0.453553706407547, -0.4131482243537903, 0.9089496731758118, -0.3304956555366516, 1.7646751403808594, -0.5070151686668396, 0.3228439688682556, 0.724951446056366, 1.3451447486877441, 0.2006521075963974, 0.005086404271423817, 0.4204663336277008, 0.34139445424079895, -0.0443170927464962, 0.57270747423172, 1.2409096956253052, 0.5797522068023682, 0.5701161623001099, 0.8685693740844727, -2.3419580459594727, 1.2474353313446045, -1.0887538194656372, 0.38227617740631104, 1.3736181259155273, -1.0028499364852905, 0.34102505445480347, -1.8812479972839355, 0.06670286506414413, 0.6269198060035706, -2.2164416313171387, 0.38172563910484314, -1.3784914016723633, -0.4550812542438507, 0.8492947220802307, 0.3228413760662079, -1.418505311012268, 0.196278378367424, -0.40611496567726135, 1.0096579790115356, 0.4593579173088074, 1.1202489137649536, -1.6987987756729126, 0.07984089106321335, -0.4096828103065491, 0.2584770619869232, -1.3582388162612915, -1.4924147129058838, 0.616367518901825, 0.7458270192146301, 0.49039754271507263, -0.18818344175815582, 1.1650971174240112, -1.155640721321106, 0.7500287294387817, -1.0821205377578735, -1.78279447555542, -1.4019614458084106, -2.115609645843506, -2.156984567642212, 0.763214647769928, -0.5129774808883667, -0.45114266872406006, 1.9927256107330322, -0.9745747447013855, -1.738107442855835, 1.1397557258605957, 0.3931494355201721, -0.0039369771257042885, 2.3761730194091797, 0.1927398443222046, -0.7581930756568909, 0.3279234766960144, -0.9395322799682617, 0.7667004466056824, -0.36836686730384827, 1.3135701417922974, 0.436012327671051, -0.9659856557846069, 1.7527923583984375, -0.2240406721830368, 0.6277790665626526, -0.6553882360458374, -0.5504660606384277, -0.8125787377357483, 0.2620794475078583, 1.9929368495941162, -0.2268013209104538, 1.5457653999328613, -0.45371294021606445, -1.5759168863296509, -1.5461511611938477, 0.8785168528556824, 0.3674318492412567, -0.7833213806152344, 0.12069973349571228, -0.36328768730163574, 0.3272128403186798, -0.12965275347232819, 1.1628637313842773, 1.3303313255310059, 0.6340259909629822, -0.3043919503688812, -0.8181691765785217, 0.10616616159677505, -0.09053144603967667, -0.6735369563102722, -1.8232167959213257, -0.36851778626441956, 0.07742807269096375, 0.6747148036956787, -1.1468758583068848, 1.7928447723388672, 0.8598830103874207, 1.953843116760254, 1.028120756149292, -0.4033186137676239, 1.6572798490524292, 0.1545649766921997, 1.7812365293502808, -0.5181543231010437, 0.6039462685585022, -0.4206681251525879, -1.1368144750595093, 0.8352118730545044, -0.21498847007751465, -1.9262408018112183, -0.7281081676483154, -0.9125702977180481, -0.2366071194410324, -0.8406496047973633, 0.9043880701065063, -0.33784326910972595, -1.5096797943115234, 0.21140003204345703, -0.7070679068565369, 0.11489668488502502, -1.1776059865951538, 0.3051241934299469, 0.7031900882720947, -0.6036638617515564, 0.20545436441898346, -0.29995277523994446, -1.210752248764038, -0.5449146032333374, 0.3754420280456543, 1.8164705038070679, -0.7328894734382629, 0.8074805736541748, 1.0641372203826904, -0.7211333513259888, -0.10082224756479263, 0.2955702543258667, -0.059159811586141586, 0.8712852001190186, -1.0506423711776733, -0.47062644362449646, 1.111216425895691, -0.23359166085720062, -0.5706102848052979, 1.3413885831832886, 0.7139652371406555, -1.0058354139328003, -0.3476129174232483, -0.2401440143585205, -0.8396441340446472, 0.03248605132102966, -1.5593231916427612, -0.16714133322238922, 0.5443769693374634, -1.5651443004608154, -0.46447503566741943, -0.2672114372253418, 1.1777197122573853, -0.20466700196266174, 1.4109904766082764, -0.326791912317276, -0.24618937075138092, -0.1779329627752304, -0.3692092299461365, 0.3429054319858551, -0.31268054246902466, -0.8584725856781006, 0.057328976690769196, -0.7540553212165833, 0.3755556046962738, 1.3222484588623047, 0.2993932366371155, 0.06261444091796875, 0.5654563307762146, 1.1547725200653076, 0.34994685649871826, 0.16698694229125977, -0.9228684306144714, -1.4128228425979614, 1.940062403678894, -1.5851860046386719, 1.9486443996429443, 0.6183409690856934, 0.027521759271621704, -1.7887681722640991, -1.8315174579620361, 1.454565405845642, 1.1537728309631348, 2.254328727722168, 0.6859031915664673, 0.37220174074172974, -0.8190003633499146, -0.648933470249176, 0.26920992136001587, -0.9549723863601685, -0.8155967593193054, 0.25620144605636597, 2.3354437351226807, 1.5944539308547974, -0.5512765645980835, -0.19954238831996918, -0.9277682900428772, 1.5292720794677734, -0.20206058025360107, 0.28655144572257996, 2.099320411682129, -0.29467421770095825, -1.0327476263046265, 1.2398700714111328, -2.381770133972168, 0.2222738265991211, 2.0138773918151855, 0.13224218785762787, 0.22081415355205536, -1.293776512145996, -0.6430605053901672, -0.1676573008298874, -0.4811114966869354, -1.2945985794067383, 0.40761759877204895, -0.33283764123916626, -0.6567690372467041, -1.5422773361206055, 0.20510350167751312, -1.0906511545181274, -1.4882699251174927, 0.15823891758918762, 2.1041901111602783, 1.9759197235107422, -0.7062357664108276, 1.5360016822814941, -0.3388237953186035, 0.25907471776008606, 1.3079019784927368, 1.174312710762024, 3.0517754554748535, 1.8561136722564697, -1.0948424339294434, 0.5209858417510986, -0.22400358319282532, -0.5093801617622375, 1.0766452550888062, -1.0547449588775635, 1.1773501634597778, -0.0700274407863617, -1.1017920970916748, -1.1507267951965332, 0.8236136436462402, 0.3993504047393799, 0.006541621871292591, -0.4796241223812103, 1.1502711772918701, 0.09534027427434921, 1.2653629779815674, 0.780876874923706, -0.33538731932640076, 0.6427415609359741, -0.41940590739250183, -0.47489142417907715, 1.570839285850525, 0.07744581252336502, -1.320388913154602, -2.255648612976074, -0.1687302440404892, -0.7305029630661011, 0.07543733716011047, -0.5998774766921997, -1.0290558338165283, 1.6298224925994873, 0.3375890254974365, -1.2504849433898926, -0.056689340621232986, -0.28359508514404297, -0.5974916219711304, 2.695338010787964, -1.3516134023666382, -0.3804602324962616, -0.9872572422027588, -0.727796733379364, 1.6409589052200317, -0.9786532521247864, -0.20358750224113464, -0.949393630027771, -0.43764108419418335, -1.3731001615524292, -0.5489851236343384, 0.010912681929767132, -0.8708226680755615, 0.9005764126777649, 0.23231491446495056, -1.2517309188842773, -0.3472440540790558, -0.8684026598930359, 0.8488052487373352, -0.22288893163204193, 0.40093278884887695, 1.8917686939239502, 0.36889055371284485, -0.3085992932319641, 0.6985769271850586, 1.0428073406219482, 0.686943531036377, -0.5563703775405884, 0.3602341115474701, -0.4793270528316498, 0.34842658042907715, -1.2468918561935425, 0.3773745000362396, -2.837381601333618, 0.549252986907959, 0.0076708486303687096, -0.046321649104356766, -0.016084622591733932, -1.3567485809326172, 1.127177357673645, 2.431931972503662, -1.1824694871902466, 0.5067434310913086, 0.21818581223487854, 1.3340461254119873, -1.6652764081954956, 0.2519828677177429, -0.2875320315361023, 2.2499589920043945, 0.2068617045879364, 1.2733732461929321, -0.4019990861415863, -2.4474987983703613, 0.4781889021396637, -1.2451636791229248, -1.1879985332489014, 0.7683008909225464, -0.8756586909294128, 0.08301980793476105, -1.5190106630325317, -0.3006744682788849, -0.8777449131011963, -1.2025614976882935, 0.8763818144798279, 0.11374560743570328, 0.39876070618629456, -0.7085346579551697, 0.41472557187080383, -2.128150463104248, -1.5057311058044434, -0.200675830245018, -0.9814642071723938, 0.5037502646446228, -0.24097281694412231, 0.6739981174468994, -0.12060407549142838, -0.00953412614762783, 0.1994004249572754, 1.507858157157898, 3.3580105304718018, 0.15918394923210144, 0.37798118591308594, -0.26480621099472046, -0.892741322517395, 1.5918346643447876, 0.875571072101593, -0.0023341341875493526, -0.4421076774597168, -1.109377145767212, 1.3127737045288086, 2.0131475925445557, 0.9209362268447876, 0.0028839604929089546, -0.6648867726325989, -0.6637091040611267, -0.13754475116729736, 0.1462758630514145, 0.5675371885299683, 0.8287867307662964, 0.11708429455757141, 0.12383443117141724, 1.223388910293579, 1.039900302886963, -0.5794724822044373, 0.5162550210952759, -0.835902750492096, -0.45243340730667114, 0.38350239396095276, 0.2172977328300476, -0.06704474985599518, 0.2389001101255417, -1.0721501111984253, -0.3018417954444885, -0.3999677300453186, -0.9296103119850159, -0.6077793836593628, -0.4014136493206024, -0.3599480390548706, 1.593799352645874, 0.13202573359012604, -0.5534145832061768, -0.10886989533901215, -0.7288185954093933, -0.06953360140323639, -1.0934419631958008, 0.17862731218338013, -0.264858603477478, -0.06867502629756927, -0.05435634404420853, 1.750571370124817, -0.9505266547203064, -2.0422608852386475, 0.10097502917051315, 0.27220213413238525, -0.3715929388999939, 0.2349214255809784, 1.7196838855743408, 0.46182483434677124, 1.3989810943603516, 1.331704020500183, 0.9894673228263855, -0.7247021198272705, -1.294862151145935, 0.6233544945716858, 0.9253010749816895, -1.3848203420639038, 0.8396024703979492, 0.11086351424455643, -0.5939213037490845, 0.5647003054618835, 1.3232052326202393, 0.5242472290992737, -2.154252767562866, 0.8652470707893372, -0.9892542958259583, 0.7348645925521851, 0.8267631530761719, 0.8040902614593506, 0.3961922824382782, 0.8965361714363098, -1.3037683963775635, -1.1228313446044922, -0.7768813967704773, -0.7054183483123779, 1.9339336156845093, -0.23006793856620789, 0.5581735372543335, -0.0408051460981369, -1.2938843965530396, -0.15369604527950287, 0.69338458776474, 0.5977866649627686, -0.38566306233406067, 0.7103314399719238, -0.697296142578125, -1.1574475765228271, -1.5555503368377686, -0.45307523012161255, -0.9577971696853638, -1.0245954990386963, 0.8874173760414124, 0.8493701815605164, 0.26451900601387024, 1.8502928018569946, 0.606273889541626, 0.1158304214477539, -2.5455822944641113, 1.0002089738845825, 0.2887043058872223, -0.10563414543867111, 0.7770465612411499, 0.4098759591579437, 1.0556106567382812, 0.08140137791633606, 0.5428485870361328, -2.473653554916382, 2.2405102252960205, -0.25511837005615234, 0.7698444724082947, -0.15203063189983368, -0.24165362119674683, 1.1175004243850708, 0.5231795310974121, 0.5407324433326721, -0.9852754473686218, 0.703758716583252, -0.6801005601882935, 1.249152421951294, 0.9312192797660828, -0.8245142102241516, -0.0778600201010704, 1.3024168014526367, 0.38377687335014343, -0.7891848683357239, -0.9370365142822266, -0.960517168045044, 0.8251468539237976, 1.6898750066757202, -0.07438107579946518, -0.028982505202293396, 0.8987540602684021, 0.6761431694030762, -1.2938084602355957, 0.09365276247262955, -0.5691094994544983, -0.7728861570358276, 1.7109375, 2.008216142654419, -0.31860291957855225, -0.24281875789165497, -0.7429752945899963, -1.2855042219161987, 0.7238950729370117, 0.06550515443086624, -0.02186027728021145, 0.6359730362892151, -0.7425810694694519, 1.0166221857070923, 0.8168265223503113, 0.8810546398162842, 0.20627626776695251, 0.2643043100833893, 0.40173086524009705, -0.45559969544410706, -1.137994647026062, -0.20414938032627106, -1.0745197534561157, -2.5070528984069824, 0.46463921666145325, -0.22304700314998627, -1.2643132209777832, 0.016865964978933334, -0.9811344146728516, 0.8579569458961487, -0.5771055221557617, -1.1052629947662354, -1.4776647090911865, 0.20684590935707092, 0.0048604439944028854, 0.8593677878379822, -1.6018649339675903, -0.08715279400348663, 1.2321444749832153, 1.0372304916381836, -0.7115206122398376, 1.055783748626709, 0.24045708775520325, 1.038085699081421, 0.9516251087188721, -0.429894357919693, 0.5899785161018372, -0.061995189636945724, -1.288887858390808, 0.4545828700065613, 1.1474891901016235, 0.08415580540895462, 1.6366581916809082, -0.5784893035888672, -0.06409305334091187, 0.44574469327926636, -0.5355083346366882, -0.38071030378341675, -0.5654081702232361, 0.6039869785308838, -0.03137117624282837, -0.8668338656425476, 0.12594695389270782, 0.07597660273313522, -0.1732129454612732, 0.18314892053604126, -1.5017975568771362, -0.06804203242063522, -0.3384210169315338, -0.640691339969635, -1.3476163148880005, 0.033457156270742416, 1.3604955673217773, -0.6654701828956604, -0.2905885577201843, 0.5303581953048706, 0.38201773166656494, 0.506892204284668, 0.4761463701725006, -0.6487748622894287, -0.32025524973869324, -0.21436971426010132, -0.3494720757007599, 0.3254060447216034, 1.3716400861740112, -0.1757901906967163, -0.9992902278900146, 0.6334128379821777, -0.31753212213516235, -0.14166662096977234, 1.9944274425506592, 0.07416639477014542, -0.8349291682243347, 0.21916258335113525, -0.6961537599563599, 1.9673961400985718, 1.7229764461517334, 1.3197388648986816, -0.232821986079216, -0.9851245284080505, 0.6747422814369202, -0.4467177987098694, -0.445530503988266, 0.8965359926223755, 0.36888083815574646, -0.16053909063339233, -1.4394420385360718, 0.7322747707366943, 1.3995962142944336, -0.9028626084327698, -0.9252992868423462, 0.2564285099506378, -0.7560504078865051, 1.0321500301361084, 0.7779290080070496, 0.42158302664756775, 0.3346218168735504, 1.6043163537979126, 0.8285657167434692, -0.47620975971221924, 0.6222787499427795, 0.48774629831314087, -0.1628730446100235, -2.153064250946045, -1.3402988910675049, 0.2550995945930481, -0.4208955466747284, -1.6639407873153687, 1.3634308576583862, -1.166906714439392, -0.9398619532585144, 0.6419295072555542, 0.007332188077270985, 1.4003527164459229, 0.4896717965602875, 1.5303274393081665, 2.0437159538269043, 0.7924512624740601, 0.48262229561805725, 1.1853638887405396, -0.1941244751214981, -0.561371386051178, 1.8229765892028809, -0.5968707203865051, 0.4800245463848114, 1.2217004299163818, -0.14624300599098206, -1.2436143159866333, -0.6847885847091675, -1.3565127849578857, -0.6136095523834229, 1.1266368627548218, 0.04866860434412956, -1.1691758632659912, 0.2969045042991638, 1.7271250486373901, 0.008149807341396809, -0.3920848071575165, 0.6641623377799988, 0.49039140343666077, -0.9266068339347839, -0.07412535697221756, -1.0215362310409546, 0.5321140289306641, -0.31396549940109253, -0.3084276616573334, 0.41873788833618164, 0.4293593168258667, 1.4189784526824951, 0.05509015917778015, 0.07969554513692856, 1.149848461151123, -1.3873319625854492, 1.4728024005889893, -0.7432175278663635, 0.35226911306381226, -2.409433364868164, 1.3434895277023315, -0.7807517647743225, 2.1639206409454346, -2.621161460876465, 0.3121089041233063, -0.6257506012916565, -0.39675474166870117, 0.1796921342611313, -0.21187689900398254, 0.045615244656801224, -0.05268910527229309, -1.131371021270752, -0.14668287336826324, -0.7864227890968323, 0.49469056725502014, 1.0369858741760254, 1.318495512008667, -1.0289299488067627, -0.22166435420513153, -1.7707407474517822, -0.10061032325029373, -0.7074251174926758, 0.3274367153644562, -2.016610860824585, -0.30652710795402527, -1.914237380027771, -2.245471239089966, -1.1549875736236572, -0.7463958859443665, 1.1174185276031494, 0.032066669315099716, -0.8044242262840271, 1.3069673776626587, -0.12883029878139496, -1.7706109285354614, 0.9886810183525085, -2.0285749435424805 ]
https://github.com/huggingface/datasets/issues/5482
Reload features from Parquet metadata
I'd be happy to have a look, if nobody else has started working on this yet @lhoestq. It seems to me that for the `arrow` format features are currently attached as metadata [in `datasets.arrow_writer`](https://github.com/huggingface/datasets/blob/5f810b7011a8a4ab077a1847c024d2d9e267b065/src/datasets/arrow_writer.py#L412) and retrieved from the metadata at `load_dataset` time using [`datasets.features.features.from_arrow_schema`](https://github.com/huggingface/datasets/blob/5f810b7011a8a4ab077a1847c024d2d9e267b065/src/datasets/features/features.py#L1602). This will need to be replicated for `parquet` via calls to [this api](https://arrow.apache.org/docs/python/generated/pyarrow.parquet.write_metadata.html) from `io.parquet.ParquetWriter` and `io.parquet.ParquetReader` [respectively](https://github.com/huggingface/datasets/blob/5f810b7011a8a4ab077a1847c024d2d9e267b065/src/datasets/io/parquet.py#L104). Any other important considerations?
The idea would be to allow this : ```python ds.to_parquet("my_dataset/ds.parquet") reloaded = load_dataset("my_dataset") assert ds.features == reloaded.features ``` And it should also work with Image and Audio types (right now they're reloaded as a dict type) This can be implemented by storing and reading the feature types in the parquet metadata, as we do for arrow files.
320
66
Reload features from Parquet metadata The idea would be to allow this : ```python ds.to_parquet("my_dataset/ds.parquet") reloaded = load_dataset("my_dataset") assert ds.features == reloaded.features ``` And it should also work with Image and Audio types (right now they're reloaded as a dict type) This can be implemented by storing and reading the feature types in the parquet metadata, as we do for arrow files. I'd be happy to have a look, if nobody else has started working on this yet @lhoestq. It seems to me that for the `arrow` format features are currently attached as metadata [in `datasets.arrow_writer`](https://github.com/huggingface/datasets/blob/5f810b7011a8a4ab077a1847c024d2d9e267b065/src/datasets/arrow_writer.py#L412) and retrieved from the metadata at `load_dataset` time using [`datasets.features.features.from_arrow_schema`](https://github.com/huggingface/datasets/blob/5f810b7011a8a4ab077a1847c024d2d9e267b065/src/datasets/features/features.py#L1602). This will need to be replicated for `parquet` via calls to [this api](https://arrow.apache.org/docs/python/generated/pyarrow.parquet.write_metadata.html) from `io.parquet.ParquetWriter` and `io.parquet.ParquetReader` [respectively](https://github.com/huggingface/datasets/blob/5f810b7011a8a4ab077a1847c024d2d9e267b065/src/datasets/io/parquet.py#L104). Any other important considerations?
[ -1.166128158569336, -0.8522657752037048, -0.7657282948493958, 1.5049726963043213, -0.08720782399177551, -1.2787712812423706, 0.06049301102757454, -1.0508406162261963, 1.6568968296051025, -0.6973925232887268, 0.29063931107521057, -1.6855441331863403, 0.01580018177628517, -0.5152422189712524, -0.780817985534668, -0.8544712066650391, -0.2755289673805237, -0.8104838728904724, 0.9855679869651794, 2.5073366165161133, 1.1969656944274902, -1.3373557329177856, 2.7121987342834473, 0.6612936854362488, -0.347092866897583, -0.9985063076019287, 0.5319368839263916, 0.10894077271223068, -1.3273167610168457, -0.40854090452194214, -0.9157127141952515, 0.01319215539842844, -0.4828704297542572, -0.5820867419242859, 0.08962636440992355, 0.4645093083381653, -0.26676657795906067, -0.4418029189109802, -0.5833626389503479, -0.7484051585197449, 0.4366401433944702, -0.2937304973602295, 0.8608614206314087, -0.28311896324157715, 1.8041636943817139, -0.5827202200889587, 0.3003254234790802, 0.6405613422393799, 1.3563536405563354, 0.13258518278598785, -0.025196928530931473, 0.1941850185394287, 0.389506459236145, 0.04408350586891174, 0.475769579410553, 1.2055507898330688, 0.6393111348152161, 0.4758579432964325, 0.6746298670768738, -2.1982638835906982, 1.3875107765197754, -0.9749854803085327, 0.2755892872810364, 1.2977155447006226, -0.9379362463951111, 0.3205832242965698, -1.8186241388320923, -0.0316561795771122, 0.5607110261917114, -2.261990547180176, 0.19094885885715485, -1.4307864904403687, -0.5129532217979431, 1.011898159980774, 0.2066202163696289, -1.1861971616744995, 0.3199566900730133, -0.5382229685783386, 1.0774061679840088, 0.5344575643539429, 1.1884316205978394, -1.7001851797103882, -0.06945884972810745, -0.2561550438404083, 0.08088139444589615, -1.3146356344223022, -1.5655441284179688, 0.5841450095176697, 0.7286134362220764, 0.6058734655380249, -0.06147563084959984, 0.9925438761711121, -0.9900855422019958, 0.7534069418907166, -0.9155459403991699, -1.6444525718688965, -1.3304595947265625, -2.190937042236328, -2.274709939956665, 0.7869008779525757, -0.4983538091182709, -0.4219311773777008, 1.9848263263702393, -1.0609935522079468, -1.8603849411010742, 1.0346001386642456, 0.3141993284225464, -0.010380635969340801, 2.3687496185302734, 0.259213387966156, -0.7175965309143066, 0.36442285776138306, -0.6959608793258667, 0.7507138252258301, -0.323681503534317, 1.3556606769561768, 0.5445585250854492, -0.9948133826255798, 1.572984218597412, -0.4040236175060272, 0.5408956408500671, -0.7112530469894409, -0.4997037947177887, -0.7628229856491089, 0.36346182227134705, 1.9890174865722656, -0.3847753405570984, 1.6188663244247437, -0.4035613238811493, -1.6001455783843994, -1.5282740592956543, 0.779613196849823, 0.5972475409507751, -0.8086219429969788, 0.03454599156975746, -0.46822816133499146, 0.10948508232831955, -0.007263755425810814, 1.1645513772964478, 1.2348544597625732, 0.7799078226089478, -0.386939138174057, -0.8364781737327576, 0.24404332041740417, 0.07130180299282074, -0.5927897095680237, -1.9026762247085571, -0.32026469707489014, 0.23342549800872803, 0.6741728186607361, -1.2056591510772705, 1.6207847595214844, 0.8595242500305176, 1.9365309476852417, 1.0467848777770996, -0.3756566643714905, 1.5724585056304932, 0.07827254384756088, 1.9095925092697144, -0.5497377514839172, 0.67303067445755, -0.3682696223258972, -1.125145673751831, 0.8495664596557617, -0.28096166253089905, -2.0040442943573, -0.7922145128250122, -0.8381040692329407, -0.21781033277511597, -0.7945785522460938, 0.8087286949157715, -0.3200450837612152, -1.4968878030776978, 0.18022331595420837, -0.6393817067146301, 0.11383824795484543, -1.1932241916656494, 0.24545150995254517, 0.7740662097930908, -0.6147012710571289, -0.03283749520778656, -0.2941444218158722, -1.3056954145431519, -0.4352692663669586, 0.26738157868385315, 1.8910698890686035, -0.6332847476005554, 0.9162420034408569, 1.1026097536087036, -0.691438615322113, 0.11976832896471024, 0.27947232127189636, -0.26379621028900146, 0.832250714302063, -1.1110711097717285, -0.3119948208332062, 1.1224244832992554, -0.13513876497745514, -0.6956499218940735, 1.4270572662353516, 0.8128250241279602, -0.9901465773582458, -0.22567568719387054, -0.17961397767066956, -0.7554571032524109, -0.033583614975214005, -1.532078504562378, -0.1552267223596573, 0.3557894825935364, -1.4553993940353394, -0.4543572962284088, -0.2173893302679062, 1.3614903688430786, -0.22572386264801025, 1.4175523519515991, -0.2850441038608551, -0.2380525916814804, -0.3410777151584625, -0.4172995984554291, 0.12731006741523743, -0.22290968894958496, -0.6495075225830078, 0.276459664106369, -0.8497884273529053, 0.24742743372917175, 1.446478247642517, 0.4103681445121765, -0.0000623110681772232, 0.5462929606437683, 1.1063295602798462, 0.34074848890304565, -0.023006493225693703, -0.8472740054130554, -1.635358452796936, 2.022834062576294, -1.4922475814819336, 1.9491393566131592, 0.7707967162132263, 0.023722786456346512, -1.7407501935958862, -1.8580362796783447, 1.3577795028686523, 1.100498080253601, 2.430480480194092, 0.5226566195487976, 0.37057358026504517, -0.7337164878845215, -0.7080813646316528, 0.45658212900161743, -0.9864274859428406, -0.6721402406692505, 0.16196976602077484, 2.352548599243164, 1.7445231676101685, -0.5570558905601501, -0.2845264673233032, -0.9740018844604492, 1.2717299461364746, -0.10783686488866806, 0.22122038900852203, 2.014014720916748, -0.2719630300998688, -1.0432645082473755, 1.2552660703659058, -2.334014415740967, 0.1703900396823883, 2.019707441329956, 0.2743484079837799, 0.03769867867231369, -1.4285979270935059, -0.5906850695610046, -0.29710519313812256, -0.47309720516204834, -1.2798174619674683, 0.5363537669181824, -0.2727776765823364, -0.8916569352149963, -1.5156046152114868, 0.09839566051959991, -1.2224775552749634, -1.7817721366882324, 0.36533457040786743, 1.9261455535888672, 1.976911187171936, -0.7537160515785217, 1.5059047937393188, -0.39123764634132385, 0.08951464295387268, 1.2142654657363892, 1.3030774593353271, 3.1115782260894775, 1.8388687372207642, -1.2642550468444824, 0.836479127407074, -0.16450591385364532, -0.5232843160629272, 1.1842596530914307, -1.1535011529922485, 1.1590112447738647, -0.23671701550483704, -1.1423888206481934, -1.27802574634552, 1.0069679021835327, 0.517442524433136, 0.08341901749372482, -0.5086270570755005, 1.2176679372787476, 0.07822668552398682, 1.290497064590454, 0.5667592287063599, -0.4059784412384033, 0.6687669157981873, -0.35312196612358093, -0.5145277976989746, 1.5099413394927979, 0.14883409440517426, -1.4261252880096436, -2.241981029510498, -0.262012779712677, -0.7541356086730957, -0.042541950941085815, -0.5794057250022888, -1.0453050136566162, 1.7058790922164917, 0.4264082610607147, -1.308916449546814, -0.20881202816963196, -0.34316080808639526, -0.599912703037262, 2.548922538757324, -1.3687433004379272, -0.1488955169916153, -0.9979262351989746, -0.5892235040664673, 1.5934927463531494, -1.0973337888717651, -0.17157134413719177, -0.9165942072868347, -0.5847307443618774, -1.3676245212554932, -0.5430445671081543, -0.03339415043592453, -0.8593765497207642, 0.6780365705490112, 0.062008630484342575, -1.0968724489212036, -0.3034408390522003, -0.8064600825309753, 0.9857773780822754, -0.09126795083284378, 0.2032804638147354, 1.9729344844818115, 0.43451401591300964, -0.41468340158462524, 0.6345897912979126, 1.094288945198059, 0.5442547798156738, -0.663486123085022, 0.19755825400352478, -0.7554743885993958, 0.19922016561031342, -1.476860523223877, 0.26951777935028076, -2.8960747718811035, 0.694124162197113, -0.0913473591208458, -0.02563239261507988, -0.016301294788718224, -1.2901692390441895, 1.071969985961914, 2.704623222351074, -1.1639676094055176, 0.4613257050514221, 0.39291614294052124, 1.2303194999694824, -1.5131275653839111, 0.36282727122306824, -0.34616851806640625, 2.089186668395996, 0.2296508252620697, 1.2878800630569458, -0.5128033757209778, -2.0911052227020264, 0.5423080325126648, -1.2582796812057495, -1.1287347078323364, 0.8068790435791016, -0.8698359727859497, 0.1508963704109192, -1.4312938451766968, -0.15058493614196777, -0.9557117819786072, -1.2697515487670898, 0.8087766170501709, 0.1262379288673401, 0.3966159522533417, -0.6108567714691162, 0.43743351101875305, -2.042513608932495, -1.3130172491073608, -0.1895247846841812, -0.9573253393173218, 0.4723457396030426, -0.2981286942958832, 0.6025526523590088, -0.10718873888254166, 0.10698145627975464, 0.3492147624492645, 1.3386788368225098, 3.3658804893493652, 0.22551587224006653, 0.2891944348812103, -0.15857861936092377, -0.9825697541236877, 1.4508072137832642, 0.9761617183685303, -0.13106705248355865, -0.5203759074211121, -1.0447627305984497, 1.236452579498291, 2.0396504402160645, 1.1655914783477783, 0.038674600422382355, -0.890634298324585, -0.8888025283813477, 0.07354969531297684, 0.13238713145256042, 0.44440966844558716, 0.8840844035148621, 0.028352603316307068, 0.16359543800354004, 1.3824695348739624, 1.2275410890579224, -0.39912939071655273, 0.4784576892852783, -0.9681817889213562, -0.42469513416290283, 0.4111097753047943, 0.31171029806137085, 0.0364641435444355, 0.37965911626815796, -1.063448429107666, -0.25779634714126587, -0.3848341405391693, -0.9299056529998779, -0.6770111918449402, -0.47277238965034485, -0.3407593071460724, 1.6333539485931396, 0.1309337317943573, -0.469963014125824, -0.02048889547586441, -0.8329402208328247, -0.16476450860500336, -1.0787872076034546, 0.2756507098674774, -0.13087916374206543, -0.06374718993902206, -0.007834641262888908, 1.704666018486023, -0.955429196357727, -2.0799286365509033, 0.24990734457969666, 0.20404545962810516, -0.4429069459438324, 0.23107518255710602, 1.7384105920791626, 0.6161502003669739, 1.339661955833435, 1.2623109817504883, 1.0042564868927002, -0.631015419960022, -1.274401307106018, 0.6343745589256287, 0.8958552479743958, -1.4155473709106445, 0.9209553599357605, -0.1073501706123352, -0.47310671210289, 0.6920619606971741, 1.3286874294281006, 0.3983272314071655, -2.069479465484619, 0.7562025785446167, -0.799506425857544, 0.5768144726753235, 0.6499844789505005, 0.7772071957588196, 0.24180403351783752, 0.8506877422332764, -1.2288986444473267, -1.1337236166000366, -0.752056360244751, -0.6087486743927002, 1.9152085781097412, -0.15688994526863098, 0.5490359663963318, -0.20599432289600372, -1.2998251914978027, -0.1558849960565567, 0.7715120911598206, 0.35938912630081177, -0.5439833998680115, 0.805890679359436, -0.5792946219444275, -1.0294297933578491, -1.3405725955963135, -0.5373552441596985, -1.008212924003601, -0.915287971496582, 0.9603697657585144, 0.8146182298660278, 0.3910311162471771, 1.9397914409637451, 0.5357440710067749, 0.25145089626312256, -2.686978578567505, 0.8688622117042542, 0.2772599160671234, 0.0019465312361717224, 0.9632927179336548, 0.24327006936073303, 1.099098563194275, -0.03236817568540573, 0.5794352889060974, -2.339465856552124, 2.2283074855804443, -0.25378113985061646, 0.736855685710907, 0.09483681619167328, -0.26120203733444214, 1.0940158367156982, 0.4947170317173004, 0.6865033507347107, -1.2140036821365356, 0.7303372025489807, -0.6194040775299072, 1.1327402591705322, 0.9570043683052063, -0.8749165534973145, -0.023377802222967148, 1.43131685256958, 0.42790496349334717, -0.485682874917984, -0.905076801776886, -0.9416894316673279, 0.9182814359664917, 1.7101421356201172, -0.05868778005242348, 0.0040005287155508995, 0.8923141360282898, 0.6456617116928101, -1.302624225616455, 0.11143463104963303, -0.782228946685791, -0.676077127456665, 1.6669715642929077, 2.09682297706604, -0.11536730825901031, -0.22176364064216614, -0.7874791622161865, -1.1292672157287598, 0.7371090650558472, -0.07919033616781235, 0.1614411175251007, 0.6501829624176025, -0.7389017343521118, 1.1694023609161377, 0.75981205701828, 0.9625324010848999, 0.0037168124690651894, 0.40890979766845703, 0.41860610246658325, -0.28881317377090454, -1.210558295249939, -0.3941992223262787, -1.1092143058776855, -2.5566611289978027, 0.5219517946243286, -0.24170206487178802, -1.4119043350219727, 0.03888583183288574, -1.145919919013977, 0.8696662783622742, -0.6609437465667725, -1.048940896987915, -1.4493253231048584, 0.2615357041358948, -0.17201071977615356, 0.9273671507835388, -1.6668072938919067, -0.0849754810333252, 1.2298117876052856, 0.984815776348114, -0.5340144634246826, 1.0444310903549194, 0.21946105360984802, 1.0526435375213623, 0.9222211241722107, -0.36895909905433655, 0.5170557498931885, 0.14986318349838257, -1.261879324913025, 0.422726571559906, 1.2403632402420044, 0.25343337655067444, 1.444563627243042, -0.4950057864189148, 0.10043246299028397, 0.48230811953544617, -0.5668696165084839, -0.41681021451950073, -0.5163122415542603, 0.7251970171928406, 0.07441247254610062, -0.9442899823188782, 0.08767033368349075, -0.05976007133722305, -0.20167841017246246, 0.17269062995910645, -1.4912430047988892, -0.26968860626220703, -0.32668542861938477, -0.5666935443878174, -1.2143412828445435, 0.0358009934425354, 1.3322416543960571, -0.8590923547744751, -0.21031169593334198, 0.42972686886787415, 0.4117669463157654, 0.555508017539978, 0.5520118474960327, -0.7097296118736267, -0.3582523763179779, -0.21737012267112732, -0.4060491919517517, 0.3444514274597168, 1.293097972869873, -0.09453384578227997, -0.9380242228507996, 0.6510604023933411, -0.39206454157829285, 0.014748736284673214, 2.011483669281006, 0.003776176832616329, -0.7408973574638367, 0.26057037711143494, -0.642830491065979, 1.8681089878082275, 1.7031853199005127, 1.377119779586792, -0.1800169199705124, -0.9416349530220032, 0.5655480027198792, -0.23431983590126038, -0.3631250262260437, 0.987801730632782, 0.4267354905605316, -0.12418736517429352, -1.442790150642395, 0.5246922969818115, 1.2576745748519897, -0.9279834628105164, -0.7037333846092224, 0.004483657889068127, -0.8086371421813965, 1.109383463859558, 0.6197692155838013, 0.2818252742290497, 0.24530604481697083, 1.5809065103530884, 0.6816832423210144, -0.46841832995414734, 0.5433765649795532, 0.43137457966804504, -0.19155287742614746, -2.2369771003723145, -1.0266424417495728, 0.2820647656917572, -0.3318285644054413, -1.6382919549942017, 1.3104218244552612, -1.227376103401184, -0.9563271999359131, 0.483694851398468, 0.1340819150209427, 1.4762521982192993, 0.2478204071521759, 1.7350921630859375, 2.1185779571533203, 0.9279861450195312, 0.26634639501571655, 1.29953932762146, -0.04121904820203781, -0.5250836610794067, 1.7743970155715942, -0.5007864832878113, 0.5146338939666748, 1.0427802801132202, -0.35716190934181213, -1.0639731884002686, -0.7808889150619507, -1.2086129188537598, -0.6730157136917114, 1.182718276977539, 0.12043044716119766, -1.1546672582626343, 0.22748087346553802, 1.6051422357559204, 0.09585153311491013, -0.303433895111084, 0.755395770072937, 0.4679127633571625, -0.7041193842887878, -0.05793740600347519, -0.8694581985473633, 0.4308265149593353, -0.1646967977285385, -0.3339192867279053, 0.2817707359790802, 0.41992998123168945, 1.2725979089736938, 0.014806847088038921, 0.09135405719280243, 1.255250334739685, -1.4358203411102295, 1.5191985368728638, -0.5927366614341736, 0.3267058730125427, -2.4090044498443604, 1.445675015449524, -0.8640136122703552, 1.885364055633545, -2.568359851837158, 0.480408638715744, -0.588442862033844, -0.4682234227657318, 0.29217496514320374, -0.39051553606987, 0.09777761995792389, -0.1102423295378685, -1.020317792892456, -0.12724532186985016, -0.7959486842155457, 0.6183938980102539, 1.1061936616897583, 1.353842854499817, -1.1609134674072266, -0.2380298525094986, -1.8564585447311401, -0.24046163260936737, -0.6892510652542114, 0.2588161826133728, -1.9796476364135742, -0.16361570358276367, -2.001203775405884, -2.403883695602417, -1.4959137439727783, -0.8131831288337708, 0.9743913412094116, 0.15843826532363892, -0.880588173866272, 1.0670419931411743, -0.38597992062568665, -1.9135740995407104, 1.1088277101516724, -2.155219793319702 ]
https://github.com/huggingface/datasets/issues/5482
Reload features from Parquet metadata
Thanks @MFreidank ! That's correct :) Reading the metadata to infer the features can be ideally done in the `parquet.py` file in `packaged_builder` when a parquet file is read. You can cast the arrow table to the schema you get from the features.arrow_schema
The idea would be to allow this : ```python ds.to_parquet("my_dataset/ds.parquet") reloaded = load_dataset("my_dataset") assert ds.features == reloaded.features ``` And it should also work with Image and Audio types (right now they're reloaded as a dict type) This can be implemented by storing and reading the feature types in the parquet metadata, as we do for arrow files.
320
43
Reload features from Parquet metadata The idea would be to allow this : ```python ds.to_parquet("my_dataset/ds.parquet") reloaded = load_dataset("my_dataset") assert ds.features == reloaded.features ``` And it should also work with Image and Audio types (right now they're reloaded as a dict type) This can be implemented by storing and reading the feature types in the parquet metadata, as we do for arrow files. Thanks @MFreidank ! That's correct :) Reading the metadata to infer the features can be ideally done in the `parquet.py` file in `packaged_builder` when a parquet file is read. You can cast the arrow table to the schema you get from the features.arrow_schema
[ -1.197356939315796, -0.8986155390739441, -0.824112057685852, 1.652525544166565, -0.22901135683059692, -1.4266657829284668, 0.11700111627578735, -1.1063463687896729, 1.7173707485198975, -0.9330558776855469, 0.4493255317211151, -1.6518818140029907, 0.18065370619297028, -0.5315032005310059, -0.8650293946266174, -0.8744242787361145, -0.39859554171562195, -0.7281120419502258, 0.9813159108161926, 2.3146610260009766, 1.2427312135696411, -1.3126721382141113, 2.634401559829712, 0.6757102012634277, -0.3517187237739563, -1.097568392753601, 0.5405280590057373, 0.10804440826177597, -1.2759546041488647, -0.4545741677284241, -0.9242809414863586, -0.06435653567314148, -0.5048209428787231, -0.6254276633262634, 0.05199965089559555, 0.4971219003200531, -0.33621394634246826, -0.5035799145698547, -0.5334101915359497, -0.8591989874839783, 0.427604615688324, -0.30020004510879517, 0.8757020831108093, -0.45163312554359436, 1.754723310470581, -0.5381386280059814, 0.32265931367874146, 0.7396199107170105, 1.4571988582611084, 0.10785647481679916, -0.2014254778623581, 0.20648112893104553, 0.38735365867614746, 0.01968848705291748, 0.4697006940841675, 1.1148533821105957, 0.5219227075576782, 0.6293641328811646, 0.8084204792976379, -2.2139101028442383, 1.4240822792053223, -1.1237387657165527, 0.2429778277873993, 1.2706961631774902, -0.9562649130821228, 0.3358977138996124, -1.7389613389968872, -0.04961206391453743, 0.5027164816856384, -2.317227840423584, 0.25121501088142395, -1.3334324359893799, -0.5789685845375061, 0.9791662096977234, 0.26975950598716736, -1.1803619861602783, 0.1170145720243454, -0.4322812855243683, 0.964668869972229, 0.5458190441131592, 1.020480751991272, -1.5946145057678223, 0.02896272763609886, -0.37009143829345703, -0.048977505415678024, -1.3751699924468994, -1.4509575366973877, 0.5594136714935303, 0.7423819303512573, 0.5844860076904297, -0.01742924004793167, 1.1306928396224976, -0.9475863575935364, 0.8126603960990906, -0.8838454484939575, -1.5829271078109741, -1.2913274765014648, -2.191009044647217, -2.140284776687622, 0.7464597821235657, -0.5831477046012878, -0.5773053169250488, 2.1558046340942383, -1.0629140138626099, -1.7608540058135986, 1.181330919265747, 0.1904904991388321, -0.01676524430513382, 2.386993408203125, 0.18869386613368988, -0.5979955196380615, 0.4278184771537781, -0.5965043902397156, 0.8883134126663208, -0.48728498816490173, 1.3369220495224, 0.4365708827972412, -1.019484043121338, 1.593902826309204, -0.3525146543979645, 0.6051939725875854, -0.5946205258369446, -0.6054763793945312, -0.8387190103530884, 0.38928481936454773, 1.8661398887634277, -0.299023300409317, 1.5653719902038574, -0.32127025723457336, -1.5315839052200317, -1.6126246452331543, 0.8705964088439941, 0.5517840385437012, -0.8005731701850891, 0.13316574692726135, -0.271208256483078, 0.08227633684873581, -0.07217353582382202, 1.1999071836471558, 1.2632356882095337, 0.8074727058410645, -0.32203173637390137, -0.7901197671890259, 0.276738703250885, 0.06924188882112503, -0.6435471773147583, -1.8896210193634033, -0.393441766500473, 0.11887122690677643, 0.6473596692085266, -1.121579885482788, 1.6302636861801147, 0.9739478230476379, 1.951797604560852, 0.9790815711021423, -0.26450303196907043, 1.551019549369812, 0.05096283555030823, 1.8461462259292603, -0.4310395121574402, 0.7527521252632141, -0.3965461254119873, -1.101696491241455, 0.8190789818763733, -0.2634637951850891, -1.9903706312179565, -0.8270097970962524, -0.9110689759254456, -0.22018690407276154, -0.6869692206382751, 0.9559338092803955, -0.4414728879928589, -1.4144452810287476, 0.19186164438724518, -0.5761714577674866, 0.15703411400318146, -1.2042572498321533, 0.39469626545906067, 0.622538685798645, -0.6219372153282166, 0.018976666033267975, -0.331773966550827, -1.2047172784805298, -0.476826012134552, 0.3398716449737549, 1.8961031436920166, -0.794295608997345, 0.9351632595062256, 1.0111795663833618, -0.7670676112174988, -0.020557522773742676, 0.1989826112985611, -0.22401730716228485, 0.8128617405891418, -0.993859589099884, -0.5068449974060059, 1.197758674621582, -0.1870531290769577, -0.7607854604721069, 1.5178495645523071, 0.6836490035057068, -0.8379059433937073, -0.11438602954149246, -0.2718888223171234, -0.7867007255554199, -0.03237422555685043, -1.529038429260254, -0.08237875252962112, 0.3707934617996216, -1.502029538154602, -0.4411148130893707, -0.13502365350723267, 1.3084676265716553, -0.21985870599746704, 1.3950430154800415, -0.4758143424987793, -0.42794162034988403, -0.26933151483535767, -0.3664124011993408, 0.12664589285850525, -0.04770056530833244, -0.6555837392807007, 0.1317361444234848, -0.7657427191734314, 0.20734703540802002, 1.4043352603912354, 0.3307448625564575, 0.07872479408979416, 0.6232103109359741, 1.0859228372573853, 0.36390218138694763, 0.03721529245376587, -0.8886197805404663, -1.4941177368164062, 2.0416321754455566, -1.5799968242645264, 1.9764784574508667, 0.6485236883163452, -0.011858830228447914, -1.7900702953338623, -1.8326544761657715, 1.3711068630218506, 1.2213512659072876, 2.197845697402954, 0.608586847782135, 0.36247530579566956, -0.7801719307899475, -0.672020673751831, 0.48910439014434814, -1.093462586402893, -0.6803340911865234, 0.09815622866153717, 2.2680914402008057, 1.78524911403656, -0.44856980443000793, -0.2145557552576065, -0.983906626701355, 1.3666110038757324, -0.05756966397166252, 0.26443955302238464, 1.8923299312591553, -0.3134823143482208, -1.094368815422058, 1.1839079856872559, -2.373814821243286, 0.07730624079704285, 1.9759904146194458, 0.3403264582157135, 0.06225745379924774, -1.390759825706482, -0.5146017074584961, -0.1871463656425476, -0.4648860991001129, -1.2964248657226562, 0.505133867263794, -0.36685141921043396, -0.7610026001930237, -1.3923430442810059, 0.22919510304927826, -1.1453777551651, -1.747166395187378, 0.33975905179977417, 2.011702299118042, 1.9824734926223755, -0.6470838189125061, 1.640733242034912, -0.40008634328842163, 0.12733876705169678, 1.2576903104782104, 1.2410370111465454, 3.0604422092437744, 1.9941842555999756, -1.2039942741394043, 0.6399956345558167, -0.027892880141735077, -0.4941721558570862, 1.223335862159729, -1.1678764820098877, 1.2787535190582275, -0.09922300279140472, -1.0441330671310425, -1.2887150049209595, 0.8577021360397339, 0.42622652649879456, 0.11792358756065369, -0.5063069462776184, 1.2862579822540283, 0.07429657131433487, 1.206525206565857, 0.514724612236023, -0.44248679280281067, 0.6517066359519958, -0.3778119385242462, -0.5538732409477234, 1.6052871942520142, 0.1412314921617508, -1.3827940225601196, -2.18782377243042, -0.22211460769176483, -0.6541573405265808, 0.11898091435432434, -0.499667227268219, -0.9203361868858337, 1.8647356033325195, 0.3484223484992981, -1.386486530303955, -0.26051393151283264, -0.3928085267543793, -0.6169254779815674, 2.7539405822753906, -1.3563857078552246, -0.26260024309158325, -0.9806130528450012, -0.6362497806549072, 1.7119054794311523, -1.2296104431152344, -0.23640352487564087, -0.9701269865036011, -0.43040212988853455, -1.4303457736968994, -0.5432461500167847, -0.06120210513472557, -0.947479248046875, 0.8131091594696045, 0.10860449075698853, -1.1885900497436523, -0.5022050738334656, -0.7593934535980225, 0.9276220202445984, -0.09880468249320984, 0.22476108372211456, 2.0301854610443115, 0.46767276525497437, -0.4078962206840515, 0.7159561514854431, 1.0785341262817383, 0.5966822504997253, -0.6020704507827759, 0.34436798095703125, -0.577786922454834, 0.3403293192386627, -1.324242115020752, 0.2768702805042267, -2.9530205726623535, 0.6654644012451172, -0.1441916823387146, -0.050852660089731216, -0.09140971302986145, -1.3163652420043945, 1.0003718137741089, 2.6846017837524414, -1.1033647060394287, 0.3825972378253937, 0.24784338474273682, 1.274509072303772, -1.5272352695465088, 0.42020976543426514, -0.38804927468299866, 2.169113874435425, 0.11828573048114777, 1.2378724813461304, -0.552655041217804, -2.159834146499634, 0.6107110977172852, -1.143254041671753, -1.2225004434585571, 0.7763847708702087, -0.795657217502594, 0.08092565834522247, -1.4151334762573242, -0.23568035662174225, -0.8898667097091675, -1.207424521446228, 0.8561861515045166, 0.35496047139167786, 0.37569403648376465, -0.6527884006500244, 0.35577118396759033, -2.147000789642334, -1.3694086074829102, -0.27404093742370605, -0.891340970993042, 0.4531780481338501, -0.4202296733856201, 0.6178092956542969, -0.21895858645439148, 0.1848262995481491, 0.3679087162017822, 1.4436839818954468, 3.3707849979400635, 0.19544318318367004, 0.3472498655319214, -0.3373137414455414, -0.9133321046829224, 1.4660825729370117, 0.980375349521637, -0.10093409568071365, -0.4872611463069916, -1.0792287588119507, 1.1884108781814575, 1.9561808109283447, 0.9318568706512451, 0.011488503776490688, -0.8131179809570312, -0.7743874788284302, -0.09196383506059647, 0.07107384502887726, 0.5755916833877563, 0.8622050881385803, 0.09190090745687485, 0.17038503289222717, 1.4300141334533691, 1.2256280183792114, -0.37124866247177124, 0.4564805030822754, -0.8638545870780945, -0.418292760848999, 0.399934858083725, 0.45659980177879333, -0.05884784087538719, 0.33473315834999084, -0.8985674977302551, -0.2524418234825134, -0.43022632598876953, -0.9563489556312561, -0.6284780502319336, -0.3810054361820221, -0.43671295046806335, 1.6631724834442139, 0.19754533469676971, -0.5576377511024475, -0.10871297866106033, -0.8038687705993652, -0.07592269778251648, -1.0961332321166992, 0.3137667775154114, -0.11653531342744827, -0.16453774273395538, -0.02347365766763687, 1.8076363801956177, -0.9924959540367126, -2.1023995876312256, 0.3380762040615082, 0.13473127782344818, -0.3247378468513489, 0.3215014636516571, 1.6190003156661987, 0.5528466701507568, 1.3462063074111938, 1.3929955959320068, 0.9493647217750549, -0.6791850924491882, -1.3562588691711426, 0.6448096632957458, 0.873827338218689, -1.5789648294448853, 0.831180214881897, 0.047971006482839584, -0.4665212333202362, 0.665213942527771, 1.229390025138855, 0.4322235584259033, -2.124032974243164, 0.7682495713233948, -0.8751710653305054, 0.7119725942611694, 0.8399406671524048, 0.660689651966095, 0.3606356382369995, 0.8606913089752197, -1.0577545166015625, -1.2258435487747192, -0.7899653911590576, -0.8131231069564819, 1.8640191555023193, -0.27352672815322876, 0.61605304479599, -0.15857873857021332, -1.3502761125564575, -0.14029274880886078, 0.6702004671096802, 0.31402936577796936, -0.37807315587997437, 0.7571042776107788, -0.5977801084518433, -1.089096188545227, -1.4876981973648071, -0.5568875670433044, -1.0433648824691772, -0.9626937508583069, 0.9314501881599426, 0.8746347427368164, 0.23154813051223755, 1.8930785655975342, 0.588588535785675, 0.19692237675189972, -2.6205639839172363, 0.8634592294692993, 0.3450780212879181, 0.03133942186832428, 0.7776934504508972, 0.34535646438598633, 1.010092854499817, -0.08522506803274155, 0.4817979633808136, -2.354525566101074, 2.318755626678467, -0.3741154968738556, 0.7617941498756409, 0.0972074642777443, -0.2512561082839966, 1.1174278259277344, 0.5337002873420715, 0.7055724263191223, -1.0619858503341675, 0.6993406414985657, -0.6564605832099915, 1.3399245738983154, 1.0052180290222168, -0.7790842652320862, -0.04310399293899536, 1.5249601602554321, 0.494355708360672, -0.6694915294647217, -0.8955290913581848, -1.0331815481185913, 0.8745025992393494, 1.6973719596862793, -0.04908352717757225, 0.06677335500717163, 0.7752470374107361, 0.5849260687828064, -1.1732853651046753, 0.1450112909078598, -0.8490607738494873, -0.7513859272003174, 1.5956443548202515, 1.9987168312072754, -0.19132322072982788, -0.1897548884153366, -0.7774776220321655, -1.1300723552703857, 0.789534330368042, -0.11886972934007645, 0.09077027440071106, 0.6127458214759827, -0.7682526707649231, 1.0573887825012207, 0.8763037323951721, 0.8297094702720642, 0.030346065759658813, 0.4985904395580292, 0.40858280658721924, -0.2855953276157379, -1.1819040775299072, -0.24935315549373627, -1.0985195636749268, -2.559138536453247, 0.47156864404678345, -0.3043905198574066, -1.3128209114074707, -0.045497942715883255, -1.194129228591919, 0.9160991907119751, -0.6574531197547913, -0.9979373812675476, -1.495161771774292, 0.06492383778095245, -0.13124646246433258, 0.8350481390953064, -1.503463625907898, -0.08657541126012802, 1.2569265365600586, 0.9811083078384399, -0.7270880341529846, 1.058221697807312, 0.15959638357162476, 1.2156363725662231, 0.881472110748291, -0.4329412281513214, 0.5364231467247009, -0.0700560212135315, -1.279871940612793, 0.4855724275112152, 1.0497932434082031, 0.19436514377593994, 1.4754881858825684, -0.5101305842399597, 0.001809508539736271, 0.3976494371891022, -0.5574639439582825, -0.35766783356666565, -0.640601634979248, 0.7739342451095581, -0.05797411501407623, -0.8195227384567261, 0.24242597818374634, -0.021871954202651978, -0.2911994457244873, 0.17933794856071472, -1.6024833917617798, -0.2502267360687256, -0.33062803745269775, -0.5656691789627075, -1.2572226524353027, -0.029408156871795654, 1.3834270238876343, -0.6870300769805908, -0.2120310664176941, 0.4237339496612549, 0.42365941405296326, 0.5497339367866516, 0.5604960918426514, -0.743972659111023, -0.2977128326892853, -0.20040930807590485, -0.3036595284938812, 0.4804275333881378, 1.395500659942627, -0.13711948692798615, -0.8467771410942078, 0.6679890155792236, -0.22345596551895142, 0.003366183489561081, 2.021271228790283, 0.02758241444826126, -0.6782112717628479, 0.25692012906074524, -0.72356778383255, 1.8527849912643433, 1.6438459157943726, 1.2601737976074219, -0.18130585551261902, -0.9483522772789001, 0.6067772507667542, -0.3177184462547302, -0.29360300302505493, 0.8339720964431763, 0.47367995977401733, -0.07173128426074982, -1.3715600967407227, 0.7087975144386292, 1.1460611820220947, -0.8249965906143188, -0.8654329180717468, -0.025475408881902695, -0.6093971133232117, 1.0090268850326538, 0.65117347240448, 0.47094616293907166, 0.3379901051521301, 1.6259400844573975, 0.7531342506408691, -0.4574190378189087, 0.4284696877002716, 0.49840328097343445, -0.1539212316274643, -2.1494929790496826, -1.1146626472473145, 0.33407071232795715, -0.5397812724113464, -1.7252144813537598, 1.395240306854248, -1.2274855375289917, -0.9242529273033142, 0.48489606380462646, 0.1288546472787857, 1.5630474090576172, 0.310687780380249, 1.5594202280044556, 2.022128105163574, 0.967970073223114, 0.4336630702018738, 1.44560968875885, -0.14552469551563263, -0.5846702456474304, 1.8266828060150146, -0.5531732439994812, 0.29140156507492065, 1.1254154443740845, -0.3580901026725769, -0.9722739458084106, -0.8134610652923584, -1.2233027219772339, -0.7091661095619202, 1.176225185394287, 0.11337845772504807, -1.1357464790344238, 0.16805317997932434, 1.4853858947753906, 0.10773811489343643, -0.34027159214019775, 0.6569346785545349, 0.3524697721004486, -0.8079434633255005, -0.036479800939559937, -0.7964635491371155, 0.46016645431518555, -0.21671155095100403, -0.4658314287662506, 0.45520010590553284, 0.2745627462863922, 1.290725588798523, -0.07247760891914368, 0.14978443086147308, 1.184443712234497, -1.518231749534607, 1.3864409923553467, -0.5768114328384399, 0.2493399977684021, -2.340529680252075, 1.4993464946746826, -0.8004809021949768, 1.960145354270935, -2.672863006591797, 0.5406248569488525, -0.6862595081329346, -0.47403937578201294, 0.41001224517822266, -0.4256007671356201, 0.11618809401988983, -0.15522387623786926, -1.071869969367981, 0.05223705992102623, -0.6747341752052307, 0.5691299438476562, 1.1204252243041992, 1.2943730354309082, -1.1728100776672363, -0.30570414662361145, -1.8373888731002808, -0.1977592408657074, -0.6701253652572632, 0.35629087686538696, -2.1613733768463135, -0.19232672452926636, -1.9425337314605713, -2.3265554904937744, -1.3486555814743042, -0.8691962957382202, 1.0360313653945923, 0.16500632464885712, -0.791840136051178, 1.1263988018035889, -0.3094838559627533, -1.8602148294448853, 1.084688425064087, -2.0885112285614014 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
Hi ! Sure :) you can comment `#self-assign` to assign yourself to this issue. I can give you some pointers to get started: `load_dataset` works roughly this way: 1. it instantiate a dataset builder using `load_dataset_builder()` 2. the builder download and prepare the dataset as Arrow files in the cache using `download_and_prepare()` 3. the builder returns a Dataset object with `as_dataset()` One way to approach this would be to implement `as_iterable_dataset()` in `builder.py`. And similarly to `as_dataset()`, you can use the `ArrowReader`. It has a `get_file_instructions()` method that can be helpful. It gives you the files to read as list of dictionaries with those keys: `filename`, `skip` and `take`. The `skip` and `take` arguments are used in case the user wants to load a subset of the dataset, e.g. ```python load_dataset(..., split="train[:10]") ``` Let me know if you have questions or if I can help :)
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
146
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True Hi ! Sure :) you can comment `#self-assign` to assign yourself to this issue. I can give you some pointers to get started: `load_dataset` works roughly this way: 1. it instantiate a dataset builder using `load_dataset_builder()` 2. the builder download and prepare the dataset as Arrow files in the cache using `download_and_prepare()` 3. the builder returns a Dataset object with `as_dataset()` One way to approach this would be to implement `as_iterable_dataset()` in `builder.py`. And similarly to `as_dataset()`, you can use the `ArrowReader`. It has a `get_file_instructions()` method that can be helpful. It gives you the files to read as list of dictionaries with those keys: `filename`, `skip` and `take`. The `skip` and `take` arguments are used in case the user wants to load a subset of the dataset, e.g. ```python load_dataset(..., split="train[:10]") ``` Let me know if you have questions or if I can help :)
[ -1.1753803491592407, -0.8470456004142761, -0.704535961151123, 1.5490326881408691, -0.16414037346839905, -1.296331524848938, 0.1660868376493454, -1.0722166299819946, 1.7976151704788208, -0.8254375457763672, 0.452565997838974, -1.6749439239501953, 0.1041148230433464, -0.5741820335388184, -0.8720881938934326, -0.8487449884414673, -0.4964609146118164, -0.6868562698364258, 0.9176697731018066, 2.4053919315338135, 1.1874240636825562, -1.3788983821868896, 2.551947593688965, 0.6275684237480164, -0.0911039412021637, -1.045905351638794, 0.41641348600387573, -0.007401626091450453, -1.2553646564483643, -0.4678330719470978, -0.8747647404670715, -0.25170189142227173, -0.5792993903160095, -0.6937179565429688, 0.02321498468518257, 0.506144106388092, -0.3636367619037628, -0.46272367238998413, -0.4496559798717499, -0.8702599406242371, 0.5100427269935608, -0.4155951142311096, 0.9797112941741943, -0.36024466156959534, 1.8689303398132324, -0.5812743902206421, 0.5630451440811157, 0.739388644695282, 1.3768528699874878, 0.1733342707157135, -0.032651957124471664, 0.3575707972049713, 0.3540803790092468, 0.010270644910633564, 0.5607422590255737, 1.1404229402542114, 0.6161519289016724, 0.5619434118270874, 0.7432854175567627, -2.2447543144226074, 1.3005701303482056, -1.1305139064788818, 0.35136929154396057, 1.2400120496749878, -0.9333623647689819, 0.22444404661655426, -1.75714111328125, -0.07051091641187668, 0.45178431272506714, -2.1166117191314697, 0.30410388112068176, -1.402562141418457, -0.4468227028846741, 1.1624394655227661, 0.3768373727798462, -1.2253894805908203, 0.17121291160583496, -0.2652394473552704, 0.9524579644203186, 0.4624332785606384, 1.0806766748428345, -1.7026934623718262, 0.04199281707406044, -0.33688414096832275, 0.183277890086174, -1.205002784729004, -1.4102052450180054, 0.5068029761314392, 0.6343429088592529, 0.4969465434551239, -0.17068235576152802, 1.1220265626907349, -0.9220791459083557, 0.7722094058990479, -1.110730767250061, -1.738883137702942, -1.3889044523239136, -2.0694921016693115, -2.3559415340423584, 0.7805417776107788, -0.534845769405365, -0.5414363145828247, 2.098101854324341, -0.9888821840286255, -1.733560562133789, 1.1175010204315186, 0.2064868062734604, -0.03966287896037102, 2.2499427795410156, 0.16578686237335205, -0.6339535117149353, 0.4363425076007843, -0.6817351579666138, 0.8243951797485352, -0.3496858775615692, 1.3659496307373047, 0.41977477073669434, -1.1315865516662598, 1.601755976676941, -0.4030253291130066, 0.6010676026344299, -0.6951952576637268, -0.5626046657562256, -0.7505372166633606, 0.4003714621067047, 1.9202589988708496, -0.2960248291492462, 1.5415472984313965, -0.3156198561191559, -1.6011927127838135, -1.5700442790985107, 0.9590567946434021, 0.4404754936695099, -0.6526303291320801, 0.06368175148963928, -0.269589364528656, 0.12445108592510223, -0.04818589240312576, 1.1945631504058838, 1.2164920568466187, 0.8242869973182678, -0.34562185406684875, -0.7575188279151917, 0.21911939978599548, 0.021518956869840622, -0.7735646963119507, -1.706599473953247, -0.39485639333724976, 0.13504959642887115, 0.5354964137077332, -1.1206774711608887, 1.8195476531982422, 0.9062286615371704, 1.875744342803955, 1.0318344831466675, -0.20063158869743347, 1.5064544677734375, 0.06251366436481476, 1.959989309310913, -0.39325055480003357, 0.5850566625595093, -0.4031742513179779, -1.138027548789978, 0.8844049572944641, -0.3053632080554962, -2.1029052734375, -0.7553210854530334, -0.8234091997146606, -0.08561458438634872, -0.6881764531135559, 0.923909068107605, -0.25975194573402405, -1.4387032985687256, 0.18697991967201233, -0.6498610973358154, 0.0976007729768753, -1.1990457773208618, 0.36770957708358765, 0.7243331074714661, -0.767551064491272, 0.0957770124077797, -0.2860276401042938, -1.2599995136260986, -0.43568485975265503, 0.3057486414909363, 1.917799472808838, -0.8028834462165833, 0.9100988507270813, 1.0695593357086182, -0.7580296397209167, -0.13629058003425598, 0.31317609548568726, -0.29442599415779114, 0.7736629247665405, -1.042826771736145, -0.3836108148097992, 1.3042231798171997, -0.15177035331726074, -0.7228504419326782, 1.4823706150054932, 0.6966040730476379, -0.9377326369285583, -0.045732300728559494, -0.2596590220928192, -0.8089977502822876, -0.015007277950644493, -1.5771896839141846, 0.006238834001123905, 0.4190512001514435, -1.5704257488250732, -0.4230353832244873, -0.12032737582921982, 1.1709309816360474, -0.2281447947025299, 1.4578065872192383, -0.3460277020931244, -0.2500027120113373, -0.3529376983642578, -0.40041694045066833, 0.060067068785429, -0.12729142606258392, -0.7177569270133972, 0.17783606052398682, -0.6832394003868103, 0.37746214866638184, 1.3995270729064941, 0.28578925132751465, 0.007507083006203175, 0.46990299224853516, 1.1898179054260254, 0.3190101981163025, 0.05548591539263725, -0.8853219747543335, -1.5163087844848633, 1.9824564456939697, -1.4153258800506592, 1.9987684488296509, 0.6472620368003845, 0.010176855139434338, -1.7763112783432007, -1.7982162237167358, 1.3834149837493896, 1.1780588626861572, 2.3576912879943848, 0.5963364243507385, 0.34515225887298584, -0.8674122095108032, -0.5900440216064453, 0.46082863211631775, -1.0744826793670654, -0.7438571453094482, 0.19348257780075073, 2.399233102798462, 1.7812649011611938, -0.4036465883255005, -0.25479352474212646, -1.0253430604934692, 1.4939370155334473, -0.19402441382408142, 0.20680755376815796, 1.964361310005188, -0.1702088713645935, -1.1055989265441895, 1.3067594766616821, -2.303466320037842, 0.10698249936103821, 2.0062644481658936, 0.31104519963264465, 0.0742286890745163, -1.4092081785202026, -0.5773800015449524, -0.18029020726680756, -0.40277373790740967, -1.2623649835586548, 0.5277993083000183, -0.2936258912086487, -0.6814613938331604, -1.3622193336486816, 0.23021909594535828, -1.1092760562896729, -1.6440603733062744, 0.16385890543460846, 1.8459875583648682, 1.8400014638900757, -0.6002179384231567, 1.6522568464279175, -0.38627713918685913, 0.27693936228752136, 1.3443397283554077, 1.2310194969177246, 3.1605141162872314, 1.9817378520965576, -1.2741509675979614, 0.6200869083404541, -0.17217102646827698, -0.5820444226264954, 1.2724751234054565, -1.2013410329818726, 1.2327722311019897, -0.22333689033985138, -1.1948518753051758, -1.2655630111694336, 0.8980419039726257, 0.42876067757606506, 0.1399480402469635, -0.5185006856918335, 1.1923342943191528, 0.13834670186042786, 1.3141776323318481, 0.5657802224159241, -0.406377375125885, 0.6945808529853821, -0.4518759846687317, -0.5066813230514526, 1.5268678665161133, 0.24326041340827942, -1.2291204929351807, -2.2859275341033936, -0.16364432871341705, -0.896666407585144, 0.047521982342004776, -0.5189645290374756, -0.9453893303871155, 1.6716444492340088, 0.36120539903640747, -1.421177625656128, -0.2161579728126526, -0.29546937346458435, -0.6451694369316101, 2.7855794429779053, -1.324190616607666, -0.22227033972740173, -1.0282038450241089, -0.7837623953819275, 1.7575081586837769, -1.1836230754852295, -0.2363280951976776, -1.0018377304077148, -0.47245943546295166, -1.3267804384231567, -0.5897964239120483, -0.0093507319688797, -0.9104835987091064, 0.919873833656311, 0.15501494705677032, -1.3190574645996094, -0.4983649253845215, -0.853694498538971, 0.7971645593643188, -0.15366369485855103, 0.2370234876871109, 1.8600369691848755, 0.5153093338012695, -0.43155425786972046, 0.7317642569541931, 1.0827069282531738, 0.6056414246559143, -0.5745493769645691, 0.4230075180530548, -0.7015759944915771, 0.2840014100074768, -1.368558406829834, 0.2643931210041046, -2.8384478092193604, 0.6521497368812561, -0.05953937768936157, -0.09262222796678543, -0.08745019882917404, -1.3414908647537231, 0.9215880036354065, 2.701467275619507, -1.2694138288497925, 0.460967481136322, 0.31318604946136475, 1.1568629741668701, -1.6289701461791992, 0.28860583901405334, -0.4272685945034027, 2.1167232990264893, 0.1578243225812912, 1.2573046684265137, -0.45212340354919434, -2.301173686981201, 0.5568446516990662, -1.3458971977233887, -1.3469288349151611, 0.8470621705055237, -0.8562302589416504, -0.03017633780837059, -1.2782118320465088, -0.2248317450284958, -0.8377760648727417, -1.2021236419677734, 0.8382384181022644, 0.19998887181282043, 0.4196954071521759, -0.614057183265686, 0.3858436644077301, -2.1932058334350586, -1.3386883735656738, -0.31755489110946655, -0.8908164501190186, 0.41386500000953674, -0.28486987948417664, 0.6729106307029724, -0.23087957501411438, -0.0047334530390799046, 0.4128669798374176, 1.4594213962554932, 3.392406940460205, 0.2890913188457489, 0.3159297704696655, -0.23610493540763855, -0.9136477708816528, 1.4617712497711182, 0.8874772191047668, -0.22638516128063202, -0.5281786918640137, -1.0378642082214355, 1.1292365789413452, 1.8818870782852173, 0.9670765399932861, -0.0015175146982073784, -0.7155930399894714, -0.7353618741035461, -0.04133576154708862, 0.016014397144317627, 0.4130224883556366, 0.8423567414283752, 0.20081037282943726, 0.10488612949848175, 1.2734113931655884, 1.100884199142456, -0.3878096342086792, 0.3399796187877655, -0.7604293823242188, -0.43966177105903625, 0.5325074791908264, 0.3708714544773102, -0.02992383763194084, 0.2949483096599579, -0.964165210723877, -0.23428651690483093, -0.44028446078300476, -0.9698343276977539, -0.7435298562049866, -0.540541410446167, -0.4135233163833618, 1.6437479257583618, 0.03448787331581116, -0.5094105005264282, -0.09509749710559845, -0.7757022976875305, -0.04883960634469986, -1.06222403049469, 0.2988818287849426, -0.11706209927797318, -0.14206044375896454, -0.06817452609539032, 1.7976744174957275, -1.0206481218338013, -1.9742563962936401, 0.354070782661438, 0.14984463155269623, -0.35276979207992554, 0.2565353214740753, 1.5805054903030396, 0.518246054649353, 1.3960986137390137, 1.416369080543518, 1.0348209142684937, -0.6284270882606506, -1.3247911930084229, 0.697536826133728, 0.9742857217788696, -1.4538878202438354, 0.7498036026954651, 0.18281985819339752, -0.346876323223114, 0.6465950608253479, 1.1892889738082886, 0.48209628462791443, -2.0108964443206787, 0.632911205291748, -0.8659911155700684, 0.6837632656097412, 0.7850830554962158, 0.6760478615760803, 0.1985349953174591, 0.8514920473098755, -1.138727068901062, -1.21029531955719, -0.678014874458313, -0.7467042803764343, 1.9335477352142334, -0.2552464008331299, 0.6942878365516663, -0.09900927543640137, -1.4865939617156982, -0.11213481426239014, 0.7783642411231995, 0.37691497802734375, -0.5940350890159607, 0.7687137126922607, -0.5668871402740479, -1.0308690071105957, -1.4106289148330688, -0.4860505163669586, -1.092633843421936, -0.9207053780555725, 0.9381333589553833, 0.8429844975471497, 0.24757009744644165, 1.8397517204284668, 0.7532737851142883, 0.25138911604881287, -2.6690752506256104, 0.8266509175300598, 0.26817065477371216, -0.046907711774110794, 0.7502350807189941, 0.4172922670841217, 0.8343554735183716, -0.0939101055264473, 0.6407086253166199, -2.418025016784668, 2.3725829124450684, -0.284484326839447, 0.6685203909873962, -0.022845551371574402, -0.22882384061813354, 1.0561177730560303, 0.536690890789032, 0.5164704322814941, -1.1477879285812378, 0.5857357978820801, -0.6729274392127991, 1.2547426223754883, 0.8806085586547852, -0.8484176993370056, -0.0734340026974678, 1.4380055665969849, 0.4013991355895996, -0.5978133678436279, -1.004353642463684, -0.9935961961746216, 1.0352659225463867, 1.6734601259231567, -0.11687648296356201, -0.04787275195121765, 0.928756833076477, 0.6697649955749512, -1.238835096359253, 0.09605206549167633, -0.7570104598999023, -0.8867549896240234, 1.6332921981811523, 2.0492312908172607, -0.20005932450294495, -0.22846515476703644, -0.8465116620063782, -1.10526442527771, 0.8478010296821594, 0.08717355877161026, 0.030122868716716766, 0.6516744494438171, -0.5745682716369629, 1.1324094533920288, 0.9918735027313232, 0.9074808955192566, 0.22807088494300842, 0.3247312903404236, 0.3623366355895996, -0.3147069215774536, -1.1726434230804443, -0.1533178836107254, -1.0795488357543945, -2.562563180923462, 0.5381344556808472, -0.2353922575712204, -1.395001769065857, 0.0281333290040493, -1.0313957929611206, 0.9058956503868103, -0.5420697927474976, -1.2042661905288696, -1.5120989084243774, 0.21938785910606384, -0.013428252190351486, 0.9076666831970215, -1.6046196222305298, 0.039334893226623535, 1.130505084991455, 0.9383185505867004, -0.7805004715919495, 0.9334427714347839, 0.15660427510738373, 1.0530482530593872, 1.0040099620819092, -0.4013155996799469, 0.5996336340904236, 0.03367563709616661, -1.3349299430847168, 0.4268706738948822, 1.109853744506836, 0.08417003601789474, 1.5015616416931152, -0.5780215859413147, 0.05304919183254242, 0.3304290175437927, -0.557478666305542, -0.4545991122722626, -0.7358421683311462, 0.6805762052536011, 0.04555840417742729, -0.8527757525444031, 0.10139260441064835, -0.002509037498384714, -0.11883498728275299, 0.10017010569572449, -1.5158195495605469, -0.10743900388479233, -0.21250194311141968, -0.592261016368866, -1.1215554475784302, -0.167709618806839, 1.3794811964035034, -0.6889933347702026, -0.1662704050540924, 0.4901517927646637, 0.31709927320480347, 0.5496320724487305, 0.4987533390522003, -0.6981669664382935, -0.3413431942462921, -0.2554936408996582, -0.3482966423034668, 0.3612152338027954, 1.4466609954833984, -0.026730451732873917, -0.8878771662712097, 0.7714577317237854, -0.3192868232727051, 0.03227241709828377, 1.890778660774231, 0.15232355892658234, -0.767744779586792, 0.2895267903804779, -0.7219849228858948, 1.8313878774642944, 1.8505502939224243, 1.2684874534606934, -0.036823201924562454, -1.039121389389038, 0.6404333710670471, -0.4578409194946289, -0.45256471633911133, 0.8802248239517212, 0.3417331874370575, -0.1674819439649582, -1.3387595415115356, 0.7596035599708557, 1.2343441247940063, -0.75448077917099, -0.9231945872306824, 0.07449334859848022, -0.7325319647789001, 0.9483708739280701, 0.61505126953125, 0.3766143321990967, 0.24658021330833435, 1.6053611040115356, 0.7604784965515137, -0.37043818831443787, 0.6292206645011902, 0.5319809317588806, -0.12958592176437378, -2.133598566055298, -1.3317292928695679, 0.39182189106941223, -0.5593053102493286, -1.712506651878357, 1.369644284248352, -1.1722012758255005, -0.9848749041557312, 0.612126886844635, 0.016828283667564392, 1.5848544836044312, 0.3702164888381958, 1.503848910331726, 2.0818519592285156, 0.8398611545562744, 0.40203240513801575, 1.3203566074371338, -0.11846217513084412, -0.5243890881538391, 1.8418649435043335, -0.5168229937553406, 0.4475783705711365, 1.048675775527954, -0.21485114097595215, -1.081514596939087, -0.8546470403671265, -1.3008605241775513, -0.7328541874885559, 1.1214362382888794, 0.06655780971050262, -1.1115224361419678, 0.2972604036331177, 1.6748371124267578, 0.06033588573336601, -0.3076716363430023, 0.6915465593338013, 0.23301324248313904, -0.868823230266571, -0.009881220757961273, -0.9272750616073608, 0.4958193004131317, -0.20469875633716583, -0.25995972752571106, 0.34245067834854126, 0.4685075581073761, 1.30110764503479, -0.008065072819590569, 0.02193642035126686, 1.1469712257385254, -1.3979439735412598, 1.437734603881836, -0.6372888088226318, 0.383271723985672, -2.367784261703491, 1.415689468383789, -0.8170185089111328, 1.7966822385787964, -2.6543359756469727, 0.38420262932777405, -0.5474440455436707, -0.582748293876648, 0.38778752088546753, -0.411120742559433, 0.14448556303977966, -0.13070695102214813, -1.1691739559173584, -0.02693985030055046, -0.6094076633453369, 0.5891455411911011, 1.035779356956482, 1.4060873985290527, -1.1782759428024292, -0.42545995116233826, -1.8369296789169312, -0.08529828488826752, -0.5630754232406616, 0.45539793372154236, -2.019726037979126, -0.1216546967625618, -1.9289649724960327, -2.3026323318481445, -1.323601245880127, -0.782863199710846, 1.0464359521865845, 0.14787064492702484, -0.7566355466842651, 1.113741397857666, -0.3250042796134949, -1.8935518264770508, 1.0689507722854614, -2.1402928829193115 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
This use-case is a bit specific, and `load_dataset` already has enough parameters (plus, `streaming=True` also returns an iterable dataset, so we would have to explain the difference), so I think it would be better to add `IterableDataset.from_file` to the API (more flexible and aligned with the goal from https://github.com/huggingface/datasets/issues/3444) instead.
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
50
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True This use-case is a bit specific, and `load_dataset` already has enough parameters (plus, `streaming=True` also returns an iterable dataset, so we would have to explain the difference), so I think it would be better to add `IterableDataset.from_file` to the API (more flexible and aligned with the goal from https://github.com/huggingface/datasets/issues/3444) instead.
[ -1.2134650945663452, -0.9165612459182739, -0.8333216905593872, 1.5663814544677734, -0.14164571464061737, -1.298644781112671, 0.10598117113113403, -0.971045732498169, 1.614971399307251, -0.9010605216026306, 0.4977528154850006, -1.7379769086837769, 0.028258066624403, -0.5117005705833435, -0.7640029788017273, -0.8413874506950378, -0.3832770884037018, -0.7232490181922913, 0.9215183854103088, 2.4526302814483643, 1.2389267683029175, -1.321531057357788, 2.6547534465789795, 0.5940269231796265, -0.12404737621545792, -1.0674532651901245, 0.4276975691318512, 0.03220411390066147, -1.2159219980239868, -0.5499005317687988, -0.9454075694084167, -0.09760183840990067, -0.49375787377357483, -0.6075354814529419, 0.04927396774291992, 0.4465748965740204, -0.25984063744544983, -0.34513357281684875, -0.4484128952026367, -0.7761149406433105, 0.5355414748191833, -0.42537397146224976, 1.0111465454101562, -0.3940609097480774, 1.8708337545394897, -0.5556252002716064, 0.4229825735092163, 0.6462939977645874, 1.4144208431243896, 0.14331994950771332, -0.013389939442276955, 0.35154223442077637, 0.32947665452957153, 0.023899588733911514, 0.5323392152786255, 1.083215594291687, 0.5499054193496704, 0.6185364723205566, 0.7053894996643066, -2.176199197769165, 1.3619275093078613, -1.167708158493042, 0.3032776117324829, 1.3236128091812134, -0.9866399765014648, 0.2888985872268677, -1.7644836902618408, -0.15342731773853302, 0.3702731132507324, -2.3071680068969727, 0.3038707375526428, -1.2893363237380981, -0.4877239167690277, 1.1187382936477661, 0.29540687799453735, -1.3075981140136719, 0.1141933798789978, -0.3401561975479126, 0.8781516551971436, 0.5100575089454651, 1.086071252822876, -1.6750181913375854, 0.08268017321825027, -0.32508906722068787, 0.16983027756214142, -1.3106307983398438, -1.433145523071289, 0.5193668603897095, 0.5104901790618896, 0.6265211701393127, -0.10998675227165222, 1.0793073177337646, -0.8962044715881348, 0.8259016275405884, -0.9800446033477783, -1.5580754280090332, -1.3655869960784912, -2.230433464050293, -2.3181889057159424, 0.8026599884033203, -0.5421531200408936, -0.6257452368736267, 1.9477812051773071, -1.1030255556106567, -1.7566254138946533, 1.147230863571167, 0.19299080967903137, -0.03283993899822235, 2.3737826347351074, 0.18216125667095184, -0.6200822591781616, 0.4562353491783142, -0.7272936701774597, 1.0023678541183472, -0.3879128098487854, 1.4492183923721313, 0.5259716510772705, -1.0477334260940552, 1.6263535022735596, -0.4143085181713104, 0.44274118542671204, -0.609359622001648, -0.6261964440345764, -0.8750191926956177, 0.31072211265563965, 1.9208781719207764, -0.27761122584342957, 1.6097561120986938, -0.340888649225235, -1.6140401363372803, -1.5612398386001587, 0.9668470025062561, 0.3995938301086426, -0.7807144522666931, 0.052825648337602615, -0.31668686866760254, 0.07255850732326508, 0.003884783945977688, 1.1808772087097168, 1.1155177354812622, 0.7403100728988647, -0.31742212176322937, -0.8508817553520203, 0.25151440501213074, 0.033929284662008286, -0.7535151839256287, -1.7942737340927124, -0.3970978260040283, 0.17475780844688416, 0.6164872050285339, -1.2124247550964355, 1.8031432628631592, 1.053663730621338, 1.886084794998169, 0.9882562160491943, -0.19621288776397705, 1.4693262577056885, 0.014783530496060848, 1.9337891340255737, -0.49192214012145996, 0.5496364235877991, -0.37908703088760376, -1.147950530052185, 0.7918799519538879, -0.3683016300201416, -1.9980822801589966, -0.8494561910629272, -0.9740898609161377, -0.13772734999656677, -0.7754917144775391, 1.0194123983383179, -0.3444650173187256, -1.4508386850357056, 0.16050425171852112, -0.5563953518867493, 0.08669846504926682, -1.2346137762069702, 0.35268038511276245, 0.7544472813606262, -0.7756952047348022, 0.050902072340250015, -0.3019489347934723, -1.276876449584961, -0.485013872385025, 0.20764531195163727, 1.967990756034851, -0.7674183249473572, 0.9287429451942444, 0.9487900137901306, -0.7692291736602783, -0.09879270941019058, 0.3128702938556671, -0.30458933115005493, 0.6928272247314453, -1.0237926244735718, -0.34969595074653625, 1.2523787021636963, -0.12397438287734985, -0.72142493724823, 1.572854995727539, 0.763026237487793, -0.9239614009857178, -0.13485625386238098, -0.2227010428905487, -0.7398366928100586, -0.04532274231314659, -1.5540226697921753, 0.027454867959022522, 0.26443207263946533, -1.5131220817565918, -0.42463159561157227, -0.14404752850532532, 1.11260986328125, -0.28419023752212524, 1.3147366046905518, -0.23344877362251282, -0.3577090799808502, -0.353869765996933, -0.38398638367652893, 0.04397286847233772, -0.03898144140839577, -0.703947901725769, 0.27011337876319885, -0.8136972784996033, 0.3630948066711426, 1.5337440967559814, 0.31557026505470276, 0.051788125187158585, 0.5400542616844177, 1.1393259763717651, 0.41779011487960815, 0.03634071350097656, -0.9372746348381042, -1.5778295993804932, 1.9893370866775513, -1.5415135622024536, 1.9130691289901733, 0.6945799589157104, -0.057032231241464615, -1.7753835916519165, -1.6946884393692017, 1.2911614179611206, 1.2926208972930908, 2.333388328552246, 0.6597725749015808, 0.27364617586135864, -0.7984176874160767, -0.6416695713996887, 0.41750964522361755, -1.1104886531829834, -0.7562018632888794, 0.1736316978931427, 2.3328347206115723, 1.8532557487487793, -0.4763636291027069, -0.25555095076560974, -1.076392412185669, 1.3092968463897705, -0.20687484741210938, 0.2021780163049698, 1.9427756071090698, -0.252439945936203, -1.1582940816879272, 1.388476848602295, -2.354628086090088, 0.16163472831249237, 2.0411994457244873, 0.42347103357315063, -0.01253386028110981, -1.4309557676315308, -0.6056780815124512, -0.21069099009037018, -0.3931428790092468, -1.3285938501358032, 0.5611809492111206, -0.2896731495857239, -0.7722614407539368, -1.422820806503296, 0.21933750808238983, -1.1075265407562256, -1.6127979755401611, 0.33500832319259644, 1.7766026258468628, 2.0147480964660645, -0.5443925857543945, 1.4272006750106812, -0.3234395384788513, 0.28794270753860474, 1.2794216871261597, 1.2018041610717773, 3.0841119289398193, 1.9288066625595093, -1.213484525680542, 0.7189769744873047, -0.20452149212360382, -0.5958755612373352, 1.298352599143982, -1.1853702068328857, 1.2001140117645264, -0.1698494702577591, -1.1833794116973877, -1.2469664812088013, 0.8622804284095764, 0.3775831460952759, 0.15501141548156738, -0.4963497519493103, 1.2454723119735718, 0.13292087614536285, 1.273503065109253, 0.6674810647964478, -0.3583635687828064, 0.5330823063850403, -0.4732253849506378, -0.534696102142334, 1.6008356809616089, 0.23652881383895874, -1.4474577903747559, -2.2458879947662354, -0.14381162822246552, -0.8770538568496704, 0.09024441987276077, -0.4980693757534027, -0.9632072448730469, 1.6771670579910278, 0.335915207862854, -1.3124523162841797, -0.20728272199630737, -0.36137157678604126, -0.6370717287063599, 2.7027587890625, -1.3482122421264648, -0.27341341972351074, -1.0298420190811157, -0.7345302700996399, 1.7097443342208862, -1.2657051086425781, -0.14947552978992462, -1.002433180809021, -0.536244809627533, -1.398307204246521, -0.5362699031829834, 0.017777621746063232, -0.9563119411468506, 0.7622973322868347, 0.1322704404592514, -1.0964655876159668, -0.4531395733356476, -0.8500574827194214, 0.797010064125061, -0.13201768696308136, 0.2763967514038086, 1.797298550605774, 0.524724543094635, -0.405524879693985, 0.7315254807472229, 1.200089454650879, 0.5996021032333374, -0.5903789401054382, 0.2912476062774658, -0.7001934051513672, 0.21551062166690826, -1.3751126527786255, 0.27974048256874084, -2.8929014205932617, 0.5708929300308228, -0.08319100737571716, -0.1915859580039978, -0.10192640870809555, -1.3522469997406006, 1.145188331604004, 2.6176469326019287, -1.2131268978118896, 0.4533807933330536, 0.3391794264316559, 1.1832419633865356, -1.6057356595993042, 0.38413116335868835, -0.40372034907341003, 2.070321798324585, 0.1819579303264618, 1.1945838928222656, -0.5658256411552429, -2.252835988998413, 0.6341295838356018, -1.2965940237045288, -1.2276523113250732, 0.8209639191627502, -0.8489071726799011, 0.04458248242735863, -1.4197413921356201, -0.16181494295597076, -0.842411994934082, -1.3086854219436646, 0.8534397482872009, 0.2060713917016983, 0.4222094714641571, -0.5656213760375977, 0.40427491068840027, -2.2104878425598145, -1.4052940607070923, -0.17018115520477295, -0.8929145336151123, 0.4679073095321655, -0.37247321009635925, 0.6321375370025635, -0.25448933243751526, -0.00041403016075491905, 0.4176504909992218, 1.453246831893921, 3.4601688385009766, 0.35959917306900024, 0.5116760730743408, -0.13901850581169128, -0.9725931882858276, 1.53620183467865, 0.9882410168647766, -0.0853048637509346, -0.496222585439682, -0.9646725058555603, 1.1802353858947754, 1.9678596258163452, 0.9958873987197876, 0.026371758431196213, -0.798281729221344, -0.6683244705200195, -0.09772792458534241, 0.10132448375225067, 0.417551726102829, 0.9693173766136169, 0.10690470039844513, 0.1378054916858673, 1.3307918310165405, 1.1041899919509888, -0.4057534337043762, 0.3588551878929138, -0.768054723739624, -0.3721955716609955, 0.5516356229782104, 0.3766092360019684, -0.11681291460990906, 0.473638653755188, -0.9376649260520935, -0.328511118888855, -0.36117351055145264, -0.9849185347557068, -0.7110171914100647, -0.4781714081764221, -0.3381821811199188, 1.6137973070144653, -0.03708202764391899, -0.5466670393943787, -0.018489457666873932, -0.8194302320480347, -0.10836856067180634, -1.1286689043045044, 0.22017401456832886, -0.07786835730075836, -0.12406548112630844, -0.09367909282445908, 1.8631585836410522, -1.0515364408493042, -2.1293861865997314, 0.2734347879886627, 0.28613921999931335, -0.3435072600841522, 0.25515878200531006, 1.5638691186904907, 0.4604836404323578, 1.3510550260543823, 1.3644518852233887, 1.0149625539779663, -0.6208310127258301, -1.3178379535675049, 0.738777220249176, 0.9155295491218567, -1.415303349494934, 0.8035988807678223, 0.0577254444360733, -0.3822973966598511, 0.6965091824531555, 1.0768574476242065, 0.4966181814670563, -1.8976678848266602, 0.632127583026886, -0.8393911719322205, 0.7561245560646057, 0.7927736639976501, 0.756070613861084, 0.2717973589897156, 0.874562680721283, -1.172640085220337, -1.1539725065231323, -0.7707983255386353, -0.6946176290512085, 1.905921459197998, -0.20974278450012207, 0.7101273536682129, -0.09053420275449753, -1.3234748840332031, -0.09114831686019897, 0.7798295021057129, 0.31495481729507446, -0.4783223271369934, 0.7689729332923889, -0.6292600035667419, -1.061417818069458, -1.4596868753433228, -0.5047597885131836, -1.0519707202911377, -0.892092227935791, 1.0706101655960083, 0.725014865398407, 0.1259773075580597, 1.9576749801635742, 0.7367506623268127, 0.22945421934127808, -2.727952718734741, 0.8528414368629456, 0.2637147009372711, 0.13277950882911682, 0.8148016929626465, 0.4357948303222656, 1.0047968626022339, -0.007868337444961071, 0.5559133887290955, -2.4072368144989014, 2.3387391567230225, -0.26243770122528076, 0.6675440073013306, -0.02324836514890194, -0.2697325348854065, 1.0886679887771606, 0.6439148783683777, 0.5598012208938599, -1.2202470302581787, 0.6303786635398865, -0.5959954261779785, 1.2249729633331299, 0.9406225681304932, -0.8109631538391113, -0.047869276255369186, 1.4063693284988403, 0.48615846037864685, -0.47741585969924927, -1.0293598175048828, -0.8172361850738525, 0.9853547811508179, 1.5971155166625977, -0.04605922847986221, -0.023246970027685165, 0.8297843933105469, 0.6560245156288147, -1.2525819540023804, 0.059761859476566315, -0.6540080904960632, -0.9044073820114136, 1.7024527788162231, 2.0508646965026855, -0.14135460555553436, -0.2021908015012741, -0.8005157113075256, -1.0785346031188965, 0.7964324355125427, 0.06329542398452759, 0.1790464222431183, 0.7170260548591614, -0.6496866941452026, 1.108842372894287, 0.9093880653381348, 0.9650318622589111, 0.15004822611808777, 0.3448030948638916, 0.36978644132614136, -0.26410722732543945, -1.1813021898269653, -0.2932286262512207, -1.219906210899353, -2.6277546882629395, 0.4978795349597931, -0.3580126464366913, -1.3871817588806152, 0.10357584804296494, -1.0503225326538086, 0.9448716044425964, -0.6403246521949768, -1.1123946905136108, -1.4287045001983643, 0.14844948053359985, -0.10721520334482193, 0.8708286881446838, -1.6988954544067383, -0.07180014252662659, 1.1458775997161865, 0.9363954067230225, -0.7079583406448364, 1.0575499534606934, 0.1389327049255371, 1.1168501377105713, 0.8892468214035034, -0.41291072964668274, 0.6061009764671326, 0.19191274046897888, -1.4076963663101196, 0.4214273989200592, 1.1157455444335938, 0.18810810148715973, 1.4613066911697388, -0.4619513154029846, 0.18881851434707642, 0.4623221158981323, -0.6433455944061279, -0.4694380462169647, -0.6544502377510071, 0.7875577211380005, 0.10984398424625397, -0.9420480728149414, 0.1014217659831047, -0.12170806527137756, -0.11968237161636353, 0.08467940986156464, -1.5105068683624268, -0.29215630888938904, -0.37832754850387573, -0.6359965205192566, -1.2565110921859741, -0.09392289072275162, 1.3928344249725342, -0.7392539381980896, -0.08629941940307617, 0.45681697130203247, 0.35812264680862427, 0.5077760815620422, 0.5449542999267578, -0.8325011730194092, -0.2706063687801361, -0.2365698218345642, -0.32580241560935974, 0.4131624698638916, 1.3810999393463135, -0.11522678285837173, -0.9929618239402771, 0.7076143622398376, -0.19928856194019318, 0.0697677731513977, 1.9306353330612183, 0.05082803592085838, -0.7023738622665405, 0.31381353735923767, -0.7280769348144531, 1.8226890563964844, 1.7328522205352783, 1.2823338508605957, -0.06947138905525208, -0.8197038173675537, 0.6618441343307495, -0.294417142868042, -0.391528457403183, 0.8136706948280334, 0.35437360405921936, -0.07047364860773087, -1.4318623542785645, 0.5702325105667114, 1.2518985271453857, -0.8208813667297363, -0.8321901559829712, -0.0017059892416000366, -0.8058544397354126, 0.9830628037452698, 0.5942617058753967, 0.40189340710639954, 0.3079814910888672, 1.5803200006484985, 0.654628574848175, -0.4989151358604431, 0.5828264355659485, 0.5111276507377625, -0.12117179483175278, -2.1084866523742676, -1.1505471467971802, 0.3491268455982208, -0.45608454942703247, -1.5294326543807983, 1.318312644958496, -1.1298948526382446, -0.8709267377853394, 0.6722028851509094, 0.1270492523908615, 1.6214818954467773, 0.39576321840286255, 1.5300064086914062, 2.0618302822113037, 0.8185645937919617, 0.25253045558929443, 1.3034063577651978, -0.09744951874017715, -0.4489811360836029, 1.8323811292648315, -0.41518160700798035, 0.469818651676178, 1.0465385913848877, -0.2881827652454376, -1.0765964984893799, -0.8165963292121887, -1.2699294090270996, -0.7139449715614319, 1.0963647365570068, 0.14582940936088562, -1.2279075384140015, 0.2058023363351822, 1.5886855125427246, 0.12108587473630905, -0.26284751296043396, 0.564391553401947, 0.3764418065547943, -0.7734411954879761, -0.0039416165091097355, -0.8972827196121216, 0.4819590449333191, -0.25478506088256836, -0.2877963185310364, 0.2621908485889435, 0.5131397843360901, 1.220016360282898, -0.01635577902197838, 0.0795905813574791, 1.2120028734207153, -1.3661519289016724, 1.392210841178894, -0.5749455094337463, 0.2700302004814148, -2.3284616470336914, 1.420023798942566, -0.8282065391540527, 1.8541556596755981, -2.6340529918670654, 0.39286932349205017, -0.6034132242202759, -0.5960681438446045, 0.38330623507499695, -0.49517184495925903, 0.1682811677455902, -0.17054399847984314, -0.9745137095451355, 0.05364711210131645, -0.6672112345695496, 0.5796030759811401, 1.067486047744751, 1.342311978340149, -1.081236720085144, -0.465400755405426, -1.8561465740203857, -0.2106710821390152, -0.6389395594596863, 0.33725443482398987, -2.100999355316162, -0.214212104678154, -2.009225606918335, -2.2045328617095947, -1.3475594520568848, -0.7864335179328918, 1.1172659397125244, 0.23403583467006683, -0.7384876608848572, 1.039886474609375, -0.29314953088760376, -1.756537914276123, 1.032709002494812, -2.1212551593780518 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
> This use-case is a bit specific This allows to use `datasets` for large scale training where map-style datasets are too slow and use too much memory in PyTorch. So I would still consider adding it. Alternatively we could add this feature one level bellow: ```python builder = load_dataset_builder(...) builder.download_and_prepare() ids = builder.as_iterable_dataset() ```
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
54
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True > This use-case is a bit specific This allows to use `datasets` for large scale training where map-style datasets are too slow and use too much memory in PyTorch. So I would still consider adding it. Alternatively we could add this feature one level bellow: ```python builder = load_dataset_builder(...) builder.download_and_prepare() ids = builder.as_iterable_dataset() ```
[ -1.2192336320877075, -0.8842707276344299, -0.701069176197052, 1.5191925764083862, -0.20752127468585968, -1.333116054534912, 0.18966422975063324, -1.0095540285110474, 1.7087229490280151, -0.928950309753418, 0.45042845606803894, -1.6462763547897339, 0.07562471926212311, -0.5040363669395447, -0.7774582505226135, -0.8177738189697266, -0.4184149503707886, -0.7054936289787292, 0.9836771488189697, 2.4212992191314697, 1.199702501296997, -1.3486369848251343, 2.6472489833831787, 0.5993903875350952, -0.1392892748117447, -1.0803383588790894, 0.42387503385543823, 0.09102321416139603, -1.3579751253128052, -0.46321484446525574, -0.9676131010055542, -0.1285771280527115, -0.5065677762031555, -0.5793879628181458, 0.03285767883062363, 0.43195444345474243, -0.28672173619270325, -0.4515955448150635, -0.4681810140609741, -0.7532169222831726, 0.481469064950943, -0.366863876581192, 1.0024644136428833, -0.4134012758731842, 1.8267226219177246, -0.5394810438156128, 0.49098774790763855, 0.6769776344299316, 1.3178695440292358, 0.14792367815971375, -0.08032312989234924, 0.3071897625923157, 0.37761402130126953, -0.01618066243827343, 0.560603141784668, 1.0586003065109253, 0.5745456218719482, 0.5255725979804993, 0.6823375225067139, -2.1897945404052734, 1.3853371143341064, -1.1536316871643066, 0.2767498195171356, 1.3262455463409424, -1.0030373334884644, 0.23921838402748108, -1.7176679372787476, -0.13385546207427979, 0.4288274645805359, -2.2000484466552734, 0.2834758758544922, -1.336928129196167, -0.5002326965332031, 1.1063042879104614, 0.38187021017074585, -1.2814173698425293, 0.06122448667883873, -0.3201397657394409, 0.9342070817947388, 0.5159233808517456, 1.0795257091522217, -1.662499189376831, 0.041192274540662766, -0.29462704062461853, 0.11295591294765472, -1.3263473510742188, -1.3851912021636963, 0.5255480408668518, 0.5951491594314575, 0.6112442016601562, -0.09268269687891006, 1.0899198055267334, -0.9325647354125977, 0.8258519768714905, -1.0340157747268677, -1.654782772064209, -1.3880620002746582, -2.262789011001587, -2.326249599456787, 0.8001559972763062, -0.5154145359992981, -0.5941447019577026, 1.9827271699905396, -1.021566390991211, -1.7415426969528198, 1.184899091720581, 0.081178218126297, 0.017990533262491226, 2.2839415073394775, 0.20854832231998444, -0.6398462057113647, 0.4339313507080078, -0.7248108983039856, 0.8682976365089417, -0.3268113434314728, 1.3895272016525269, 0.490852415561676, -1.0362893342971802, 1.5652509927749634, -0.34245508909225464, 0.4997939467430115, -0.5423813462257385, -0.6334810853004456, -0.8362026810646057, 0.3801097571849823, 1.9629771709442139, -0.20305733382701874, 1.6086342334747314, -0.34161368012428284, -1.6164804697036743, -1.641074299812317, 0.9815201163291931, 0.49990659952163696, -0.6603930592536926, 0.10952067375183105, -0.3473765552043915, 0.08872412145137787, 0.014258758164942265, 1.2090344429016113, 1.177354097366333, 0.8131354451179504, -0.3405805230140686, -0.7763782739639282, 0.26715126633644104, 0.07710322737693787, -0.7472514510154724, -1.787866473197937, -0.34140390157699585, 0.12646281719207764, 0.6486836075782776, -1.1504548788070679, 1.735012173652649, 1.0098615884780884, 1.869234323501587, 1.028745412826538, -0.08137118816375732, 1.4832425117492676, -0.04756864532828331, 1.895707130432129, -0.44677555561065674, 0.5824252367019653, -0.38820964097976685, -1.1187286376953125, 0.8408469557762146, -0.3358285427093506, -2.0343146324157715, -0.8045355081558228, -0.9677175283432007, -0.0948241576552391, -0.7641581296920776, 1.0202909708023071, -0.34281617403030396, -1.4721083641052246, 0.1399082988500595, -0.6322838068008423, 0.08397085964679718, -1.1702347993850708, 0.3689712584018707, 0.7317169904708862, -0.7279049754142761, 0.06449998915195465, -0.2767622768878937, -1.270918846130371, -0.40657109022140503, 0.20279622077941895, 1.9057728052139282, -0.8207778930664062, 0.8965115547180176, 0.9944829940795898, -0.7876317501068115, -0.0648142471909523, 0.23631823062896729, -0.26145538687705994, 0.7009412050247192, -1.0000767707824707, -0.2595561742782593, 1.2674179077148438, -0.1480989307165146, -0.6723477840423584, 1.5230534076690674, 0.7041661739349365, -0.9121172428131104, -0.12925605475902557, -0.2548372447490692, -0.797851026058197, -0.08164920657873154, -1.6203508377075195, -0.029180951416492462, 0.33013880252838135, -1.561065435409546, -0.3650459349155426, -0.10138502717018127, 1.1501338481903076, -0.2553670406341553, 1.3808687925338745, -0.30165374279022217, -0.26106494665145874, -0.3213904798030853, -0.4165116846561432, 0.09467939287424088, -0.07990536838769913, -0.7010228037834167, 0.25386956334114075, -0.7835414409637451, 0.33210915327072144, 1.4781957864761353, 0.29007279872894287, 0.08916623890399933, 0.5180824398994446, 1.0968303680419922, 0.42447197437286377, 0.020643718540668488, -0.848884642124176, -1.6287833452224731, 1.985327124595642, -1.5096766948699951, 1.9815548658370972, 0.618070662021637, -0.05962470918893814, -1.766297459602356, -1.8556544780731201, 1.3566341400146484, 1.2489086389541626, 2.338947057723999, 0.6048922538757324, 0.2787838280200958, -0.7705714106559753, -0.6545702815055847, 0.45024773478507996, -1.0763981342315674, -0.7557831406593323, 0.13425670564174652, 2.3284661769866943, 1.8114935159683228, -0.45895957946777344, -0.2664989233016968, -1.0037107467651367, 1.3852373361587524, -0.09263104945421219, 0.23628529906272888, 2.020278215408325, -0.22080916166305542, -1.1261491775512695, 1.369738221168518, -2.3409693241119385, 0.17977099120616913, 2.049745559692383, 0.38180941343307495, 0.11505711078643799, -1.4341111183166504, -0.5551294088363647, -0.23147328197956085, -0.40229538083076477, -1.2705552577972412, 0.6038022637367249, -0.30928948521614075, -0.7363055944442749, -1.4285426139831543, 0.25688737630844116, -1.1229265928268433, -1.6539932489395142, 0.3337875306606293, 1.823783040046692, 2.0229833126068115, -0.5968876481056213, 1.5090835094451904, -0.34388840198516846, 0.2780991792678833, 1.259981393814087, 1.1978610754013062, 3.1192591190338135, 1.9600728750228882, -1.242630124092102, 0.6980977058410645, -0.16474784910678864, -0.557563066482544, 1.1983674764633179, -1.2124170064926147, 1.2581290006637573, -0.1118956208229065, -1.127118468284607, -1.2963858842849731, 0.858843982219696, 0.3862799108028412, 0.11526186764240265, -0.49627426266670227, 1.282548427581787, 0.12480387836694717, 1.3188037872314453, 0.5895958542823792, -0.32024478912353516, 0.6217299103736877, -0.48329252004623413, -0.4985194206237793, 1.5296199321746826, 0.2738563120365143, -1.394984483718872, -2.20953106880188, -0.15529873967170715, -0.8906988501548767, 0.04269970580935478, -0.4828648567199707, -0.9618253707885742, 1.7101391553878784, 0.35419678688049316, -1.3539421558380127, -0.1317252367734909, -0.3083842992782593, -0.6328473091125488, 2.731565475463867, -1.3230713605880737, -0.20977818965911865, -1.039611577987671, -0.7477018237113953, 1.7659915685653687, -1.2903997898101807, -0.20003657042980194, -1.014434814453125, -0.535532534122467, -1.3818104267120361, -0.558334469795227, 0.0023964522406458855, -0.9500149488449097, 0.7982421517372131, 0.153685063123703, -1.163888692855835, -0.5178141593933105, -0.8288264274597168, 0.8522850275039673, -0.12329322099685669, 0.25145214796066284, 1.7963577508926392, 0.4258922040462494, -0.39773035049438477, 0.7126513123512268, 1.1616414785385132, 0.5872747898101807, -0.6355627775192261, 0.3145066499710083, -0.6917218565940857, 0.3168158531188965, -1.3526724576950073, 0.30059486627578735, -2.9238948822021484, 0.5783832669258118, -0.10005160421133041, -0.15614596009254456, -0.14102257788181305, -1.4207956790924072, 1.1093932390213013, 2.6313436031341553, -1.198063850402832, 0.5208730697631836, 0.38497620820999146, 1.1336021423339844, -1.5283554792404175, 0.40750885009765625, -0.4139275550842285, 2.08968186378479, 0.2553967535495758, 1.286895990371704, -0.5389366149902344, -2.267026901245117, 0.6987966299057007, -1.3113603591918945, -1.2847354412078857, 0.7636050581932068, -0.8651614785194397, 0.05211419612169266, -1.350774884223938, -0.21195344626903534, -0.8180952072143555, -1.2778522968292236, 0.814984142780304, 0.24488267302513123, 0.3356943428516388, -0.5717900991439819, 0.44311028718948364, -2.263242483139038, -1.3744159936904907, -0.21214993298053741, -0.9796780347824097, 0.4586468040943146, -0.3433510661125183, 0.6079563498497009, -0.2587009370326996, 0.050484538078308105, 0.38828209042549133, 1.3740932941436768, 3.4721500873565674, 0.26920583844184875, 0.42204707860946655, -0.184255912899971, -0.9561302661895752, 1.6056857109069824, 0.9779731035232544, -0.07969019562005997, -0.4830351769924164, -1.0169668197631836, 1.1729925870895386, 1.9276138544082642, 1.006748914718628, -0.043548475950956345, -0.7610098123550415, -0.7106632590293884, -0.029828287661075592, 0.0781167596578598, 0.4535006582736969, 0.9516145586967468, 0.1016068235039711, 0.14207738637924194, 1.3802180290222168, 1.0792478322982788, -0.45114099979400635, 0.3413506746292114, -0.8072682023048401, -0.43105611205101013, 0.49603134393692017, 0.38516607880592346, -0.10913044959306717, 0.3851262032985687, -0.8721525073051453, -0.25676435232162476, -0.36815035343170166, -0.943408191204071, -0.6642961502075195, -0.5223521590232849, -0.4260062575340271, 1.6412363052368164, -0.04011651501059532, -0.5223042368888855, -0.09145853668451309, -0.853363037109375, -0.12099850922822952, -1.1270666122436523, 0.2723475694656372, -0.0835484191775322, -0.13690216839313507, -0.0731106847524643, 1.9015768766403198, -0.9865847826004028, -2.033395528793335, 0.3234167695045471, 0.23845411837100983, -0.30398088693618774, 0.2037685215473175, 1.5548158884048462, 0.5362114906311035, 1.3598363399505615, 1.3633544445037842, 1.0251110792160034, -0.6309517621994019, -1.371018648147583, 0.7095458507537842, 0.9105406999588013, -1.4592795372009277, 0.7570294141769409, 0.03214249014854431, -0.3477296531200409, 0.5886530876159668, 1.152936339378357, 0.5833504796028137, -1.8859199285507202, 0.6799834370613098, -0.8524095416069031, 0.6974397897720337, 0.8647164702415466, 0.7328788042068481, 0.20903855562210083, 0.8339052796363831, -1.1343263387680054, -1.1767336130142212, -0.7968034744262695, -0.711531937122345, 1.9154484272003174, -0.2588199973106384, 0.6983903646469116, -0.07711268216371536, -1.35199773311615, -0.06312157213687897, 0.7523733973503113, 0.3273812234401703, -0.44645237922668457, 0.8149292469024658, -0.6610996127128601, -1.0495742559432983, -1.4130687713623047, -0.44184476137161255, -1.1004297733306885, -0.9231807589530945, 1.0893793106079102, 0.7663511633872986, 0.19087326526641846, 1.9415030479431152, 0.7038576006889343, 0.30453500151634216, -2.727893352508545, 0.8655491471290588, 0.16955186426639557, 0.13575421273708344, 0.7789121270179749, 0.3966660499572754, 0.9860475659370422, -0.06853117793798447, 0.6194294691085815, -2.460270404815674, 2.3863301277160645, -0.2938680350780487, 0.6300477981567383, -0.03284969925880432, -0.18989743292331696, 1.1001075506210327, 0.6401404738426208, 0.5285168886184692, -1.1719446182250977, 0.6717576384544373, -0.6134447455406189, 1.2917343378067017, 0.931915819644928, -0.7699468731880188, -0.07548902183771133, 1.342725396156311, 0.43582314252853394, -0.5781395435333252, -0.9333242177963257, -0.9270866513252258, 0.9251607656478882, 1.5933467149734497, -0.07091141492128372, -0.06514465063810349, 0.8111047148704529, 0.6127572059631348, -1.242951512336731, 0.01164716761559248, -0.6677475571632385, -0.84427809715271, 1.6401550769805908, 2.0815353393554688, -0.17193537950515747, -0.21020348370075226, -0.7591519355773926, -1.0851445198059082, 0.7589427828788757, 0.07566419243812561, 0.1243717297911644, 0.649258017539978, -0.5545114278793335, 1.0590476989746094, 0.9471939206123352, 0.9549790024757385, 0.11776936799287796, 0.3085155785083771, 0.35348260402679443, -0.15124404430389404, -1.2251588106155396, -0.2892400324344635, -1.1372555494308472, -2.657172441482544, 0.4746460020542145, -0.3573439121246338, -1.3290586471557617, 0.03778411075472832, -1.0946149826049805, 0.8874930143356323, -0.6351392269134521, -1.1214966773986816, -1.4126423597335815, 0.05286409333348274, -0.11552277952432632, 0.8883636593818665, -1.6670233011245728, -0.11632950603961945, 1.1788355112075806, 0.9189675450325012, -0.7516277432441711, 1.136749505996704, 0.10695023089647293, 1.0435926914215088, 0.8692159652709961, -0.3571597635746002, 0.6233136057853699, 0.15330973267555237, -1.3448388576507568, 0.4238172471523285, 1.1002427339553833, 0.08830513805150986, 1.4687283039093018, -0.5228450298309326, 0.151692733168602, 0.4474526345729828, -0.6218975186347961, -0.4029175341129303, -0.6414069533348083, 0.8521795868873596, 0.12099791318178177, -0.9231002926826477, 0.006215705536305904, -0.13877230882644653, -0.16693949699401855, 0.09774577617645264, -1.5128591060638428, -0.19472049176692963, -0.3136589229106903, -0.5796236395835876, -1.2062593698501587, -0.11796892434358597, 1.3890368938446045, -0.7687028646469116, -0.11617220938205719, 0.3865193724632263, 0.3412831723690033, 0.5351461172103882, 0.6266448497772217, -0.7527873516082764, -0.236431285738945, -0.2566142678260803, -0.29324257373809814, 0.48265090584754944, 1.4199832677841187, -0.03305790573358536, -1.0367228984832764, 0.7114593982696533, -0.20246724784374237, 0.04229968786239624, 1.9396064281463623, 0.0560259111225605, -0.7718210220336914, 0.24391666054725647, -0.7394459247589111, 1.8343331813812256, 1.7141684293746948, 1.3621126413345337, -0.07709430158138275, -0.890374481678009, 0.62824547290802, -0.323700487613678, -0.37378546595573425, 0.830819845199585, 0.39389145374298096, -0.13113220036029816, -1.3783745765686035, 0.6681753396987915, 1.2136726379394531, -0.8011789917945862, -0.8162850737571716, -0.012721296399831772, -0.7793628573417664, 0.9552303552627563, 0.5540637969970703, 0.34376251697540283, 0.3496668338775635, 1.6187716722488403, 0.6752477884292603, -0.44522032141685486, 0.5870531797409058, 0.506289541721344, -0.1606975793838501, -2.1181373596191406, -1.1330556869506836, 0.4255879521369934, -0.5219800472259521, -1.6529200077056885, 1.3650206327438354, -1.1765116453170776, -0.9369991421699524, 0.6382091045379639, 0.03462476283311844, 1.589255928993225, 0.3595854938030243, 1.5864837169647217, 2.063612699508667, 0.8799210786819458, 0.31899288296699524, 1.2884159088134766, -0.1790139526128769, -0.48340725898742676, 1.7451286315917969, -0.460328608751297, 0.4291127026081085, 1.0196452140808105, -0.26213374733924866, -1.0606727600097656, -0.8212308883666992, -1.295983910560608, -0.6784768104553223, 1.0381381511688232, 0.17266833782196045, -1.2326698303222656, 0.21711964905261993, 1.5962464809417725, 0.11249512434005737, -0.26466280221939087, 0.5797920227050781, 0.30324283242225647, -0.8340938687324524, -0.018900468945503235, -0.9302716255187988, 0.471848726272583, -0.25427064299583435, -0.34234270453453064, 0.265034019947052, 0.4416598975658417, 1.2258758544921875, -0.03142748773097992, 0.12186714261770248, 1.1654049158096313, -1.3467388153076172, 1.3592503070831299, -0.5730571150779724, 0.2846073508262634, -2.3231353759765625, 1.458711862564087, -0.8763992190361023, 1.8896675109863281, -2.6933445930480957, 0.39199569821357727, -0.5839664340019226, -0.5772590041160583, 0.36134466528892517, -0.43578892946243286, 0.11833297461271286, -0.17635799944400787, -1.0836541652679443, -0.04740796983242035, -0.6906378865242004, 0.589141309261322, 1.0215404033660889, 1.3049691915512085, -1.100675106048584, -0.4398542046546936, -1.8281643390655518, -0.19051194190979004, -0.6695442795753479, 0.3300888240337372, -2.086789131164551, -0.17634746432304382, -1.989549160003662, -2.2299959659576416, -1.3175556659698486, -0.7498776912689209, 1.1154688596725464, 0.1584334373474121, -0.7357268929481506, 1.0655152797698975, -0.20838186144828796, -1.8049973249435425, 1.022410273551941, -2.0847787857055664 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
Yes, I see how this can be useful. Still, I think `Dataset.to_iterable` + `IterableDataset.from_file` would be much cleaner in terms of the API design (and more flexible since `load_dataset` can only access the "initial" (unprocessed) version of a dataset). And since it can be tricky to manually find the "initial" version of a dataset in the cache, maybe `load_dataset` could return an iterable dataset streamed from the cache if `streaming=True` and the cache is up-to-date.
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
75
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True Yes, I see how this can be useful. Still, I think `Dataset.to_iterable` + `IterableDataset.from_file` would be much cleaner in terms of the API design (and more flexible since `load_dataset` can only access the "initial" (unprocessed) version of a dataset). And since it can be tricky to manually find the "initial" version of a dataset in the cache, maybe `load_dataset` could return an iterable dataset streamed from the cache if `streaming=True` and the cache is up-to-date.
[ -1.1892433166503906, -0.9370976090431213, -0.7828351259231567, 1.5670956373214722, -0.22921042144298553, -1.299664855003357, 0.1782594472169876, -0.9872884750366211, 1.7259507179260254, -0.927904486656189, 0.44232386350631714, -1.7147488594055176, 0.05562882125377655, -0.508151650428772, -0.819399356842041, -0.8759220242500305, -0.4061051607131958, -0.7547403573989868, 0.8812689185142517, 2.4498190879821777, 1.2493988275527954, -1.3354426622390747, 2.541435956954956, 0.6367217898368835, -0.1463417112827301, -1.061991810798645, 0.4594515860080719, 0.11407958716154099, -1.230690598487854, -0.5183379650115967, -0.9161533713340759, -0.11439543962478638, -0.5036687254905701, -0.6225897669792175, 0.024291032925248146, 0.47408315539360046, -0.2981702387332916, -0.4143913984298706, -0.48719289898872375, -0.8395199179649353, 0.5222630500793457, -0.46039262413978577, 1.0635746717453003, -0.43957024812698364, 1.8690634965896606, -0.5698804259300232, 0.41333919763565063, 0.685968279838562, 1.3628615140914917, 0.15446904301643372, 0.007995853200554848, 0.24443016946315765, 0.40030786395072937, -0.00035555753856897354, 0.4937264919281006, 1.0198792219161987, 0.5637679100036621, 0.6268318891525269, 0.7537823915481567, -2.2134785652160645, 1.4017553329467773, -1.1657549142837524, 0.3211406171321869, 1.3116066455841064, -1.0028891563415527, 0.29664766788482666, -1.7446132898330688, -0.12735579907894135, 0.42358455061912537, -2.22802996635437, 0.2793283462524414, -1.3482927083969116, -0.4970494508743286, 1.0733692646026611, 0.31702345609664917, -1.2201706171035767, 0.11476922035217285, -0.35164448618888855, 0.864599883556366, 0.4745843708515167, 1.0464757680892944, -1.7281421422958374, 0.011989610269665718, -0.3670233488082886, 0.15768781304359436, -1.354195237159729, -1.3871132135391235, 0.4841761887073517, 0.5389626622200012, 0.5327070355415344, -0.18286371231079102, 1.118281364440918, -0.893893301486969, 0.7387211918830872, -1.0075312852859497, -1.5671359300613403, -1.3823574781417847, -2.2072904109954834, -2.2872872352600098, 0.7482306957244873, -0.5208471417427063, -0.5943700075149536, 2.0361807346343994, -1.0889523029327393, -1.7041751146316528, 1.173782467842102, 0.14465132355690002, 0.013788308948278427, 2.3082165718078613, 0.12021660804748535, -0.6332502961158752, 0.4497077167034149, -0.6600264310836792, 0.8791289925575256, -0.3900565803050995, 1.385715365409851, 0.4697367548942566, -1.1350314617156982, 1.5905473232269287, -0.4142031967639923, 0.5579645037651062, -0.6258563995361328, -0.6314369440078735, -0.8745251297950745, 0.33344510197639465, 1.8119556903839111, -0.23021186888217926, 1.593782901763916, -0.28185176849365234, -1.5909247398376465, -1.6388397216796875, 0.9734470844268799, 0.3978521525859833, -0.6845396161079407, 0.028439639136195183, -0.26626724004745483, 0.08167781680822372, -0.08487745374441147, 1.182797908782959, 1.165581226348877, 0.7932483553886414, -0.3544425368309021, -0.8708640336990356, 0.2204136997461319, 0.007057378068566322, -0.7298030853271484, -1.7307531833648682, -0.4095872938632965, 0.17201988399028778, 0.6351627707481384, -1.1164568662643433, 1.7895126342773438, 1.0365350246429443, 1.8487281799316406, 1.0484106540679932, -0.1507493555545807, 1.4887851476669312, 0.06167861819267273, 1.9101389646530151, -0.49477386474609375, 0.6377975344657898, -0.33854663372039795, -1.1591863632202148, 0.8098931312561035, -0.34004563093185425, -2.0013744831085205, -0.8196757435798645, -0.9297298192977905, -0.1713443398475647, -0.7574963569641113, 1.0038328170776367, -0.33649227023124695, -1.425633430480957, 0.20021550357341766, -0.5679128170013428, 0.0864739641547203, -1.178684949874878, 0.3486558794975281, 0.7233797311782837, -0.7306989431381226, 0.04572778940200806, -0.2693078815937042, -1.289241075515747, -0.43676573038101196, 0.22077342867851257, 1.9492952823638916, -0.8170130848884583, 0.9565593600273132, 0.9822923541069031, -0.7842065691947937, -0.07168126851320267, 0.3185287117958069, -0.2845655381679535, 0.7562183141708374, -1.0410624742507935, -0.3520931601524353, 1.2766977548599243, -0.20554667711257935, -0.6778809428215027, 1.570144772529602, 0.6662834286689758, -0.870331346988678, -0.0607420951128006, -0.2039792835712433, -0.774675726890564, -0.07185626029968262, -1.536414623260498, 0.006314162164926529, 0.3159027695655823, -1.49712336063385, -0.423210084438324, -0.16057105362415314, 1.1500624418258667, -0.2687689960002899, 1.3347551822662354, -0.22323556244373322, -0.37614142894744873, -0.3556516468524933, -0.3878452777862549, 0.07987919449806213, -0.1056077629327774, -0.7483213543891907, 0.27074941992759705, -0.7959118485450745, 0.37239566445350647, 1.4765852689743042, 0.33341866731643677, 0.008425341919064522, 0.5272549986839294, 1.166209101676941, 0.35856327414512634, 0.08133125305175781, -0.9146327376365662, -1.5756356716156006, 1.9491963386535645, -1.5159733295440674, 1.9435209035873413, 0.6449393033981323, -0.09092206507921219, -1.7380982637405396, -1.7611620426177979, 1.311705231666565, 1.258844017982483, 2.313213586807251, 0.6263687014579773, 0.2148202806711197, -0.8084728121757507, -0.6179631948471069, 0.4299977123737335, -1.1913161277770996, -0.6999809145927429, 0.19734270870685577, 2.3436005115509033, 1.755953311920166, -0.4511170983314514, -0.18557953834533691, -1.0791497230529785, 1.3825595378875732, -0.13401785492897034, 0.1481582373380661, 1.9809143543243408, -0.242315411567688, -1.170401930809021, 1.3422538042068481, -2.3214502334594727, 0.160383403301239, 1.967785358428955, 0.43458110094070435, -0.005606326274573803, -1.4250563383102417, -0.6375137567520142, -0.23208920657634735, -0.38731181621551514, -1.3598377704620361, 0.6223000288009644, -0.36134254932403564, -0.6935149431228638, -1.3949733972549438, 0.2539669871330261, -1.0572643280029297, -1.6085374355316162, 0.3123524487018585, 1.835463523864746, 1.993819236755371, -0.5150415897369385, 1.5210994482040405, -0.3071722984313965, 0.24061663448810577, 1.2858963012695312, 1.2141684293746948, 3.1217598915100098, 1.9865515232086182, -1.2485538721084595, 0.6702277064323425, -0.1513739675283432, -0.5354952812194824, 1.3439847230911255, -1.2586323022842407, 1.2775659561157227, -0.17392988502979279, -1.1271605491638184, -1.2356719970703125, 0.8118814826011658, 0.32602694630622864, 0.1203305572271347, -0.49239495396614075, 1.2293462753295898, 0.1505545675754547, 1.3042099475860596, 0.6413003206253052, -0.3654695451259613, 0.6061868071556091, -0.5193572640419006, -0.5192781090736389, 1.595327615737915, 0.22721847891807556, -1.3943634033203125, -2.2527613639831543, -0.15959636867046356, -0.8475667238235474, 0.07786248624324799, -0.500227689743042, -0.9745585918426514, 1.7544313669204712, 0.33708977699279785, -1.3178211450576782, -0.17875085771083832, -0.355379581451416, -0.6740743517875671, 2.7692759037017822, -1.3749080896377563, -0.27525046467781067, -1.0689961910247803, -0.7859474420547485, 1.718418002128601, -1.285639762878418, -0.1426955759525299, -1.028702974319458, -0.4782404601573944, -1.419614553451538, -0.5243662595748901, 0.015793750062584877, -0.9466354846954346, 0.8725338578224182, 0.19062161445617676, -1.1823841333389282, -0.49247321486473083, -0.8155790567398071, 0.7731476426124573, -0.058685049414634705, 0.32720947265625, 1.8562531471252441, 0.49503570795059204, -0.40737321972846985, 0.6745240092277527, 1.169134259223938, 0.6838873624801636, -0.5937368869781494, 0.29783928394317627, -0.6971237063407898, 0.19695842266082764, -1.3249192237854004, 0.2955501675605774, -2.819011926651001, 0.5774198174476624, -0.05870164930820465, -0.16653324663639069, -0.03167993575334549, -1.3496495485305786, 1.073009967803955, 2.5961737632751465, -1.243284821510315, 0.4360295832157135, 0.2629930078983307, 1.1606947183609009, -1.6077193021774292, 0.3882547914981842, -0.4565807580947876, 2.08026123046875, 0.2264975607395172, 1.1979479789733887, -0.5246936082839966, -2.290712833404541, 0.6559739708900452, -1.2647027969360352, -1.2453138828277588, 0.8076988458633423, -0.8431114554405212, -0.0005270130932331085, -1.3729504346847534, -0.2489745169878006, -0.8567332625389099, -1.256266713142395, 0.9183768033981323, 0.18868759274482727, 0.43322184681892395, -0.5569897294044495, 0.3437559902667999, -2.197657585144043, -1.3475617170333862, -0.291020929813385, -0.8803038597106934, 0.4859258234500885, -0.36839115619659424, 0.6386814713478088, -0.2883436679840088, 0.008899388834834099, 0.4141905903816223, 1.480666160583496, 3.4409985542297363, 0.3300327658653259, 0.4645093083381653, -0.17557144165039062, -0.9751567840576172, 1.4565378427505493, 0.962997317314148, -0.07029154896736145, -0.5335975289344788, -1.09732186794281, 1.1149911880493164, 1.8891521692276, 0.9649221897125244, 0.014559464529156685, -0.752335250377655, -0.6479032635688782, -0.05684538185596466, 0.11421748250722885, 0.4318099319934845, 0.8584114909172058, 0.13595542311668396, 0.11379984766244888, 1.3914936780929565, 1.0879918336868286, -0.35669341683387756, 0.24623315036296844, -0.7757768630981445, -0.42824795842170715, 0.6395142674446106, 0.3703981339931488, -0.0580596849322319, 0.4062555134296417, -0.9454565048217773, -0.29259416460990906, -0.3790004253387451, -1.039007306098938, -0.6565671563148499, -0.5546707510948181, -0.37752148509025574, 1.6372051239013672, -0.018560823053121567, -0.5557186603546143, -0.09982040524482727, -0.8393994569778442, -0.11216430366039276, -1.108656644821167, 0.31426721811294556, -0.08641987293958664, -0.1632302850484848, -0.07272034883499146, 1.8755955696105957, -1.0193243026733398, -2.072561264038086, 0.3016285002231598, 0.2825842499732971, -0.306753545999527, 0.23513227701187134, 1.4894399642944336, 0.4372720420360565, 1.3294986486434937, 1.351042628288269, 0.9649738669395447, -0.6217299699783325, -1.3972715139389038, 0.653881311416626, 0.9153376221656799, -1.4591162204742432, 0.8735976219177246, 0.13331158459186554, -0.4158690869808197, 0.6893064975738525, 1.111160397529602, 0.4924413561820984, -1.9569367170333862, 0.5854433178901672, -0.8768774271011353, 0.7536218166351318, 0.8372832536697388, 0.7641041278839111, 0.17897789180278778, 0.8326208591461182, -1.1966652870178223, -1.1893047094345093, -0.7192941308021545, -0.7144900560379028, 1.9576244354248047, -0.2400655895471573, 0.7347744703292847, -0.11855915188789368, -1.3224592208862305, -0.06627234816551208, 0.7042894959449768, 0.30301180481910706, -0.49485260248184204, 0.7776258587837219, -0.6680071949958801, -1.0537002086639404, -1.4653816223144531, -0.4909466505050659, -1.1335617303848267, -0.9531722664833069, 1.1261706352233887, 0.7643257975578308, 0.13407279551029205, 1.9101040363311768, 0.7196602821350098, 0.2385716736316681, -2.6921560764312744, 0.7446144223213196, 0.2438930720090866, 0.13556908071041107, 0.7676894664764404, 0.36614108085632324, 0.8908513784408569, 0.04725857824087143, 0.5949157476425171, -2.4785115718841553, 2.3536078929901123, -0.3393493592739105, 0.7070951461791992, -0.06345517933368683, -0.2722296714782715, 1.1166080236434937, 0.6408870816230774, 0.505824625492096, -1.1792417764663696, 0.6861404776573181, -0.6018360257148743, 1.2268744707107544, 0.9456657767295837, -0.7933651804924011, -0.008712220005691051, 1.4158649444580078, 0.4924796223640442, -0.5063353180885315, -0.992644727230072, -0.8945918679237366, 0.9756546020507812, 1.69195556640625, -0.04574022442102432, -0.032630711793899536, 0.8491904735565186, 0.6386561393737793, -1.1880919933319092, 0.14445705711841583, -0.7575996518135071, -0.9240744709968567, 1.651135802268982, 2.0090246200561523, -0.17282971739768982, -0.18055345118045807, -0.7721864581108093, -0.9779942035675049, 0.7778419256210327, 0.1042112410068512, 0.059416212141513824, 0.6735234260559082, -0.6421555280685425, 1.0443564653396606, 1.0114848613739014, 0.9279032349586487, 0.26660600304603577, 0.4067024290561676, 0.42947104573249817, -0.23691366612911224, -1.1817983388900757, -0.1482585370540619, -1.1231141090393066, -2.6611742973327637, 0.5278593301773071, -0.30670365691185, -1.4765514135360718, 0.03294447064399719, -1.1104357242584229, 0.9527024030685425, -0.5861384272575378, -1.2351794242858887, -1.495033621788025, 0.08381114900112152, 0.005145092494785786, 0.8820955753326416, -1.6448311805725098, -0.08461833000183105, 1.1751922369003296, 0.9249378442764282, -0.7093549966812134, 1.0358984470367432, 0.1257283091545105, 1.1225080490112305, 0.9247347712516785, -0.41080623865127563, 0.5006014108657837, 0.1200515478849411, -1.3797863721847534, 0.44904017448425293, 1.1227563619613647, 0.158561572432518, 1.5182054042816162, -0.5136078000068665, 0.17423148453235626, 0.3640523850917816, -0.5920817255973816, -0.42085617780685425, -0.681033194065094, 0.7514433264732361, 0.1359371840953827, -0.8232710957527161, 0.17298729717731476, -0.09756558388471603, -0.14988940954208374, 0.11161306500434875, -1.4573369026184082, -0.21141068637371063, -0.38879144191741943, -0.6049336194992065, -1.2256964445114136, -0.15413442254066467, 1.3707797527313232, -0.686432957649231, -0.06706653535366058, 0.4951578974723816, 0.34765154123306274, 0.544499933719635, 0.5067909955978394, -0.8014068603515625, -0.285441130399704, -0.17273391783237457, -0.37184175848960876, 0.39453360438346863, 1.3850780725479126, -0.0854714885354042, -0.9118005633354187, 0.7277831435203552, -0.15531916916370392, 0.04994715005159378, 1.9241650104522705, 0.094923235476017, -0.6976013779640198, 0.31099212169647217, -0.778416633605957, 1.8426852226257324, 1.7244749069213867, 1.2937804460525513, -0.028398169204592705, -0.9339357614517212, 0.6539421081542969, -0.3286478519439697, -0.4923410713672638, 0.833311140537262, 0.42254993319511414, -0.08603553473949432, -1.367693543434143, 0.7454369068145752, 1.213654637336731, -0.8265365958213806, -0.7945873141288757, 0.028234349563717842, -0.747663676738739, 0.884377121925354, 0.5073140859603882, 0.4404757618904114, 0.3343229293823242, 1.6487886905670166, 0.6865197420120239, -0.4331100285053253, 0.6287420392036438, 0.5463865399360657, -0.04655172675848007, -2.135560989379883, -1.2511284351348877, 0.3874177932739258, -0.551933228969574, -1.5845839977264404, 1.387610912322998, -1.160965085029602, -0.9613572955131531, 0.7031075954437256, 0.19044743478298187, 1.6115179061889648, 0.39344269037246704, 1.5116969347000122, 2.087125062942505, 0.7995150089263916, 0.3261612057685852, 1.3513988256454468, -0.00852463860064745, -0.520673394203186, 1.8431240320205688, -0.42321470379829407, 0.4056638479232788, 1.0750352144241333, -0.19179731607437134, -1.0957659482955933, -0.7580415606498718, -1.2586981058120728, -0.6861587762832642, 1.047664761543274, 0.09236398339271545, -1.1437499523162842, 0.20487578213214874, 1.6107406616210938, 0.09948703646659851, -0.30670011043548584, 0.5665321350097656, 0.3428110182285309, -0.8091598749160767, -0.0600605309009552, -0.9306936860084534, 0.48748135566711426, -0.2397521436214447, -0.2854022979736328, 0.2585771381855011, 0.4994450807571411, 1.3341662883758545, -0.02036270499229431, 0.07296430319547653, 1.1878340244293213, -1.4080750942230225, 1.397699236869812, -0.6263403296470642, 0.25664249062538147, -2.352165937423706, 1.4625837802886963, -0.8228330016136169, 1.8883044719696045, -2.624011516571045, 0.39618414640426636, -0.6201931238174438, -0.5675351023674011, 0.4059428870677948, -0.45340588688850403, 0.1929142028093338, -0.16013509035110474, -0.9695136547088623, 0.09117916226387024, -0.65033358335495, 0.5928937792778015, 1.1076712608337402, 1.3263778686523438, -1.1650255918502808, -0.43759968876838684, -1.810755968093872, -0.23755763471126556, -0.6258812546730042, 0.4325934648513794, -2.0032999515533447, -0.21863535046577454, -1.920409083366394, -2.3199548721313477, -1.3327771425247192, -0.8121448159217834, 1.0905733108520508, 0.1907619833946228, -0.7938404083251953, 1.0544466972351074, -0.3035164177417755, -1.8171807527542114, 1.0202617645263672, -2.1029250621795654 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
> This allows to use datasets for large scale training where map-style datasets are too slow and use too much memory in PyTorch. I second that. e.g. In my last experiment Oscar-en uses 16GB RSS RAM per process and when using multiple processes the host quickly runs out cpu memory.
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
50
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True > This allows to use datasets for large scale training where map-style datasets are too slow and use too much memory in PyTorch. I second that. e.g. In my last experiment Oscar-en uses 16GB RSS RAM per process and when using multiple processes the host quickly runs out cpu memory.
[ -1.277882695198059, -0.9373113512992859, -0.7740324139595032, 1.5673296451568604, -0.2550923824310303, -1.2900761365890503, 0.0703420341014862, -1.0109537839889526, 1.6413134336471558, -0.8726053833961487, 0.3990180492401123, -1.6514431238174438, 0.05712546035647392, -0.41546377539634705, -0.6918919086456299, -0.9208748936653137, -0.42400071024894714, -0.7877992391586304, 1.013239860534668, 2.459284543991089, 1.2417367696762085, -1.3511625528335571, 2.6367883682250977, 0.6890015006065369, -0.1815061718225479, -1.0600159168243408, 0.5418391823768616, 0.1251411736011505, -1.360216736793518, -0.47880351543426514, -0.982448160648346, -0.0814996063709259, -0.5184239745140076, -0.5460413694381714, 0.04562009871006012, 0.35109981894493103, -0.19403207302093506, -0.40568849444389343, -0.5075503587722778, -0.6803664565086365, 0.5186388492584229, -0.40099233388900757, 0.9537442326545715, -0.4785112142562866, 1.8609130382537842, -0.5500357151031494, 0.41314831376075745, 0.651936948299408, 1.3587056398391724, 0.12945911288261414, -0.08519615232944489, 0.2835996150970459, 0.3861694037914276, -0.07002571225166321, 0.49077871441841125, 1.0258185863494873, 0.572084367275238, 0.5984380841255188, 0.698514461517334, -2.065206527709961, 1.417559027671814, -1.1283293962478638, 0.2576271891593933, 1.408830165863037, -1.0350220203399658, 0.33433759212493896, -1.7916193008422852, -0.11517219245433807, 0.4261208772659302, -2.2639219760894775, 0.21412311494350433, -1.2474312782287598, -0.49333733320236206, 1.1118193864822388, 0.29302239418029785, -1.3067562580108643, 0.12642160058021545, -0.37193813920021057, 0.8939945101737976, 0.5634121298789978, 1.166527271270752, -1.6948552131652832, 0.08181004226207733, -0.3319745361804962, 0.057560812681913376, -1.376610517501831, -1.3646268844604492, 0.5508867502212524, 0.5389757752418518, 0.5821327567100525, -0.0444234199821949, 1.0402326583862305, -0.9333701133728027, 0.8376287817955017, -0.9774401187896729, -1.5968486070632935, -1.344465732574463, -2.2854437828063965, -2.27962327003479, 0.8503406047821045, -0.5470879673957825, -0.6101195216178894, 1.9922274351119995, -1.0739929676055908, -1.794525384902954, 1.1065089702606201, 0.17643584311008453, -0.03149803355336189, 2.394430637359619, 0.1778659224510193, -0.6265970468521118, 0.49395257234573364, -0.7053515315055847, 0.905980110168457, -0.4182511866092682, 1.4410384893417358, 0.4227179288864136, -0.962226927280426, 1.6389180421829224, -0.38759613037109375, 0.5482467412948608, -0.5739083290100098, -0.6718493103981018, -0.9165194034576416, 0.3513813316822052, 1.9467400312423706, -0.22607514262199402, 1.6139318943023682, -0.33351844549179077, -1.587282419204712, -1.6120189428329468, 0.8638193607330322, 0.49621206521987915, -0.686276376247406, 0.11870551109313965, -0.2564852237701416, 0.039317984133958817, 0.04002819210290909, 1.1394535303115845, 1.2449194192886353, 0.8324698805809021, -0.31151795387268066, -0.8728405833244324, 0.22831547260284424, 0.02538273110985756, -0.7118387222290039, -1.8169209957122803, -0.3690726161003113, 0.08755913376808167, 0.7005652189254761, -1.2415608167648315, 1.7273937463760376, 1.081309199333191, 1.9820510149002075, 0.9807406663894653, -0.19573357701301575, 1.3963963985443115, 0.002688620239496231, 1.8691262006759644, -0.4214200973510742, 0.7135069370269775, -0.3786346912384033, -1.135305643081665, 0.8013520240783691, -0.3744713366031647, -2.0133159160614014, -0.8424980640411377, -0.9755167365074158, -0.14313049614429474, -0.7776473760604858, 1.0809677839279175, -0.273735910654068, -1.3555793762207031, 0.1943405270576477, -0.5545647740364075, 0.02714654430747032, -1.2369791269302368, 0.34368330240249634, 0.7388817667961121, -0.6913144588470459, 0.0010913833975791931, -0.26595932245254517, -1.3619904518127441, -0.5247905254364014, 0.11043722927570343, 1.881083369255066, -0.8922680616378784, 0.9352251887321472, 0.9672144651412964, -0.7786781787872314, -0.05062735453248024, 0.24716609716415405, -0.27471470832824707, 0.74347984790802, -1.0203272104263306, -0.2982528507709503, 1.2022465467453003, -0.17339789867401123, -0.6201517581939697, 1.4746021032333374, 0.6568397879600525, -0.9369814395904541, -0.11305336654186249, -0.2726043462753296, -0.7883713841438293, -0.10608382523059845, -1.5691968202590942, -0.018887972459197044, 0.19844333827495575, -1.5451195240020752, -0.4082848131656647, -0.12955592572689056, 1.2167444229125977, -0.24809157848358154, 1.3745746612548828, -0.2523632049560547, -0.29931455850601196, -0.43282249569892883, -0.49623286724090576, 0.13816416263580322, -0.08799432218074799, -0.6649941802024841, 0.3968447744846344, -0.7884329557418823, 0.3149286210536957, 1.4954843521118164, 0.3294219374656677, 0.04566630348563194, 0.5085424780845642, 1.0367727279663086, 0.4380747675895691, -0.02868412248790264, -0.9040120244026184, -1.598552942276001, 1.953965663909912, -1.552540898323059, 1.9443728923797607, 0.6695143580436707, -0.11061543226242065, -1.741800308227539, -1.8391268253326416, 1.3654251098632812, 1.2550292015075684, 2.3479135036468506, 0.6989989876747131, 0.25421902537345886, -0.8358817100524902, -0.6566194295883179, 0.3780967891216278, -1.1316343545913696, -0.7702856659889221, 0.1426904797554016, 2.2958009243011475, 1.7928966283798218, -0.5016738772392273, -0.14608962833881378, -0.9717240333557129, 1.2919410467147827, -0.03151259571313858, 0.2331688106060028, 1.9661701917648315, -0.2614155411720276, -1.1454994678497314, 1.3512346744537354, -2.3447091579437256, 0.13297265768051147, 2.01235032081604, 0.4144009053707123, 0.10769565403461456, -1.404158115386963, -0.6301393508911133, -0.20273122191429138, -0.43350526690483093, -1.2699987888336182, 0.6241740584373474, -0.29143258929252625, -0.8375272154808044, -1.4355508089065552, 0.2074059396982193, -1.1243054866790771, -1.5995838642120361, 0.3872612714767456, 1.868417739868164, 2.0528852939605713, -0.6567193865776062, 1.445206880569458, -0.3471352756023407, 0.14767895638942719, 1.1849348545074463, 1.172891616821289, 3.0585086345672607, 1.9675894975662231, -1.1756939888000488, 0.7211889624595642, -0.17301732301712036, -0.48376843333244324, 1.1947402954101562, -1.2178592681884766, 1.2658380270004272, -0.1896749585866928, -1.0632275342941284, -1.2735432386398315, 0.7756645083427429, 0.300342857837677, 0.1706034541130066, -0.48617956042289734, 1.2731223106384277, 0.17144253849983215, 1.3565261363983154, 0.4945293664932251, -0.29666417837142944, 0.538612425327301, -0.47178006172180176, -0.5172662138938904, 1.570264220237732, 0.22129353880882263, -1.4200769662857056, -2.200448513031006, -0.18995746970176697, -0.7862540483474731, 0.036793675273656845, -0.4861947298049927, -0.9070630073547363, 1.716323733329773, 0.364155650138855, -1.229866862297058, -0.16250929236412048, -0.32479429244995117, -0.6438918113708496, 2.733060359954834, -1.4415338039398193, -0.21162095665931702, -1.0323708057403564, -0.6703301668167114, 1.7379064559936523, -1.2412563562393188, -0.13028952479362488, -0.9732834100723267, -0.5048456788063049, -1.427290439605713, -0.5080989599227905, -0.014295566827058792, -0.8992618918418884, 0.768202543258667, 0.1906730681657791, -1.117551326751709, -0.4925330877304077, -0.8051218390464783, 0.795326828956604, -0.013377809897065163, 0.30562642216682434, 1.8531866073608398, 0.3685491681098938, -0.3422814905643463, 0.6973419785499573, 1.2293152809143066, 0.6033568978309631, -0.6400889158248901, 0.2387237250804901, -0.7000734806060791, 0.3714545667171478, -1.2873952388763428, 0.26014944911003113, -2.8987185955047607, 0.5764526128768921, -0.09397900104522705, -0.18699224293231964, -0.06892421841621399, -1.392151951789856, 1.1201204061508179, 2.6181700229644775, -1.157082200050354, 0.5214577317237854, 0.33893492817878723, 1.16405189037323, -1.4869197607040405, 0.42116597294807434, -0.4928298890590668, 2.116366386413574, 0.20972102880477905, 1.1803590059280396, -0.6130998730659485, -2.2451157569885254, 0.6785120368003845, -1.309013843536377, -1.2717012166976929, 0.7231380343437195, -0.9202417135238647, 0.05957579240202904, -1.430981993675232, -0.17957235872745514, -0.9233807921409607, -1.3292564153671265, 0.808212399482727, 0.20821061730384827, 0.4012865126132965, -0.585617184638977, 0.42839476466178894, -2.2777838706970215, -1.3653725385665894, -0.24234072864055634, -0.9807806015014648, 0.42716410756111145, -0.4127252399921417, 0.680367112159729, -0.24470417201519012, 0.05421598628163338, 0.4013063609600067, 1.3647412061691284, 3.412991523742676, 0.1671736091375351, 0.4558393061161041, -0.1803758591413498, -1.014439582824707, 1.5778981447219849, 1.0681108236312866, -0.09179164469242096, -0.5540071725845337, -1.0193469524383545, 1.1319500207901, 1.9835638999938965, 1.0144288539886475, -0.046383872628211975, -0.8502225875854492, -0.6768552660942078, -0.020972590893507004, 0.1315021812915802, 0.492611289024353, 1.0062549114227295, 0.017740759998559952, 0.12189842760562897, 1.4848333597183228, 1.10943603515625, -0.4173946976661682, 0.3271384537220001, -0.8326178193092346, -0.3856222927570343, 0.5421115159988403, 0.4426882565021515, -0.04558965563774109, 0.3961372673511505, -0.8709765672683716, -0.25587156414985657, -0.29297229647636414, -0.9911826848983765, -0.7029395699501038, -0.4170077443122864, -0.43433669209480286, 1.6886894702911377, -0.0007370458915829659, -0.5616273283958435, -0.0878758430480957, -0.8699698448181152, -0.046503979712724686, -1.0986521244049072, 0.3617982566356659, -0.09160245954990387, -0.08818712830543518, -0.08059528470039368, 1.8833723068237305, -1.0464762449264526, -2.0899391174316406, 0.3331453502178192, 0.3579445481300354, -0.307661235332489, 0.17042472958564758, 1.5134644508361816, 0.5693327188491821, 1.4258332252502441, 1.3598642349243164, 1.0381864309310913, -0.6992484331130981, -1.4595036506652832, 0.6487138271331787, 0.932955265045166, -1.4665896892547607, 0.7929419875144958, -0.019715644419193268, -0.3816870152950287, 0.5770576000213623, 1.174225926399231, 0.5262815356254578, -1.9327044486999512, 0.7486281394958496, -0.9060790538787842, 0.7286343574523926, 0.7637657523155212, 0.7914233207702637, 0.17642360925674438, 0.8034679293632507, -1.1878384351730347, -1.0706779956817627, -0.8088331818580627, -0.6914136409759521, 1.906201720237732, -0.27776578068733215, 0.6759496331214905, -0.10116240382194519, -1.2447377443313599, -0.05795753374695778, 0.6886463165283203, 0.2922840416431427, -0.33326783776283264, 0.8176854848861694, -0.611127495765686, -1.1681586503982544, -1.4421277046203613, -0.4456188678741455, -1.0379858016967773, -0.9513217210769653, 1.08454430103302, 0.7008894681930542, 0.21694768965244293, 2.0234663486480713, 0.6465744376182556, 0.29438191652297974, -2.7228238582611084, 0.9068769216537476, 0.1995033323764801, 0.18429744243621826, 0.7854593396186829, 0.40571409463882446, 0.9840995073318481, -0.060945719480514526, 0.5287669897079468, -2.431094169616699, 2.3882579803466797, -0.3256312310695648, 0.6331925392150879, 0.02479110285639763, -0.1665879786014557, 1.0595908164978027, 0.7060874104499817, 0.5385066866874695, -1.1962265968322754, 0.6565711498260498, -0.632491409778595, 1.2932755947113037, 0.8888612389564514, -0.7157424092292786, -0.06714638322591782, 1.23128342628479, 0.4933937191963196, -0.4458673894405365, -1.0298864841461182, -0.8892946243286133, 0.9408236145973206, 1.6517457962036133, -0.15355005860328674, 0.02308831922709942, 0.7050924897193909, 0.5756760239601135, -1.2808703184127808, 0.002342069521546364, -0.7922623753547668, -0.90925532579422, 1.6300225257873535, 1.9524641036987305, -0.08821618556976318, -0.19229848682880402, -0.7835604548454285, -1.0663002729415894, 0.7624931931495667, 0.055146168917417526, 0.2517286539077759, 0.7134910225868225, -0.6148738265037537, 1.1299468278884888, 0.94709312915802, 0.8638814687728882, 0.11821901798248291, 0.3136097490787506, 0.37150585651397705, -0.14072290062904358, -1.138924241065979, -0.19014409184455872, -1.0599281787872314, -2.6072323322296143, 0.43902117013931274, -0.35299763083457947, -1.355928659439087, -0.006409918889403343, -1.0295991897583008, 0.8715012073516846, -0.542464017868042, -1.1249350309371948, -1.4477661848068237, 0.08079101145267487, -0.12474465370178223, 0.8613137602806091, -1.6240872144699097, -0.12011125683784485, 1.1820813417434692, 0.9459080100059509, -0.7463537454605103, 1.187825083732605, 0.16830293834209442, 1.0716373920440674, 0.7735630869865417, -0.30379417538642883, 0.5549459457397461, 0.13010898232460022, -1.339206337928772, 0.44463762640953064, 1.14645516872406, 0.17670169472694397, 1.3949682712554932, -0.586020827293396, 0.11988277733325958, 0.415959894657135, -0.5419185757637024, -0.42983999848365784, -0.6646448969841003, 0.8494197130203247, 0.12004980444908142, -0.9088402390480042, 0.04795753210783005, -0.24378183484077454, -0.104962557554245, 0.10176035761833191, -1.4592127799987793, -0.30734938383102417, -0.43954360485076904, -0.5344924330711365, -1.2061556577682495, -0.04522395133972168, 1.4080523252487183, -0.7745818495750427, -0.07000520825386047, 0.5116637945175171, 0.38398826122283936, 0.510520875453949, 0.5728573203086853, -0.7706122398376465, -0.23446853458881378, -0.1333555281162262, -0.32116907835006714, 0.43059036135673523, 1.3908830881118774, -0.024851763620972633, -1.0400333404541016, 0.6810811161994934, -0.11925049126148224, -0.02699897438287735, 1.9948092699050903, 0.07639548182487488, -0.7893624305725098, 0.2249031662940979, -0.7175204157829285, 1.8341649770736694, 1.6327507495880127, 1.3589346408843994, -0.09396427869796753, -0.8786786794662476, 0.6838605403900146, -0.24272195994853973, -0.3467172384262085, 0.8057205080986023, 0.4504075348377228, -0.17419396340847015, -1.4740242958068848, 0.560822606086731, 1.1783138513565063, -0.8343098759651184, -0.7452124953269958, 0.002797842025756836, -0.7546290159225464, 0.9178847670555115, 0.6699061393737793, 0.41060107946395874, 0.3810068666934967, 1.6924333572387695, 0.7316397428512573, -0.45335710048675537, 0.46447625756263733, 0.5184574723243713, -0.16957277059555054, -2.064157009124756, -1.112849235534668, 0.4039468765258789, -0.5329036116600037, -1.5805059671401978, 1.405786156654358, -1.2196400165557861, -0.87721186876297, 0.5966221690177917, 0.11956183612346649, 1.5529917478561401, 0.42227789759635925, 1.5641347169876099, 2.06252121925354, 0.875419557094574, 0.2537558972835541, 1.3286118507385254, -0.15116317570209503, -0.46818578243255615, 1.7524460554122925, -0.454468697309494, 0.41429176926612854, 1.0891326665878296, -0.2917660176753998, -1.017562747001648, -0.8010702729225159, -1.2502354383468628, -0.6468406915664673, 1.0813547372817993, 0.1835055947303772, -1.2090920209884644, 0.195441335439682, 1.531216025352478, 0.15800781548023224, -0.30137503147125244, 0.5372979640960693, 0.37013137340545654, -0.8496913313865662, -0.02127061039209366, -0.8927893042564392, 0.4598885178565979, -0.18778511881828308, -0.4113868772983551, 0.25994738936424255, 0.48245102167129517, 1.2980552911758423, -0.0027578999288380146, 0.15807980298995972, 1.186137080192566, -1.3380013704299927, 1.4183286428451538, -0.6317410469055176, 0.2921640872955322, -2.2864673137664795, 1.4652539491653442, -0.7964006662368774, 1.8639923334121704, -2.7032344341278076, 0.41156184673309326, -0.59159255027771, -0.5560784935951233, 0.37139183282852173, -0.46188491582870483, 0.18069179356098175, -0.15766024589538574, -0.9998796582221985, 0.05111401155591011, -0.6418080925941467, 0.6000784039497375, 0.9906848669052124, 1.2249153852462769, -1.079689621925354, -0.4354160726070404, -1.8403301239013672, -0.2790883183479309, -0.6374334096908569, 0.4127309322357178, -2.1229753494262695, -0.26939886808395386, -2.0150949954986572, -2.217205762863159, -1.368539571762085, -0.764286458492279, 1.2230184078216553, 0.13128316402435303, -0.8707708716392517, 1.052934169769287, -0.31424257159233093, -1.7732195854187012, 1.0969882011413574, -2.139195680618286 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
>And since it can be tricky to manually find the "initial" version of a dataset in the cache, maybe load_dataset could return an iterable dataset streamed from the cache if streaming=True and the cache is up-to-date. This is exactly the need on JeanZay (HPC) - I have the dataset cache ready, but the compute node is offline, so making streaming work off a local cache would address that need. If you will have a working POC I can be the tester.
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
81
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True >And since it can be tricky to manually find the "initial" version of a dataset in the cache, maybe load_dataset could return an iterable dataset streamed from the cache if streaming=True and the cache is up-to-date. This is exactly the need on JeanZay (HPC) - I have the dataset cache ready, but the compute node is offline, so making streaming work off a local cache would address that need. If you will have a working POC I can be the tester.
[ -1.2290716171264648, -0.9090748429298401, -0.806638777256012, 1.565148115158081, -0.22343139350414276, -1.2788716554641724, 0.0906263217329979, -1.0198851823806763, 1.6406433582305908, -0.9181777834892273, 0.4443301260471344, -1.7047456502914429, 0.11137185990810394, -0.4876655042171478, -0.7684443593025208, -0.843840479850769, -0.3647015690803528, -0.7967377305030823, 0.959239661693573, 2.4395194053649902, 1.186554193496704, -1.3277764320373535, 2.6424872875213623, 0.6544943451881409, -0.1991993933916092, -1.117073655128479, 0.5118825435638428, 0.04255066066980362, -1.2759112119674683, -0.5762695670127869, -1.0295631885528564, -0.0467546284198761, -0.45752349495887756, -0.5160366296768188, -0.012877160683274269, 0.36559706926345825, -0.27755510807037354, -0.3278559744358063, -0.4863804876804352, -0.7833930253982544, 0.48238617181777954, -0.45118165016174316, 1.0001355409622192, -0.43583622574806213, 1.9131766557693481, -0.5138349533081055, 0.3481113314628601, 0.7123982906341553, 1.3199256658554077, 0.1579303741455078, -0.03789133206009865, 0.26365265250205994, 0.39898553490638733, -0.1128198504447937, 0.5178161263465881, 1.013911485671997, 0.512438952922821, 0.6064344048500061, 0.7023065686225891, -2.171295404434204, 1.5021306276321411, -1.1703194379806519, 0.29028141498565674, 1.3386175632476807, -0.9769874215126038, 0.34451553225517273, -1.7295255661010742, -0.12291168421506882, 0.4006115794181824, -2.250683307647705, 0.2890687882900238, -1.2760601043701172, -0.5368764996528625, 1.0826109647750854, 0.2707628607749939, -1.2720520496368408, 0.09154245257377625, -0.3477117419242859, 0.8995504379272461, 0.48524782061576843, 1.0600489377975464, -1.7116235494613647, -0.009165510535240173, -0.34355583786964417, 0.1510600596666336, -1.4369268417358398, -1.4818394184112549, 0.5490253567695618, 0.5370578765869141, 0.5350306630134583, -0.09389709681272507, 1.1033949851989746, -0.9644094109535217, 0.8296180367469788, -0.9358116984367371, -1.5455282926559448, -1.3552790880203247, -2.334885358810425, -2.2712347507476807, 0.7673672437667847, -0.583483874797821, -0.626640260219574, 2.0523672103881836, -1.160485029220581, -1.673539400100708, 1.184017300605774, 0.15061965584754944, 0.04196164011955261, 2.420469045639038, 0.15027838945388794, -0.5779885053634644, 0.4473876655101776, -0.6493260860443115, 0.9485011696815491, -0.420792818069458, 1.3665403127670288, 0.45268771052360535, -1.0539518594741821, 1.6329636573791504, -0.4125901162624359, 0.45933428406715393, -0.6102079749107361, -0.6210333108901978, -0.8952975273132324, 0.33868148922920227, 1.837011456489563, -0.26111793518066406, 1.5628494024276733, -0.30751505494117737, -1.5337454080581665, -1.6536107063293457, 0.9286854267120361, 0.4173524081707001, -0.7881554365158081, 0.13540533185005188, -0.278775691986084, 0.06862856447696686, -0.054803214967250824, 1.1306018829345703, 1.195125937461853, 0.7550507187843323, -0.30043846368789673, -0.9243273138999939, 0.2858900725841522, -0.0359010249376297, -0.7420051693916321, -1.7478911876678467, -0.3951611816883087, 0.13421528041362762, 0.7033579349517822, -1.152121901512146, 1.794115424156189, 1.110941767692566, 1.8097233772277832, 1.0504564046859741, -0.15282049775123596, 1.420491099357605, 0.07587471604347229, 1.8376110792160034, -0.5431910753250122, 0.652722954750061, -0.40077418088912964, -1.144500970840454, 0.7548633217811584, -0.34703630208969116, -1.9776413440704346, -0.8031513690948486, -0.9535772204399109, -0.1915612816810608, -0.8124381303787231, 1.0079256296157837, -0.3463371992111206, -1.3842443227767944, 0.23381303250789642, -0.5453925728797913, 0.11245233565568924, -1.2557001113891602, 0.4104354977607727, 0.7009130120277405, -0.709187388420105, 0.06128397583961487, -0.26003405451774597, -1.3305094242095947, -0.4526408016681671, 0.2025982141494751, 1.9513951539993286, -0.7797625660896301, 0.9023486971855164, 0.9322085380554199, -0.7168749570846558, -0.145751953125, 0.3808601498603821, -0.28605809807777405, 0.7164319753646851, -0.9993864297866821, -0.3300575017929077, 1.1976038217544556, -0.23029759526252747, -0.6450515389442444, 1.4813578128814697, 0.703308641910553, -0.9025201201438904, -0.11914068460464478, -0.26634663343429565, -0.7819071412086487, -0.07030121237039566, -1.566881537437439, -0.05430735647678375, 0.24701528251171112, -1.5781922340393066, -0.37507322430610657, -0.09678816795349121, 1.1630765199661255, -0.2756378948688507, 1.363652229309082, -0.30019620060920715, -0.37523800134658813, -0.34709039330482483, -0.3612275719642639, 0.10075247287750244, -0.07231646776199341, -0.6977958083152771, 0.2797167897224426, -0.7721437811851501, 0.32354074716567993, 1.4797557592391968, 0.38165169954299927, 0.08015298843383789, 0.5146743655204773, 1.0926979780197144, 0.38732028007507324, 0.03531515598297119, -0.9048203825950623, -1.5535434484481812, 1.9623494148254395, -1.5577152967453003, 1.9897751808166504, 0.7231002449989319, -0.08900235593318939, -1.8148084878921509, -1.7526869773864746, 1.2998039722442627, 1.3058284521102905, 2.2957050800323486, 0.6309605240821838, 0.2185301035642624, -0.8053580522537231, -0.6724667549133301, 0.47421520948410034, -1.157405138015747, -0.762557864189148, 0.10369474440813065, 2.3243489265441895, 1.8182674646377563, -0.42773789167404175, -0.19468578696250916, -0.9919354319572449, 1.3111686706542969, -0.1290900558233261, 0.1020679846405983, 1.9311105012893677, -0.3011571168899536, -1.146682858467102, 1.3140438795089722, -2.385006904602051, 0.10209996998310089, 1.979426383972168, 0.45184746384620667, -0.030230820178985596, -1.3582481145858765, -0.6729439496994019, -0.2100633680820465, -0.3799709379673004, -1.3025039434432983, 0.5724910497665405, -0.4233432114124298, -0.7583357095718384, -1.4370232820510864, 0.2146206498146057, -1.1142319440841675, -1.5873879194259644, 0.3947058916091919, 1.7731707096099854, 2.0774998664855957, -0.5777267813682556, 1.4619667530059814, -0.26145124435424805, 0.2443000227212906, 1.2250887155532837, 1.219488263130188, 3.158210039138794, 1.9648172855377197, -1.25235116481781, 0.6093834638595581, -0.10783454030752182, -0.5161928534507751, 1.334193229675293, -1.2086312770843506, 1.2869765758514404, -0.07866345345973969, -1.1728843450546265, -1.2467554807662964, 0.847260057926178, 0.31054264307022095, 0.10156647861003876, -0.4556027352809906, 1.250992774963379, 0.1649150550365448, 1.302608847618103, 0.5971149206161499, -0.3402647078037262, 0.5963294506072998, -0.557422935962677, -0.5291098952293396, 1.5660018920898438, 0.18364617228507996, -1.47260320186615, -2.2331104278564453, -0.18005190789699554, -0.7827108502388, 0.09087643772363663, -0.5104184150695801, -1.0356942415237427, 1.6643033027648926, 0.3245020806789398, -1.289771318435669, -0.19412796199321747, -0.3978075683116913, -0.7206185460090637, 2.7052767276763916, -1.3418737649917603, -0.28457343578338623, -1.0277745723724365, -0.7222728133201599, 1.680048942565918, -1.3065531253814697, -0.13480700552463531, -1.0708602666854858, -0.4996965527534485, -1.4331531524658203, -0.48613855242729187, -0.013044685125350952, -0.9180867671966553, 0.8117367029190063, 0.22300784289836884, -1.1100280284881592, -0.48760509490966797, -0.83017897605896, 0.741786003112793, -0.07748381793498993, 0.3329792320728302, 1.8104705810546875, 0.4449729323387146, -0.4137741029262543, 0.6816626191139221, 1.2073609828948975, 0.6210387349128723, -0.5594055652618408, 0.26705777645111084, -0.6873357892036438, 0.2547059655189514, -1.2701014280319214, 0.3023059070110321, -2.8753154277801514, 0.6080147624015808, -0.050121456384658813, -0.18920168280601501, -0.07136854529380798, -1.3701534271240234, 1.0417734384536743, 2.596867322921753, -1.1825131177902222, 0.5634955763816833, 0.3088392913341522, 1.2185378074645996, -1.6294420957565308, 0.4227762222290039, -0.46731382608413696, 2.144289016723633, 0.2032455950975418, 1.1236704587936401, -0.5992950201034546, -2.3225364685058594, 0.6481772661209106, -1.273074746131897, -1.2450071573257446, 0.7099272608757019, -0.8624442219734192, 0.03452973812818527, -1.3807604312896729, -0.21427826583385468, -0.9209293723106384, -1.2625746726989746, 0.8671388030052185, 0.2076309323310852, 0.4584387242794037, -0.5503461956977844, 0.3356196880340576, -2.1755025386810303, -1.299170970916748, -0.1933457851409912, -0.8996677398681641, 0.4985634684562683, -0.3599124252796173, 0.668061375617981, -0.2723058760166168, 0.05814310908317566, 0.41388845443725586, 1.4671152830123901, 3.3975741863250732, 0.26607534289360046, 0.5251851677894592, -0.1864236444234848, -0.9590653777122498, 1.4829819202423096, 0.9465550184249878, -0.09399963170289993, -0.5800922513008118, -1.0777314901351929, 1.1673588752746582, 1.8781800270080566, 0.9319470524787903, 0.04827968776226044, -0.7442559599876404, -0.6054713129997253, -0.05365121364593506, 0.16776184737682343, 0.44278496503829956, 0.9723241329193115, 0.08172038942575455, 0.12874507904052734, 1.4385507106781006, 1.114964246749878, -0.4160265326499939, 0.29137083888053894, -0.7375769019126892, -0.45580142736434937, 0.5477371215820312, 0.4249579608440399, -0.10764750838279724, 0.43270033597946167, -0.8291015028953552, -0.3201616704463959, -0.3309231996536255, -1.0545297861099243, -0.5992647409439087, -0.49340012669563293, -0.3314949870109558, 1.642822265625, 0.037041403353214264, -0.47724148631095886, -0.03929368406534195, -0.9042402505874634, -0.09277456998825073, -1.1306995153427124, 0.24526993930339813, -0.0957980751991272, -0.16511444747447968, -0.028454743325710297, 1.9296038150787354, -0.9807464480400085, -2.1049892902374268, 0.2678034007549286, 0.27857714891433716, -0.20903447270393372, 0.19604533910751343, 1.516221046447754, 0.4413767457008362, 1.4086521863937378, 1.3617359399795532, 0.9621614813804626, -0.6521453857421875, -1.377018690109253, 0.6963359713554382, 0.920259416103363, -1.4325073957443237, 0.9074835181236267, 0.08891494572162628, -0.419198215007782, 0.6785801649093628, 1.1952828168869019, 0.48820915818214417, -1.9084193706512451, 0.6679449677467346, -0.9050915837287903, 0.7703893184661865, 0.8272161483764648, 0.7681453824043274, 0.18492667376995087, 0.8800771832466125, -1.1715457439422607, -1.1651402711868286, -0.7791999578475952, -0.6807723045349121, 1.9843157529830933, -0.2998451292514801, 0.7467210292816162, -0.10411873459815979, -1.3001527786254883, -0.028125597164034843, 0.7180331945419312, 0.2430938333272934, -0.380074143409729, 0.782588005065918, -0.7221798300743103, -1.1523000001907349, -1.5331697463989258, -0.4189879596233368, -1.093818187713623, -0.8933394551277161, 1.1672667264938354, 0.7843033075332642, 0.0014885412529110909, 1.9692426919937134, 0.6571527123451233, 0.23679421842098236, -2.691070079803467, 0.8096844553947449, 0.23413912951946259, 0.15874312818050385, 0.8233458399772644, 0.3662216067314148, 0.9397755861282349, 0.10749714076519012, 0.5334409475326538, -2.4446778297424316, 2.349546194076538, -0.3224058151245117, 0.7934653759002686, -0.05911833792924881, -0.2667701244354248, 1.115563988685608, 0.7021512985229492, 0.570999026298523, -1.089749813079834, 0.7189826965332031, -0.5533410906791687, 1.2536633014678955, 1.041418194770813, -0.7309060096740723, 0.023987242951989174, 1.3084884881973267, 0.4924171566963196, -0.5103990435600281, -1.0113521814346313, -0.8538270592689514, 0.9203506112098694, 1.7631852626800537, -0.06459455192089081, -0.03841152787208557, 0.7446008920669556, 0.6876931190490723, -1.1878279447555542, 0.167618989944458, -0.7656041979789734, -1.0097365379333496, 1.6032307147979736, 2.034843683242798, -0.10371967405080795, -0.14796842634677887, -0.7180471420288086, -1.082629919052124, 0.7774789333343506, 0.06437902897596359, 0.18621458113193512, 0.6635048985481262, -0.6392855644226074, 1.0414822101593018, 0.9293524622917175, 0.8971161842346191, 0.26787954568862915, 0.35817578434944153, 0.41030851006507874, -0.23819589614868164, -1.1836005449295044, -0.21196645498275757, -1.1502165794372559, -2.683220148086548, 0.5359129905700684, -0.3322991728782654, -1.4720144271850586, 0.04688253998756409, -1.0579406023025513, 0.9059732556343079, -0.5258331894874573, -1.1560012102127075, -1.4938788414001465, 0.038172490894794464, -0.0709085762500763, 0.8671149015426636, -1.6267842054367065, -0.07402583211660385, 1.1924031972885132, 0.9558461308479309, -0.6782479286193848, 1.0541967153549194, 0.10931430011987686, 1.1592752933502197, 0.8848229050636292, -0.4846383333206177, 0.47623828053474426, 0.1639425903558731, -1.405781626701355, 0.4094497263431549, 1.161574125289917, 0.1468796283006668, 1.5001100301742554, -0.46500101685523987, 0.16795222461223602, 0.4198470115661621, -0.5421063303947449, -0.4714953303337097, -0.6092953085899353, 0.8287851214408875, 0.09297787398099899, -0.8247739672660828, 0.11263839155435562, -0.15762776136398315, -0.20683808624744415, 0.10347365587949753, -1.4434672594070435, -0.24706490337848663, -0.4800420105457306, -0.6065595746040344, -1.2953234910964966, -0.12602481245994568, 1.4073796272277832, -0.7418973445892334, -0.11413238942623138, 0.4594375789165497, 0.37616562843322754, 0.5003509521484375, 0.5632289052009583, -0.7573647499084473, -0.2999502420425415, -0.14927338063716888, -0.3754095137119293, 0.44223716855049133, 1.3348972797393799, -0.15199756622314453, -0.8991991877555847, 0.653812050819397, -0.07446103543043137, 0.03396707773208618, 1.931081771850586, 0.060754939913749695, -0.6922545433044434, 0.3060277998447418, -0.710313081741333, 1.8610868453979492, 1.6384080648422241, 1.309937596321106, -0.09486319124698639, -0.880334198474884, 0.7379357218742371, -0.28625279664993286, -0.4060291349887848, 0.8677111864089966, 0.45726537704467773, -0.07293456792831421, -1.4388964176177979, 0.6821002960205078, 1.1059945821762085, -0.859497606754303, -0.7905503511428833, -0.037719421088695526, -0.7704890370368958, 0.8995310068130493, 0.543846845626831, 0.4191782474517822, 0.3673354983329773, 1.7262771129608154, 0.7013376951217651, -0.5200448632240295, 0.6190458536148071, 0.4870876967906952, -0.12725454568862915, -2.1333296298980713, -1.1200898885726929, 0.2957400977611542, -0.4773203432559967, -1.5167977809906006, 1.3953309059143066, -1.1585639715194702, -0.9716960787773132, 0.6625612378120422, 0.12865373492240906, 1.5215288400650024, 0.3139382600784302, 1.5725696086883545, 2.0182387828826904, 0.8148079514503479, 0.26231223344802856, 1.3663088083267212, -0.021338794380426407, -0.4648649990558624, 1.8818212747573853, -0.41000643372535706, 0.3880593478679657, 1.082115650177002, -0.24650156497955322, -1.0935684442520142, -0.7537165880203247, -1.129294753074646, -0.7174518704414368, 1.0623778104782104, 0.06703691184520721, -1.110039472579956, 0.19981983304023743, 1.5516324043273926, 0.11425039917230606, -0.2862817049026489, 0.5067961812019348, 0.44612905383110046, -0.7458078861236572, -0.0847572460770607, -0.8848562836647034, 0.5136672258377075, -0.2805491089820862, -0.328692227602005, 0.22856956720352173, 0.445956289768219, 1.32523775100708, -0.033142976462841034, 0.09214602410793304, 1.2148462533950806, -1.3687684535980225, 1.3318177461624146, -0.6213393211364746, 0.2129133641719818, -2.3969507217407227, 1.501025676727295, -0.8589639067649841, 1.9151049852371216, -2.622544527053833, 0.48189523816108704, -0.626905083656311, -0.5582525730133057, 0.4565165936946869, -0.3913895785808563, 0.2222939133644104, -0.2095884531736374, -0.9563574194908142, 0.03206043690443039, -0.6525509357452393, 0.5450045466423035, 1.118624210357666, 1.259163498878479, -1.1094814538955688, -0.4191807210445404, -1.7973273992538452, -0.22664587199687958, -0.700682520866394, 0.34895560145378113, -2.042118549346924, -0.2348385602235794, -2.0382466316223145, -2.274298906326294, -1.336574673652649, -0.826732873916626, 1.145387053489685, 0.22833774983882904, -0.8276147842407227, 1.062179684638977, -0.30780261754989624, -1.7124741077423096, 1.0814478397369385, -2.035017728805542 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
> Yes, I see how this can be useful. Still, I think Dataset.to_iterable + IterableDataset.from_file would be much cleaner in terms of the API design (and more flexible since load_dataset can only access the "initial" (unprocessed) version of a dataset). I like `IterableDataset.from_file` as well. On the other hand `Dataset.to_iterable` first requires to load a Dataset object, which can take time depending on your hardware and your dataset size (sometimes 1h+). > And since it can be tricky to manually find the "initial" version of a dataset in the cache, maybe load_dataset could return an iterable dataset streamed from the cache if streaming=True and the cache is up-to-date. That would definitely do the job. I was suggesting a different parameter just to make explicit the difference between - streaming from the raw data - streaming from the local cache But I'd be fine with streaming from cache is the cache is up-to-date since it's always faster. We could log a message as usual to make it explicit that the cache is used
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
172
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True > Yes, I see how this can be useful. Still, I think Dataset.to_iterable + IterableDataset.from_file would be much cleaner in terms of the API design (and more flexible since load_dataset can only access the "initial" (unprocessed) version of a dataset). I like `IterableDataset.from_file` as well. On the other hand `Dataset.to_iterable` first requires to load a Dataset object, which can take time depending on your hardware and your dataset size (sometimes 1h+). > And since it can be tricky to manually find the "initial" version of a dataset in the cache, maybe load_dataset could return an iterable dataset streamed from the cache if streaming=True and the cache is up-to-date. That would definitely do the job. I was suggesting a different parameter just to make explicit the difference between - streaming from the raw data - streaming from the local cache But I'd be fine with streaming from cache is the cache is up-to-date since it's always faster. We could log a message as usual to make it explicit that the cache is used
[ -1.2615983486175537, -0.9546722173690796, -0.732764482498169, 1.4907504320144653, -0.2046111524105072, -1.2499337196350098, 0.11575119197368622, -1.0419470071792603, 1.6616331338882446, -0.8744317293167114, 0.38723519444465637, -1.6974396705627441, 0.015965620055794716, -0.46230530738830566, -0.7547509670257568, -0.8616952300071716, -0.45795658230781555, -0.7873963713645935, 0.8971273303031921, 2.44527268409729, 1.182880163192749, -1.427022099494934, 2.628058433532715, 0.6282963752746582, -0.11211839318275452, -1.0969562530517578, 0.448830783367157, 0.11948703974485397, -1.3040006160736084, -0.48482072353363037, -0.9754067063331604, -0.07719244062900543, -0.5515789985656738, -0.5474339127540588, 0.05062750726938248, 0.3551296591758728, -0.24368169903755188, -0.42078760266304016, -0.5061773657798767, -0.7850908637046814, 0.5231528282165527, -0.4397962689399719, 1.0113452672958374, -0.3723141551017761, 1.8722771406173706, -0.5533925294876099, 0.4141974449157715, 0.7472745180130005, 1.3495221138000488, 0.20457865297794342, 0.001174749806523323, 0.3093523383140564, 0.3941754996776581, -0.04860413819551468, 0.5059826374053955, 1.026474118232727, 0.5872857570648193, 0.5629293918609619, 0.710986316204071, -2.2016279697418213, 1.4164246320724487, -1.1233694553375244, 0.36753958463668823, 1.343062162399292, -0.9980632066726685, 0.39797043800354004, -1.7691936492919922, -0.09764710068702698, 0.5258978009223938, -2.220360517501831, 0.23895780742168427, -1.3054170608520508, -0.4369133710861206, 1.0730663537979126, 0.26340287923812866, -1.1979230642318726, 0.16959799826145172, -0.42493757605552673, 0.9226011633872986, 0.5188436508178711, 1.1274960041046143, -1.758338212966919, 0.013786617666482925, -0.29544544219970703, 0.2306787073612213, -1.3262403011322021, -1.5001710653305054, 0.4834170341491699, 0.5844669342041016, 0.5020756125450134, -0.10257580876350403, 1.0789241790771484, -0.9753974676132202, 0.7963877320289612, -0.9835958480834961, -1.514570951461792, -1.4296109676361084, -2.252542018890381, -2.276855707168579, 0.7624920606613159, -0.553026556968689, -0.5637762546539307, 2.0342888832092285, -1.1374433040618896, -1.7401912212371826, 1.1857553720474243, 0.17905782163143158, 0.009981783106923103, 2.3616929054260254, 0.08077731728553772, -0.6802868843078613, 0.4475416839122772, -0.6506978273391724, 0.8457029461860657, -0.420329213142395, 1.3222987651824951, 0.45030447840690613, -1.0202950239181519, 1.5815341472625732, -0.4504604935646057, 0.5480859279632568, -0.6540583968162537, -0.5675275325775146, -0.8569512367248535, 0.33304280042648315, 1.846331238746643, -0.2635832130908966, 1.6012550592422485, -0.30702483654022217, -1.590815782546997, -1.6360974311828613, 0.9216416478157043, 0.37815219163894653, -0.7638666033744812, 0.025905689224600792, -0.26004546880722046, 0.07959013432264328, -0.05176182836294174, 1.0728788375854492, 1.173423171043396, 0.7591004371643066, -0.32765793800354004, -0.9455478191375732, 0.17654214799404144, -0.06982073187828064, -0.7502047419548035, -1.7268108129501343, -0.4024002254009247, 0.1576889604330063, 0.6459475159645081, -1.1750236749649048, 1.7446125745773315, 1.0538901090621948, 1.855973720550537, 1.0425513982772827, -0.2752866744995117, 1.5205813646316528, 0.09982920438051224, 1.872750997543335, -0.47863540053367615, 0.6940094232559204, -0.3391285836696625, -1.1858227252960205, 0.7362224459648132, -0.32057249546051025, -2.007948160171509, -0.766477644443512, -0.8547887206077576, -0.18520428240299225, -0.7534239888191223, 0.9796821475028992, -0.2784140408039093, -1.4281796216964722, 0.2341502606868744, -0.5398576855659485, 0.13982513546943665, -1.1932132244110107, 0.371911883354187, 0.7404727339744568, -0.7171590924263, 0.08241039514541626, -0.27328717708587646, -1.3611207008361816, -0.4066486358642578, 0.2525792121887207, 1.903326153755188, -0.7870418429374695, 0.899058997631073, 0.9727950692176819, -0.7404083013534546, -0.04220101982355118, 0.30425453186035156, -0.2523832619190216, 0.8040448427200317, -1.0127815008163452, -0.3163866102695465, 1.301125407218933, -0.23371891677379608, -0.6342703700065613, 1.4959537982940674, 0.682242214679718, -0.9236090779304504, -0.15278780460357666, -0.19667553901672363, -0.81365567445755, -0.07694864273071289, -1.5706639289855957, -0.00962490402162075, 0.23639842867851257, -1.5214149951934814, -0.4037077724933624, -0.195424422621727, 1.183158040046692, -0.19806797802448273, 1.4031164646148682, -0.3160516023635864, -0.29674825072288513, -0.3668423891067505, -0.3420129418373108, 0.17453277111053467, -0.1858484148979187, -0.696240246295929, 0.2590211033821106, -0.826870858669281, 0.3165459930896759, 1.4632316827774048, 0.39106398820877075, 0.029810896143317223, 0.4834658205509186, 1.1049002408981323, 0.3373323082923889, 0.01305016502737999, -0.8607705235481262, -1.5686445236206055, 2.058905601501465, -1.4795849323272705, 1.9684447050094604, 0.7155481576919556, -0.13259242475032806, -1.7875601053237915, -1.7426378726959229, 1.308295726776123, 1.2303576469421387, 2.365448236465454, 0.5599596500396729, 0.27377477288246155, -0.8362724184989929, -0.6573889851570129, 0.39351266622543335, -1.0882742404937744, -0.756110668182373, 0.16744811832904816, 2.3416879177093506, 1.7412079572677612, -0.467804878950119, -0.16468670964241028, -1.0569862127304077, 1.3850334882736206, -0.22898414731025696, 0.17529252171516418, 1.9547240734100342, -0.22588036954402924, -1.1558481454849243, 1.3859702348709106, -2.358889579772949, 0.17512017488479614, 1.9646666049957275, 0.4364303648471832, 0.04149343818426132, -1.3872123956680298, -0.6545693278312683, -0.23864248394966125, -0.33646872639656067, -1.3002477884292603, 0.5663537979125977, -0.3884583115577698, -0.7103345394134521, -1.4603129625320435, 0.16636499762535095, -1.0990079641342163, -1.611389398574829, 0.29181841015815735, 1.800704836845398, 1.9590184688568115, -0.5838338136672974, 1.4257956743240356, -0.27925509214401245, 0.23172029852867126, 1.2257392406463623, 1.1989420652389526, 3.138333797454834, 1.9976236820220947, -1.2856627702713013, 0.5989711284637451, -0.12120893597602844, -0.5114478468894958, 1.2010797262191772, -1.2644553184509277, 1.3312090635299683, -0.13545095920562744, -1.1963636875152588, -1.1603953838348389, 0.952090322971344, 0.38529452681541443, 0.10251546651124954, -0.5058808326721191, 1.239695429801941, 0.1067369133234024, 1.348036527633667, 0.6245989203453064, -0.3732886016368866, 0.626248836517334, -0.5143216252326965, -0.5944466590881348, 1.5857176780700684, 0.16444948315620422, -1.4389842748641968, -2.2404818534851074, -0.20545175671577454, -0.8399825692176819, 0.06878209859132767, -0.5330120921134949, -0.9513364434242249, 1.693738579750061, 0.35611236095428467, -1.3152740001678467, -0.247145876288414, -0.3882896304130554, -0.6263676285743713, 2.7205166816711426, -1.354315996170044, -0.2872482240200043, -1.0061259269714355, -0.751221776008606, 1.6159225702285767, -1.2297518253326416, -0.17212143540382385, -1.08016037940979, -0.5531337857246399, -1.3852314949035645, -0.5296875834465027, -0.014290369115769863, -0.9341008067131042, 0.8037418723106384, 0.2604084014892578, -1.175660490989685, -0.40860775113105774, -0.8831019997596741, 0.7432515621185303, -0.0447806790471077, 0.27757886052131653, 1.7898627519607544, 0.43977075815200806, -0.3903515636920929, 0.715765655040741, 1.178230881690979, 0.6514157056808472, -0.5835080742835999, 0.22061684727668762, -0.7094635367393494, 0.2639131247997284, -1.3179634809494019, 0.29976195096969604, -2.8555562496185303, 0.6357783079147339, -0.04434990882873535, -0.12474605441093445, -0.03606446459889412, -1.3103368282318115, 1.0285022258758545, 2.6374683380126953, -1.1651725769042969, 0.5041642189025879, 0.32756391167640686, 1.154759168624878, -1.6474372148513794, 0.3824683725833893, -0.43823057413101196, 2.1459882259368896, 0.2484467625617981, 1.184130311012268, -0.5278570055961609, -2.368863582611084, 0.5852038860321045, -1.2771297693252563, -1.2183218002319336, 0.7853376865386963, -0.8774832487106323, -0.00808145385235548, -1.368322730064392, -0.22563473880290985, -0.8235872387886047, -1.2361392974853516, 0.8227006196975708, 0.11853986233472824, 0.48262056708335876, -0.5786730051040649, 0.2960594892501831, -2.2506332397460938, -1.3320668935775757, -0.27730321884155273, -0.8906537294387817, 0.5101178884506226, -0.3732510805130005, 0.72966468334198, -0.24581904709339142, 0.025784114375710487, 0.38858431577682495, 1.4542758464813232, 3.3990142345428467, 0.3200610876083374, 0.49949297308921814, -0.14763297140598297, -0.9471790194511414, 1.4312856197357178, 0.9336591362953186, -0.18890538811683655, -0.5604979991912842, -1.0455814599990845, 1.157006025314331, 1.9019182920455933, 0.9550313353538513, 0.013717951253056526, -0.7755283117294312, -0.6679051518440247, -0.06283143162727356, 0.13260892033576965, 0.442920058965683, 0.9029715061187744, 0.07774526625871658, 0.16729499399662018, 1.4706919193267822, 1.1682065725326538, -0.3537558317184448, 0.26469507813453674, -0.7618830800056458, -0.4737039804458618, 0.6583541035652161, 0.41627299785614014, -0.08518469333648682, 0.43470844626426697, -0.953712522983551, -0.2389790117740631, -0.4097234606742859, -1.0112230777740479, -0.6226353049278259, -0.4890957474708557, -0.2989041209220886, 1.6844013929367065, 0.063745878636837, -0.5062094330787659, -0.02730921097099781, -0.7839012742042542, -0.11749185621738434, -1.0546468496322632, 0.36074861884117126, -0.03142751008272171, -0.10715705156326294, -0.09543192386627197, 1.8372294902801514, -0.9759963750839233, -2.0764431953430176, 0.24184201657772064, 0.26864591240882874, -0.2718142867088318, 0.18257251381874084, 1.5195003747940063, 0.3716129958629608, 1.4096194505691528, 1.406489372253418, 0.9328563213348389, -0.6393425464630127, -1.3577839136123657, 0.6808435320854187, 0.9194043874740601, -1.4137773513793945, 0.8705096244812012, 0.09509032219648361, -0.4811660647392273, 0.6633798480033875, 1.1963834762573242, 0.40720346570014954, -1.9742555618286133, 0.7276559472084045, -0.9082058072090149, 0.7406994104385376, 0.7581117749214172, 0.7594213485717773, 0.1504489630460739, 0.8737960457801819, -1.2010732889175415, -1.1624239683151245, -0.7662693858146667, -0.66965252161026, 2.0395798683166504, -0.30897724628448486, 0.7026746869087219, -0.1294666826725006, -1.3458242416381836, -0.028598612174391747, 0.6992913484573364, 0.2996978163719177, -0.431404709815979, 0.8376371264457703, -0.7245010137557983, -1.1516979932785034, -1.4723875522613525, -0.46346917748451233, -1.1127805709838867, -0.8861580491065979, 1.11844801902771, 0.7750208377838135, 0.05475875735282898, 1.8842778205871582, 0.6581566333770752, 0.21899031102657318, -2.747525453567505, 0.8131298422813416, 0.24790817499160767, 0.03837987780570984, 0.8504953384399414, 0.2882014811038971, 0.8840653300285339, 0.06580843031406403, 0.5305136442184448, -2.481346368789673, 2.288970708847046, -0.27337291836738586, 0.8014742136001587, -0.10221605002880096, -0.29017511010169983, 1.0521539449691772, 0.7077915072441101, 0.5485342741012573, -1.1415457725524902, 0.7275384664535522, -0.5838139653205872, 1.2205126285552979, 0.9573139548301697, -0.7801661491394043, -0.012799141928553581, 1.3628023862838745, 0.468487411737442, -0.4779306948184967, -1.0340025424957275, -0.8646908402442932, 0.9823391437530518, 1.7765629291534424, -0.060165680944919586, -0.02112039551138878, 0.7855239510536194, 0.723312497138977, -1.2308735847473145, 0.1665956676006317, -0.7549332976341248, -0.9646044969558716, 1.5887569189071655, 2.0538835525512695, -0.07277592271566391, -0.16964294016361237, -0.6715658903121948, -1.121370553970337, 0.732395350933075, 0.06249789148569107, 0.16973254084587097, 0.6437841057777405, -0.6071609258651733, 1.0802208185195923, 0.9144719839096069, 0.9023245573043823, 0.2294750064611435, 0.31638839840888977, 0.404632031917572, -0.2465669959783554, -1.1692489385604858, -0.16629859805107117, -1.1136771440505981, -2.55633807182312, 0.5192868709564209, -0.25742673873901367, -1.5876706838607788, 0.09299064427614212, -0.9977548122406006, 0.9509294033050537, -0.5322365760803223, -1.2448515892028809, -1.510809063911438, 0.10935434699058533, -0.04442445933818817, 0.8501645922660828, -1.6134111881256104, -0.06088691204786301, 1.1473156213760376, 0.9499003291130066, -0.612493634223938, 1.0281683206558228, 0.13968999683856964, 1.110703468322754, 0.9090909361839294, -0.39989346265792847, 0.5052093267440796, 0.1911451369524002, -1.383884310722351, 0.4188469350337982, 1.1415228843688965, 0.23131190240383148, 1.4616565704345703, -0.5352664589881897, 0.1257432997226715, 0.39175307750701904, -0.5903467535972595, -0.43080613017082214, -0.6285085082054138, 0.7954255938529968, 0.05819832533597946, -0.8620426654815674, 0.10344889014959335, -0.16202594339847565, -0.1835407167673111, 0.11906149238348007, -1.4465588331222534, -0.19566158950328827, -0.4253069758415222, -0.5367544293403625, -1.2269524335861206, -0.11320246756076813, 1.4233471155166626, -0.7767080068588257, -0.10811285674571991, 0.4809153378009796, 0.4096167981624603, 0.5547269582748413, 0.593273937702179, -0.7374664545059204, -0.31315577030181885, -0.12338709831237793, -0.34426331520080566, 0.38578134775161743, 1.3088067770004272, -0.13759231567382812, -0.9152560830116272, 0.7048462629318237, -0.24573688209056854, 0.06120070815086365, 1.8832368850708008, 0.1303054690361023, -0.655087947845459, 0.348021000623703, -0.74675452709198, 1.8140352964401245, 1.7531908750534058, 1.301494836807251, -0.08748852461576462, -0.9835330247879028, 0.6730222105979919, -0.36491453647613525, -0.4230800271034241, 0.8555975556373596, 0.4989190399646759, -0.08565148711204529, -1.4159464836120605, 0.7103617191314697, 1.1732550859451294, -0.7920963168144226, -0.7667638063430786, 0.012837234884500504, -0.7614529132843018, 0.9477323889732361, 0.5520155429840088, 0.43415939807891846, 0.22685059905052185, 1.7145227193832397, 0.7387664914131165, -0.4623429477214813, 0.6404944062232971, 0.5413339138031006, -0.145912766456604, -2.1119484901428223, -1.175912857055664, 0.3219009339809418, -0.5224627256393433, -1.5161919593811035, 1.3690364360809326, -1.1789913177490234, -0.9656471610069275, 0.5980019569396973, 0.1128835380077362, 1.5279710292816162, 0.3747161328792572, 1.5512272119522095, 2.1208302974700928, 0.9016802906990051, 0.32336241006851196, 1.3278378248214722, -0.0004905899986624718, -0.44154709577560425, 1.8794007301330566, -0.38067975640296936, 0.44787436723709106, 1.138904094696045, -0.3102192282676697, -1.0764018297195435, -0.7544993162155151, -1.1819204092025757, -0.6713040471076965, 1.0444393157958984, 0.08114370703697205, -1.1121008396148682, 0.19400206208229065, 1.6227494478225708, 0.11171363294124603, -0.30820780992507935, 0.5687422156333923, 0.40106460452079773, -0.7346422076225281, -0.06778531521558762, -0.9625852704048157, 0.4649776220321655, -0.3090885877609253, -0.30147573351860046, 0.24736067652702332, 0.48668959736824036, 1.314305305480957, -0.005030567292124033, 0.10876304656267166, 1.2334154844284058, -1.4545588493347168, 1.3730865716934204, -0.7256043553352356, 0.2762798070907593, -2.3861117362976074, 1.4481797218322754, -0.8115934729576111, 1.893880009651184, -2.5440309047698975, 0.43834224343299866, -0.6447111368179321, -0.565546452999115, 0.41751426458358765, -0.40615159273147583, 0.15715090930461884, -0.14644192159175873, -1.0252999067306519, 0.029573237523436546, -0.6832445859909058, 0.5540722012519836, 1.0995360612869263, 1.290299654006958, -1.1242058277130127, -0.3999386131763458, -1.7798866033554077, -0.23565977811813354, -0.6890757083892822, 0.41028890013694763, -1.9536097049713135, -0.20181240141391754, -1.964475154876709, -2.348759174346924, -1.3587777614593506, -0.8230301737785339, 1.1165210008621216, 0.20678719878196716, -0.8418673872947693, 1.0865119695663452, -0.3353356420993805, -1.8103033304214478, 1.095669150352478, -2.146036386489868 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
> I was suggesting a different parameter just to make explicit the difference between MosaicML's `streaming` library does the same (tries to stream from the local cache if possible), so logging a message should be explicit enough :).
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
38
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True > I was suggesting a different parameter just to make explicit the difference between MosaicML's `streaming` library does the same (tries to stream from the local cache if possible), so logging a message should be explicit enough :).
[ -1.2099270820617676, -0.8309966325759888, -0.8755233883857727, 1.6023204326629639, -0.25128743052482605, -1.2368806600570679, 0.1659827083349228, -1.0083129405975342, 1.6647257804870605, -0.7686957120895386, 0.46065738797187805, -1.6777592897415161, 0.03902047872543335, -0.4802227318286896, -0.7527121305465698, -0.8053062558174133, -0.4704241156578064, -0.7295313477516174, 0.964289665222168, 2.4329276084899902, 1.2615586519241333, -1.399289608001709, 2.576219081878662, 0.7277877926826477, -0.0725107416510582, -1.0600780248641968, 0.4397162199020386, 0.032963261008262634, -1.2669755220413208, -0.5943897366523743, -0.9921565651893616, -0.19860081374645233, -0.4800644814968109, -0.6514133810997009, 0.02798975631594658, 0.4168834388256073, -0.24885034561157227, -0.47560766339302063, -0.5323996543884277, -0.7433517575263977, 0.49428436160087585, -0.4673069417476654, 0.939216136932373, -0.4419243633747101, 1.9050647020339966, -0.6172391176223755, 0.36341607570648193, 0.665383517742157, 1.4935358762741089, 0.19453509151935577, -0.13839833438396454, 0.4689357578754425, 0.3968467116355896, -0.13377615809440613, 0.5585347414016724, 1.0129424333572388, 0.534260630607605, 0.6957556009292603, 0.7959908843040466, -2.104290246963501, 1.3722774982452393, -1.2468302249908447, 0.24988415837287903, 1.314566731452942, -1.0710437297821045, 0.275340735912323, -1.7564293146133423, -0.09550708532333374, 0.3897126019001007, -2.2917981147766113, 0.3676707446575165, -1.2371349334716797, -0.48235273361206055, 1.058815360069275, 0.3427653908729553, -1.3578510284423828, 0.06128164380788803, -0.31614044308662415, 0.8505866527557373, 0.5057648420333862, 1.0850385427474976, -1.7297643423080444, 0.1615132987499237, -0.42345935106277466, 0.11996500194072723, -1.3195686340332031, -1.3334276676177979, 0.5252280235290527, 0.5317708849906921, 0.513777494430542, -0.12063731998205185, 1.0843755006790161, -0.8575116395950317, 0.8011137247085571, -0.9984996914863586, -1.5358076095581055, -1.4048370122909546, -2.234701633453369, -2.1815218925476074, 0.8266348838806152, -0.5672245621681213, -0.6335744261741638, 2.0542566776275635, -1.0356699228286743, -1.7634003162384033, 1.133900761604309, 0.24071165919303894, -0.054128482937812805, 2.370345115661621, 0.14490674436092377, -0.5839434266090393, 0.40957212448120117, -0.7653334736824036, 1.0048655271530151, -0.457496702671051, 1.4869521856307983, 0.4785805940628052, -1.000311017036438, 1.7105106115341187, -0.34193775057792664, 0.5689533948898315, -0.6533995866775513, -0.668238639831543, -0.9039120078086853, 0.3515082597732544, 2.01815128326416, -0.2516477406024933, 1.578900933265686, -0.35700735449790955, -1.6332420110702515, -1.5781656503677368, 0.9765872359275818, 0.4078121483325958, -0.7620725035667419, 0.16541379690170288, -0.23573513329029083, 0.07004251331090927, -0.04568304121494293, 1.2001348733901978, 1.2221760749816895, 0.7014461159706116, -0.3049517571926117, -0.9583949446678162, 0.13690343499183655, 0.07861282676458359, -0.7755728960037231, -1.7368755340576172, -0.43770307302474976, 0.06019256263971329, 0.6161783337593079, -1.214543104171753, 1.77379310131073, 1.0683420896530151, 1.8653829097747803, 1.018164038658142, -0.1780479997396469, 1.4652129411697388, 0.009307160042226315, 1.9045844078063965, -0.52613365650177, 0.5679696202278137, -0.396509051322937, -1.2121670246124268, 0.82320636510849, -0.26163309812545776, -2.06335711479187, -0.8942445516586304, -0.920961320400238, -0.133669912815094, -0.7092720866203308, 1.0897681713104248, -0.34875720739364624, -1.3473231792449951, 0.1922798603773117, -0.5794958472251892, 0.08406801521778107, -1.2385644912719727, 0.41015729308128357, 0.6690664887428284, -0.7145418524742126, 0.13007783889770508, -0.2486022561788559, -1.3379826545715332, -0.5023115873336792, 0.14773668348789215, 1.9404815435409546, -0.8516112565994263, 0.8630036115646362, 0.9030274748802185, -0.8238616585731506, -0.12791110575199127, 0.30227914452552795, -0.24801421165466309, 0.764248788356781, -1.1133829355239868, -0.36879003047943115, 1.26731276512146, -0.13208332657814026, -0.6888175010681152, 1.496063470840454, 0.7177737355232239, -0.8817577362060547, -0.09151098877191544, -0.24202200770378113, -0.8839382529258728, -0.07389789074659348, -1.594252347946167, -0.0006484189070761204, 0.2241499423980713, -1.5726882219314575, -0.45076292753219604, -0.11766674369573593, 1.199716567993164, -0.24375715851783752, 1.3477543592453003, -0.22264020144939423, -0.25497788190841675, -0.31187352538108826, -0.3823520541191101, 0.092547208070755, -0.07727529108524323, -0.6995088458061218, 0.2971346974372864, -0.7616952061653137, 0.3999461829662323, 1.545589566230774, 0.31266188621520996, 0.09268214553594589, 0.5345373153686523, 1.113600492477417, 0.4133331775665283, 0.05757001042366028, -0.862557053565979, -1.5582281351089478, 1.9560059309005737, -1.5228887796401978, 1.8879802227020264, 0.60347980260849, -0.06018659472465515, -1.738940715789795, -1.7699007987976074, 1.3553407192230225, 1.358410120010376, 2.280111789703369, 0.6382840275764465, 0.16720014810562134, -0.7911517024040222, -0.6655670404434204, 0.3555862009525299, -1.2284038066864014, -0.7806755304336548, 0.21638092398643494, 2.314178705215454, 1.800891637802124, -0.4962458908557892, -0.23541709780693054, -1.0446842908859253, 1.314544916152954, -0.17431844770908356, 0.18075989186763763, 1.8374240398406982, -0.19523340463638306, -1.1892893314361572, 1.351711392402649, -2.4074206352233887, 0.122154101729393, 2.0223758220672607, 0.5166321992874146, 0.1241224855184555, -1.3736276626586914, -0.6480244994163513, -0.1829291582107544, -0.3801700472831726, -1.2866441011428833, 0.5909538865089417, -0.31050509214401245, -0.7966471910476685, -1.424314022064209, 0.2658209502696991, -1.109366536140442, -1.5620701313018799, 0.3326652944087982, 1.8526958227157593, 1.9103437662124634, -0.49116164445877075, 1.4657870531082153, -0.34877610206604004, 0.21561571955680847, 1.2491965293884277, 1.1670702695846558, 3.016129493713379, 1.9892528057098389, -1.126356840133667, 0.6685401797294617, -0.18282803893089294, -0.5769116878509521, 1.2948471307754517, -1.278916835784912, 1.3019658327102661, -0.14096178114414215, -1.0810203552246094, -1.2815426588058472, 0.7126909494400024, 0.3808775246143341, 0.17497111856937408, -0.41745224595069885, 1.2634834051132202, 0.12674109637737274, 1.2401877641677856, 0.63726806640625, -0.38217470049858093, 0.5646349787712097, -0.45448043942451477, -0.44972503185272217, 1.594792366027832, 0.23680134117603302, -1.4034504890441895, -2.224058151245117, -0.08349701762199402, -0.8601133823394775, 0.10680286586284637, -0.5114612579345703, -0.9039013981819153, 1.7514641284942627, 0.3140983283519745, -1.2578355073928833, -0.15880368649959564, -0.34736961126327515, -0.6018743515014648, 2.8206801414489746, -1.3755536079406738, -0.32154911756515503, -1.0235244035720825, -0.740687906742096, 1.7580000162124634, -1.187496304512024, -0.24232348799705505, -1.0804506540298462, -0.3962607681751251, -1.4028286933898926, -0.5370115041732788, -0.020641474053263664, -0.9158746600151062, 0.800086498260498, 0.17242147028446198, -1.2028499841690063, -0.5233750939369202, -0.7996593713760376, 0.7554490566253662, -0.08556464314460754, 0.2688843905925751, 1.8162034749984741, 0.4565432071685791, -0.32802364230155945, 0.7737598419189453, 1.276991605758667, 0.6058609485626221, -0.460477352142334, 0.35928359627723694, -0.6286093592643738, 0.2630096673965454, -1.3320969343185425, 0.31461775302886963, -2.814687490463257, 0.4778065085411072, -0.03058505430817604, -0.1364961564540863, -0.07141626626253128, -1.3923704624176025, 1.068799376487732, 2.6163008213043213, -1.1556322574615479, 0.47663623094558716, 0.30077624320983887, 1.2203794717788696, -1.5432391166687012, 0.37497279047966003, -0.46175578236579895, 2.1493804454803467, 0.2488916516304016, 1.1310348510742188, -0.5405961275100708, -2.3318846225738525, 0.6025106906890869, -1.3077961206436157, -1.3429945707321167, 0.6957611441612244, -0.8192126750946045, -0.07429663091897964, -1.4667953252792358, -0.22969277203083038, -0.8544638752937317, -1.2647072076797485, 0.9067940711975098, 0.2383282333612442, 0.39537718892097473, -0.5538362264633179, 0.38387635350227356, -2.209829568862915, -1.3039002418518066, -0.21134324371814728, -0.8867614269256592, 0.5021100044250488, -0.3865995705127716, 0.6630542874336243, -0.2775256931781769, 0.045404884964227676, 0.3606342375278473, 1.4576523303985596, 3.4593491554260254, 0.29251986742019653, 0.5350662469863892, -0.23356075584888458, -0.8759406208992004, 1.534061074256897, 1.0169012546539307, -0.08724771440029144, -0.6375292539596558, -0.9686256647109985, 1.1203986406326294, 1.9151936769485474, 0.8827050924301147, -0.05529584363102913, -0.8492329120635986, -0.6203340888023376, -0.1788392961025238, 0.14934849739074707, 0.3092922866344452, 0.9521772861480713, 0.12139864265918732, 0.01737544685602188, 1.309555172920227, 1.0668766498565674, -0.41328516602516174, 0.3291684091091156, -0.7673157453536987, -0.3639502227306366, 0.6256610751152039, 0.46808481216430664, -0.062186721712350845, 0.4091114103794098, -0.8428670763969421, -0.2606148421764374, -0.32322531938552856, -0.9383842349052429, -0.6971421241760254, -0.4151723384857178, -0.34331855177879333, 1.7012567520141602, -0.02448291704058647, -0.5988044142723083, -0.13649335503578186, -0.8543121218681335, -0.044084202498197556, -1.0593297481536865, 0.28633424639701843, -0.02769380435347557, -0.1709396094083786, -0.06657295674085617, 1.8747869729995728, -1.0630429983139038, -2.098172903060913, 0.3057243227958679, 0.3958801329135895, -0.22892308235168457, 0.26795434951782227, 1.509602665901184, 0.4460514783859253, 1.3674330711364746, 1.3968757390975952, 0.9281008839607239, -0.6474772095680237, -1.4526348114013672, 0.6248739361763, 0.9148076176643372, -1.4895539283752441, 0.7568490505218506, 0.16038452088832855, -0.32076892256736755, 0.5956223011016846, 1.0386888980865479, 0.5089576840400696, -1.9784973859786987, 0.6202806234359741, -0.9127948880195618, 0.7630260586738586, 0.724295973777771, 0.7219160795211792, 0.2907317578792572, 0.8927050232887268, -1.1170625686645508, -1.2082499265670776, -0.7823132276535034, -0.6915932297706604, 1.970042109489441, -0.32066336274147034, 0.7872849702835083, -0.07913611829280853, -1.3642979860305786, -0.07653618603944778, 0.7120940685272217, 0.27909356355667114, -0.4672430753707886, 0.7761200666427612, -0.6689357161521912, -1.1672724485397339, -1.4427015781402588, -0.5280141234397888, -1.0397191047668457, -0.9020607471466064, 1.064239740371704, 0.7101064920425415, 0.07876837253570557, 2.003514289855957, 0.6854428648948669, 0.25021108984947205, -2.7514095306396484, 0.8442707061767578, 0.2824830710887909, 0.14422498643398285, 0.7442931532859802, 0.47907865047454834, 0.8541520833969116, -0.061756763607263565, 0.5756329298019409, -2.4256505966186523, 2.33007550239563, -0.3001566529273987, 0.6924257874488831, -0.03559238463640213, -0.2676140367984772, 1.004298448562622, 0.7167900204658508, 0.5380038619041443, -1.1408404111862183, 0.5913891792297363, -0.64637690782547, 1.3109899759292603, 0.9082223773002625, -0.6846609115600586, -0.04720442369580269, 1.3158823251724243, 0.4877161383628845, -0.45779353380203247, -1.0827456712722778, -0.7605913281440735, 1.0435116291046143, 1.6307642459869385, -0.07429289817810059, 0.02775631472468376, 0.8474090099334717, 0.5771240592002869, -1.2320691347122192, 0.09051626175642014, -0.7104050517082214, -1.0256680250167847, 1.6293189525604248, 2.0341989994049072, -0.19730517268180847, -0.13923464715480804, -0.7461372017860413, -1.1205167770385742, 0.7823428511619568, 0.04089580476284027, 0.20850829780101776, 0.5946410298347473, -0.6062656044960022, 1.0825778245925903, 0.8798272013664246, 0.9109155535697937, 0.17981205880641937, 0.44252288341522217, 0.44304177165031433, -0.19312110543251038, -1.2025835514068604, -0.23867887258529663, -1.1462388038635254, -2.6500332355499268, 0.45799991488456726, -0.3525567352771759, -1.4353152513504028, 0.140404611825943, -1.0742287635803223, 0.9317998290061951, -0.5551126599311829, -1.2052185535430908, -1.4524544477462769, 0.11864019930362701, -0.037701185792684555, 0.8210729956626892, -1.6325407028198242, -0.05150676518678665, 1.1028997898101807, 0.9227765798568726, -0.8187502026557922, 1.0648056268692017, 0.13082537055015564, 1.2272493839263916, 0.8961167335510254, -0.38162314891815186, 0.5377069711685181, 0.1866072118282318, -1.3583390712738037, 0.5045441389083862, 1.1356027126312256, 0.10997451096773148, 1.4856107234954834, -0.5514068007469177, 0.1401391476392746, 0.4496821165084839, -0.6428694128990173, -0.46995651721954346, -0.6644917130470276, 0.8130220174789429, 0.11042235791683197, -0.9149868488311768, 0.01656997576355934, -0.143153578042984, -0.10227259248495102, 0.07883641868829727, -1.41569185256958, -0.21094262599945068, -0.465549498796463, -0.5621358752250671, -1.1881784200668335, -0.13730862736701965, 1.350601315498352, -0.6160388588905334, -0.12542091310024261, 0.49245986342430115, 0.3964301645755768, 0.5052661299705505, 0.5413051843643188, -0.8082732558250427, -0.23321862518787384, -0.11864401400089264, -0.4310414791107178, 0.4086734354496002, 1.366726279258728, -0.09213242679834366, -0.9401341080665588, 0.7086392045021057, -0.14454218745231628, 0.020222198218107224, 1.920575499534607, 0.10598578304052353, -0.707921028137207, 0.24795764684677124, -0.7215264439582825, 1.8711817264556885, 1.6271754503250122, 1.2451845407485962, -0.12858760356903076, -0.8381491899490356, 0.7806837558746338, -0.3497437536716461, -0.41153857111930847, 0.7089771628379822, 0.39185237884521484, -0.1545715183019638, -1.4737175703048706, 0.6449570059776306, 1.2354408502578735, -0.7806436419487, -0.8820279240608215, -0.06953790038824081, -0.7319846749305725, 0.8595016002655029, 0.5844355821609497, 0.42321741580963135, 0.3416604697704315, 1.661954641342163, 0.6397895812988281, -0.4821477234363556, 0.626924455165863, 0.5540836453437805, -0.04635359346866608, -2.160093069076538, -1.1964170932769775, 0.42995601892471313, -0.5055496692657471, -1.5562465190887451, 1.402324914932251, -1.1683753728866577, -0.9128671884536743, 0.6281999349594116, 0.15787985920906067, 1.6186810731887817, 0.3527779281139374, 1.4896482229232788, 2.048781633377075, 0.7780441641807556, 0.24907928705215454, 1.2861194610595703, -0.02189219929277897, -0.4645383358001709, 1.9017939567565918, -0.4270649254322052, 0.508751392364502, 1.110522985458374, -0.23600086569786072, -1.0656144618988037, -0.7215875387191772, -1.2825098037719727, -0.7302061319351196, 1.0320924520492554, 0.14052937924861908, -1.1549285650253296, 0.20957019925117493, 1.5954068899154663, 0.0803723856806755, -0.3605784475803375, 0.4931934177875519, 0.3437599539756775, -0.8450763821601868, -0.024304617196321487, -0.9586952924728394, 0.4998684823513031, -0.27154603600502014, -0.3597586452960968, 0.2865159213542938, 0.4489269554615021, 1.2657454013824463, 0.019763648509979248, 0.08883289992809296, 1.1597681045532227, -1.4388315677642822, 1.4343096017837524, -0.667388916015625, 0.26315197348594666, -2.299504041671753, 1.519784927368164, -0.7937513589859009, 1.9036815166473389, -2.6492695808410645, 0.43166884779930115, -0.5875494480133057, -0.5518873929977417, 0.4153507351875305, -0.3971850275993347, 0.1772269457578659, -0.1335006058216095, -0.9911478757858276, 0.15511424839496613, -0.5708304643630981, 0.5527867078781128, 1.015999436378479, 1.2612563371658325, -1.0447330474853516, -0.4114295542240143, -1.857172966003418, -0.2517804205417633, -0.627765417098999, 0.41327929496765137, -2.120305061340332, -0.26758670806884766, -2.0104057788848877, -2.1838061809539795, -1.287819743156433, -0.7194197177886963, 1.1609914302825928, 0.25968506932258606, -0.7670333981513977, 1.0744329690933228, -0.3252602517604828, -1.8013969659805298, 1.0282666683197021, -2.080488681793213 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
Hi Both! It has been a while since my first issue so I am gonna go for this one ! #self-assign
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
21
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True Hi Both! It has been a while since my first issue so I am gonna go for this one ! #self-assign
[ -1.2416939735412598, -0.8539114594459534, -0.8113563060760498, 1.5327818393707275, -0.20977532863616943, -1.3059695959091187, 0.1383461207151413, -0.956865668296814, 1.6455330848693848, -0.8499376773834229, 0.5143492817878723, -1.693522572517395, 0.027579037472605705, -0.46484267711639404, -0.7841768264770508, -0.8325910568237305, -0.4400373101234436, -0.6563296914100647, 1.0530376434326172, 2.4150643348693848, 1.206325888633728, -1.375275731086731, 2.614208936691284, 0.6397078037261963, -0.1361350119113922, -0.9840542078018188, 0.4587748050689697, 0.07615049928426743, -1.330745816230774, -0.5583296418190002, -0.9534142017364502, -0.1893726885318756, -0.4423278868198395, -0.593471348285675, 0.026755010709166527, 0.4858916103839874, -0.18047338724136353, -0.4745224714279175, -0.5025952458381653, -0.6751997470855713, 0.5229724645614624, -0.4541832208633423, 1.005348563194275, -0.44416117668151855, 1.9420835971832275, -0.5353558659553528, 0.41034504771232605, 0.6667252779006958, 1.3811194896697998, 0.17276935279369354, -0.042506344616413116, 0.2960895299911499, 0.40272510051727295, -0.16501085460186005, 0.4994868040084839, 1.018330454826355, 0.5535635948181152, 0.7580522298812866, 0.7580450177192688, -1.986781358718872, 1.4353846311569214, -1.2004801034927368, 0.29758769273757935, 1.4026479721069336, -1.1160335540771484, 0.314670592546463, -1.7379114627838135, -0.06016751751303673, 0.38566669821739197, -2.124826669692993, 0.33456388115882874, -1.2204149961471558, -0.5139514803886414, 1.0857903957366943, 0.3169443607330322, -1.378920078277588, 0.09704449027776718, -0.24851909279823303, 0.8332154750823975, 0.4623771607875824, 1.110276699066162, -1.7256308794021606, 0.22144731879234314, -0.42069631814956665, 0.15600545704364777, -1.342881679534912, -1.3396860361099243, 0.5652103424072266, 0.47600892186164856, 0.5646536946296692, -0.1297815889120102, 1.0119293928146362, -0.8355317115783691, 0.8158074021339417, -0.9973423480987549, -1.4845857620239258, -1.3714988231658936, -2.2910854816436768, -2.3177788257598877, 0.826092541217804, -0.517044186592102, -0.6438989043235779, 1.9904049634933472, -1.0660077333450317, -1.7163746356964111, 1.1396595239639282, 0.13342006504535675, 0.0005194349214434624, 2.3722035884857178, 0.1875462830066681, -0.5569370985031128, 0.40374478697776794, -0.7502857446670532, 1.0049265623092651, -0.49172261357307434, 1.414940357208252, 0.46789950132369995, -1.0590848922729492, 1.6773617267608643, -0.3338128328323364, 0.5466592311859131, -0.6089860200881958, -0.6986938714981079, -0.857685387134552, 0.4365387260913849, 1.9759317636489868, -0.24575825035572052, 1.604201316833496, -0.4333649277687073, -1.6193000078201294, -1.6090234518051147, 0.9562462568283081, 0.4138612151145935, -0.7166581749916077, 0.13675223290920258, -0.22994716465473175, 0.026631919667124748, -0.002469336148351431, 1.1453396081924438, 1.2158678770065308, 0.7490209937095642, -0.28145715594291687, -0.8728808760643005, 0.20325441658496857, 0.16689762473106384, -0.7171385884284973, -1.6982349157333374, -0.3870210647583008, 0.04319963604211807, 0.6643049716949463, -1.2479511499404907, 1.784805417060852, 1.0845372676849365, 1.8977234363555908, 0.9724472165107727, -0.18257445096969604, 1.4720872640609741, 0.056809552013874054, 1.874902367591858, -0.4878341257572174, 0.5225005149841309, -0.41795089840888977, -1.2099573612213135, 0.8224884271621704, -0.3047863245010376, -1.9556878805160522, -0.8921449780464172, -0.9831547737121582, -0.15830112993717194, -0.8058676719665527, 1.0635175704956055, -0.3063024580478668, -1.4253195524215698, 0.2145063728094101, -0.5038228034973145, 0.1140710860490799, -1.2771605253219604, 0.36871233582496643, 0.6679835319519043, -0.6944737434387207, 0.08601991832256317, -0.23964823782444, -1.3308709859848022, -0.5122227072715759, 0.15306943655014038, 1.9412729740142822, -0.7950288653373718, 0.8169064521789551, 0.9253835678100586, -0.6701405048370361, -0.18664595484733582, 0.30799832940101624, -0.26983699202537537, 0.6701679825782776, -1.1353776454925537, -0.3078456223011017, 1.259824514389038, -0.15759877860546112, -0.5848608613014221, 1.5173293352127075, 0.6742512583732605, -0.9509148597717285, -0.05471345782279968, -0.21623431146144867, -0.8294593691825867, -0.10184857994318008, -1.5522652864456177, 0.03046712465584278, 0.2198476642370224, -1.5423146486282349, -0.4202689826488495, -0.1490810215473175, 1.1161370277404785, -0.2631157636642456, 1.3170270919799805, -0.2547670900821686, -0.2505311965942383, -0.3884676992893219, -0.42790013551712036, 0.13079731166362762, -0.16596846282482147, -0.6980987787246704, 0.23806600272655487, -0.79217928647995, 0.33640798926353455, 1.6079825162887573, 0.3547890782356262, 0.09481646120548248, 0.4401908218860626, 1.1241376399993896, 0.4577031433582306, 0.04400177672505379, -0.8515052199363708, -1.4980648756027222, 1.9153327941894531, -1.6203218698501587, 1.9349366426467896, 0.6652863025665283, -0.050154078751802444, -1.7256053686141968, -1.7193924188613892, 1.300968050956726, 1.3185335397720337, 2.3158915042877197, 0.5925445556640625, 0.13333430886268616, -0.8512306213378906, -0.6473966240882874, 0.36226171255111694, -1.1558212041854858, -0.7568323612213135, 0.26125630736351013, 2.2811291217803955, 1.7609413862228394, -0.49786582589149475, -0.24399888515472412, -1.0617585182189941, 1.3042882680892944, -0.10687585920095444, 0.14775283634662628, 1.8931100368499756, -0.18584242463111877, -1.16672682762146, 1.229255199432373, -2.3613507747650146, 0.1666063517332077, 1.960270881652832, 0.52470463514328, 0.099391408264637, -1.4261295795440674, -0.672620952129364, -0.1975393295288086, -0.3125818371772766, -1.3395500183105469, 0.6335816979408264, -0.30776816606521606, -0.7513605952262878, -1.4412829875946045, 0.2870505452156067, -1.1276005506515503, -1.5434982776641846, 0.3495369553565979, 1.8056998252868652, 1.9550716876983643, -0.6249152421951294, 1.480836272239685, -0.3383345603942871, 0.1922750025987625, 1.2442795038223267, 1.1156489849090576, 3.0628864765167236, 1.9439221620559692, -1.0780781507492065, 0.6662364602088928, -0.20744913816452026, -0.5653311610221863, 1.2628679275512695, -1.2153334617614746, 1.281160593032837, -0.14497558772563934, -0.9891420006752014, -1.192914605140686, 0.6912041306495667, 0.3214097321033478, 0.16241835057735443, -0.41673606634140015, 1.300143837928772, 0.2153175175189972, 1.3244960308074951, 0.6190768480300903, -0.2960660755634308, 0.5717928409576416, -0.4612075686454773, -0.468693345785141, 1.500771403312683, 0.300945520401001, -1.4608359336853027, -2.1365983486175537, -0.07996465265750885, -0.8528630137443542, 0.07730499655008316, -0.4849883019924164, -0.9875655174255371, 1.6929728984832764, 0.3891459107398987, -1.259106159210205, -0.08951343595981598, -0.4300803244113922, -0.7183489203453064, 2.8486993312835693, -1.4147212505340576, -0.2756156921386719, -0.9491279721260071, -0.7301362156867981, 1.847887635231018, -1.2777924537658691, -0.17316919565200806, -1.0294088125228882, -0.4224492609500885, -1.4016163349151611, -0.48048678040504456, 0.03367023169994354, -0.9041349291801453, 0.7495128512382507, 0.10979621112346649, -1.1209248304367065, -0.5762671828269958, -0.7542572617530823, 0.7314080595970154, -0.04980350285768509, 0.40800294280052185, 1.8917347192764282, 0.46588635444641113, -0.3837173283100128, 0.7355390787124634, 1.2809725999832153, 0.5221728682518005, -0.559457004070282, 0.3345222473144531, -0.6550707817077637, 0.2768253982067108, -1.2745182514190674, 0.30584588646888733, -2.819239616394043, 0.5217978358268738, -0.06861958652734756, -0.17750342190265656, -0.15881776809692383, -1.4306243658065796, 1.1386396884918213, 2.5867209434509277, -1.196271538734436, 0.5092160105705261, 0.35214194655418396, 1.261948823928833, -1.5965418815612793, 0.44900596141815186, -0.4807526767253876, 2.0570192337036133, 0.2878805994987488, 1.1079598665237427, -0.621582567691803, -2.3609819412231445, 0.6010206937789917, -1.3114591836929321, -1.2838164567947388, 0.7072077393531799, -0.9533511400222778, -0.07862493395805359, -1.4260516166687012, -0.22889868915081024, -0.9194654226303101, -1.350603699684143, 0.8497558236122131, 0.2253568321466446, 0.4022632837295532, -0.5878337025642395, 0.43074342608451843, -2.255591869354248, -1.4002594947814941, -0.2680588960647583, -0.8466719388961792, 0.4773409366607666, -0.42949026823043823, 0.652256429195404, -0.30595409870147705, 0.06758780777454376, 0.3596574664115906, 1.4169195890426636, 3.380065679550171, 0.26054269075393677, 0.5380846261978149, -0.2598910629749298, -0.9109755158424377, 1.5734343528747559, 1.0106830596923828, -0.08495888859033585, -0.6323198080062866, -0.9489335417747498, 1.2037668228149414, 1.8995249271392822, 0.9711368083953857, -0.07082099467515945, -0.7684724926948547, -0.6297153830528259, -0.05265830457210541, 0.07367604970932007, 0.2715575695037842, 1.0033572912216187, 0.10529449582099915, 0.12450739741325378, 1.3071708679199219, 1.0290775299072266, -0.458551287651062, 0.2581970691680908, -0.770783007144928, -0.374620258808136, 0.5744372010231018, 0.4408295750617981, -0.07816503942012787, 0.3991088569164276, -0.7909547686576843, -0.3497186303138733, -0.24689382314682007, -0.979108989238739, -0.7277354001998901, -0.4345162808895111, -0.4236043393611908, 1.736759901046753, -0.06508282572031021, -0.6786633133888245, -0.05270964652299881, -0.8604710102081299, -0.058850858360528946, -1.1282081604003906, 0.2380639761686325, -0.09801045060157776, -0.08436264097690582, -0.039639703929424286, 1.932634949684143, -1.096389889717102, -2.1791598796844482, 0.31183546781539917, 0.3317779004573822, -0.24339659512043, 0.1764814853668213, 1.5240647792816162, 0.46012717485427856, 1.379358172416687, 1.4019960165023804, 1.016663908958435, -0.6862971782684326, -1.4532512426376343, 0.6581165790557861, 0.9648743867874146, -1.4982004165649414, 0.7810962796211243, 0.10386932641267776, -0.2485806792974472, 0.5937067866325378, 1.093953013420105, 0.49724113941192627, -1.9784871339797974, 0.6370558142662048, -0.9055094122886658, 0.8073238730430603, 0.7513052225112915, 0.7716919779777527, 0.2535717189311981, 0.861539363861084, -1.133410096168518, -1.198318362236023, -0.7248367071151733, -0.7398754954338074, 1.9565645456314087, -0.30067700147628784, 0.803776741027832, -0.1062079593539238, -1.2614299058914185, -0.02197582647204399, 0.6881013512611389, 0.2213095724582672, -0.43059292435646057, 0.7750785946846008, -0.741615355014801, -1.167086124420166, -1.4946775436401367, -0.5841039419174194, -1.0765128135681152, -0.9565825462341309, 1.1095362901687622, 0.7347565293312073, 0.1503133475780487, 2.0352895259857178, 0.7089019417762756, 0.25689172744750977, -2.7109572887420654, 0.8312867283821106, 0.20973147451877594, 0.22261501848697662, 0.749640941619873, 0.45490941405296326, 0.8731517791748047, -0.0021721236407756805, 0.4739462435245514, -2.4986984729766846, 2.483168363571167, -0.40230679512023926, 0.7378673553466797, -0.06225176155567169, -0.22309191524982452, 1.1170328855514526, 0.7779062390327454, 0.5601035952568054, -1.2536427974700928, 0.5961290001869202, -0.5843265652656555, 1.3012441396713257, 0.8948541283607483, -0.7903710603713989, -0.027926268056035042, 1.232017993927002, 0.5161206722259521, -0.5219064950942993, -1.0982108116149902, -0.7566041946411133, 1.0095188617706299, 1.5905247926712036, -0.09066072106361389, 0.062300100922584534, 0.7528305649757385, 0.5636844635009766, -1.179604172706604, 0.04414748027920723, -0.7820518016815186, -1.0313150882720947, 1.6533437967300415, 2.026864528656006, -0.15441212058067322, -0.16536034643650055, -0.7069621086120605, -1.028214454650879, 0.8063486814498901, 0.04575592279434204, 0.25080007314682007, 0.5975530743598938, -0.6503227949142456, 1.0584325790405273, 0.8629513382911682, 0.8931737542152405, 0.17285549640655518, 0.3310406804084778, 0.4486760199069977, -0.14785267412662506, -1.231079339981079, -0.1803690642118454, -1.1603447198867798, -2.6201939582824707, 0.4226396679878235, -0.37735337018966675, -1.3612583875656128, 0.08192270249128342, -1.1262550354003906, 0.8932704925537109, -0.588444709777832, -1.214034080505371, -1.4461524486541748, 0.04141899570822716, -0.00830561202019453, 0.8395921587944031, -1.703432321548462, -0.13422778248786926, 1.1442103385925293, 0.9519813656806946, -0.8341721892356873, 1.1060714721679688, 0.15552756190299988, 1.1711657047271729, 0.8943862915039062, -0.325046569108963, 0.5497789978981018, 0.1315341591835022, -1.3839467763900757, 0.5422235727310181, 1.2139686346054077, 0.11218263953924179, 1.507741093635559, -0.546640932559967, 0.21212607622146606, 0.4561603367328644, -0.6222759485244751, -0.4583655595779419, -0.7041437029838562, 0.7581514120101929, 0.12393514811992645, -0.8788647651672363, -0.039780788123607635, -0.15414538979530334, -0.020470090210437775, 0.11092215776443481, -1.4590847492218018, -0.2792643904685974, -0.4570907652378082, -0.548820972442627, -1.2744934558868408, -0.2064308375120163, 1.4131680727005005, -0.6110376119613647, -0.03225569427013397, 0.4673786163330078, 0.4415619373321533, 0.5067477822303772, 0.5329992771148682, -0.8520088195800781, -0.2275351583957672, -0.11632745712995529, -0.3708910644054413, 0.3919370770454407, 1.403098464012146, -0.16669125854969025, -0.9292939901351929, 0.6434940099716187, -0.1679820865392685, 0.05568699538707733, 1.9735792875289917, 0.06201133877038956, -0.6964647769927979, 0.32293611764907837, -0.8253536820411682, 1.8683453798294067, 1.689189076423645, 1.255733847618103, -0.1039358600974083, -0.8839767575263977, 0.7645508646965027, -0.2752350866794586, -0.4614223837852478, 0.7566661238670349, 0.30522802472114563, -0.1922876536846161, -1.4796546697616577, 0.582107424736023, 1.1931517124176025, -0.7774925231933594, -0.8640766143798828, -0.06245207041501999, -0.7133660912513733, 0.8726845979690552, 0.5735695958137512, 0.3783203065395355, 0.4177072048187256, 1.7501107454299927, 0.6641458868980408, -0.499223530292511, 0.5907061696052551, 0.5159972906112671, -0.05541156604886055, -2.086153507232666, -1.1716729402542114, 0.4058016538619995, -0.5203820466995239, -1.537156581878662, 1.4143129587173462, -1.0978333950042725, -1.020385980606079, 0.713787317276001, 0.12498769164085388, 1.6397730112075806, 0.40906625986099243, 1.4492270946502686, 2.0133371353149414, 0.7598704695701599, 0.2683853209018707, 1.277761697769165, -0.06593061983585358, -0.4601837396621704, 1.8684086799621582, -0.45178157091140747, 0.42401283979415894, 1.0539005994796753, -0.21797411143779755, -1.0892575979232788, -0.7877909541130066, -1.2454826831817627, -0.7506701350212097, 1.0642024278640747, 0.1613263487815857, -1.1994479894638062, 0.31646114587783813, 1.615790843963623, 0.06284268200397491, -0.34003281593322754, 0.4353180527687073, 0.3831872045993805, -0.783076286315918, -0.08960957825183868, -0.9824153184890747, 0.4935724139213562, -0.2618156671524048, -0.3991939127445221, 0.29426079988479614, 0.5872216820716858, 1.258211612701416, -0.032092463225126266, 0.12957854568958282, 1.1715039014816284, -1.3867344856262207, 1.3821980953216553, -0.6797778606414795, 0.2639031410217285, -2.2632765769958496, 1.4895823001861572, -0.7332766056060791, 1.873050570487976, -2.7079660892486572, 0.4352090060710907, -0.5554161667823792, -0.6512764096260071, 0.4528674781322479, -0.436225563287735, 0.20035269856452942, -0.16638250648975372, -0.8965170383453369, 0.13301140069961548, -0.5556648969650269, 0.6444873213768005, 0.9662390351295471, 1.2441811561584473, -1.0083726644515991, -0.43946194648742676, -1.7991081476211548, -0.20151041448116302, -0.5897514820098877, 0.36546698212623596, -2.142317533493042, -0.25394299626350403, -2.0569307804107666, -2.127704620361328, -1.373868465423584, -0.6863128542900085, 1.1571362018585205, 0.28425243496894836, -0.7694684267044067, 1.0318286418914795, -0.3009091317653656, -1.801588535308838, 1.0593726634979248, -2.014700412750244 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
https://github.com/huggingface/datasets/pull/5821 should be helpful to implement `IterableDataset.from_file`, since it defines a new ArrowExamplesIterable that takes an Arrow tables generator function (e.g. from a file) and can be used in an IterableDataset
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
31
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True https://github.com/huggingface/datasets/pull/5821 should be helpful to implement `IterableDataset.from_file`, since it defines a new ArrowExamplesIterable that takes an Arrow tables generator function (e.g. from a file) and can be used in an IterableDataset
[ -1.205568790435791, -0.9849755764007568, -0.8147204518318176, 1.6263556480407715, -0.17988377809524536, -1.2975077629089355, 0.07710582762956619, -0.9588920474052429, 1.5921838283538818, -0.8183634877204895, 0.530085027217865, -1.6791902780532837, 0.0354824997484684, -0.4295259714126587, -0.7938428521156311, -0.8701484203338623, -0.3788186013698578, -0.7904078364372253, 1.0326224565505981, 2.4340243339538574, 1.2212848663330078, -1.3420188426971436, 2.6143388748168945, 0.618635356426239, -0.20784415304660797, -1.0739389657974243, 0.4927769601345062, 0.09346895664930344, -1.2779914140701294, -0.6244349479675293, -0.9397528767585754, -0.07883980125188828, -0.47749873995780945, -0.532235324382782, 0.09677744656801224, 0.49971482157707214, -0.1949271708726883, -0.35366758704185486, -0.5289084315299988, -0.7446000576019287, 0.48978209495544434, -0.4644853472709656, 0.9951877593994141, -0.40400633215904236, 1.8246362209320068, -0.5436639189720154, 0.4020918905735016, 0.6306197643280029, 1.4285811185836792, 0.2206459939479828, 0.030715327709913254, 0.31234222650527954, 0.3799881041049957, -0.03935783728957176, 0.5574489831924438, 1.0567020177841187, 0.48784616589546204, 0.6611052751541138, 0.7426103949546814, -2.1317803859710693, 1.4056323766708374, -1.102604866027832, 0.31274160742759705, 1.304073691368103, -0.9518787264823914, 0.31548285484313965, -1.764760136604309, -0.14956337213516235, 0.39997437596321106, -2.3077497482299805, 0.328298956155777, -1.2625216245651245, -0.46684530377388, 1.1153627634048462, 0.2641068994998932, -1.301192283630371, 0.1334804892539978, -0.37973272800445557, 0.8301694989204407, 0.4755513668060303, 1.0341109037399292, -1.6234139204025269, 0.05090075731277466, -0.3393687605857849, 0.084478959441185, -1.3080644607543945, -1.3596264123916626, 0.523299515247345, 0.5469180941581726, 0.6076893210411072, -0.15032897889614105, 1.0823729038238525, -0.8620153069496155, 0.8164657354354858, -0.9752328395843506, -1.5610105991363525, -1.3779104948043823, -2.2475197315216064, -2.285153388977051, 0.8358158469200134, -0.5316978693008423, -0.5941706299781799, 1.9940295219421387, -1.0633841753005981, -1.7601590156555176, 1.0899213552474976, 0.21945072710514069, 0.03200386464595795, 2.3609559535980225, 0.18395163118839264, -0.6012413501739502, 0.41797730326652527, -0.7113446593284607, 0.9679415822029114, -0.49594321846961975, 1.4435129165649414, 0.44818711280822754, -1.0178794860839844, 1.6166311502456665, -0.3737245798110962, 0.48637479543685913, -0.6194770336151123, -0.6962489485740662, -0.9329516291618347, 0.3466140329837799, 1.9527946710586548, -0.3256385326385498, 1.6572058200836182, -0.2834920287132263, -1.6365835666656494, -1.5696121454238892, 0.8761404752731323, 0.41179031133651733, -0.7890328168869019, 0.01393201295286417, -0.3183702528476715, 0.11078020185232162, -0.028862010687589645, 1.1383861303329468, 1.1235638856887817, 0.7864193916320801, -0.3113362789154053, -0.8772866725921631, 0.25035855174064636, 0.025241345167160034, -0.7714237570762634, -1.7508491277694702, -0.4011220932006836, 0.16125313937664032, 0.6317226886749268, -1.302138090133667, 1.734926700592041, 1.1020151376724243, 1.9796264171600342, 0.9604154229164124, -0.1881076544523239, 1.4744027853012085, 0.0013704439625144005, 1.9134122133255005, -0.4727363884449005, 0.5636181831359863, -0.4114784002304077, -1.2121490240097046, 0.7932916879653931, -0.32527396082878113, -2.0446722507476807, -0.840842604637146, -0.9620136022567749, -0.10524915158748627, -0.777998685836792, 1.0057477951049805, -0.3763746917247772, -1.392575740814209, 0.14483016729354858, -0.5938358306884766, 0.10702765733003616, -1.2665361166000366, 0.26918894052505493, 0.7079285979270935, -0.7176599502563477, 0.06693298369646072, -0.20418044924736023, -1.2922263145446777, -0.44274359941482544, 0.21066401898860931, 2.0010812282562256, -0.8345082998275757, 0.9443045258522034, 0.9575483798980713, -0.7374832630157471, -0.020315375179052353, 0.29774656891822815, -0.2711063623428345, 0.6536424160003662, -1.0498677492141724, -0.36387887597084045, 1.3132928609848022, -0.11870838701725006, -0.6951891779899597, 1.5160099267959595, 0.7406628131866455, -0.9317829012870789, -0.1874593198299408, -0.2333037555217743, -0.7232643365859985, -0.05025997757911682, -1.5711396932601929, 0.009135379455983639, 0.23768045008182526, -1.556915044784546, -0.40353643894195557, -0.16197854280471802, 1.1521674394607544, -0.280070960521698, 1.3405119180679321, -0.1637449562549591, -0.3606303930282593, -0.2937973737716675, -0.44585925340652466, 0.0954388901591301, -0.117792509496212, -0.7207585573196411, 0.34213292598724365, -0.8032534718513489, 0.392975389957428, 1.5910835266113281, 0.3504028022289276, 0.03312995657324791, 0.5454792976379395, 1.0771859884262085, 0.45400938391685486, 0.007514311000704765, -0.8633894920349121, -1.5552624464035034, 1.9961333274841309, -1.5344433784484863, 1.9465653896331787, 0.7035226821899414, -0.08882036805152893, -1.726089596748352, -1.7940582036972046, 1.2684690952301025, 1.2605576515197754, 2.3565313816070557, 0.6867174506187439, 0.2230386734008789, -0.8305785655975342, -0.5929234623908997, 0.3777073323726654, -1.1585819721221924, -0.721750795841217, 0.12763012945652008, 2.3529303073883057, 1.8411860466003418, -0.46868112683296204, -0.2627537250518799, -1.0268957614898682, 1.2599294185638428, -0.155466228723526, 0.19083361327648163, 1.888358235359192, -0.18086688220500946, -1.141842007637024, 1.3471182584762573, -2.346126079559326, 0.1838313490152359, 2.022723913192749, 0.4770877957344055, 0.026097726076841354, -1.4517074823379517, -0.6216210126876831, -0.2774803042411804, -0.3551950454711914, -1.2818644046783447, 0.5531372427940369, -0.2544041872024536, -0.8420578837394714, -1.3899726867675781, 0.2402609884738922, -1.1256922483444214, -1.6692781448364258, 0.3424667716026306, 1.8809887170791626, 1.9256421327590942, -0.5648553967475891, 1.3607845306396484, -0.3815898299217224, 0.19774214923381805, 1.2740647792816162, 1.2233282327651978, 3.0422747135162354, 1.9415148496627808, -1.1661325693130493, 0.7214818000793457, -0.2004707008600235, -0.5122162699699402, 1.2219380140304565, -1.223077416419983, 1.2306556701660156, -0.21734800934791565, -1.1479196548461914, -1.2659748792648315, 0.8117697238922119, 0.37797269225120544, 0.09053055942058563, -0.4863433241844177, 1.299161434173584, 0.1614447981119156, 1.3056939840316772, 0.5899980664253235, -0.39759039878845215, 0.5703830122947693, -0.3953720033168793, -0.5494793653488159, 1.5278959274291992, 0.20255208015441895, -1.4942864179611206, -2.2370753288269043, -0.12534694373607635, -0.8174731731414795, -0.025135397911071777, -0.49266642332077026, -1.013026237487793, 1.7323660850524902, 0.3445669114589691, -1.2440667152404785, -0.20040132105350494, -0.28419598937034607, -0.6260042190551758, 2.7861034870147705, -1.3436284065246582, -0.27875202894210815, -1.0267413854599, -0.6409469246864319, 1.7895655632019043, -1.1995598077774048, -0.23228807747364044, -1.0320996046066284, -0.487432062625885, -1.3949106931686401, -0.49103420972824097, -0.012960159219801426, -0.8967686295509338, 0.7708099484443665, 0.16161641478538513, -1.1283977031707764, -0.5240226984024048, -0.809177815914154, 0.8802316784858704, 0.007402801886200905, 0.27659472823143005, 1.8263390064239502, 0.4700236916542053, -0.3755543529987335, 0.7513566017150879, 1.2781826257705688, 0.663386881351471, -0.611208975315094, 0.2622312009334564, -0.6858323216438293, 0.2640802562236786, -1.3797153234481812, 0.2470201998949051, -2.882235527038574, 0.5519992709159851, -0.12341225147247314, -0.15864062309265137, -0.09017480164766312, -1.3511587381362915, 1.1675970554351807, 2.6511359214782715, -1.1626441478729248, 0.48169055581092834, 0.3212856352329254, 1.09445321559906, -1.6320370435714722, 0.42143183946609497, -0.4203190803527832, 2.0970075130462646, 0.2037174552679062, 1.2436360120773315, -0.6075855493545532, -2.2126739025115967, 0.6258248686790466, -1.3235914707183838, -1.2165471315383911, 0.7447510361671448, -0.9481598138809204, -0.02761758491396904, -1.4451850652694702, -0.15191532671451569, -0.847437858581543, -1.3577443361282349, 0.9063190817832947, 0.17952443659305573, 0.437045156955719, -0.538443386554718, 0.4567694664001465, -2.280352830886841, -1.3822838068008423, -0.23892366886138916, -0.996411919593811, 0.47684505581855774, -0.4233803153038025, 0.6501957178115845, -0.20615938305854797, -0.019174668937921524, 0.41369763016700745, 1.4448729753494263, 3.4265308380126953, 0.29454025626182556, 0.4631611108779907, -0.205597385764122, -0.9637247920036316, 1.4785138368606567, 0.987818717956543, -0.1025271862745285, -0.537528932094574, -0.9637680053710938, 1.1940606832504272, 2.009226083755493, 1.056621789932251, -0.038332823663949966, -0.7816858887672424, -0.7198090553283691, -0.06891276687383652, 0.13111229240894318, 0.4961486756801605, 0.9961707592010498, 0.08482307940721512, 0.0350431464612484, 1.3728290796279907, 1.063920259475708, -0.36385369300842285, 0.29160207509994507, -0.8376922607421875, -0.3787829577922821, 0.5416377186775208, 0.3468511700630188, -0.08342277258634567, 0.5639821887016296, -0.9680389761924744, -0.28685539960861206, -0.34934547543525696, -1.0033330917358398, -0.7184061408042908, -0.45536497235298157, -0.3713935911655426, 1.6622542142868042, -0.08190105110406876, -0.5332476496696472, -0.008455936796963215, -0.7487032413482666, -0.08318039029836655, -1.0906956195831299, 0.2454148679971695, -0.02697029709815979, -0.0979144498705864, -0.09988293051719666, 1.839666724205017, -1.0669598579406738, -2.146557569503784, 0.3116517961025238, 0.2991555333137512, -0.32360967993736267, 0.268192857503891, 1.553728699684143, 0.43291276693344116, 1.3294028043746948, 1.3287498950958252, 1.037988305091858, -0.7363439202308655, -1.3513023853302002, 0.6769420504570007, 0.9622999429702759, -1.3561335802078247, 0.8058022856712341, -0.005224699154496193, -0.3203963339328766, 0.5931930541992188, 1.11248779296875, 0.521884560585022, -1.9661592245101929, 0.6797436475753784, -0.892589271068573, 0.7321913838386536, 0.7277002930641174, 0.827043354511261, 0.25677788257598877, 0.7828670144081116, -1.1891289949417114, -1.0849617719650269, -0.7584301233291626, -0.6943281888961792, 1.878807544708252, -0.23349379003047943, 0.7269333004951477, -0.05519459396600723, -1.267115592956543, -0.09840693324804306, 0.7066742777824402, 0.32028862833976746, -0.4402485191822052, 0.7820495367050171, -0.6517925262451172, -1.0540533065795898, -1.4139553308486938, -0.5130483508110046, -1.0465199947357178, -0.9336934089660645, 1.0081489086151123, 0.706153392791748, 0.19168466329574585, 1.9669846296310425, 0.6949637532234192, 0.2622227370738983, -2.751162528991699, 0.880324125289917, 0.2621311843395233, 0.15017986297607422, 0.7960377335548401, 0.37184083461761475, 0.9526109099388123, 0.01742061972618103, 0.537048876285553, -2.385056257247925, 2.311845064163208, -0.278359055519104, 0.6687800288200378, -0.002932559698820114, -0.30382275581359863, 1.0804471969604492, 0.669131338596344, 0.5414870977401733, -1.1981126070022583, 0.6650922894477844, -0.6653510928153992, 1.1953140497207642, 0.9548832774162292, -0.742931604385376, -0.010427648201584816, 1.3036468029022217, 0.5115750432014465, -0.45427724719047546, -1.1211199760437012, -0.7193163633346558, 1.0083144903182983, 1.6372932195663452, -0.09106576442718506, -0.008789663203060627, 0.8232604265213013, 0.6131715774536133, -1.241180181503296, 0.06509605795145035, -0.7024109959602356, -0.9325397610664368, 1.6578752994537354, 1.9322880506515503, -0.13702067732810974, -0.24164296686649323, -0.805587649345398, -0.9915744662284851, 0.6940193176269531, -0.04036865383386612, 0.14188377559185028, 0.7244110703468323, -0.6586988568305969, 1.1065967082977295, 0.8691867589950562, 0.9522063136100769, 0.09965839236974716, 0.3517882525920868, 0.3565276265144348, -0.22116847336292267, -1.2000864744186401, -0.2506239414215088, -1.160264253616333, -2.722310781478882, 0.5280880928039551, -0.36890527606010437, -1.360775351524353, 0.06222420930862427, -1.1361373662948608, 0.962181568145752, -0.5927873253822327, -1.1330748796463013, -1.4478635787963867, 0.10954418033361435, -0.12147516757249832, 0.8446093201637268, -1.6513030529022217, -0.09512250870466232, 1.202690839767456, 0.9757619500160217, -0.7968036532402039, 1.0718201398849487, 0.102145716547966, 1.1797338724136353, 0.8498073220252991, -0.34125596284866333, 0.5780807137489319, 0.1343533843755722, -1.3388274908065796, 0.42822232842445374, 1.1590501070022583, 0.17028288543224335, 1.4494270086288452, -0.593248724937439, 0.16057586669921875, 0.4787020981311798, -0.6324091553688049, -0.41709673404693604, -0.6777085065841675, 0.8578063249588013, 0.06331546604633331, -0.9536409974098206, 0.06159944832324982, -0.24309538304805756, -0.08602270483970642, 0.05705758184194565, -1.4646050930023193, -0.33068743348121643, -0.31856170296669006, -0.5024517774581909, -1.2711561918258667, -0.10846555978059769, 1.3264590501785278, -0.7745121121406555, -0.1379697620868683, 0.4900079369544983, 0.34750187397003174, 0.5695850849151611, 0.5869848132133484, -0.8494596481323242, -0.2457897812128067, -0.1915881186723709, -0.2591971755027771, 0.4503254294395447, 1.4209153652191162, -0.052460379898548126, -0.9847192168235779, 0.6890407204627991, -0.21857686340808868, 0.05377062410116196, 1.9600050449371338, 0.04662388935685158, -0.6879967451095581, 0.33319908380508423, -0.7400432825088501, 1.8019250631332397, 1.6250994205474854, 1.2186956405639648, -0.07080778479576111, -0.8401679992675781, 0.7237043380737305, -0.26297736167907715, -0.41470542550086975, 0.7934830784797668, 0.4346711337566376, -0.11447162181138992, -1.5415620803833008, 0.5785483121871948, 1.2147917747497559, -0.8369704484939575, -0.8286596536636353, 0.011918644420802593, -0.7706009745597839, 0.9846566319465637, 0.5577420592308044, 0.3529345393180847, 0.3631878197193146, 1.6277931928634644, 0.7121124863624573, -0.486234575510025, 0.5284589529037476, 0.5285066366195679, -0.15297041833400726, -2.0917346477508545, -1.1369504928588867, 0.38338255882263184, -0.44872593879699707, -1.5023881196975708, 1.3492085933685303, -1.1625251770019531, -0.9050177335739136, 0.6944174766540527, 0.19716383516788483, 1.617616891860962, 0.4075065553188324, 1.585422158241272, 2.1032238006591797, 0.8762683868408203, 0.2255822867155075, 1.3311160802841187, -0.10293049365282059, -0.5004649758338928, 1.8021868467330933, -0.41838133335113525, 0.5195464491844177, 0.9793533086776733, -0.29597482085227966, -1.0798949003219604, -0.7691136598587036, -1.2858864068984985, -0.7116926312446594, 1.0728065967559814, 0.18313835561275482, -1.1756584644317627, 0.17344079911708832, 1.5696579217910767, 0.13380572199821472, -0.2541899085044861, 0.540298342704773, 0.36405491828918457, -0.8574978709220886, -0.0427771657705307, -0.9143829345703125, 0.42233189940452576, -0.21738530695438385, -0.3159886300563812, 0.2657030522823334, 0.5473321080207825, 1.2674226760864258, 0.014203979633748531, 0.08745573461055756, 1.1605840921401978, -1.3437633514404297, 1.4404101371765137, -0.5829484462738037, 0.24454079568386078, -2.3268489837646484, 1.435897946357727, -0.8798732161521912, 1.8912127017974854, -2.57369065284729, 0.48218780755996704, -0.5978611707687378, -0.5643236637115479, 0.418680340051651, -0.5282754898071289, 0.22614185512065887, -0.1863897740840912, -0.9112415909767151, 0.0910184308886528, -0.6144489049911499, 0.6392256617546082, 1.0652251243591309, 1.3215283155441284, -1.0778309106826782, -0.48525944352149963, -1.9001511335372925, -0.21979573369026184, -0.6294807195663452, 0.3951902389526367, -2.0721542835235596, -0.21979977190494537, -1.944522738456726, -2.1996078491210938, -1.3840128183364868, -0.7365331053733826, 1.1097232103347778, 0.2916454076766968, -0.7691633701324463, 1.0005176067352295, -0.25936344265937805, -1.756068229675293, 1.0412319898605347, -2.1466634273529053 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
So what's recommanded usage of `IterableDataset.from_file` and `load_dataset`? How about I have multiple arrow files and `load_dataset` is often convenient to handle that.
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
23
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True So what's recommanded usage of `IterableDataset.from_file` and `load_dataset`? How about I have multiple arrow files and `load_dataset` is often convenient to handle that.
[ -1.1906013488769531, -0.9140706658363342, -0.8065270185470581, 1.6290780305862427, -0.19189764559268951, -1.3308740854263306, 0.25316500663757324, -0.9579043984413147, 1.6622309684753418, -0.9153589010238647, 0.492199182510376, -1.7103694677352905, -0.005908402614295483, -0.5033282041549683, -0.7327945828437805, -0.8433938026428223, -0.46425968408584595, -0.740291178226471, 1.0149930715560913, 2.3518521785736084, 1.2463922500610352, -1.3259364366531372, 2.544459104537964, 0.6128236651420593, -0.15760214626789093, -1.0150076150894165, 0.4304834008216858, 0.09090445935726166, -1.2037136554718018, -0.5627601146697998, -0.8941492438316345, -0.14025507867336273, -0.46499505639076233, -0.6672254204750061, 0.04457465559244156, 0.49683678150177, -0.2707463800907135, -0.43939846754074097, -0.4388345181941986, -0.7456153631210327, 0.48668715357780457, -0.4625839591026306, 0.9446200728416443, -0.4491068124771118, 1.900771975517273, -0.5434731245040894, 0.4252318739891052, 0.6986642479896545, 1.4611743688583374, 0.14897271990776062, 0.03617134690284729, 0.3529493808746338, 0.39420291781425476, -0.08175157010555267, 0.494970440864563, 1.0992623567581177, 0.48687049746513367, 0.7124386429786682, 0.7580000162124634, -2.2049319744110107, 1.3551663160324097, -1.2005765438079834, 0.36094367504119873, 1.2755563259124756, -1.0963228940963745, 0.23867253959178925, -1.7114644050598145, -0.07185488194227219, 0.3510908782482147, -2.254930257797241, 0.378653883934021, -1.3088353872299194, -0.4723298251628876, 1.0280731916427612, 0.3407726287841797, -1.2765984535217285, 0.11129168421030045, -0.29309579730033875, 0.808715283870697, 0.47347456216812134, 1.0443369150161743, -1.6743656396865845, 0.14897024631500244, -0.40870290994644165, 0.09467581659555435, -1.318128228187561, -1.3647838830947876, 0.4965941309928894, 0.5125895142555237, 0.5786858201026917, -0.2256494015455246, 1.1135231256484985, -0.8442173004150391, 0.7221886515617371, -1.0317991971969604, -1.5535047054290771, -1.3347245454788208, -2.1626267433166504, -2.2882869243621826, 0.8193828463554382, -0.5960289239883423, -0.6212351322174072, 1.9461685419082642, -0.9911980628967285, -1.7863435745239258, 1.1604194641113281, 0.21565839648246765, -0.04008699953556061, 2.253035068511963, 0.22209817171096802, -0.5504778027534485, 0.41051796078681946, -0.7882602214813232, 0.9772140383720398, -0.47106537222862244, 1.4033482074737549, 0.48682332038879395, -1.0482900142669678, 1.5769191980361938, -0.32048311829566956, 0.6481936573982239, -0.6443508267402649, -0.7453659176826477, -0.9179455637931824, 0.304851233959198, 1.9715756177902222, -0.22729280591011047, 1.5850725173950195, -0.33010268211364746, -1.646809697151184, -1.6002438068389893, 1.0480595827102661, 0.34854185581207275, -0.7233474850654602, 0.10967837274074554, -0.26771751046180725, 0.10480710119009018, -0.07813220471143723, 1.17337965965271, 1.1492853164672852, 0.7896395921707153, -0.32134872674942017, -0.8760876059532166, 0.22774511575698853, 0.034912772476673126, -0.7568686604499817, -1.7295732498168945, -0.3980310559272766, 0.10600840300321579, 0.5787113904953003, -1.180871844291687, 1.7116754055023193, 1.1011040210723877, 1.9125691652297974, 0.9918952584266663, -0.1588437259197235, 1.4681448936462402, -0.004298349842429161, 1.937002420425415, -0.4345967173576355, 0.5365785360336304, -0.3875560760498047, -1.2087273597717285, 0.8660053610801697, -0.30110621452331543, -2.0008599758148193, -0.9237385988235474, -1.0204931497573853, -0.10001997649669647, -0.7341240644454956, 0.9873253107070923, -0.31572720408439636, -1.4875788688659668, 0.14908355474472046, -0.5047832727432251, 0.12312289327383041, -1.2496978044509888, 0.3594589829444885, 0.7069462537765503, -0.7081717252731323, 0.058245182037353516, -0.24240876734256744, -1.315016269683838, -0.4899314343929291, 0.23705947399139404, 1.9843641519546509, -0.8405002355575562, 0.9022674560546875, 0.9772725701332092, -0.850653350353241, -0.03885947912931442, 0.19851110875606537, -0.24981538951396942, 0.6458224058151245, -1.1151164770126343, -0.2867050766944885, 1.3510257005691528, -0.08886983245611191, -0.6987431049346924, 1.5623855590820312, 0.7334179282188416, -0.882006824016571, 0.00039433035999536514, -0.2589873969554901, -0.7790286540985107, -0.11899839341640472, -1.5071723461151123, 0.03556281328201294, 0.23229336738586426, -1.5377702713012695, -0.44419246912002563, -0.19583040475845337, 1.1064682006835938, -0.2687463164329529, 1.2746394872665405, -0.19405367970466614, -0.3463902771472931, -0.29311603307724, -0.400300532579422, 0.11335740238428116, -0.13466504216194153, -0.7670384645462036, 0.21516263484954834, -0.7745598554611206, 0.3963305354118347, 1.5666711330413818, 0.25709331035614014, 0.07228445261716843, 0.5647508502006531, 1.1630607843399048, 0.4096561372280121, 0.07451421767473221, -0.83638596534729, -1.4842865467071533, 1.932511806488037, -1.5195975303649902, 1.905102252960205, 0.4611690640449524, -0.08038816601037979, -1.7384271621704102, -1.7963225841522217, 1.2862924337387085, 1.326189398765564, 2.295210361480713, 0.6338984370231628, 0.22563140094280243, -0.8450613021850586, -0.6327844858169556, 0.33890339732170105, -1.1916372776031494, -0.6679950952529907, 0.17364054918289185, 2.3084797859191895, 1.7387409210205078, -0.6040290594100952, -0.2335454672574997, -1.0562009811401367, 1.3814506530761719, -0.2029975801706314, 0.20792041718959808, 1.8946737051010132, -0.2147189825773239, -1.149815320968628, 1.4031915664672852, -2.377422571182251, 0.1426062285900116, 2.00846529006958, 0.4919714331626892, 0.0778464749455452, -1.3617452383041382, -0.6356409192085266, -0.18622195720672607, -0.4087616205215454, -1.2852654457092285, 0.5851731300354004, -0.2625409662723541, -0.7483698129653931, -1.4015333652496338, 0.2920149862766266, -1.0315426588058472, -1.5904011726379395, 0.3186044991016388, 1.8895231485366821, 1.8826260566711426, -0.5125792622566223, 1.4741075038909912, -0.3698251247406006, 0.2745055556297302, 1.3497438430786133, 1.1501163244247437, 3.0090677738189697, 2.0148532390594482, -1.100253701210022, 0.7646814584732056, -0.17688117921352386, -0.5912158489227295, 1.3033639192581177, -1.2260409593582153, 1.2271091938018799, -0.1873803436756134, -1.0197877883911133, -1.310363531112671, 0.7755091786384583, 0.3762797713279724, 0.21652287244796753, -0.4559495151042938, 1.2344698905944824, 0.1362215131521225, 1.3197476863861084, 0.646295964717865, -0.4013068675994873, 0.5990283489227295, -0.4755081236362457, -0.4766885042190552, 1.6261279582977295, 0.3184024393558502, -1.3745752573013306, -2.2398388385772705, -0.1425497829914093, -0.842965304851532, 0.09491513669490814, -0.4427509605884552, -0.9557756781578064, 1.6820745468139648, 0.3525945246219635, -1.2985496520996094, -0.13842524588108063, -0.29066768288612366, -0.5803707838058472, 2.8175666332244873, -1.3316643238067627, -0.3277328908443451, -0.9767677783966064, -0.7182751297950745, 1.832381248474121, -1.2779368162155151, -0.18612919747829437, -1.0081205368041992, -0.40520185232162476, -1.3825591802597046, -0.531961977481842, 0.025465743616223335, -0.9451500773429871, 0.8462450504302979, 0.13742773234844208, -1.217943787574768, -0.5417783856391907, -0.8311271667480469, 0.8496272563934326, -0.0688842386007309, 0.31910550594329834, 1.7833634614944458, 0.5215823650360107, -0.33562299609184265, 0.7537555694580078, 1.203873634338379, 0.5937357544898987, -0.6218664050102234, 0.2989574074745178, -0.642295777797699, 0.20559896528720856, -1.3829947710037231, 0.2892444133758545, -2.8969264030456543, 0.5283553004264832, -0.11447446048259735, -0.15369051694869995, -0.13408516347408295, -1.5065455436706543, 1.1346588134765625, 2.6108715534210205, -1.2002665996551514, 0.4551171064376831, 0.3215150535106659, 1.2090399265289307, -1.5246046781539917, 0.4090718626976013, -0.4847048819065094, 2.0838522911071777, 0.17169377207756042, 1.2466003894805908, -0.5394790768623352, -2.286172389984131, 0.6099793910980225, -1.3102492094039917, -1.3486332893371582, 0.7547926306724548, -0.8874726295471191, -0.01317184790968895, -1.435187578201294, -0.2685864269733429, -0.7974254488945007, -1.3003017902374268, 0.923226535320282, 0.21548029780387878, 0.32061877846717834, -0.6340214610099792, 0.4279961884021759, -2.206941843032837, -1.3734856843948364, -0.22771701216697693, -0.8791258931159973, 0.47633782029151917, -0.4008208215236664, 0.6493512392044067, -0.25422993302345276, 0.03394097834825516, 0.37646153569221497, 1.4576727151870728, 3.380540132522583, 0.24675537645816803, 0.4732482433319092, -0.18321312963962555, -0.841254711151123, 1.5495357513427734, 1.0047489404678345, -0.09957733005285263, -0.5123451948165894, -0.9896875619888306, 1.111962080001831, 1.9853930473327637, 0.9415035843849182, -0.13796035945415497, -0.7968892455101013, -0.5765718221664429, -0.17245644330978394, 0.043867290019989014, 0.42481082677841187, 0.9200080633163452, 0.17254208028316498, 0.10233855247497559, 1.2385574579238892, 1.0183225870132446, -0.39296871423721313, 0.28462839126586914, -0.7875275611877441, -0.3621591329574585, 0.5823053121566772, 0.4648337960243225, -0.06575024873018265, 0.45611056685447693, -0.9245055913925171, -0.26941609382629395, -0.29583194851875305, -0.9421935081481934, -0.7745130062103271, -0.5123125314712524, -0.38392874598503113, 1.7025693655014038, -0.030100731179118156, -0.6535694599151611, -0.09879300743341446, -0.7741395831108093, 0.01780477538704872, -1.1259092092514038, 0.3348532021045685, -0.11700795590877533, -0.08183659613132477, -0.04465889930725098, 1.9020588397979736, -1.1469786167144775, -2.102637767791748, 0.32791271805763245, 0.38122794032096863, -0.26642459630966187, 0.21402694284915924, 1.5235605239868164, 0.4858640730381012, 1.340490698814392, 1.3466384410858154, 1.0550287961959839, -0.695633590221405, -1.390362024307251, 0.629477322101593, 0.8901281356811523, -1.3765153884887695, 0.7044216394424438, 0.21774527430534363, -0.31806305050849915, 0.6349024772644043, 1.0393593311309814, 0.4805319309234619, -2.027358055114746, 0.6064935922622681, -0.926655650138855, 0.738431453704834, 0.8055675029754639, 0.774056613445282, 0.29819419980049133, 0.8660611510276794, -1.1040207147598267, -1.1890820264816284, -0.7790545225143433, -0.8118277788162231, 1.9150482416152954, -0.2934947907924652, 0.7516272068023682, 0.00850583054125309, -1.3319553136825562, -0.06356099247932434, 0.7822598218917847, 0.2942896783351898, -0.48946985602378845, 0.7639757394790649, -0.6507754921913147, -1.0813533067703247, -1.4466798305511475, -0.5320757031440735, -1.172229528427124, -0.9500204920768738, 1.1023142337799072, 0.7248543500900269, 0.16304506361484528, 1.9287245273590088, 0.7749089598655701, 0.28720614314079285, -2.741945743560791, 0.814708411693573, 0.25022822618484497, 0.16646163165569305, 0.7200855016708374, 0.467401921749115, 0.88947594165802, -0.03931152820587158, 0.5245633125305176, -2.424018144607544, 2.3254759311676025, -0.30721622705459595, 0.6323163509368896, -0.04680243134498596, -0.21275289356708527, 1.0684789419174194, 0.6690835952758789, 0.5544514656066895, -1.2108211517333984, 0.6174790859222412, -0.6060647368431091, 1.2452964782714844, 0.8942022919654846, -0.7659321427345276, -0.06197042763233185, 1.4005142450332642, 0.5200785398483276, -0.48104628920555115, -1.045903205871582, -0.8579403162002563, 0.9815965890884399, 1.6304467916488647, -0.12678737938404083, -0.02618040330708027, 0.8161581754684448, 0.5907494425773621, -1.2211153507232666, 0.011903354898095131, -0.6881822943687439, -0.9439907670021057, 1.6250327825546265, 1.9871972799301147, -0.22465811669826508, -0.1931343972682953, -0.8142299056053162, -1.020556092262268, 0.7909142971038818, 0.10469595342874527, 0.11375081539154053, 0.6465068459510803, -0.7064164876937866, 1.0788589715957642, 0.8522172570228577, 0.9211025238037109, 0.12616103887557983, 0.41641560196876526, 0.3902618885040283, -0.16252541542053223, -1.207735300064087, -0.18810272216796875, -1.1356390714645386, -2.642345666885376, 0.47646579146385193, -0.3619574010372162, -1.4164419174194336, 0.07666071504354477, -1.1371665000915527, 0.9775704145431519, -0.5979140996932983, -1.1946173906326294, -1.5166867971420288, 0.08741452544927597, -0.016750022768974304, 0.8192088007926941, -1.607173204421997, -0.031332556158304214, 1.1583123207092285, 0.9843065142631531, -0.8130741119384766, 1.1568825244903564, 0.1758929342031479, 1.1342508792877197, 0.8901127576828003, -0.44286730885505676, 0.603143036365509, 0.11140408366918564, -1.3202139139175415, 0.5453310608863831, 1.1931705474853516, 0.0996263176202774, 1.5031449794769287, -0.6141051650047302, 0.1012958511710167, 0.4683946371078491, -0.705845057964325, -0.45833340287208557, -0.671005368232727, 0.7888826727867126, 0.14510829746723175, -0.9708208441734314, 0.10817941278219223, -0.11190132051706314, -0.09378435462713242, 0.13429373502731323, -1.477351427078247, -0.2741660475730896, -0.3736621141433716, -0.5672651529312134, -1.2371325492858887, -0.11076670140028, 1.4254237413406372, -0.605930507183075, -0.07096931338310242, 0.47570133209228516, 0.3305322527885437, 0.5257744789123535, 0.48051291704177856, -0.7999082207679749, -0.14835584163665771, -0.23854467272758484, -0.36124151945114136, 0.45653036236763, 1.4283218383789062, -0.13118936121463776, -0.9637900590896606, 0.7805646061897278, -0.12758418917655945, 0.0008974112570285797, 1.9683964252471924, 0.13004320859909058, -0.6645793914794922, 0.27388709783554077, -0.8058783411979675, 1.8609241247177124, 1.6975651979446411, 1.237573266029358, -0.038017138838768005, -0.862684965133667, 0.6612654328346252, -0.3318729102611542, -0.4615272879600525, 0.7623578310012817, 0.3926720917224884, -0.1421644389629364, -1.4540703296661377, 0.6835445165634155, 1.2532973289489746, -0.7911538481712341, -0.9059590101242065, -0.0062229447066783905, -0.7255737781524658, 0.9090734124183655, 0.5823643207550049, 0.4244876503944397, 0.3172292113304138, 1.6203848123550415, 0.7107935547828674, -0.4264402687549591, 0.6168970465660095, 0.5491588711738586, -0.014101481065154076, -2.0472466945648193, -1.2272783517837524, 0.4738035202026367, -0.49660250544548035, -1.5831046104431152, 1.4137096405029297, -1.0887690782546997, -0.9929571747779846, 0.6844202280044556, 0.19461503624916077, 1.6972291469573975, 0.4766820967197418, 1.4827637672424316, 2.061859369277954, 0.8350158333778381, 0.27639129757881165, 1.3348585367202759, -0.13940469920635223, -0.5665874481201172, 1.8817009925842285, -0.4276605248451233, 0.37741729617118835, 1.0764397382736206, -0.24433574080467224, -1.0495463609695435, -0.7929314970970154, -1.3015385866165161, -0.7042018175125122, 1.0326310396194458, 0.18119363486766815, -1.2020275592803955, 0.25411543250083923, 1.6111376285552979, 0.13913755118846893, -0.3305831551551819, 0.5946305990219116, 0.26632413268089294, -0.8806113600730896, -0.00501090195029974, -0.9755072593688965, 0.44299784302711487, -0.29715192317962646, -0.3443668484687805, 0.25620925426483154, 0.4724409282207489, 1.268343448638916, 0.006072117947041988, 0.05542786419391632, 1.141865849494934, -1.4383139610290527, 1.427367925643921, -0.6141963005065918, 0.25329890847206116, -2.3203847408294678, 1.4506025314331055, -0.7913489937782288, 1.8656046390533447, -2.648218870162964, 0.4024469554424286, -0.6080610752105713, -0.5940874814987183, 0.4193134009838104, -0.45485180616378784, 0.15152254700660706, -0.14656998217105865, -1.0559707880020142, 0.17014557123184204, -0.576785147190094, 0.6157853603363037, 0.9934056401252747, 1.3017604351043701, -1.096242904663086, -0.4872038662433624, -1.8148088455200195, -0.18270227313041687, -0.5525834560394287, 0.43744340538978577, -2.120929479598999, -0.3419206738471985, -1.945331335067749, -2.1745336055755615, -1.256853699684143, -0.7499528527259827, 1.1107850074768066, 0.21350881457328796, -0.758378267288208, 1.040592074394226, -0.2964692711830139, -1.8258373737335205, 1.0959526300430298, -2.078582525253296 ]
https://github.com/huggingface/datasets/issues/5481
Load a cached dataset as iterable
If you have multiple Arrow files you can load them using ```python from datasets import load_dataset data_files = {"train": ["path/to/0.arrow", "path/to/1.arrow", ..., "path/to/n.arrow"]} ds = load_dataset("arrow", data_files=data_files, streaming=True) ``` This is equivalent to calling `IterableDataset.from_file` and `concatenate_datasets`.
The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True
321
37
Load a cached dataset as iterable The idea would be to allow something like ```python ds = load_dataset("c4", "en", as_iterable=True) ``` To be used to train models. It would load an IterableDataset from the cached Arrow files. Cc @stas00 Edit : from the discussions we may load from cache when streaming=True If you have multiple Arrow files you can load them using ```python from datasets import load_dataset data_files = {"train": ["path/to/0.arrow", "path/to/1.arrow", ..., "path/to/n.arrow"]} ds = load_dataset("arrow", data_files=data_files, streaming=True) ``` This is equivalent to calling `IterableDataset.from_file` and `concatenate_datasets`.
[ -1.1421035528182983, -0.9280318021774292, -0.7541816234588623, 1.5897581577301025, -0.18992190062999725, -1.205849528312683, 0.18088871240615845, -1.0219354629516602, 1.6403167247772217, -0.8541223406791687, 0.4649083614349365, -1.70931077003479, 0.02902182564139366, -0.5327165722846985, -0.7613592743873596, -0.9158823490142822, -0.3587911128997803, -0.6756552457809448, 0.9179652333259583, 2.4571807384490967, 1.2299463748931885, -1.255266785621643, 2.568702220916748, 0.6348341107368469, -0.170919269323349, -0.9690285921096802, 0.5258815288543701, 0.10074564069509506, -1.225999355316162, -0.46721214056015015, -0.9493525624275208, -0.14523673057556152, -0.47309768199920654, -0.5420025587081909, 0.046227045357227325, 0.48419901728630066, -0.3895161747932434, -0.3356640040874481, -0.5857033729553223, -0.8406306505203247, 0.4811806380748749, -0.4683299958705902, 1.0247535705566406, -0.4292653203010559, 1.9413155317306519, -0.6332021951675415, 0.5184229612350464, 0.7273280024528503, 1.251559853553772, 0.1484212577342987, 0.10666979104280472, 0.3090685307979584, 0.41081035137176514, 0.005340480245649815, 0.5380512475967407, 1.0305006504058838, 0.4948888421058655, 0.6643889546394348, 0.7474381327629089, -2.1903154850006104, 1.3344614505767822, -1.0960453748703003, 0.22407011687755585, 1.323536992073059, -0.8820750117301941, 0.2808307707309723, -1.7759088277816772, -0.12601140141487122, 0.4885849058628082, -2.235714912414551, 0.3977516293525696, -1.4046231508255005, -0.574680745601654, 1.0969817638397217, 0.39077121019363403, -1.205496907234192, 0.12159128487110138, -0.3278167247772217, 0.8308475017547607, 0.4980277419090271, 1.0056278705596924, -1.6926215887069702, 0.022638704627752304, -0.3926357328891754, 0.08240970969200134, -1.3598358631134033, -1.444589376449585, 0.5866456627845764, 0.4519721269607544, 0.5806742310523987, -0.18977412581443787, 1.1368569135665894, -0.9813777804374695, 0.7672802805900574, -1.1113280057907104, -1.654915690422058, -1.3891452550888062, -2.283571481704712, -2.3180134296417236, 0.8080297112464905, -0.49876120686531067, -0.5723810791969299, 1.9171679019927979, -1.0316994190216064, -1.6637914180755615, 1.100232481956482, 0.16197164356708527, -0.012867930345237255, 2.322920322418213, 0.19878704845905304, -0.5351561903953552, 0.4060811698436737, -0.8081613183021545, 0.8384671211242676, -0.2763461172580719, 1.3693817853927612, 0.488675057888031, -1.0918278694152832, 1.6628962755203247, -0.3157140910625458, 0.5351819396018982, -0.6504397392272949, -0.6630598902702332, -0.8289980888366699, 0.2494506537914276, 1.9312349557876587, -0.2938569188117981, 1.518212080001831, -0.24172309041023254, -1.5551589727401733, -1.615596890449524, 0.9729254245758057, 0.3712085485458374, -0.6860109567642212, 0.024400293827056885, -0.2512161135673523, 0.14683371782302856, -0.08036698400974274, 1.264926552772522, 1.1573166847229004, 0.7694747447967529, -0.3929723799228668, -0.7745445370674133, 0.21988683938980103, -0.012781071476638317, -0.7781649827957153, -1.7890727519989014, -0.41736775636672974, 0.17964105308055878, 0.6416262984275818, -1.1810898780822754, 1.786141037940979, 1.0585275888442993, 1.8771318197250366, 1.0100101232528687, -0.24317991733551025, 1.466143250465393, -0.008569162338972092, 1.9524693489074707, -0.5404534339904785, 0.5900548100471497, -0.4478001594543457, -1.1351522207260132, 0.8397287726402283, -0.22256985306739807, -1.9874377250671387, -0.8761122226715088, -0.9583981037139893, -0.18770258128643036, -0.7556529641151428, 0.9613823294639587, -0.36536720395088196, -1.4385766983032227, 0.13663040101528168, -0.6278312802314758, 0.01638888195157051, -1.2074003219604492, 0.33573412895202637, 0.6768754720687866, -0.708914041519165, 0.056525781750679016, -0.21105507016181946, -1.240054965019226, -0.5019963979721069, 0.1797524392604828, 1.9918837547302246, -0.7525379657745361, 0.9291272759437561, 0.9655957221984863, -0.8390963077545166, -0.048153579235076904, 0.2879909574985504, -0.3060528337955475, 0.6785756945610046, -1.0696897506713867, -0.40701839327812195, 1.2875949144363403, -0.2058413177728653, -0.7182544469833374, 1.5100935697555542, 0.7458088994026184, -0.9753934741020203, -0.16259151697158813, -0.2692728042602539, -0.6775311827659607, 0.026150479912757874, -1.4644832611083984, -0.014916809275746346, 0.34282779693603516, -1.5547868013381958, -0.4100748598575592, -0.15017780661582947, 1.196515679359436, -0.31555816531181335, 1.2892491817474365, -0.20564448833465576, -0.41155239939689636, -0.30771490931510925, -0.41896674036979675, 0.07025855779647827, -0.05786231905221939, -0.6917368173599243, 0.2718293070793152, -0.8090928792953491, 0.4017029106616974, 1.5441746711730957, 0.2904762923717499, 0.027980145066976547, 0.49888473749160767, 1.07381272315979, 0.43557682633399963, 0.06597945839166641, -0.9537920355796814, -1.5880447626113892, 1.8973214626312256, -1.5258705615997314, 1.9721958637237549, 0.558398962020874, -0.0983181819319725, -1.8150146007537842, -1.8152430057525635, 1.2868839502334595, 1.2185654640197754, 2.3374783992767334, 0.6309468150138855, 0.2635784149169922, -0.7674561142921448, -0.6988077759742737, 0.39145347476005554, -1.14853036403656, -0.638796329498291, 0.24182799458503723, 2.3397762775421143, 1.7957439422607422, -0.5109166502952576, -0.22755952179431915, -1.0205483436584473, 1.341160774230957, -0.13599072396755219, 0.1992831528186798, 2.005143404006958, -0.23859606683254242, -1.1188687086105347, 1.3371108770370483, -2.2828800678253174, 0.11220771074295044, 1.974869966506958, 0.37027597427368164, 0.0616554319858551, -1.3911645412445068, -0.6526772379875183, -0.30388206243515015, -0.4484064280986786, -1.3052457571029663, 0.5000975728034973, -0.29288265109062195, -0.7618474960327148, -1.3879433870315552, 0.2613261938095093, -1.1394504308700562, -1.6191462278366089, 0.2958170175552368, 1.8727363348007202, 1.9884923696517944, -0.6034399271011353, 1.444848656654358, -0.32464316487312317, 0.2048002928495407, 1.3193657398223877, 1.2646812200546265, 3.0567545890808105, 1.9448120594024658, -1.155961275100708, 0.7458142042160034, -0.1541203260421753, -0.5170182585716248, 1.3306337594985962, -1.2284152507781982, 1.2514597177505493, -0.11651373654603958, -1.064603328704834, -1.2850630283355713, 0.8465747237205505, 0.35362136363983154, 0.1246950626373291, -0.47585463523864746, 1.2125135660171509, 0.17666985094547272, 1.3353793621063232, 0.6703970432281494, -0.38973280787467957, 0.6115664839744568, -0.44339290261268616, -0.4446376860141754, 1.6114757061004639, 0.2640134394168854, -1.432691216468811, -2.2786977291107178, -0.19250376522541046, -0.9405317306518555, 0.03485650196671486, -0.4740247428417206, -0.9724246859550476, 1.7424755096435547, 0.34330621361732483, -1.2932050228118896, -0.08929876238107681, -0.3062281608581543, -0.585120677947998, 2.8463292121887207, -1.260563850402832, -0.2200208157300949, -1.0476843118667603, -0.7914040088653564, 1.7778633832931519, -1.219820499420166, -0.18083415925502777, -1.0115896463394165, -0.423572838306427, -1.4064379930496216, -0.4599153697490692, 0.06351757049560547, -0.9705749750137329, 0.8826501965522766, 0.11878646910190582, -1.1827822923660278, -0.5873556137084961, -0.8772501349449158, 0.8680905699729919, -0.05317414179444313, 0.2959214448928833, 1.8813260793685913, 0.49215173721313477, -0.319069504737854, 0.6862331628799438, 1.2080861330032349, 0.6629355549812317, -0.6557954549789429, 0.3755592703819275, -0.7190544009208679, 0.16777381300926208, -1.3447816371917725, 0.29365044832229614, -2.8392975330352783, 0.5950139164924622, -0.1539628505706787, -0.22737883031368256, 0.007222299464046955, -1.3527843952178955, 1.0842957496643066, 2.625784158706665, -1.187502384185791, 0.4185341000556946, 0.3280227482318878, 1.108510971069336, -1.5538772344589233, 0.3938518464565277, -0.4561324417591095, 2.0617008209228516, 0.22300279140472412, 1.1950962543487549, -0.5360901355743408, -2.201676845550537, 0.6500770449638367, -1.274936556816101, -1.2794914245605469, 0.789545476436615, -0.89163738489151, 0.0789269432425499, -1.4414341449737549, -0.234694242477417, -0.8589722514152527, -1.3554964065551758, 0.8377835154533386, 0.17244026064872742, 0.3768709897994995, -0.4509749114513397, 0.3975205421447754, -2.231335163116455, -1.38765287399292, -0.23866569995880127, -0.8700116872787476, 0.5404464602470398, -0.3366595208644867, 0.7495332360267639, -0.251509428024292, 0.02858828753232956, 0.4080877900123596, 1.5371372699737549, 3.4185969829559326, 0.25996384024620056, 0.3752826154232025, -0.1786193698644638, -0.9730571508407593, 1.5095347166061401, 1.0162861347198486, 0.01676548644900322, -0.4943545460700989, -1.0443304777145386, 1.0832310914993286, 1.9778729677200317, 1.0315428972244263, -0.015721416100859642, -0.7493647933006287, -0.6443765163421631, -0.06597606092691422, 0.10540877282619476, 0.39277851581573486, 0.9196772575378418, 0.1172347366809845, 0.047993842512369156, 1.362191081047058, 1.1212211847305298, -0.3624125123023987, 0.2181241512298584, -0.7848474979400635, -0.33532577753067017, 0.6107871532440186, 0.30594879388809204, 0.02343803271651268, 0.41693180799484253, -0.9819197654724121, -0.2871840298175812, -0.39103490114212036, -1.0202528238296509, -0.6800498366355896, -0.5886507630348206, -0.4300116300582886, 1.581365942955017, -0.03351718932390213, -0.5344594120979309, -0.10139412432909012, -0.8115382790565491, -0.10006769746541977, -1.1538050174713135, 0.19254685938358307, -0.11024856567382812, -0.16078026592731476, -0.1307685226202011, 1.9051769971847534, -1.087780237197876, -2.056166172027588, 0.27471819519996643, 0.28273823857307434, -0.2974611520767212, 0.32599687576293945, 1.5521279573440552, 0.4970536231994629, 1.3797450065612793, 1.240780234336853, 0.9986923933029175, -0.5692558884620667, -1.3229998350143433, 0.6450538039207458, 0.9614495038986206, -1.3951765298843384, 0.8794419765472412, 0.06830575317144394, -0.30544787645339966, 0.6292300224304199, 1.068725824356079, 0.47882306575775146, -1.9384758472442627, 0.6248301863670349, -0.897517204284668, 0.7062793374061584, 0.7943785190582275, 0.761814296245575, 0.20387446880340576, 0.8534787893295288, -1.1300699710845947, -1.0930202007293701, -0.6977517008781433, -0.6548702716827393, 1.947049856185913, -0.211958110332489, 0.727017879486084, -0.10556373000144958, -1.2874538898468018, -0.03421947360038757, 0.7610317468643188, 0.35009291768074036, -0.5209924578666687, 0.814660906791687, -0.6186429858207703, -0.9743378758430481, -1.3849222660064697, -0.463468074798584, -1.2042980194091797, -0.9155713319778442, 1.110705852508545, 0.6880049109458923, 0.23037032783031464, 1.9512754678726196, 0.7586721777915955, 0.3681277334690094, -2.7279605865478516, 0.8505997061729431, 0.157721146941185, 0.14772942662239075, 0.7985502481460571, 0.4126570224761963, 0.9906998872756958, -0.1332380175590515, 0.5557942390441895, -2.429656744003296, 2.3498480319976807, -0.2996616065502167, 0.5919375419616699, -0.021926671266555786, -0.2293468713760376, 1.0950207710266113, 0.6585138440132141, 0.5092551112174988, -1.103341817855835, 0.5376896858215332, -0.5985198020935059, 1.199185848236084, 0.9103128910064697, -0.8149899244308472, -0.012041556648910046, 1.354961633682251, 0.614526629447937, -0.47010692954063416, -0.9866428971290588, -0.8822125196456909, 0.9443730711936951, 1.587572455406189, -0.14516818523406982, -0.09485579282045364, 0.9361788630485535, 0.6038528680801392, -1.210440993309021, 0.0697234496474266, -0.6999861598014832, -0.8513761758804321, 1.6027971506118774, 2.0177624225616455, -0.2012237310409546, -0.21300633251667023, -0.8248041868209839, -0.9913723468780518, 0.7785710096359253, -0.003400116693228483, 0.12482759356498718, 0.6676070094108582, -0.6362550258636475, 0.992225170135498, 0.8550134301185608, 0.9720805287361145, 0.250900000333786, 0.4370514750480652, 0.39908772706985474, -0.34623390436172485, -1.2128052711486816, -0.27602463960647583, -1.0852839946746826, -2.721991539001465, 0.6196655035018921, -0.39511093497276306, -1.3799587488174438, 0.04548079892992973, -1.131836175918579, 0.9793992638587952, -0.5698487162590027, -1.1755261421203613, -1.4749809503555298, 0.1138252317905426, -0.08370133489370346, 0.9783009886741638, -1.6493114233016968, -0.07065673917531967, 1.1815457344055176, 0.9430045485496521, -0.7339495420455933, 1.0393078327178955, 0.1432391256093979, 1.179510474205017, 0.8389422297477722, -0.3847019076347351, 0.6213667392730713, 0.057035624980926514, -1.3709814548492432, 0.4412253499031067, 1.126731038093567, 0.17853817343711853, 1.4514023065567017, -0.5104036927223206, 0.19185732305049896, 0.4150545001029968, -0.6565477252006531, -0.4946703016757965, -0.5554550886154175, 0.7088170647621155, 0.09075775742530823, -0.962618350982666, 0.0023368317633867264, -0.08571036905050278, -0.1147691085934639, 0.0006006266921758652, -1.429564118385315, -0.263309121131897, -0.35485175251960754, -0.6144116520881653, -1.2262407541275024, -0.17419928312301636, 1.3394718170166016, -0.6929308176040649, -0.07543016225099564, 0.46326586604118347, 0.3123660683631897, 0.5457719564437866, 0.4893029034137726, -0.7639637589454651, -0.26131513714790344, -0.20836496353149414, -0.33772367238998413, 0.42732399702072144, 1.4196653366088867, -0.1022752895951271, -0.9773194193840027, 0.7040526866912842, -0.09254603832960129, 0.1017148569226265, 1.9924705028533936, 0.04696930944919586, -0.6761041283607483, 0.24780505895614624, -0.7091276049613953, 1.8075851202011108, 1.71805739402771, 1.2971473932266235, -0.12398423999547958, -0.7861096262931824, 0.6650254130363464, -0.35684430599212646, -0.4391659200191498, 0.8192091584205627, 0.35411337018013, -0.12632682919502258, -1.363045573234558, 0.6981191039085388, 1.3248456716537476, -0.8341174125671387, -0.8683280944824219, 0.13893383741378784, -0.78345787525177, 0.9325919151306152, 0.5535219311714172, 0.38982093334198, 0.3946717083454132, 1.570871114730835, 0.7131079435348511, -0.45231643319129944, 0.6120471954345703, 0.5181518793106079, -0.10550966113805771, -2.1042447090148926, -1.2475770711898804, 0.43007317185401917, -0.6255595684051514, -1.603007197380066, 1.4389748573303223, -1.1555564403533936, -1.0134249925613403, 0.6890010833740234, 0.1829797327518463, 1.5550322532653809, 0.45265379548072815, 1.5400549173355103, 2.0521225929260254, 0.7497072815895081, 0.3127933144569397, 1.2993828058242798, -0.060078706592321396, -0.5856542587280273, 1.8028311729431152, -0.516020655632019, 0.4973633289337158, 1.0093599557876587, -0.12544722855091095, -1.0897233486175537, -0.7983322143554688, -1.222645878791809, -0.681105375289917, 1.1193960905075073, 0.08601923286914825, -1.1025861501693726, 0.16442622244358063, 1.6160953044891357, 0.10971145331859589, -0.3287316560745239, 0.6111581325531006, 0.1843031793832779, -0.8311110138893127, -0.06767435371875763, -0.9508132934570312, 0.5653305649757385, -0.20923085510730743, -0.2429598867893219, 0.23496049642562866, 0.5166505575180054, 1.3522629737854004, -0.07262157648801804, 0.11437482386827469, 1.1681963205337524, -1.344740390777588, 1.5206023454666138, -0.673143208026886, 0.28647279739379883, -2.3711330890655518, 1.450347661972046, -0.8596073985099792, 1.8282135725021362, -2.6279304027557373, 0.3879769444465637, -0.5039172768592834, -0.5917649865150452, 0.2566491961479187, -0.44319605827331543, 0.16181780397891998, -0.17118994891643524, -1.0100823640823364, 0.12665772438049316, -0.6688916087150574, 0.581588089466095, 1.063075304031372, 1.4023630619049072, -1.1523078680038452, -0.4589727520942688, -1.9084875583648682, -0.1637069433927536, -0.7196899056434631, 0.39580920338630676, -2.0710666179656982, -0.2371753603219986, -1.8393834829330444, -2.3267903327941895, -1.3405276536941528, -0.7625742554664612, 1.0702389478683472, 0.15584367513656616, -0.8131497502326965, 1.0989928245544434, -0.26720598340034485, -1.8726398944854736, 1.106095790863037, -2.1293416023254395 ]
https://github.com/huggingface/datasets/issues/5477
Unpin sqlalchemy once issue is fixed
@albertvillanova It looks like that issue has been fixed so I made a PR to unpin sqlalchemy!
Once the source issue is fixed: - pandas-dev/pandas#51015 we should revert the pin introduced in: - #5476
322
17
Unpin sqlalchemy once issue is fixed Once the source issue is fixed: - pandas-dev/pandas#51015 we should revert the pin introduced in: - #5476 @albertvillanova It looks like that issue has been fixed so I made a PR to unpin sqlalchemy!
[ -1.0940613746643066, -0.8565547466278076, -0.8060352206230164, 1.3778626918792725, -0.22861014306545258, -1.200943946838379, -0.0018995129503309727, -0.9439231157302856, 1.7429156303405762, -0.7648454904556274, 0.4368641674518585, -1.7347999811172485, -0.07652505487203598, -0.661085844039917, -0.757275402545929, -0.6733805537223816, -0.4486162066459656, -0.7137618064880371, 0.9986016750335693, 2.6261632442474365, 1.204001545906067, -1.444930076599121, 2.907156229019165, 0.596527636051178, -0.3073383569717407, -0.8752439022064209, 0.7426279187202454, -0.07557861506938934, -1.3482073545455933, -0.5614784359931946, -0.9846788048744202, -0.08523249626159668, -0.39788904786109924, -0.6168035268783569, 0.1794632077217102, 0.2672747075557709, 0.05123642086982727, -0.5719136595726013, -0.41844382882118225, -0.7773295640945435, 0.47773948311805725, -0.23584075272083282, 0.9372397065162659, -0.41440698504447937, 1.9190850257873535, -0.5841991901397705, 0.19430240988731384, 0.8444944620132446, 1.41969633102417, 0.33203810453414917, -0.1441718339920044, 0.3344653844833374, 0.3927486836910248, -0.19576147198677063, 0.3832000195980072, 0.9773443937301636, 0.42755427956581116, 0.5218526124954224, 0.862409234046936, -2.055389642715454, 1.427346110343933, -1.1619994640350342, 0.2325364351272583, 1.5769946575164795, -1.220220685005188, 0.36576393246650696, -1.817610263824463, 0.053610317409038544, 0.5542421340942383, -2.114088535308838, 0.31552615761756897, -1.2197307348251343, -0.6362825632095337, 0.935065746307373, 0.4144580662250519, -1.3211020231246948, -0.11564366519451141, -0.34569278359413147, 1.11394202709198, 0.44607654213905334, 1.3984524011611938, -1.593366026878357, 0.2718726396560669, -0.39966461062431335, 0.01872982457280159, -1.2713031768798828, -1.4157389402389526, 0.7036945223808289, 0.54939866065979, 0.6076442003250122, -0.16737580299377441, 0.9502609372138977, -0.9394859671592712, 0.9974761009216309, -0.7525836825370789, -1.5998308658599854, -1.548849105834961, -2.3401403427124023, -2.2648427486419678, 0.8203501105308533, -0.5156458616256714, -0.47518566250801086, 1.814481258392334, -1.0263231992721558, -1.8978279829025269, 1.2085466384887695, 0.3022467792034149, -0.1802220344543457, 2.4700374603271484, 0.504977285861969, -0.710014820098877, 0.34290626645088196, -0.9113446474075317, 1.0260846614837646, -0.5142799615859985, 1.373512625694275, 0.5450369715690613, -0.8962581753730774, 1.683663249015808, -0.4800662398338318, 0.5641537308692932, -0.5293664336204529, -0.5739398002624512, -0.8454298973083496, 0.260903537273407, 1.975034236907959, -0.40948083996772766, 1.4406627416610718, -0.5141371488571167, -1.652860403060913, -1.6535775661468506, 0.8679594993591309, 0.5197563171386719, -0.907429039478302, 0.3933350145816803, -0.3869532644748688, -0.04507772624492645, -0.04327303171157837, 1.0373382568359375, 1.4277727603912354, 0.641697347164154, -0.04385945200920105, -0.9253886938095093, -0.004303134046494961, 0.27357128262519836, -0.8516419529914856, -1.6857500076293945, -0.3195623755455017, -0.007296974305063486, 0.8450031280517578, -1.0714937448501587, 1.7870738506317139, 1.1097456216812134, 1.9715172052383423, 0.9966938495635986, -0.26402339339256287, 1.472394347190857, -0.038820333778858185, 1.8912407159805298, -0.3841131627559662, 0.5303354859352112, -0.5034046769142151, -1.1598988771438599, 0.7295604944229126, -0.5060153603553772, -1.9753913879394531, -0.5786904692649841, -0.9263058304786682, -0.18377606570720673, -0.7475660443305969, 0.9985930919647217, -0.21178460121154785, -1.3278093338012695, 0.1739494651556015, -0.6902825236320496, 0.1633431762456894, -1.3471403121948242, 0.43714630603790283, 0.6312862038612366, -0.6556443572044373, 0.16148896515369415, -0.22466106712818146, -1.3224701881408691, -0.3979297876358032, 0.19118502736091614, 1.967864990234375, -0.8682641983032227, 1.0720229148864746, 0.9209566116333008, -0.6016080975532532, -0.117692731320858, 0.45057952404022217, -0.29810041189193726, 0.7648329734802246, -1.2315136194229126, -0.37386035919189453, 0.9893057346343994, -0.17973987758159637, -0.4689083993434906, 1.475584864616394, 0.7443023920059204, -1.0554977655410767, 0.005355349741876125, -0.2617124915122986, -0.7795400023460388, -0.1393958032131195, -1.6386699676513672, -0.21718023717403412, 0.1753409057855606, -1.3381839990615845, -0.6938029527664185, -0.2724805772304535, 1.299941062927246, 0.019278259947896004, 1.2436367273330688, -0.3152370750904083, -0.15109477937221527, -0.5551459789276123, -0.35667648911476135, 0.3490138649940491, -0.08836359530687332, -0.4354749321937561, 0.20010517537593842, -0.9373718500137329, 0.3323814570903778, 1.4634265899658203, 0.28245389461517334, 0.15634959936141968, 0.5377514362335205, 1.1738559007644653, 0.2910773456096649, -0.017559118568897247, -0.8232203722000122, -1.5478174686431885, 2.1451635360717773, -1.6470615863800049, 1.9588778018951416, 0.7847625017166138, 0.04095710813999176, -1.9162434339523315, -1.9795819520950317, 1.2724956274032593, 1.3051121234893799, 2.149130344390869, 0.5375033617019653, 0.45428913831710815, -0.934666097164154, -0.687242329120636, 0.34633925557136536, -0.9302554130554199, -0.648918628692627, 0.08510532230138779, 2.264972686767578, 1.5930557250976562, -0.6035408973693848, -0.04563411325216293, -1.0247077941894531, 1.174506425857544, -0.05889678746461868, 0.10346635431051254, 2.0054373741149902, -0.3389204442501068, -1.2213797569274902, 1.1067601442337036, -2.3821935653686523, 0.18583573400974274, 1.931073546409607, 0.2400888055562973, 0.21189111471176147, -1.2568503618240356, -0.6749531626701355, -0.14644230902194977, -0.32873180508613586, -1.1145111322402954, 0.7287379503250122, -0.24351739883422852, -0.8598928451538086, -1.396444320678711, 0.04465591907501221, -1.044988751411438, -1.5705738067626953, 0.3903409540653229, 1.836248755455017, 2.155576705932617, -0.8796892166137695, 1.5173351764678955, -0.24173550307750702, 0.04828368127346039, 1.3098340034484863, 1.089974045753479, 3.1668035984039307, 2.050821542739868, -1.261361002922058, 0.6552436351776123, 0.014270378276705742, -0.5222144722938538, 1.12212073802948, -1.2593491077423096, 1.3049910068511963, -0.24514803290367126, -1.1350609064102173, -1.178713083267212, 0.7437522411346436, 0.3617299795150757, 0.03285594284534454, -0.35164985060691833, 1.374900221824646, 0.10486043989658356, 1.34196138381958, 0.5434074997901917, -0.3347702622413635, 0.6369103789329529, -0.4916496276855469, -0.21446630358695984, 1.5258371829986572, 0.3221184015274048, -1.3959014415740967, -2.2459750175476074, -0.04659348726272583, -1.0068057775497437, 0.14213241636753082, -0.8253207206726074, -0.9796963930130005, 1.5528942346572876, 0.3494969606399536, -1.1622874736785889, -0.5281924605369568, -0.5277513265609741, -0.5904639363288879, 2.574836492538452, -1.4407134056091309, -0.2606063187122345, -0.7444238662719727, -0.39617720246315, 1.7347328662872314, -1.3362597227096558, -0.2843987047672272, -1.2300419807434082, -0.48627257347106934, -1.2625092267990112, -0.5924521088600159, -0.005204033572226763, -0.6152525544166565, 0.8357263803482056, -0.05613655596971512, -1.1146167516708374, -0.28749340772628784, -0.881359875202179, 0.685456395149231, -0.2375125288963318, 0.24729028344154358, 1.9281809329986572, 0.32085874676704407, -0.31895914673805237, 0.6480891704559326, 1.2415359020233154, 0.49272534251213074, -0.45885610580444336, 0.14516231417655945, -0.588992178440094, 0.38271620869636536, -1.2471729516983032, 0.34681957960128784, -2.8719754219055176, 0.5082453489303589, -0.08349809795618057, 0.013542376458644867, -0.20753435790538788, -1.474252462387085, 0.9876028895378113, 2.2845826148986816, -1.1458462476730347, 0.5387400984764099, 0.18969373404979706, 1.3953216075897217, -1.6297718286514282, 0.23947909474372864, -0.672124445438385, 2.2160584926605225, 0.22818203270435333, 1.0475221872329712, -0.4509732723236084, -2.2696917057037354, 0.5415531396865845, -1.3308712244033813, -1.0166412591934204, 0.7472445964813232, -0.8313173055648804, -0.13038942217826843, -1.1575192213058472, -0.058751218020915985, -0.9244018197059631, -1.1878979206085205, 0.834531307220459, 0.21515485644340515, 0.5397319793701172, -0.6378017663955688, 0.23713360726833344, -2.4510531425476074, -1.3763861656188965, -0.11049551516771317, -0.9120262861251831, 0.5873628258705139, -0.4579124450683594, 0.7157586216926575, -0.13248705863952637, 0.11437733471393585, 0.40186139941215515, 1.179918646812439, 3.274420976638794, 0.09759708493947983, 0.5916811227798462, -0.27974453568458557, -0.7599406838417053, 1.4760950803756714, 0.9096469283103943, -0.24297860264778137, -0.7125265598297119, -1.126449465751648, 1.3377677202224731, 1.8206932544708252, 1.0228965282440186, -0.05909241735935211, -0.8107309937477112, -0.7298929691314697, -0.05910711735486984, 0.17207330465316772, 0.3500058948993683, 0.8969733715057373, 0.030992543324828148, 0.15702547132968903, 1.4177175760269165, 1.1679068803787231, -0.5520520806312561, 0.5206963419914246, -0.7631493806838989, -0.2870483994483948, 0.501044511795044, 0.3801437020301819, 0.011092625558376312, 0.27908721566200256, -0.8753147125244141, -0.4001578986644745, -0.05051213502883911, -0.7225840091705322, -0.896141529083252, -0.2403801530599594, -0.3258703649044037, 1.6621252298355103, 0.18913063406944275, -0.7243631482124329, 0.003222920000553131, -0.9221471548080444, 0.027603836730122566, -1.1266223192214966, 0.2757929563522339, -0.09367813915014267, 0.040762096643447876, -0.04344634711742401, 1.7220876216888428, -1.0596356391906738, -2.2385661602020264, 0.3036985397338867, 0.23680473864078522, -0.47422656416893005, -0.04418553411960602, 1.5534454584121704, 0.5257745385169983, 1.3809762001037598, 1.4973394870758057, 0.9424583315849304, -0.7546201348304749, -1.0580958127975464, 0.4755498766899109, 0.9414564371109009, -1.5445234775543213, 0.6401790380477905, -0.08445826172828674, -0.5402015447616577, 0.7173309922218323, 1.1406517028808594, 0.2926030158996582, -2.0382206439971924, 0.859045147895813, -0.9924545884132385, 0.8842208981513977, 0.766412079334259, 0.8726680278778076, 0.42144259810447693, 0.8671122193336487, -1.0266441106796265, -1.244423508644104, -0.6834081411361694, -0.8662198781967163, 1.9501384496688843, -0.23807400465011597, 0.36129888892173767, -0.330587774515152, -1.164311170578003, -0.09439525008201599, 0.5399913191795349, 0.09817469120025635, -0.17205537855625153, 0.6019585132598877, -0.6678586006164551, -1.091600775718689, -1.4567842483520508, -0.6405831575393677, -0.9499223828315735, -0.8501617908477783, 1.1988725662231445, 0.964688777923584, 0.4172678589820862, 2.062744140625, 0.4161759316921234, 0.25827449560165405, -2.527970552444458, 0.6343521475791931, 0.22346599400043488, 0.05549875646829605, 1.1014460325241089, 0.39339572191238403, 1.0590070486068726, -0.04034436494112015, 0.4266521632671356, -2.504408597946167, 2.239744186401367, -0.3341393768787384, 0.599026083946228, 0.12411357462406158, -0.01760679855942726, 1.014984369277954, 0.7120420336723328, 0.5783169865608215, -1.0787519216537476, 0.7177050709724426, -0.4831070303916931, 1.073676347732544, 0.9068432450294495, -0.7937684655189514, 0.15461647510528564, 1.2740079164505005, 0.3825590908527374, -0.5427966713905334, -0.9280803799629211, -0.8533198833465576, 0.887807309627533, 1.6168732643127441, -0.05306278169155121, 0.3234497606754303, 0.6167894005775452, 0.6387262940406799, -1.07827627658844, -0.0561300590634346, -0.7655280828475952, -0.9557161927223206, 1.708434820175171, 2.0511717796325684, -0.09541351348161697, 0.07400111109018326, -0.7269545793533325, -1.430812954902649, 0.8470802307128906, 0.02506205625832081, 0.19044248759746552, 0.5770907402038574, -0.7008596658706665, 1.203898310661316, 0.6378743648529053, 0.858239471912384, -0.07049945741891861, 0.24341252446174622, 0.3137856423854828, -0.0017640916630625725, -1.100089430809021, -0.3020159602165222, -1.048439860343933, -2.438500165939331, 0.5212448239326477, -0.27884525060653687, -1.5637658834457397, 0.05854204297065735, -0.9398711323738098, 0.8042929768562317, -0.45275261998176575, -0.9445978999137878, -1.3643242120742798, 0.0983572006225586, -0.1285392940044403, 0.9454825520515442, -1.7554811239242554, -0.17850971221923828, 1.376033067703247, 0.8501171469688416, -0.704617440700531, 1.1001174449920654, 0.5174914002418518, 1.0518397092819214, 0.8309245109558105, -0.292373925447464, 0.5314350128173828, 0.09509778767824173, -1.4776971340179443, 0.5304405689239502, 1.3835268020629883, 0.03036505915224552, 1.5475702285766602, -0.553076446056366, -0.022859860211610794, 0.5268321633338928, -0.5251071453094482, -0.6029176115989685, -0.5559277534484863, 0.5705632567405701, 0.11393857002258301, -0.9404948353767395, 0.022019127383828163, -0.04408609867095947, -0.16112589836120605, 0.09575451910495758, -1.4690017700195312, -0.3911159038543701, -0.4645287096500397, -0.4406500458717346, -1.2534681558609009, -0.20480476319789886, 1.3866312503814697, -0.5139785408973694, -0.11883316934108734, 0.530663013458252, 0.5719450116157532, 0.3613094091415405, 0.6367753744125366, -0.46781376004219055, -0.3741147518157959, -0.22879603505134583, -0.4032351076602936, 0.33599981665611267, 1.350156545639038, -0.12560661137104034, -0.9528063535690308, 0.5447335243225098, -0.34286797046661377, 0.14124177396297455, 1.8871409893035889, 0.12110067903995514, -0.9099587202072144, 0.2741977870464325, -0.6991905570030212, 2.0961856842041016, 1.5304466485977173, 1.2789968252182007, -0.109145388007164, -1.0530558824539185, 0.7653802037239075, -0.20921920239925385, -0.29256466031074524, 0.8480105996131897, 0.3558558523654938, -0.377841055393219, -1.3028079271316528, 0.5733839273452759, 1.1777805089950562, -0.8583859801292419, -0.8103989362716675, -0.2419227808713913, -0.7409670352935791, 0.9303322434425354, 0.8844378590583801, 0.4409104287624359, 0.29447752237319946, 1.656024694442749, 0.7326229214668274, -0.7185757756233215, 0.562692403793335, 0.4423232674598694, 0.09386596083641052, -2.161477565765381, -0.9204668998718262, 0.4380451738834381, -0.41298964619636536, -1.6380194425582886, 1.355100393295288, -1.0376543998718262, -1.0311402082443237, 0.5436186194419861, 0.06724103540182114, 1.3503365516662598, 0.33236953616142273, 1.586092233657837, 1.9897615909576416, 0.914086639881134, 0.30026745796203613, 1.2905319929122925, -0.24188634753227234, -0.24512334167957306, 1.834021806716919, -0.41262388229370117, 0.4440573751926422, 1.0284485816955566, -0.42148929834365845, -1.1501498222351074, -0.8244354128837585, -1.2451515197753906, -0.856406033039093, 1.1305657625198364, 0.1337793618440628, -1.249258279800415, 0.34254056215286255, 1.6255548000335693, 0.022566985338926315, -0.24088263511657715, 0.5079584121704102, 0.43801847100257874, -0.9863900542259216, -0.04797658324241638, -1.1667146682739258, 0.5228340029716492, -0.07523270696401596, -0.6728545427322388, 0.3984026312828064, 0.5807828903198242, 1.316411018371582, 0.04920031130313873, 0.16083593666553497, 1.3201526403427124, -1.4569271802902222, 1.4259750843048096, -0.7717844247817993, 0.08490699529647827, -2.2647907733917236, 1.5003973245620728, -0.7847415208816528, 1.9129050970077515, -2.700418472290039, 0.4206795394420624, -0.5136640667915344, -0.5476402640342712, 0.32898640632629395, -0.10259762406349182, 0.16872264444828033, -0.23813216388225555, -1.0338701009750366, 0.0022249724715948105, -0.5485342144966125, 0.5346511006355286, 1.1004438400268555, 1.2888827323913574, -0.9469525218009949, -0.14029383659362793, -1.5990169048309326, -0.16504406929016113, -0.5525333285331726, 0.1586853563785553, -2.0886356830596924, -0.20347699522972107, -1.9740139245986938, -2.2323312759399414, -1.3015968799591064, -0.9812610149383545, 1.4631298780441284, 0.3037829101085663, -1.0391274690628052, 0.9145326614379883, -0.4021671712398529, -1.6896264553070068, 0.9261624813079834, -1.920365333557129 ]
https://github.com/huggingface/datasets/issues/5477
Unpin sqlalchemy once issue is fixed
The source issue: - https://github.com/pandas-dev/pandas/issues/40686 has been fixed: - https://github.com/pandas-dev/pandas/pull/48576 The fix was released yesterday (2023-04-03) only in `pandas-2.0.0`: - https://github.com/pandas-dev/pandas/releases/tag/v2.0.0 but it will not be back-ported to `pandas-1`: - https://github.com/pandas-dev/pandas/pull/48576#issuecomment-1466467159 Also note that `pandas-2.0.0` dropped support for Python 3.7: - https://github.com/pandas-dev/pandas/issues/41678 - https://github.com/pandas-dev/pandas/pull/41989 Therefore, we cannot unpin `sqlalchemy` until we drop support for Python 3.7 (these Python users cannot use `pandas-2`).
Once the source issue is fixed: - pandas-dev/pandas#51015 we should revert the pin introduced in: - #5476
322
62
Unpin sqlalchemy once issue is fixed Once the source issue is fixed: - pandas-dev/pandas#51015 we should revert the pin introduced in: - #5476 The source issue: - https://github.com/pandas-dev/pandas/issues/40686 has been fixed: - https://github.com/pandas-dev/pandas/pull/48576 The fix was released yesterday (2023-04-03) only in `pandas-2.0.0`: - https://github.com/pandas-dev/pandas/releases/tag/v2.0.0 but it will not be back-ported to `pandas-1`: - https://github.com/pandas-dev/pandas/pull/48576#issuecomment-1466467159 Also note that `pandas-2.0.0` dropped support for Python 3.7: - https://github.com/pandas-dev/pandas/issues/41678 - https://github.com/pandas-dev/pandas/pull/41989 Therefore, we cannot unpin `sqlalchemy` until we drop support for Python 3.7 (these Python users cannot use `pandas-2`).
[ -1.0830845832824707, -0.7927930355072021, -0.7707298994064331, 1.4383342266082764, 0.002129746600985527, -1.3204591274261475, 0.002570660784840584, -0.8994882702827454, 1.5556992292404175, -0.6449288129806519, 0.34706997871398926, -1.695032000541687, -0.0441645011305809, -0.6863159537315369, -0.832362174987793, -0.7044064402580261, -0.2880878746509552, -0.8401995897293091, 1.0128549337387085, 2.590277671813965, 1.2749977111816406, -1.440428376197815, 2.6848573684692383, 0.6493659615516663, -0.31089872121810913, -0.8714635968208313, 0.6131182312965393, -0.040399614721536636, -1.3574782609939575, -0.38058945536613464, -0.9297285676002502, 0.017802756279706955, -0.5130481123924255, -0.48366624116897583, 0.15439733862876892, 0.4743190109729767, -0.20817267894744873, -0.292033314704895, -0.5166962146759033, -0.8149017691612244, 0.5434721112251282, -0.21118244528770447, 1.0316499471664429, -0.26719388365745544, 1.8020210266113281, -0.6004481911659241, 0.4170352816581726, 0.6087861657142639, 1.3631166219711304, 0.14688272774219513, -0.06369461119174957, 0.33331283926963806, 0.29610535502433777, 0.005645428784191608, 0.5220417976379395, 1.164086937904358, 0.6479569673538208, 0.43524226546287537, 0.7917516231536865, -2.1253342628479004, 1.3363251686096191, -0.7759612798690796, 0.1743493676185608, 1.4825745820999146, -1.0375431776046753, 0.27699384093284607, -1.9000307321548462, 0.004476979374885559, 0.4285472631454468, -2.3711283206939697, 0.23589491844177246, -1.2665786743164062, -0.44832366704940796, 1.0631335973739624, 0.2863568067550659, -1.2808961868286133, 0.14211957156658173, -0.4095824658870697, 0.8995552062988281, 0.46203064918518066, 1.2372149229049683, -1.5179861783981323, -0.06440558284521103, -0.16912932693958282, 0.030191857367753983, -1.2008546590805054, -1.5723110437393188, 0.508264422416687, 0.6844130158424377, 0.6642189025878906, -0.22494900226593018, 0.8948078155517578, -0.9716272950172424, 0.8483601808547974, -0.7559245824813843, -1.729201316833496, -1.499767780303955, -2.3082022666931152, -2.4048373699188232, 0.8849107623100281, -0.4027291238307953, -0.3166978061199188, 1.8846160173416138, -0.9803403615951538, -1.8124713897705078, 0.8411043882369995, 0.46818023920059204, -0.05678858980536461, 2.329230546951294, 0.34387627243995667, -0.8333802819252014, 0.48043370246887207, -0.7892966270446777, 0.6741577386856079, -0.267850786447525, 1.38103187084198, 0.6610668897628784, -1.1024045944213867, 1.7174705266952515, -0.4161708950996399, 0.4637621343135834, -0.6867607831954956, -0.4154030382633209, -0.7557777166366577, 0.25360551476478577, 1.9345910549163818, -0.40121087431907654, 1.4610073566436768, -0.18431757390499115, -1.5613501071929932, -1.4643670320510864, 0.7369497418403625, 0.6007252931594849, -0.8866338729858398, 0.12495702505111694, -0.5555770993232727, 0.021183010190725327, 0.040600113570690155, 1.0815116167068481, 1.1482030153274536, 0.7233868837356567, -0.2370045930147171, -0.8944547772407532, 0.23108074069023132, 0.020399082452058792, -0.6665694117546082, -1.7498034238815308, -0.37901827692985535, 0.2615385055541992, 0.7289344668388367, -1.2455456256866455, 1.9411778450012207, 0.8392120003700256, 2.0110955238342285, 0.9029988646507263, -0.45477163791656494, 1.551591396331787, -0.23003585636615753, 1.96054208278656, -0.4069262742996216, 0.5629598498344421, -0.3483540117740631, -1.2188304662704468, 0.728257954120636, -0.43032658100128174, -2.112614154815674, -0.5579885244369507, -0.9120455384254456, -0.043862588703632355, -0.7602676153182983, 1.009926438331604, -0.22287820279598236, -1.2128889560699463, 0.01757080852985382, -0.7671651244163513, 0.16410712897777557, -1.4302072525024414, 0.10059806704521179, 0.8044443726539612, -0.7592174410820007, -0.025310594588518143, -0.21265235543251038, -1.3163871765136719, -0.5444364547729492, 0.3801763951778412, 1.922755479812622, -0.6761278510093689, 1.0917115211486816, 0.9812777638435364, -0.6606649160385132, 0.16804654896259308, 0.4346652925014496, -0.49243322014808655, 0.9542123079299927, -1.0753905773162842, -0.3956807851791382, 1.092117190361023, -0.12180943042039871, -0.5369454026222229, 1.357744574546814, 0.9845936894416809, -1.04385507106781, -0.27594175934791565, -0.1487998217344284, -0.684980034828186, 0.04073711484670639, -1.571370244026184, -0.1405721753835678, 0.17970648407936096, -1.4519877433776855, -0.49735161662101746, -0.15130926668643951, 1.3948278427124023, -0.16244462132453918, 1.401661992073059, -0.14954723417758942, -0.17610861361026764, -0.5695238709449768, -0.5123420357704163, 0.09554804116487503, -0.12387586385011673, -0.6855149269104004, 0.4722867012023926, -0.8009226322174072, 0.37139585614204407, 1.4515905380249023, 0.3690192699432373, 0.06448440998792648, 0.6636074185371399, 1.161864995956421, 0.33452123403549194, -0.1296452134847641, -0.8381267189979553, -1.7899764776229858, 2.094499111175537, -1.4488686323165894, 1.8373866081237793, 0.8135988116264343, -0.10024836659431458, -1.736465573310852, -1.9267979860305786, 1.3395850658416748, 1.1691770553588867, 2.4585888385772705, 0.6541141271591187, 0.49950847029685974, -0.82585608959198, -0.6640996932983398, 0.48353052139282227, -0.9131165146827698, -0.7964103817939758, 0.10658137500286102, 2.316617727279663, 1.7759348154067993, -0.4867469072341919, -0.3106093108654022, -1.0312026739120483, 1.2498291730880737, -0.17368043959140778, 0.14243076741695404, 1.9587833881378174, -0.19634032249450684, -1.0768405199050903, 1.2263175249099731, -2.3506710529327393, 0.41054269671440125, 1.9429205656051636, 0.3089001774787903, 0.15403296053409576, -1.49807870388031, -0.6466737389564514, -0.27161189913749695, -0.4847087860107422, -1.0397788286209106, 0.596177339553833, -0.20207542181015015, -0.9663047194480896, -1.4121358394622803, -0.00020325742661952972, -1.2768069505691528, -1.8209720849990845, 0.41189315915107727, 1.7469854354858398, 2.1663169860839844, -0.7303317189216614, 1.4308452606201172, -0.24375498294830322, 0.1250590980052948, 1.299556851387024, 1.3377864360809326, 3.312281370162964, 1.7669475078582764, -1.284361720085144, 0.8119606375694275, -0.13743501901626587, -0.4230364263057709, 1.1238861083984375, -1.1331675052642822, 1.1203258037567139, -0.308729887008667, -1.3115425109863281, -1.0937479734420776, 0.923954427242279, 0.4825018346309662, 0.03593076020479202, -0.41627222299575806, 1.1200393438339233, 0.12983150780200958, 1.3853422403335571, 0.5323597192764282, -0.3349931836128235, 0.45586520433425903, -0.2961403429508209, -0.4608185887336731, 1.6622254848480225, 0.10248302668333054, -1.4486052989959717, -2.40974497795105, -0.16840557754039764, -0.9792545437812805, -0.1605309247970581, -0.8661096692085266, -1.0200992822647095, 1.5532350540161133, 0.507294237613678, -1.1338087320327759, -0.24125586450099945, -0.3480715751647949, -0.5621672868728638, 2.5721418857574463, -1.4372204542160034, -0.14043204486370087, -0.9583448767662048, -0.43542835116386414, 1.6368904113769531, -1.1845290660858154, -0.2637690305709839, -1.0441498756408691, -0.755884051322937, -1.3491214513778687, -0.5533937215805054, -0.09775310009717941, -0.8091168999671936, 0.6714560389518738, -0.1337534487247467, -1.0292835235595703, -0.296549528837204, -0.9849997162818909, 1.0004589557647705, -0.21179655194282532, 0.13184711337089539, 1.727735161781311, 0.45482170581817627, -0.39098063111305237, 0.7516277432441711, 1.2409987449645996, 0.6050752997398376, -0.5598859786987305, 0.19974751770496368, -0.6545382738113403, 0.3444494605064392, -1.3520593643188477, 0.33378663659095764, -2.8271231651306152, 0.6578945517539978, -0.10703856498003006, -0.06152904033660889, -0.1286972612142563, -1.3887594938278198, 1.198877215385437, 2.414008855819702, -1.234542965888977, 0.566295325756073, 0.29851433634757996, 1.0952134132385254, -1.602003812789917, 0.07715281844139099, -0.4630471467971802, 2.0902669429779053, 0.06588022410869598, 1.1231485605239868, -0.44026118516921997, -2.0988690853118896, 0.590293288230896, -1.2433686256408691, -0.8096809983253479, 0.8291166424751282, -0.7310914993286133, 0.12635479867458344, -1.1572271585464478, 0.015605011023581028, -0.9144659638404846, -1.276530146598816, 0.7666192054748535, 0.0434546172618866, 0.47542786598205566, -0.5773165225982666, 0.38540878891944885, -2.1157476902008057, -1.2849067449569702, -0.14586271345615387, -1.0602797269821167, 0.5673800110816956, -0.27125829458236694, 0.649420976638794, 0.014055662788450718, -0.0363435298204422, 0.3077254295349121, 1.3577572107315063, 3.355921745300293, 0.01651117205619812, 0.3491174578666687, -0.07486244291067123, -0.9121853113174438, 1.4458473920822144, 0.9719173908233643, -0.15519072115421295, -0.6526880264282227, -0.9888754487037659, 1.351691722869873, 1.8767952919006348, 1.2613481283187866, 0.06585860997438431, -1.096325397491455, -0.9183170795440674, 0.056279245764017105, 0.16208741068840027, 0.5443861484527588, 0.9478135704994202, 0.005246308632194996, 0.01804419606924057, 1.3170603513717651, 1.2343796491622925, -0.3416830599308014, 0.4995138943195343, -0.8920717835426331, -0.32674363255500793, 0.42043453454971313, 0.2635400891304016, 0.1432957649230957, 0.5056288242340088, -1.1758989095687866, -0.18559981882572174, -0.19555039703845978, -0.9110673069953918, -0.8096113204956055, -0.5212845206260681, -0.36124956607818604, 1.6989229917526245, -0.09896092116832733, -0.47387197613716125, 0.151267409324646, -0.8592596650123596, -0.13750560581684113, -1.0307707786560059, 0.23268336057662964, -0.17966829240322113, 0.06941337883472443, -0.13234750926494598, 1.5227844715118408, -0.9656057357788086, -2.241950750350952, 0.22668656706809998, 0.2338895946741104, -0.6594209671020508, 0.0246439166367054, 1.7135839462280273, 0.5398240685462952, 1.3452134132385254, 1.429052710533142, 1.0000361204147339, -0.6962661743164062, -1.1641767024993896, 0.5827142000198364, 0.9262294173240662, -1.406606674194336, 0.9056714177131653, -0.29393821954727173, -0.4728257954120636, 0.6164337992668152, 1.2921866178512573, 0.33634504675865173, -2.035220146179199, 0.8949217796325684, -0.7708898186683655, 0.8171732425689697, 0.6097428202629089, 0.8025433421134949, 0.17209996283054352, 0.7720794677734375, -1.3718929290771484, -1.030011534690857, -0.6635523438453674, -0.6597691178321838, 1.9084582328796387, -0.02422528713941574, 0.2993946671485901, -0.12786728143692017, -1.2731223106384277, -0.15503276884555817, 0.6746070384979248, 0.33011937141418457, -0.35293155908584595, 0.9161388278007507, -0.7352216839790344, -0.9878168106079102, -1.2569525241851807, -0.506280243396759, -0.8466838598251343, -0.8357186317443848, 1.0981478691101074, 0.849542498588562, 0.502474844455719, 2.0277516841888428, 0.5076626539230347, 0.2238389253616333, -2.658541202545166, 0.8721614480018616, 0.31858646869659424, -0.03206202760338783, 1.0462795495986938, 0.14430451393127441, 1.2888840436935425, -0.16247665882110596, 0.5816287994384766, -2.366908073425293, 2.156357765197754, -0.16173356771469116, 0.5063605308532715, 0.16479142010211945, -0.120600126683712, 1.1402519941329956, 0.5442821979522705, 0.5753369331359863, -1.2849361896514893, 0.9009093642234802, -0.6402077078819275, 1.09829580783844, 0.7467787265777588, -1.0196373462677002, 0.15859325230121613, 1.1304450035095215, 0.4565446078777313, -0.40061402320861816, -1.0030169486999512, -0.9051572680473328, 1.004530429840088, 1.6246802806854248, -0.05401470884680748, 0.08242978155612946, 0.7727440595626831, 0.7422890663146973, -1.3173320293426514, 0.08285587280988693, -0.6566710472106934, -0.683903157711029, 1.7726600170135498, 2.0052075386047363, -0.019941354170441628, -0.26552602648735046, -0.8034342527389526, -1.3161643743515015, 0.7201350331306458, 0.11830784380435944, 0.07779628783464432, 0.7524113655090332, -0.7653562426567078, 1.3798118829727173, 0.7759624123573303, 0.8640214800834656, -0.09237229079008102, 0.1539783477783203, 0.24295112490653992, -0.1846521496772766, -1.2892465591430664, -0.532070517539978, -1.111627221107483, -2.6767046451568604, 0.6295278072357178, -0.2744186818599701, -1.4236880540847778, -0.004819133784621954, -1.0838342905044556, 0.7772073745727539, -0.6457309722900391, -1.0292707681655884, -1.2348073720932007, 0.32555997371673584, -0.27295851707458496, 0.7934563755989075, -1.6378250122070312, -0.1342717856168747, 1.4001648426055908, 0.9084603786468506, -0.5317323207855225, 0.9625449180603027, 0.36881303787231445, 0.9463716149330139, 0.8520660400390625, -0.3546701669692993, 0.522875189781189, 0.21316741406917572, -1.3945595026016235, 0.38553860783576965, 1.2152959108352661, 0.1763433814048767, 1.4733679294586182, -0.5606917142868042, 0.1417791098356247, 0.4704088270664215, -0.5105571150779724, -0.667682945728302, -0.7321751117706299, 0.7507873773574829, 0.0209965817630291, -1.1188323497772217, -0.012955032289028168, -0.05447983369231224, -0.08869660645723343, 0.18810124695301056, -1.5586193799972534, -0.31037330627441406, -0.16143172979354858, -0.45700690150260925, -1.3071682453155518, -0.07889026403427124, 1.1369322538375854, -0.913902223110199, -0.09459473937749863, 0.5599749088287354, 0.22174939513206482, 0.5005591511726379, 0.6742072105407715, -0.7588425278663635, -0.4035659730434418, -0.3362487554550171, -0.39131197333335876, 0.3141596019268036, 1.1435316801071167, -0.07229676842689514, -0.9468660354614258, 0.5379966497421265, -0.39168426394462585, 0.17801225185394287, 2.0459513664245605, -0.1049908772110939, -0.883919358253479, 0.4254947602748871, -0.6311571002006531, 1.8363726139068604, 1.6123814582824707, 1.2626947164535522, -0.15438002347946167, -0.9121037721633911, 0.6240451335906982, -0.23728182911872864, -0.27420350909233093, 1.029386043548584, 0.40304645895957947, -0.275078684091568, -1.392301321029663, 0.44248586893081665, 1.366876244544983, -1.0369905233383179, -0.710241436958313, 0.011857247911393642, -0.8860715627670288, 1.1414331197738647, 0.8103994727134705, 0.2935433089733124, 0.3184792399406433, 1.5480304956436157, 0.5736536383628845, -0.44739285111427307, 0.49363425374031067, 0.3599545657634735, -0.21917307376861572, -1.953468918800354, -0.9587494730949402, 0.3602488338947296, -0.37930887937545776, -1.5656136274337769, 1.244391918182373, -1.169828176498413, -0.8608275055885315, 0.56318598985672, 0.14622436463832855, 1.4199153184890747, 0.2859134078025818, 1.813349962234497, 2.030804395675659, 0.8489996790885925, 0.14798100292682648, 1.0994683504104614, -0.07115470618009567, -0.3927919566631317, 1.723379135131836, -0.46130234003067017, 0.6709321141242981, 1.0488464832305908, -0.4612499475479126, -1.080183744430542, -0.8773746490478516, -1.1596328020095825, -0.7591711282730103, 1.3224164247512817, 0.17226170003414154, -1.1517761945724487, 0.2461787462234497, 1.6316123008728027, -0.030164603143930435, -0.0721554085612297, 0.6833588480949402, 0.3736175298690796, -0.8567967414855957, -0.08954426646232605, -0.9221082925796509, 0.5049455761909485, 0.054234977811574936, -0.4799773395061493, 0.2402821183204651, 0.545937180519104, 1.2463488578796387, 0.10096665471792221, 0.11521299183368683, 1.2397491931915283, -1.3313608169555664, 1.6027092933654785, -0.7406784892082214, 0.3755815625190735, -2.3113415241241455, 1.4517080783843994, -1.0225346088409424, 1.900689721107483, -2.5811359882354736, 0.45276451110839844, -0.48203110694885254, -0.5336328744888306, 0.2839373052120209, -0.32211834192276, 0.15872427821159363, -0.23351354897022247, -0.976740837097168, -0.3089353144168854, -0.8518598675727844, 0.6457591652870178, 1.2951396703720093, 1.355685830116272, -1.0291662216186523, -0.26743653416633606, -1.7964329719543457, -0.18286250531673431, -0.533096432685852, 0.3653061091899872, -1.8012343645095825, -0.11319872736930847, -1.9591161012649536, -2.3411052227020264, -1.4004337787628174, -0.91289222240448, 1.2382925748825073, 0.17320522665977478, -0.9144174456596375, 0.9225531220436096, -0.3473658561706543, -1.6307451725006104, 1.0744255781173706, -2.2512073516845703 ]
https://github.com/huggingface/datasets/issues/5475
Dataset scan time is much slower than using native arrow
Hi ! In your code you only iterate on the Arrow buffers - you don't actually load the data as python objects. For a fair comparison, you can modify your code using: ```diff - for _ in range(0, len(table), bsz): - _ = {k:table[k][_ : _ + bsz] for k in cols} + for _ in range(0, len(table), bsz): + _ = {k:table[k][_ : _ + bsz].to_pylist() for k in cols} ``` I re-ran your code and got a speed ratio of 1.00x and 1.02x
### Describe the bug I'm basically running the same scanning experiment from the tutorials https://huggingface.co/course/chapter5/4?fw=pt except now I'm comparing to a native pyarrow version. I'm finding that the native pyarrow approach is much faster (2 orders of magnitude). Is there something I'm missing that explains this phenomenon? ### Steps to reproduce the bug https://colab.research.google.com/drive/11EtHDaGAf1DKCpvYnAPJUW-LFfAcDzHY?usp=sharing ### Expected behavior I expect scan times to be on par with using pyarrow directly. ### Environment info standard colab environment
323
85
Dataset scan time is much slower than using native arrow ### Describe the bug I'm basically running the same scanning experiment from the tutorials https://huggingface.co/course/chapter5/4?fw=pt except now I'm comparing to a native pyarrow version. I'm finding that the native pyarrow approach is much faster (2 orders of magnitude). Is there something I'm missing that explains this phenomenon? ### Steps to reproduce the bug https://colab.research.google.com/drive/11EtHDaGAf1DKCpvYnAPJUW-LFfAcDzHY?usp=sharing ### Expected behavior I expect scan times to be on par with using pyarrow directly. ### Environment info standard colab environment Hi ! In your code you only iterate on the Arrow buffers - you don't actually load the data as python objects. For a fair comparison, you can modify your code using: ```diff - for _ in range(0, len(table), bsz): - _ = {k:table[k][_ : _ + bsz] for k in cols} + for _ in range(0, len(table), bsz): + _ = {k:table[k][_ : _ + bsz].to_pylist() for k in cols} ``` I re-ran your code and got a speed ratio of 1.00x and 1.02x
[ -1.2639212608337402, -0.9404871463775635, -0.7692417502403259, 1.4909127950668335, -0.08855834603309631, -1.222729206085205, 0.08676759898662567, -1.0652048587799072, 1.5927857160568237, -0.7779014110565186, 0.34533968567848206, -1.6053789854049683, 0.10426580905914307, -0.5708794593811035, -0.7389311790466309, -0.9011778831481934, -0.3991692066192627, -0.7560293078422546, 1.0807595252990723, 2.530423641204834, 1.2350759506225586, -1.4649426937103271, 2.748321771621704, 0.7850654125213623, -0.22514450550079346, -1.0775156021118164, 0.5019269585609436, -0.013281326740980148, -1.2244919538497925, -0.45230501890182495, -0.9685623049736023, -0.1485782116651535, -0.5555652379989624, -0.49422091245651245, -0.01379337813705206, 0.3893266022205353, -0.250692218542099, -0.337772935628891, -0.5741369128227234, -0.8329737186431885, 0.45119285583496094, -0.43238288164138794, 0.9005516767501831, -0.37290170788764954, 1.804198145866394, -0.5614711046218872, 0.44058525562286377, 0.705547034740448, 1.379957675933838, 0.15254837274551392, -0.0600416362285614, 0.36814090609550476, 0.37875956296920776, -0.07143321633338928, 0.5584428310394287, 1.0922374725341797, 0.6756060123443604, 0.43016499280929565, 0.6923068165779114, -2.167062282562256, 1.2621933221817017, -0.9707581400871277, 0.2769209146499634, 1.2945735454559326, -0.9744813442230225, 0.40273040533065796, -1.6568586826324463, -0.17942018806934357, 0.6060487627983093, -2.223407506942749, 0.2300207018852234, -1.2367950677871704, -0.4979936182498932, 0.9450315833091736, 0.34138771891593933, -1.2655646800994873, 0.11045721173286438, -0.4630388021469116, 1.0932496786117554, 0.4415951371192932, 1.0844616889953613, -1.6501741409301758, -0.003565631341189146, -0.3424724340438843, -0.014464158564805984, -1.346991777420044, -1.517791986465454, 0.4454139769077301, 0.6453779339790344, 0.6128143072128296, -0.010002074763178825, 0.9541196823120117, -1.0869646072387695, 0.8072278499603271, -0.9174255132675171, -1.6598966121673584, -1.438280463218689, -2.413095235824585, -2.2540454864501953, 0.8198873996734619, -0.5077274441719055, -0.5579615831375122, 2.110637664794922, -1.049217700958252, -1.7323538064956665, 1.1966772079467773, 0.2697090208530426, -0.042015351355075836, 2.4116671085357666, 0.16296075284481049, -0.7219311594963074, 0.4973929226398468, -0.767730176448822, 0.7051090002059937, -0.5388284921646118, 1.364306092262268, 0.45686253905296326, -0.9625184535980225, 1.5816174745559692, -0.4432881772518158, 0.5527938008308411, -0.6880812048912048, -0.4996638000011444, -0.8138132691383362, 0.32602599263191223, 1.8716102838516235, -0.31118953227996826, 1.556581974029541, -0.2942752540111542, -1.458486557006836, -1.591265082359314, 0.8391273617744446, 0.45971429347991943, -0.8272343277931213, 0.19835853576660156, -0.3707730174064636, 0.06824322044849396, -0.03599019721150398, 1.0711945295333862, 1.249746322631836, 0.6169472336769104, -0.32909661531448364, -0.9072654843330383, 0.26804134249687195, -0.10231998562812805, -0.6507274508476257, -1.768796443939209, -0.26767781376838684, 0.15973055362701416, 0.5748498439788818, -1.2484482526779175, 1.745693564414978, 0.8919227719306946, 1.9152741432189941, 1.0178803205490112, -0.28096768260002136, 1.4989570379257202, 0.06679616868495941, 1.849637508392334, -0.41907453536987305, 0.6729215979576111, -0.2859444320201874, -1.1967157125473022, 0.7735220193862915, -0.4529876112937927, -2.0803234577178955, -0.6910196542739868, -0.7391459345817566, -0.12073154747486115, -0.8217253088951111, 1.018049955368042, -0.3121017813682556, -1.3409758806228638, 0.3232416808605194, -0.8085208535194397, 0.17148612439632416, -1.2662768363952637, 0.35744231939315796, 0.6701668500900269, -0.5851299166679382, 0.05900703743100166, -0.28970375657081604, -1.2310453653335571, -0.45524412393569946, 0.28141191601753235, 1.8003973960876465, -0.8328379392623901, 0.8871799111366272, 1.0477464199066162, -0.6119067072868347, 0.03817009925842285, 0.42501819133758545, -0.34299832582473755, 0.8896058201789856, -1.0461349487304688, -0.4200079143047333, 1.1754047870635986, -0.18758052587509155, -0.643237292766571, 1.352041244506836, 0.8227851390838623, -0.9697486162185669, -0.20958538353443146, -0.08933752775192261, -0.9225749373435974, 0.09831051528453827, -1.6374940872192383, -0.14474523067474365, 0.3483920991420746, -1.527020812034607, -0.3948395848274231, -0.21155454218387604, 1.3266617059707642, -0.12204451858997345, 1.4816638231277466, -0.39520034193992615, -0.11985132098197937, -0.3386097848415375, -0.4409470558166504, 0.16774266958236694, -0.204769566655159, -0.6086573600769043, 0.22745978832244873, -0.7168745994567871, 0.3411310017108917, 1.3612215518951416, 0.3767578601837158, 0.161345973610878, 0.5337674021720886, 1.069480299949646, 0.2661583125591278, -0.0737348198890686, -0.9287942051887512, -1.601371169090271, 2.0527842044830322, -1.4132344722747803, 2.1179983615875244, 0.8956865072250366, -0.02774537168443203, -1.7643113136291504, -1.8320163488388062, 1.3278545141220093, 1.1853352785110474, 2.2366063594818115, 0.5482565760612488, 0.4510669708251953, -0.8714037537574768, -0.6687011122703552, 0.20400893688201904, -1.0854312181472778, -0.760417103767395, 0.09294883906841278, 2.431161880493164, 1.7838318347930908, -0.3701182007789612, -0.1658642590045929, -0.995456874370575, 1.4484169483184814, -0.23748014867305756, 0.15738439559936523, 1.9605714082717896, -0.18044514954090118, -1.0439132452011108, 1.1804320812225342, -2.3647539615631104, 0.12603184580802917, 2.0142979621887207, 0.30105045437812805, 0.034883156418800354, -1.4628759622573853, -0.6621638536453247, -0.323997437953949, -0.39175912737846375, -1.210839033126831, 0.4991985261440277, -0.29449960589408875, -0.8053171634674072, -1.4654189348220825, 0.12951789796352386, -1.1365714073181152, -1.6889805793762207, 0.27306312322616577, 1.863983154296875, 2.0595788955688477, -0.8267449140548706, 1.6301227807998657, -0.19913488626480103, 0.212664395570755, 1.2837971448898315, 1.2339401245117188, 3.1527600288391113, 1.9360522031784058, -1.3189384937286377, 0.5776699185371399, -0.12821948528289795, -0.447567343711853, 1.1627386808395386, -1.1429150104522705, 1.2975152730941772, -0.0917353481054306, -1.1980290412902832, -1.197549819946289, 1.0460549592971802, 0.5180909037590027, 0.0017981929704546928, -0.4993428587913513, 1.205339789390564, 0.046955008059740067, 1.3070319890975952, 0.5264949798583984, -0.2878246605396271, 0.5461148023605347, -0.2732703387737274, -0.5231943130493164, 1.578676700592041, 0.1764858067035675, -1.487554669380188, -2.3562610149383545, -0.1900273710489273, -0.8208335638046265, -0.07094515860080719, -0.6519389152526855, -1.0551575422286987, 1.6270109415054321, 0.4156176447868347, -1.2606327533721924, -0.33901259303092957, -0.25992828607559204, -0.5981703400611877, 2.712099552154541, -1.4407933950424194, -0.25493115186691284, -0.9991967678070068, -0.5071353316307068, 1.6048141717910767, -1.186463713645935, -0.15810413658618927, -1.0524022579193115, -0.640445351600647, -1.237621545791626, -0.5358794331550598, -0.08629725873470306, -0.9151906371116638, 0.7262515425682068, 0.2680914103984833, -1.1099008321762085, -0.34923961758613586, -0.8460652828216553, 0.8182659149169922, -0.09102815389633179, 0.2900872528553009, 1.8223525285720825, 0.3934849202632904, -0.4211427569389343, 0.7009680867195129, 1.1562511920928955, 0.6280801296234131, -0.6764976978302002, 0.09074991941452026, -0.6547312140464783, 0.3369295597076416, -1.2961513996124268, 0.3111928701400757, -2.8582863807678223, 0.6459330916404724, -0.08086910843849182, -0.08274030685424805, -0.0332886278629303, -1.271080493927002, 1.1279176473617554, 2.602191209793091, -1.0809813737869263, 0.4855806827545166, 0.2940835654735565, 1.1764353513717651, -1.7043277025222778, 0.36774352192878723, -0.38736826181411743, 2.1325011253356934, 0.2019805759191513, 1.1943604946136475, -0.5078834891319275, -2.32353138923645, 0.6510327458381653, -1.2374229431152344, -1.1463665962219238, 0.7957908511161804, -0.860686182975769, 0.0783601850271225, -1.4032764434814453, -0.14094051718711853, -0.8707939982414246, -1.1487923860549927, 0.6718079447746277, 0.12979517877101898, 0.4412294328212738, -0.6143691539764404, 0.26086845993995667, -2.1793527603149414, -1.4060052633285522, -0.14971990883350372, -0.8987624049186707, 0.44889700412750244, -0.35927504301071167, 0.7737306952476501, -0.1415569931268692, -0.02805178426206112, 0.26583677530288696, 1.423736572265625, 3.442600727081299, 0.20606325566768646, 0.3907087445259094, -0.1514834314584732, -0.8291086554527283, 1.4158599376678467, 0.8279585242271423, -0.1614621877670288, -0.597568929195404, -1.0226914882659912, 1.3943860530853271, 1.9329074621200562, 0.9885724782943726, 0.051004379987716675, -0.7672666907310486, -0.6616669297218323, -0.03308429569005966, 0.20794914662837982, 0.4590705335140228, 0.896727979183197, -0.015913531184196472, 0.002205934375524521, 1.5417790412902832, 1.2852991819381714, -0.5069013237953186, 0.41477248072624207, -0.8746334910392761, -0.4214830696582794, 0.4111960530281067, 0.2928847670555115, 0.02035963349044323, 0.35955843329429626, -0.9963648319244385, -0.26856204867362976, -0.35544922947883606, -0.8942331671714783, -0.8404755592346191, -0.3742915987968445, -0.3636816143989563, 1.7049410343170166, 0.17666995525360107, -0.5022594332695007, 0.020485997200012207, -0.7704906463623047, -0.11724475026130676, -1.1446999311447144, 0.2275640368461609, -0.07905103266239166, -0.08949531614780426, -0.07506097853183746, 1.7920655012130737, -0.9841805696487427, -2.117016553878784, 0.26009389758110046, 0.1539662778377533, -0.29766157269477844, 0.23934008181095123, 1.7110276222229004, 0.438595712184906, 1.4521387815475464, 1.3122047185897827, 0.9593662023544312, -0.7310008406639099, -1.294963002204895, 0.728697657585144, 1.101438283920288, -1.486214518547058, 0.7738142013549805, -0.014610622078180313, -0.4882158637046814, 0.6865566968917847, 1.266711950302124, 0.3981780409812927, -1.9905513525009155, 0.8607536554336548, -0.9445918798446655, 0.8080803751945496, 0.7652626037597656, 0.6319596767425537, 0.25527894496917725, 0.8222359418869019, -1.3072868585586548, -1.1657699346542358, -0.7938331365585327, -0.63636714220047, 1.9332340955734253, -0.31727856397628784, 0.6076335310935974, -0.1643071472644806, -1.3754961490631104, -0.09192228317260742, 0.6931222677230835, 0.3458695113658905, -0.3562012016773224, 0.8357816338539124, -0.7458602786064148, -1.1768395900726318, -1.4052690267562866, -0.3807307481765747, -0.9322518110275269, -0.9860493540763855, 1.0687564611434937, 0.8070580363273621, 0.34525784850120544, 1.9119459390640259, 0.6858510971069336, 0.22712291777133942, -2.5568039417266846, 0.9428683519363403, 0.26508721709251404, -0.07078957557678223, 0.868158221244812, 0.22988657653331757, 1.0209157466888428, 0.05880209431052208, 0.535524308681488, -2.3904411792755127, 2.220667839050293, -0.1243981122970581, 0.6566841006278992, -0.004739193711429834, -0.16222237050533295, 1.0571727752685547, 0.6011711955070496, 0.5858184099197388, -1.074622392654419, 0.6633836030960083, -0.6245890259742737, 1.3209949731826782, 0.8837030529975891, -0.8821511268615723, 0.017875833436846733, 1.3614768981933594, 0.4244266152381897, -0.5680069327354431, -0.9181148409843445, -0.9380069971084595, 0.9197753667831421, 1.724094271659851, -0.0026107244193553925, 0.02427414059638977, 0.860039234161377, 0.6228353977203369, -1.3539708852767944, 0.10594187676906586, -0.7339375615119934, -0.7448013424873352, 1.7085456848144531, 2.110930919647217, -0.18020929396152496, -0.1815347522497177, -0.6811275482177734, -1.3147313594818115, 0.8612361550331116, -0.135288804769516, 0.13034959137439728, 0.670732855796814, -0.6164549589157104, 1.0188809633255005, 0.8939298391342163, 0.9394406080245972, 0.2084418386220932, 0.2497609704732895, 0.3608008623123169, -0.3160378336906433, -1.1011757850646973, -0.22552551329135895, -1.1700369119644165, -2.506268262863159, 0.3604874014854431, -0.2342003434896469, -1.420149564743042, 0.0010800296440720558, -0.9555479288101196, 0.8781612515449524, -0.5579838156700134, -1.0301244258880615, -1.54754638671875, 0.25510483980178833, -0.12573203444480896, 0.870734453201294, -1.5267835855484009, -0.07668733596801758, 1.221623182296753, 0.8899967074394226, -0.5884021520614624, 1.0101327896118164, 0.2321832925081253, 1.0467593669891357, 0.8450347781181335, -0.39965179562568665, 0.5446195602416992, 0.04281416907906532, -1.3990919589996338, 0.5224246978759766, 1.1880664825439453, 0.17377333343029022, 1.5072540044784546, -0.546196699142456, -0.00362396240234375, 0.352915495634079, -0.5678571462631226, -0.43957996368408203, -0.49509212374687195, 0.7414711117744446, 0.10088968276977539, -0.887894332408905, 0.023331131786108017, -0.16099773347377777, -0.27316832542419434, 0.17042355239391327, -1.5371378660202026, -0.11856165528297424, -0.38456207513809204, -0.6376837491989136, -1.2795535326004028, 0.0033343834802508354, 1.3688058853149414, -0.7813193798065186, -0.1797783076763153, 0.4039033353328705, 0.431125670671463, 0.5123845338821411, 0.6823427081108093, -0.6150926351547241, -0.4108322858810425, -0.24119524657726288, -0.2483580857515335, 0.3165329098701477, 1.2037972211837769, -0.0725962221622467, -0.9363807439804077, 0.7271296977996826, -0.44594091176986694, 0.08004017174243927, 1.874888300895691, 0.1379372775554657, -0.8532817363739014, 0.307064414024353, -0.7230038046836853, 2.0450491905212402, 1.621549367904663, 1.3018403053283691, -0.120955690741539, -0.9391868114471436, 0.6534650325775146, -0.2633112072944641, -0.361409991979599, 0.9151674509048462, 0.4715295135974884, -0.1977967619895935, -1.4303444623947144, 0.6066926717758179, 1.239801287651062, -0.8380546569824219, -0.7768604159355164, 0.06622907519340515, -0.7994611263275146, 1.0828194618225098, 0.7387747764587402, 0.39686036109924316, 0.264741986989975, 1.661181092262268, 0.7880731821060181, -0.6060547828674316, 0.5183610916137695, 0.5384080410003662, -0.10721081495285034, -2.0742242336273193, -1.0162569284439087, 0.32921290397644043, -0.4550304710865021, -1.6085870265960693, 1.3425945043563843, -1.1492584943771362, -0.9105060696601868, 0.5219259262084961, 0.06959547102451324, 1.3895447254180908, 0.2600649297237396, 1.542281985282898, 2.009312868118286, 0.8424228429794312, 0.38371825218200684, 1.2890790700912476, -0.1816321760416031, -0.4278499186038971, 1.834897518157959, -0.37995651364326477, 0.5141978859901428, 1.0556682348251343, -0.4057754576206207, -1.1003491878509521, -0.7688058614730835, -1.1497267484664917, -0.6056379675865173, 1.176064133644104, 0.09915336966514587, -1.0930817127227783, 0.18002310395240784, 1.583359956741333, 0.09227564930915833, -0.4097134470939636, 0.5573184490203857, 0.3973163068294525, -0.7576101422309875, -0.013471387326717377, -0.9684920310974121, 0.581978440284729, -0.1805180162191391, -0.3098456561565399, 0.43708276748657227, 0.3982216417789459, 1.2327221632003784, -0.052142441272735596, 0.12490189075469971, 1.1599631309509277, -1.4562147855758667, 1.443024754524231, -0.6592594981193542, 0.23628580570220947, -2.343519449234009, 1.4081333875656128, -0.7926090955734253, 1.9360071420669556, -2.6463255882263184, 0.41521623730659485, -0.6590923070907593, -0.45723411440849304, 0.31122729182243347, -0.4009394347667694, 0.1142619252204895, -0.11937791109085083, -1.113142967224121, -0.07426360249519348, -0.741335928440094, 0.5243495106697083, 1.1760295629501343, 1.2712335586547852, -1.0702760219573975, -0.20236332714557648, -1.6689897775650024, -0.14595653116703033, -0.7956954836845398, 0.34381377696990967, -2.0551905632019043, -0.14152197539806366, -1.966513752937317, -2.3921594619750977, -1.3483600616455078, -0.7772679924964905, 1.0892696380615234, 0.15342716872692108, -0.8758184313774109, 1.2043557167053223, -0.41549840569496155, -1.7520716190338135, 1.0865905284881592, -2.1334609985351562 ]
https://github.com/huggingface/datasets/issues/5475
Dataset scan time is much slower than using native arrow
Ah I see, datasets is implicitly making this conversion. Thanks for pointing that out! If it's not too much, I would also suggest updating some of your docs with the same `.to_pylist()` conversion in the code snippet that follows [here](https://huggingface.co/course/chapter5/4?fw=pt#:~:text=let%E2%80%99s%20run%20a%20little%20speed%20test%20by%20iterating%20over%20all%20the%20elements%20in%20the%20PubMed%20Abstracts%20dataset%3A).
### Describe the bug I'm basically running the same scanning experiment from the tutorials https://huggingface.co/course/chapter5/4?fw=pt except now I'm comparing to a native pyarrow version. I'm finding that the native pyarrow approach is much faster (2 orders of magnitude). Is there something I'm missing that explains this phenomenon? ### Steps to reproduce the bug https://colab.research.google.com/drive/11EtHDaGAf1DKCpvYnAPJUW-LFfAcDzHY?usp=sharing ### Expected behavior I expect scan times to be on par with using pyarrow directly. ### Environment info standard colab environment
323
40
Dataset scan time is much slower than using native arrow ### Describe the bug I'm basically running the same scanning experiment from the tutorials https://huggingface.co/course/chapter5/4?fw=pt except now I'm comparing to a native pyarrow version. I'm finding that the native pyarrow approach is much faster (2 orders of magnitude). Is there something I'm missing that explains this phenomenon? ### Steps to reproduce the bug https://colab.research.google.com/drive/11EtHDaGAf1DKCpvYnAPJUW-LFfAcDzHY?usp=sharing ### Expected behavior I expect scan times to be on par with using pyarrow directly. ### Environment info standard colab environment Ah I see, datasets is implicitly making this conversion. Thanks for pointing that out! If it's not too much, I would also suggest updating some of your docs with the same `.to_pylist()` conversion in the code snippet that follows [here](https://huggingface.co/course/chapter5/4?fw=pt#:~:text=let%E2%80%99s%20run%20a%20little%20speed%20test%20by%20iterating%20over%20all%20the%20elements%20in%20the%20PubMed%20Abstracts%20dataset%3A).
[ -1.24544095993042, -0.9433806538581848, -0.7787543535232544, 1.4426261186599731, -0.01119820773601532, -1.1739522218704224, 0.03638889268040657, -1.0511670112609863, 1.514532446861267, -0.8187382221221924, 0.3589247167110443, -1.6049509048461914, 0.019263528287410736, -0.4325990080833435, -0.669911801815033, -0.9902423620223999, -0.3526017665863037, -0.8023025989532471, 1.041454553604126, 2.653831720352173, 1.2019742727279663, -1.367573618888855, 2.808591604232788, 0.672455370426178, -0.25747770071029663, -1.1572448015213013, 0.5255936980247498, 0.13251592218875885, -1.2496339082717896, -0.5369753837585449, -0.898739218711853, -0.0029612071812152863, -0.5017936825752258, -0.4316486418247223, 0.0634237676858902, 0.3469619154930115, -0.17143477499485016, -0.41657909750938416, -0.496378093957901, -0.8131922483444214, 0.47341179847717285, -0.45034313201904297, 0.8682894706726074, -0.3821869492530823, 1.899306297302246, -0.6144582033157349, 0.4249451756477356, 0.7095747590065002, 1.3201302289962769, 0.2374807894229889, -0.08336471766233444, 0.2327854335308075, 0.3905535936355591, -0.05130613222718239, 0.5465278029441833, 1.0861480236053467, 0.6852023601531982, 0.4352050721645355, 0.6926371455192566, -2.1127161979675293, 1.2333674430847168, -0.980937123298645, 0.32070401310920715, 1.2899600267410278, -0.9522840976715088, 0.44022244215011597, -1.707918643951416, -0.18829850852489471, 0.5797916650772095, -2.3007922172546387, 0.2209433764219284, -1.2290681600570679, -0.506704568862915, 0.9223113059997559, 0.2688486576080322, -1.3314995765686035, 0.16972118616104126, -0.5940702557563782, 1.1177783012390137, 0.5701137185096741, 1.0712974071502686, -1.6283191442489624, 0.008972455747425556, -0.31533610820770264, -0.07292039692401886, -1.4361891746520996, -1.5332093238830566, 0.3906532824039459, 0.5941883325576782, 0.5768756866455078, 0.16905806958675385, 0.8614442944526672, -1.0441092252731323, 0.8180036544799805, -0.8986508250236511, -1.6162458658218384, -1.3314096927642822, -2.22956919670105, -2.187227487564087, 0.8626059293746948, -0.31508868932724, -0.6873073577880859, 2.057326555252075, -1.01466703414917, -1.710882544517517, 1.1800363063812256, 0.22688016295433044, -0.04849489405751228, 2.4710958003997803, 0.3129133880138397, -0.7257643938064575, 0.3661392629146576, -0.685263991355896, 0.7905515432357788, -0.597296416759491, 1.3462783098220825, 0.4074766933917999, -0.9500391483306885, 1.6320172548294067, -0.4818979501724243, 0.4971596598625183, -0.7118496298789978, -0.5525631308555603, -0.9005626440048218, 0.28702691197395325, 1.934425950050354, -0.35450631380081177, 1.568629264831543, -0.45156940817832947, -1.555499792098999, -1.6131068468093872, 0.8087853193283081, 0.32910269498825073, -0.791104257106781, 0.13392958045005798, -0.3497472405433655, 0.0362294539809227, -0.018238134682178497, 0.9746211767196655, 1.2732042074203491, 0.6481782793998718, -0.2916623055934906, -0.9652126431465149, 0.2456972301006317, -0.14649786055088043, -0.592509925365448, -1.7598775625228882, -0.2811988294124603, 0.11054790019989014, 0.650818943977356, -1.2953753471374512, 1.7285428047180176, 0.8445916771888733, 1.983526587486267, 1.040191888809204, -0.3505271375179291, 1.4756933450698853, 0.06389886885881424, 1.86836838722229, -0.4789990782737732, 0.7521052360534668, -0.21116270124912262, -1.0943530797958374, 0.726889431476593, -0.37857943773269653, -2.0873265266418457, -0.7988154292106628, -0.7642097473144531, -0.15579183399677277, -0.7783136963844299, 0.932487964630127, -0.24993203580379486, -1.3885860443115234, 0.30028754472732544, -0.7203661203384399, 0.19804464280605316, -1.3712965250015259, 0.41019389033317566, 0.77414870262146, -0.57664954662323, 0.10942956060171127, -0.1950429528951645, -1.3559527397155762, -0.45580074191093445, 0.1550634801387787, 1.9459584951400757, -0.7809796929359436, 0.8605065941810608, 0.9593628644943237, -0.7293598055839539, 0.0685858428478241, 0.3652447462081909, -0.31439611315727234, 0.9113507866859436, -1.0967421531677246, -0.33269938826560974, 1.2037137746810913, -0.2591588497161865, -0.5811440944671631, 1.4742891788482666, 0.9213564395904541, -0.9903498888015747, -0.15803006291389465, -0.15800748765468597, -0.9003857374191284, 0.09160194545984268, -1.5327788591384888, -0.0860862284898758, 0.3266477584838867, -1.3716150522232056, -0.455341637134552, -0.2587569057941437, 1.2481659650802612, -0.08637510240077972, 1.453940749168396, -0.4735378324985504, -0.24205483496189117, -0.2924380302429199, -0.4297751486301422, 0.16181683540344238, -0.26215994358062744, -0.6509252190589905, 0.21795736253261566, -0.7234736084938049, 0.277398943901062, 1.418038249015808, 0.4185154438018799, 0.07599154114723206, 0.5375849008560181, 1.079185962677002, 0.2649804949760437, -0.15856938064098358, -0.8178251385688782, -1.5241903066635132, 2.0895471572875977, -1.3926568031311035, 2.1263673305511475, 0.9393354654312134, -0.05107305198907852, -1.712235450744629, -1.7880295515060425, 1.2546898126602173, 1.1806707382202148, 2.222126007080078, 0.5271790623664856, 0.3751172423362732, -0.8715904951095581, -0.722195029258728, 0.1151042953133583, -1.1802858114242554, -0.7948391437530518, 0.11252377182245255, 2.3723137378692627, 1.7661242485046387, -0.423271507024765, -0.12452920526266098, -1.0060343742370605, 1.3482826948165894, -0.17386774718761444, 0.038815151900053024, 1.8956199884414673, -0.22401614487171173, -1.0649242401123047, 1.1540718078613281, -2.3785080909729004, 0.1413988173007965, 2.00203013420105, 0.29287031292915344, 0.05497460439801216, -1.4187054634094238, -0.7819069027900696, -0.4083942472934723, -0.23021164536476135, -1.1579272747039795, 0.4546303153038025, -0.3019695281982422, -0.8420650959014893, -1.5407016277313232, 0.07695147395133972, -1.1376714706420898, -1.657871127128601, 0.2999507486820221, 1.8486696481704712, 2.0147202014923096, -0.8183075189590454, 1.6362881660461426, -0.16311408579349518, 0.05465002730488777, 1.2919484376907349, 1.2446480989456177, 3.094500780105591, 1.8810924291610718, -1.275841474533081, 0.6232969760894775, -0.12514573335647583, -0.4552314281463623, 1.056776762008667, -1.1586097478866577, 1.2693684101104736, -0.11008910834789276, -1.213586449623108, -1.2828279733657837, 1.0410799980163574, 0.5939220786094666, -0.04028269276022911, -0.4647201597690582, 1.1886106729507446, -0.003915972076356411, 1.3903495073318481, 0.6125480532646179, -0.34321799874305725, 0.5546873211860657, -0.30835241079330444, -0.4818274676799774, 1.606764554977417, 0.1908387690782547, -1.550622820854187, -2.2569148540496826, -0.2701466977596283, -0.7866359949111938, -0.014642791822552681, -0.6428641676902771, -1.0783381462097168, 1.6723910570144653, 0.48366349935531616, -1.2064720392227173, -0.48557156324386597, -0.2431262880563736, -0.6242307424545288, 2.7401413917541504, -1.5106841325759888, -0.22334644198417664, -0.944667637348175, -0.5255451798439026, 1.5398368835449219, -1.270022988319397, -0.22969166934490204, -1.0367553234100342, -0.6892304420471191, -1.2652246952056885, -0.5354918837547302, 0.007998158223927021, -0.9817788600921631, 0.6584568023681641, 0.30596640706062317, -0.9572747945785522, -0.31958261132240295, -0.8884044289588928, 0.8067730665206909, -0.005938615649938583, 0.24188297986984253, 1.8342394828796387, 0.42696985602378845, -0.4598204493522644, 0.6598458290100098, 1.2600209712982178, 0.5677281022071838, -0.7320219278335571, 0.05305810272693634, -0.7195392847061157, 0.2416761815547943, -1.308913230895996, 0.3335234224796295, -2.9062671661376953, 0.6747553944587708, -0.22542361915111542, -0.07333041727542877, 0.06310661882162094, -1.200663447380066, 1.1950292587280273, 2.5471813678741455, -0.9684240818023682, 0.525799036026001, 0.24124860763549805, 1.3340266942977905, -1.7728221416473389, 0.469967246055603, -0.31586581468582153, 2.05419659614563, 0.2496413290500641, 1.222512125968933, -0.6211669445037842, -2.206690549850464, 0.5634726881980896, -1.1943414211273193, -1.2091885805130005, 0.7576917409896851, -0.8385281562805176, 0.07989630848169327, -1.4120193719863892, -0.24420182406902313, -0.8794028759002686, -1.119341492652893, 0.7417206764221191, 0.1101050078868866, 0.4600278437137604, -0.5679471492767334, 0.24679359793663025, -2.1920602321624756, -1.3762125968933105, -0.19120103120803833, -0.9039925336837769, 0.41829538345336914, -0.33889371156692505, 0.7225100994110107, -0.14861054718494415, -0.04905072599649429, 0.21888592839241028, 1.3634324073791504, 3.3865249156951904, 0.24976351857185364, 0.4457587003707886, -0.1461278796195984, -0.9034679532051086, 1.3707817792892456, 0.8311861157417297, -0.22658057510852814, -0.5309145450592041, -1.0120899677276611, 1.2507141828536987, 1.9500792026519775, 1.0577282905578613, 0.11754955351352692, -0.7250873446464539, -0.6041558384895325, -0.12286462634801865, 0.2445143461227417, 0.4931878447532654, 0.9450650811195374, -0.06706112623214722, 0.03251376375555992, 1.4720306396484375, 1.3673709630966187, -0.6366316080093384, 0.4036467373371124, -0.8998337984085083, -0.45936429500579834, 0.4720897972583771, 0.2493343949317932, -0.053785376250743866, 0.3172204792499542, -1.0940539836883545, -0.16151905059814453, -0.35828348994255066, -0.9206061959266663, -0.8213151097297668, -0.37739190459251404, -0.248860165476799, 1.719734787940979, 0.08861223608255386, -0.4171643853187561, 0.013476447202265263, -0.7743568420410156, -0.16354376077651978, -1.2226407527923584, 0.282152384519577, -0.12576399743556976, -0.11659842729568481, -0.020115837454795837, 1.8205664157867432, -0.9083045125007629, -2.1647284030914307, 0.24037683010101318, 0.14019711315631866, -0.33807942271232605, 0.2597239911556244, 1.653993010520935, 0.4272643029689789, 1.5523027181625366, 1.2821117639541626, 0.9797431230545044, -0.7255741953849792, -1.287219762802124, 0.6563017964363098, 1.032963514328003, -1.3398966789245605, 0.8499855995178223, -0.01094676461070776, -0.5076978206634521, 0.6893677711486816, 1.3508882522583008, 0.36878690123558044, -1.9680448770523071, 0.8793114423751831, -0.808475136756897, 0.7561449408531189, 0.7765767574310303, 0.7614786624908447, 0.24479296803474426, 0.842651903629303, -1.325581431388855, -1.2271723747253418, -0.8856124877929688, -0.5818617343902588, 1.8540323972702026, -0.2672124207019806, 0.5963455438613892, -0.15638934075832367, -1.2345094680786133, -0.05485832318663597, 0.6595186591148376, 0.3181702196598053, -0.3664310574531555, 0.8426024317741394, -0.7262076139450073, -1.2210372686386108, -1.4378117322921753, -0.3598461449146271, -0.9838017821311951, -0.8975306749343872, 0.9979061484336853, 0.7424781322479248, 0.20463119447231293, 1.8461120128631592, 0.6819869875907898, 0.29493677616119385, -2.682864189147949, 0.9719288349151611, 0.20349319279193878, -0.05105885490775108, 0.8675233721733093, 0.24648085236549377, 1.152353048324585, 0.23125773668289185, 0.37473443150520325, -2.4423439502716064, 2.2760796546936035, -0.2754060924053192, 0.6848387718200684, -0.1169416755437851, -0.1984919160604477, 1.154786229133606, 0.65073561668396, 0.6196989417076111, -1.0400861501693726, 0.7460299730300903, -0.6122484803199768, 1.21928870677948, 0.9569033980369568, -0.7918216586112976, 0.02437957376241684, 1.3905253410339355, 0.5337016582489014, -0.6428536772727966, -1.0009069442749023, -0.8634518384933472, 0.8854243159294128, 1.7729955911636353, -0.04115525260567665, 0.001559804193675518, 0.7962789535522461, 0.5933729410171509, -1.4195575714111328, 0.07296288013458252, -0.7305383682250977, -0.7173765301704407, 1.780220866203308, 2.0057406425476074, -0.11333054304122925, -0.30137550830841064, -0.7261048555374146, -1.3043628931045532, 0.7594410181045532, -0.15865223109722137, 0.28566914796829224, 0.7105215787887573, -0.7605321407318115, 1.1746190786361694, 0.8203895688056946, 0.9151267409324646, 0.17957884073257446, 0.2687155306339264, 0.3838116526603699, -0.3121618330478668, -1.1636338233947754, -0.22346721589565277, -1.2711917161941528, -2.432249069213867, 0.41492727398872375, -0.24961109459400177, -1.4889649152755737, 0.06352266669273376, -0.9861644506454468, 0.9588303565979004, -0.6060678958892822, -1.1151237487792969, -1.6563745737075806, 0.25809019804000854, -0.15928195416927338, 0.8112900257110596, -1.495062232017517, 0.009632217697799206, 1.3311084508895874, 0.8705347180366516, -0.47846513986587524, 1.041407823562622, 0.21378368139266968, 1.1255130767822266, 0.798750102519989, -0.3360178768634796, 0.5495314598083496, -0.014518313109874725, -1.3225935697555542, 0.47261127829551697, 1.123807430267334, 0.20153610408306122, 1.44693124294281, -0.5644015669822693, -0.025102335959672928, 0.387899786233902, -0.3973597586154938, -0.42351046204566956, -0.4693324565887451, 0.7296055555343628, 0.029510915279388428, -0.8576926589012146, 0.06368285417556763, -0.23922696709632874, -0.267729789018631, 0.25838330388069153, -1.5597591400146484, -0.26225531101226807, -0.43881532549858093, -0.5476441979408264, -1.2697017192840576, 0.047546736896038055, 1.3984196186065674, -0.7473093867301941, -0.20397113263607025, 0.45629724860191345, 0.5203835368156433, 0.6300191879272461, 0.7621897459030151, -0.6398272514343262, -0.33272626996040344, -0.31364017724990845, -0.2460300773382187, 0.2072921246290207, 1.2456529140472412, -0.19665765762329102, -0.9490728378295898, 0.7104220390319824, -0.4142738878726959, 0.09469173103570938, 1.9037864208221436, 0.1381794512271881, -0.7947975993156433, 0.18521477282047272, -0.7612473964691162, 2.076702833175659, 1.6109153032302856, 1.2860809564590454, -0.0846807137131691, -0.9419947266578674, 0.6785948872566223, -0.2285219430923462, -0.2661372125148773, 0.8935746550559998, 0.6516880393028259, -0.1742699146270752, -1.4371498823165894, 0.5876978039741516, 1.173166275024414, -0.8817992210388184, -0.7713537812232971, 0.10397877544164658, -0.8689253330230713, 1.0523109436035156, 0.7196646332740784, 0.4445931613445282, 0.14111337065696716, 1.6326264142990112, 0.785729706287384, -0.4951396882534027, 0.6403620839118958, 0.4733699858188629, -0.19531302154064178, -2.0030689239501953, -0.9019098877906799, 0.2629053592681885, -0.2971266210079193, -1.6068190336227417, 1.4674861431121826, -1.096769094467163, -0.839526355266571, 0.4614425301551819, 0.18123196065425873, 1.492543339729309, 0.34126198291778564, 1.6250627040863037, 2.034745454788208, 0.8682735562324524, 0.3291430175304413, 1.3079001903533936, -0.13062745332717896, -0.4863613545894623, 1.7575942277908325, -0.3455159664154053, 0.5279591679573059, 1.084696888923645, -0.43646320700645447, -1.0482677221298218, -0.7630677819252014, -1.1302070617675781, -0.5822222232818604, 1.1270111799240112, 0.04941903054714203, -1.1644704341888428, 0.21687623858451843, 1.5362895727157593, 0.0487392321228981, -0.44577252864837646, 0.6077319979667664, 0.4638534188270569, -0.6578636169433594, -0.03342823684215546, -0.960695207118988, 0.4797069728374481, -0.06090065836906433, -0.3100069463253021, 0.37506046891212463, 0.4095545709133148, 1.316413164138794, 0.03629954531788826, 0.14600244164466858, 1.2540278434753418, -1.444126009941101, 1.4074509143829346, -0.6883801817893982, 0.2626093924045563, -2.319824695587158, 1.4155677556991577, -0.8038263320922852, 1.9022340774536133, -2.605438232421875, 0.41279837489128113, -0.6467207074165344, -0.355815052986145, 0.2580887973308563, -0.4282366633415222, 0.15917527675628662, -0.1186247244477272, -1.1285479068756104, -0.04602335765957832, -0.6944352388381958, 0.5466827154159546, 1.1643714904785156, 1.2045296430587769, -1.076461672782898, -0.2187243103981018, -1.7438284158706665, -0.14176687598228455, -0.8180438280105591, 0.2930320203304291, -2.1216208934783936, -0.17242549359798431, -1.9483391046524048, -2.321979522705078, -1.3790712356567383, -0.7629023790359497, 0.9851091504096985, 0.26161184906959534, -0.9037599563598633, 1.2679448127746582, -0.41950860619544983, -1.7575483322143555, 1.087822437286377, -2.1358983516693115 ]
https://github.com/huggingface/datasets/issues/5475
Dataset scan time is much slower than using native arrow
This code snippet shows `datasets` code that reads the Arrow data as python objects already, there is no need to add to_pylist. Or were you thinking about something else ?
### Describe the bug I'm basically running the same scanning experiment from the tutorials https://huggingface.co/course/chapter5/4?fw=pt except now I'm comparing to a native pyarrow version. I'm finding that the native pyarrow approach is much faster (2 orders of magnitude). Is there something I'm missing that explains this phenomenon? ### Steps to reproduce the bug https://colab.research.google.com/drive/11EtHDaGAf1DKCpvYnAPJUW-LFfAcDzHY?usp=sharing ### Expected behavior I expect scan times to be on par with using pyarrow directly. ### Environment info standard colab environment
323
30
Dataset scan time is much slower than using native arrow ### Describe the bug I'm basically running the same scanning experiment from the tutorials https://huggingface.co/course/chapter5/4?fw=pt except now I'm comparing to a native pyarrow version. I'm finding that the native pyarrow approach is much faster (2 orders of magnitude). Is there something I'm missing that explains this phenomenon? ### Steps to reproduce the bug https://colab.research.google.com/drive/11EtHDaGAf1DKCpvYnAPJUW-LFfAcDzHY?usp=sharing ### Expected behavior I expect scan times to be on par with using pyarrow directly. ### Environment info standard colab environment This code snippet shows `datasets` code that reads the Arrow data as python objects already, there is no need to add to_pylist. Or were you thinking about something else ?
[ -1.2313355207443237, -0.9755416512489319, -0.8328843712806702, 1.4891432523727417, -0.08112998306751251, -1.2118287086486816, 0.10704300552606583, -1.0513474941253662, 1.6313530206680298, -0.8384964466094971, 0.3347957730293274, -1.6132891178131104, 0.05242260918021202, -0.5046954154968262, -0.6800708770751953, -0.9665522575378418, -0.225154310464859, -0.7850765585899353, 1.1151119470596313, 2.59870982170105, 1.2207149267196655, -1.304500699043274, 2.807370901107788, 0.7219801545143127, -0.2516058087348938, -1.0814136266708374, 0.4992373585700989, 0.08836379647254944, -1.2616621255874634, -0.5116546154022217, -0.973125159740448, -0.0620480440557003, -0.4420909583568573, -0.47088393568992615, 0.06462012231349945, 0.3739092946052551, -0.19618092477321625, -0.365408331155777, -0.5902953743934631, -0.7989479899406433, 0.4008796513080597, -0.5082082748413086, 0.8960919976234436, -0.392640620470047, 1.8977774381637573, -0.5855398178100586, 0.43015652894973755, 0.7125783562660217, 1.3752278089523315, 0.14289548993110657, -0.07222138345241547, 0.29529306292533875, 0.40343600511550903, -0.05905044451355934, 0.4231593906879425, 1.0259168148040771, 0.5975854396820068, 0.5123614072799683, 0.6580021381378174, -2.2261691093444824, 1.2555441856384277, -0.921793520450592, 0.2296983003616333, 1.265235424041748, -1.0150160789489746, 0.4182380139827728, -1.7126708030700684, -0.14030210673809052, 0.5124770402908325, -2.286524772644043, 0.21750028431415558, -1.2028961181640625, -0.6190308332443237, 0.8334777355194092, 0.33071258664131165, -1.3278765678405762, 0.059625349938869476, -0.533833384513855, 1.0530585050582886, 0.5490987300872803, 1.151373267173767, -1.6324633359909058, -0.06305001676082611, -0.3266770541667938, -0.08267181366682053, -1.4212288856506348, -1.5539088249206543, 0.46612656116485596, 0.5986307859420776, 0.604873776435852, 0.03700098395347595, 0.9458186030387878, -1.0251516103744507, 0.7821927070617676, -0.822793185710907, -1.6783416271209717, -1.375414490699768, -2.378618001937866, -2.1997618675231934, 0.8175716400146484, -0.4628547728061676, -0.5732237696647644, 2.0386483669281006, -1.1306999921798706, -1.7988847494125366, 1.1958552598953247, 0.20492157340049744, -0.05554681271314621, 2.4000368118286133, 0.26924991607666016, -0.6390482187271118, 0.384328693151474, -0.7084269523620605, 0.7655391097068787, -0.6330320239067078, 1.4031256437301636, 0.46371984481811523, -0.9784008264541626, 1.5782334804534912, -0.3598778247833252, 0.5794889330863953, -0.728279173374176, -0.42944133281707764, -0.8639779090881348, 0.24674125015735626, 1.8934181928634644, -0.38723132014274597, 1.6085985898971558, -0.3388109505176544, -1.4656630754470825, -1.627603530883789, 0.8168792128562927, 0.40044930577278137, -0.7930191159248352, 0.25522473454475403, -0.4368579387664795, 0.06340167671442032, -0.04069448262453079, 1.0811649560928345, 1.2416813373565674, 0.6006380915641785, -0.31759604811668396, -0.9163579344749451, 0.2654002606868744, -0.1323649287223816, -0.5429971814155579, -1.8291600942611694, -0.33001381158828735, 0.10324286669492722, 0.6414869427680969, -1.2488065958023071, 1.6299457550048828, 0.8764801621437073, 1.933006763458252, 1.0564411878585815, -0.26164379715919495, 1.4280308485031128, 0.015145366080105305, 1.8463232517242432, -0.4453393220901489, 0.7123542428016663, -0.27545273303985596, -1.0972610712051392, 0.7948570251464844, -0.4213193356990814, -2.05131196975708, -0.811082661151886, -0.8591949343681335, -0.19934576749801636, -0.7816879153251648, 1.000866413116455, -0.3892422616481781, -1.2796589136123657, 0.286988765001297, -0.7648705244064331, 0.14036725461483002, -1.2777780294418335, 0.4149996042251587, 0.7284340858459473, -0.5930824875831604, 0.048987507820129395, -0.333734393119812, -1.324277400970459, -0.5023173689842224, 0.2746409475803375, 1.9370993375778198, -0.8064699172973633, 0.9204614162445068, 0.9830427169799805, -0.7174856662750244, 0.10682099312543869, 0.4218733608722687, -0.37377116084098816, 0.8565163612365723, -1.0436776876449585, -0.3265015482902527, 1.148730754852295, -0.2512536942958832, -0.7229493856430054, 1.4171662330627441, 0.9162290692329407, -0.9247714281082153, -0.1925850212574005, -0.11525838822126389, -0.9056101441383362, 0.05519372224807739, -1.6112922430038452, -0.18911579251289368, 0.23153924942016602, -1.4723002910614014, -0.5004381537437439, -0.2991783618927002, 1.3397595882415771, -0.039404015988111496, 1.427573561668396, -0.33243969082832336, -0.2844250500202179, -0.2834931015968323, -0.43084755539894104, 0.26751816272735596, -0.2569642663002014, -0.7104071974754333, 0.280765175819397, -0.6732799410820007, 0.2832750976085663, 1.338423728942871, 0.37947505712509155, 0.08604113012552261, 0.6902556419372559, 0.9982213973999023, 0.29017531871795654, -0.13339221477508545, -0.885426938533783, -1.625541090965271, 1.9693068265914917, -1.3924823999404907, 1.9991812705993652, 0.9142626523971558, -0.06356439739465714, -1.8054189682006836, -1.8753489255905151, 1.3234729766845703, 1.1866652965545654, 2.1864049434661865, 0.6285948157310486, 0.4281499981880188, -0.7909231185913086, -0.6966508626937866, 0.21431614458560944, -1.1677908897399902, -0.7720621228218079, 0.03217344358563423, 2.365787982940674, 1.7421852350234985, -0.4838273823261261, -0.10808306187391281, -1.0437238216400146, 1.2818783521652222, -0.16080988943576813, 0.1255103498697281, 1.9824312925338745, -0.2795712947845459, -0.9932077527046204, 1.1610664129257202, -2.261716842651367, 0.15257741510868073, 2.001140594482422, 0.24426178634166718, 0.04606783762574196, -1.504428744316101, -0.7685679793357849, -0.3002954125404358, -0.2866964340209961, -1.2005265951156616, 0.5369381308555603, -0.26136377453804016, -0.824017345905304, -1.5361032485961914, 0.14325988292694092, -1.1381995677947998, -1.6256126165390015, 0.31007665395736694, 1.94894540309906, 1.9897456169128418, -0.7076209783554077, 1.5818517208099365, -0.2455691397190094, 0.07951154559850693, 1.3344331979751587, 1.2304571866989136, 3.1672117710113525, 1.9538649320602417, -1.2906380891799927, 0.7041459083557129, -0.05340874567627907, -0.5283384919166565, 1.1776001453399658, -1.0492674112319946, 1.2687294483184814, -0.13481393456459045, -1.0988926887512207, -1.2098454236984253, 0.9921401739120483, 0.49242907762527466, -0.02653922513127327, -0.46660491824150085, 1.2446784973144531, -0.016767311841249466, 1.3175239562988281, 0.5628449320793152, -0.32498717308044434, 0.6191378831863403, -0.34931692481040955, -0.4572247862815857, 1.584079623222351, 0.2081598937511444, -1.4934914112091064, -2.3644766807556152, -0.18268702924251556, -0.8006153702735901, -0.02293340489268303, -0.6097589731216431, -1.0529577732086182, 1.638574481010437, 0.5395411252975464, -1.1491552591323853, -0.3715985417366028, -0.23708373308181763, -0.6298622488975525, 2.6786320209503174, -1.4116407632827759, -0.29836875200271606, -1.0085673332214355, -0.4449201822280884, 1.5963536500930786, -1.2431657314300537, -0.18399269878864288, -1.0610674619674683, -0.6079165935516357, -1.2862859964370728, -0.499559611082077, -0.030650470405817032, -0.9763007760047913, 0.7596416473388672, 0.21172451972961426, -1.0192135572433472, -0.27888184785842896, -0.8336174488067627, 0.8046967387199402, -0.02905227616429329, 0.3403197228908539, 1.8642627000808716, 0.5097507238388062, -0.5319445133209229, 0.6858660578727722, 1.129813313484192, 0.5887277722358704, -0.7510002851486206, 0.10995085537433624, -0.6880631446838379, 0.2826061248779297, -1.2432541847229004, 0.33837664127349854, -2.929938554763794, 0.6661250591278076, -0.16372033953666687, -0.19467276334762573, 0.048162877559661865, -1.2186863422393799, 1.1306582689285278, 2.6152710914611816, -1.1000908613204956, 0.44249671697616577, 0.20862269401550293, 1.2527062892913818, -1.6212472915649414, 0.44568535685539246, -0.37039825320243835, 2.0618059635162354, 0.22917737066745758, 1.1846504211425781, -0.5599541664123535, -2.214625358581543, 0.679274320602417, -1.2060590982437134, -1.2309893369674683, 0.7976022958755493, -0.7797219753265381, 0.014761446975171566, -1.415537714958191, -0.1265210658311844, -0.8329194784164429, -1.223636507987976, 0.7723870873451233, 0.10224772989749908, 0.43990659713745117, -0.5978826284408569, 0.26279133558273315, -2.1453921794891357, -1.420214295387268, -0.21580910682678223, -0.8940858244895935, 0.4070375859737396, -0.3880898952484131, 0.750042736530304, -0.18663959205150604, 0.12333029508590698, 0.23968975245952606, 1.4673024415969849, 3.3855535984039307, 0.1585208773612976, 0.43338829278945923, -0.17086419463157654, -0.9012877941131592, 1.4319316148757935, 0.902275025844574, -0.10812707990407944, -0.6193144917488098, -1.0487068891525269, 1.2841310501098633, 1.9668751955032349, 1.0321637392044067, 0.11348243802785873, -0.7463827133178711, -0.6074463129043579, -0.04619110748171806, 0.2546713650226593, 0.5084952712059021, 0.9387207627296448, -0.02324005216360092, 0.02941010147333145, 1.4996522665023804, 1.2706557512283325, -0.586532473564148, 0.46869418025016785, -0.8506349325180054, -0.37912267446517944, 0.46478402614593506, 0.3219577372074127, -0.010129868984222412, 0.3484068810939789, -1.02759850025177, -0.21298229694366455, -0.3467174172401428, -0.9588782787322998, -0.8509101271629333, -0.39607328176498413, -0.3519055247306824, 1.6619329452514648, 0.16546177864074707, -0.4359797537326813, -0.09227269887924194, -0.7335906624794006, -0.05314846336841583, -1.1909291744232178, 0.1696189045906067, -0.1358453333377838, -0.08687996119260788, 0.037715066224336624, 1.7858250141143799, -1.0590990781784058, -2.1868858337402344, 0.2896329462528229, 0.19068816304206848, -0.28125858306884766, 0.2501944899559021, 1.6255275011062622, 0.45950618386268616, 1.4589506387710571, 1.2384552955627441, 0.9802488088607788, -0.7232204675674438, -1.3107874393463135, 0.6346253156661987, 0.9905314445495605, -1.3950709104537964, 0.8042210936546326, 0.03098730370402336, -0.5251537561416626, 0.7200803756713867, 1.2354423999786377, 0.44425714015960693, -1.893442988395691, 0.8855620622634888, -0.8360968828201294, 0.7673327326774597, 0.784905731678009, 0.8016626834869385, 0.2733304798603058, 0.8361204266548157, -1.2830040454864502, -1.2040044069290161, -0.8560978770256042, -0.5666338205337524, 1.9483685493469238, -0.25884753465652466, 0.5474580526351929, -0.15211722254753113, -1.3335057497024536, -0.07145098596811295, 0.6392836570739746, 0.30830323696136475, -0.28145632147789, 0.8325757384300232, -0.7168911099433899, -1.1655349731445312, -1.4329427480697632, -0.38649120926856995, -0.9147716760635376, -0.9265100359916687, 1.1085686683654785, 0.7574317455291748, 0.33024051785469055, 1.9479087591171265, 0.6382638216018677, 0.2752712666988373, -2.6499059200286865, 0.980597972869873, 0.30339232087135315, 0.02528373897075653, 0.8651790618896484, 0.24012576043605804, 1.1292225122451782, 0.07749437540769577, 0.4391212463378906, -2.3661248683929443, 2.22544002532959, -0.1871347278356552, 0.6269227266311646, -0.04125300794839859, -0.06635627895593643, 1.1529613733291626, 0.558319628238678, 0.6672359704971313, -1.0175997018814087, 0.7148541808128357, -0.6366732120513916, 1.2461304664611816, 0.9678963422775269, -0.8460127711296082, 0.05951032042503357, 1.4364007711410522, 0.47646716237068176, -0.5676465630531311, -0.8378087878227234, -0.9479178190231323, 0.9676956534385681, 1.8140170574188232, -0.003990126308053732, 0.06442081928253174, 0.801142156124115, 0.5638009905815125, -1.4210048913955688, 0.1015821099281311, -0.7416678071022034, -0.720132052898407, 1.6823033094406128, 2.042506456375122, -0.1483849734067917, -0.2246691882610321, -0.7880644202232361, -1.2846102714538574, 0.8540430068969727, -0.11184495687484741, 0.13578276336193085, 0.7498759031295776, -0.6340467929840088, 1.0842431783676147, 0.7985239624977112, 1.0188689231872559, 0.16472263634204865, 0.34422552585601807, 0.39006471633911133, -0.2712382376194, -1.0978741645812988, -0.2933546006679535, -1.2156985998153687, -2.5520260334014893, 0.405882328748703, -0.33607494831085205, -1.407736897468567, -0.045768607407808304, -1.028556227684021, 0.9421984553337097, -0.5554624795913696, -1.0598355531692505, -1.6329314708709717, 0.16257859766483307, -0.23143815994262695, 0.7920372486114502, -1.511429786682129, -0.04295763373374939, 1.324831485748291, 0.9458494782447815, -0.5118300914764404, 1.035528302192688, 0.17708204686641693, 0.9956586360931396, 0.8276048302650452, -0.4093623757362366, 0.48407554626464844, -0.020520519465208054, -1.3466923236846924, 0.5421388149261475, 1.1652196645736694, 0.26732829213142395, 1.4656956195831299, -0.554517388343811, -0.07330013811588287, 0.39823588728904724, -0.47563788294792175, -0.44516879320144653, -0.4847564101219177, 0.8014369010925293, 0.09638288617134094, -0.8543719053268433, 0.07734084874391556, -0.23302900791168213, -0.25535714626312256, 0.18770942091941833, -1.5232194662094116, -0.20465390384197235, -0.40564364194869995, -0.6820820569992065, -1.3162156343460083, 0.09344445168972015, 1.3436863422393799, -0.8140040040016174, -0.2115585207939148, 0.4016357660293579, 0.44533056020736694, 0.5715756416320801, 0.6571794748306274, -0.6763519644737244, -0.37467384338378906, -0.2639346420764923, -0.28203558921813965, 0.26586848497390747, 1.2190964221954346, -0.14825081825256348, -0.9876164793968201, 0.7026779651641846, -0.3685390055179596, 0.08496375381946564, 1.9471657276153564, 0.058142878115177155, -0.8908619284629822, 0.1898549348115921, -0.7465512752532959, 1.996898889541626, 1.5506596565246582, 1.2996681928634644, -0.06241825595498085, -0.9069839715957642, 0.6221875548362732, -0.12154702097177505, -0.32804328203201294, 0.9373181462287903, 0.5531618595123291, -0.1854328066110611, -1.4003890752792358, 0.6105228662490845, 1.2299107313156128, -0.9030237793922424, -0.842861533164978, 0.04097083956003189, -0.8615677952766418, 1.1219314336776733, 0.681459367275238, 0.4134008288383484, 0.15123453736305237, 1.601263165473938, 0.7132524847984314, -0.6421042680740356, 0.5052395462989807, 0.46678707003593445, -0.02825687825679779, -2.036572217941284, -0.9307274222373962, 0.3898893892765045, -0.34693828225135803, -1.5820653438568115, 1.4424915313720703, -1.1173095703125, -0.8287034630775452, 0.49446338415145874, 0.21625125408172607, 1.4630107879638672, 0.22446279227733612, 1.6218780279159546, 2.03488826751709, 0.8654758334159851, 0.33961260318756104, 1.2739338874816895, -0.16631236672401428, -0.48234596848487854, 1.7904635667800903, -0.33599358797073364, 0.47920194268226624, 1.0561769008636475, -0.4346224367618561, -1.0484410524368286, -0.7115657329559326, -1.0681374073028564, -0.5842170119285583, 1.159079670906067, 0.11707165837287903, -1.131990909576416, 0.11376354843378067, 1.4615987539291382, 0.1609775274991989, -0.31588420271873474, 0.5464901328086853, 0.48128339648246765, -0.7041161060333252, -0.0037193172611296177, -1.0025373697280884, 0.5343878269195557, -0.1953386664390564, -0.3068116009235382, 0.42039379477500916, 0.43617579340934753, 1.2515684366226196, -0.08240824937820435, 0.07421417534351349, 1.268536925315857, -1.3972121477127075, 1.4645248651504517, -0.5894941687583923, 0.14942696690559387, -2.4030449390411377, 1.5212668180465698, -0.807235836982727, 1.9432088136672974, -2.596022844314575, 0.31213507056236267, -0.7068957090377808, -0.329200804233551, 0.25355738401412964, -0.3483494222164154, 0.07973794639110565, -0.21432138979434967, -1.0196397304534912, -0.048466652631759644, -0.7895419001579285, 0.5189601182937622, 1.2428828477859497, 1.2003061771392822, -1.0866681337356567, -0.1882597804069519, -1.679229736328125, -0.19989854097366333, -0.7928135991096497, 0.41057005524635315, -2.1136581897735596, -0.22721438109874725, -1.9550583362579346, -2.405574083328247, -1.2803599834442139, -0.770732581615448, 1.0834180116653442, 0.21628108620643616, -0.8869925737380981, 1.191733479499817, -0.34844499826431274, -1.8067317008972168, 1.1073405742645264, -2.1427290439605713 ]
https://github.com/huggingface/datasets/issues/5474
Column project operation on `datasets.Dataset`
Hi ! This would be a nice addition indeed :) This sounds like a duplicate of https://github.com/huggingface/datasets/issues/5468 > Not sure. Some of my PRs are still open and some do not have any discussions. Sorry to hear that, feel free to ping me on those PRs
### Feature request There is no operation to select a subset of columns of original dataset. Expected API follows. ```python a = Dataset.from_dict({ 'int': [0, 1, 2] 'char': ['a', 'b', 'c'], 'none': [None] * 3, }) b = a.project('int', 'char') # usually, .select() print(a.column_names) # stdout: ['int', 'char', 'none'] print(b.column_names) # stdout: ['int', 'char'] ``` Method project can easily accept not only column names (as a `str)` but univariant function applied to corresponding column as an example. Or keyword arguments can be used in order to rename columns in advance (see `pandas`, `pyspark`, `pyarrow`, and SQL).. ### Motivation Projection is a typical operation in every data processing library. And it is a basic block of a well-known data manipulation language like SQL. Without this operation `datasets.Dataset` interface is not complete. ### Your contribution Not sure. Some of my PRs are still open and some do not have any discussions.
324
46
Column project operation on `datasets.Dataset` ### Feature request There is no operation to select a subset of columns of original dataset. Expected API follows. ```python a = Dataset.from_dict({ 'int': [0, 1, 2] 'char': ['a', 'b', 'c'], 'none': [None] * 3, }) b = a.project('int', 'char') # usually, .select() print(a.column_names) # stdout: ['int', 'char', 'none'] print(b.column_names) # stdout: ['int', 'char'] ``` Method project can easily accept not only column names (as a `str)` but univariant function applied to corresponding column as an example. Or keyword arguments can be used in order to rename columns in advance (see `pandas`, `pyspark`, `pyarrow`, and SQL).. ### Motivation Projection is a typical operation in every data processing library. And it is a basic block of a well-known data manipulation language like SQL. Without this operation `datasets.Dataset` interface is not complete. ### Your contribution Not sure. Some of my PRs are still open and some do not have any discussions. Hi ! This would be a nice addition indeed :) This sounds like a duplicate of https://github.com/huggingface/datasets/issues/5468 > Not sure. Some of my PRs are still open and some do not have any discussions. Sorry to hear that, feel free to ping me on those PRs
[ -1.145315408706665, -0.9957084059715271, -0.7484076023101807, 1.6048171520233154, -0.1513364017009735, -1.22935152053833, 0.025476552546024323, -1.0114284753799438, 1.7112200260162354, -0.7468509674072266, 0.2529119849205017, -1.71471107006073, -0.05852080509066582, -0.7319914698600769, -0.7105358839035034, -0.8772006630897522, -0.34754955768585205, -0.7686813473701477, 1.0627919435501099, 2.568000316619873, 1.1154825687408447, -1.4555177688598633, 2.681415319442749, 0.7480037212371826, -0.1336166113615036, -1.0251760482788086, 0.5083432793617249, 0.0015352265909314156, -1.2306632995605469, -0.47238942980766296, -0.9593135714530945, -0.05737050995230675, -0.5881438255310059, -0.5133853554725647, 0.008406090550124645, 0.46715205907821655, -0.2532605528831482, -0.47623687982559204, -0.5171781778335571, -0.7958173751831055, 0.40051549673080444, -0.47562140226364136, 0.8936128616333008, -0.29245010018348694, 1.8167051076889038, -0.48456794023513794, 0.3203621506690979, 0.6066333651542664, 1.4298945665359497, 0.21384449303150177, 0.050884004682302475, 0.36789971590042114, 0.3829537034034729, -0.03880671411752701, 0.5235996246337891, 1.0835853815078735, 0.6262891888618469, 0.42080944776535034, 0.8025787472724915, -2.292579174041748, 1.2880667448043823, -1.0137685537338257, 0.36857232451438904, 1.2866342067718506, -0.9066404700279236, 0.4261685609817505, -1.751278281211853, 0.020166974514722824, 0.6004116535186768, -2.1489908695220947, 0.2659865915775299, -1.2415896654129028, -0.4455014765262604, 0.9444047212600708, 0.3964537978172302, -1.2808276414871216, 0.13306455314159393, -0.4222995936870575, 1.060867428779602, 0.4514993131160736, 1.0538934469223022, -1.7797762155532837, -0.01747918128967285, -0.28893059492111206, 0.12650680541992188, -1.2590662240982056, -1.4720516204833984, 0.49479690194129944, 0.7471218109130859, 0.6705772280693054, -0.13165083527565002, 0.9013491868972778, -1.0565993785858154, 0.6388974785804749, -1.0021934509277344, -1.7556538581848145, -1.378163456916809, -2.2972412109375, -2.2799365520477295, 0.7622383236885071, -0.393989235162735, -0.4912916123867035, 1.9689699411392212, -0.8848691582679749, -1.8289332389831543, 1.1521506309509277, 0.36234623193740845, -0.036390695720911026, 2.43381929397583, 0.20138004422187805, -0.7817856073379517, 0.4375007152557373, -0.8237460255622864, 0.7534960508346558, -0.5608848929405212, 1.4564727544784546, 0.4222387671470642, -1.0213310718536377, 1.6231218576431274, -0.4653784930706024, 0.5276190638542175, -0.7330529093742371, -0.4353029727935791, -0.7762877345085144, 0.3948777914047241, 1.9232314825057983, -0.22988326847553253, 1.4955278635025024, -0.38437941670417786, -1.5727373361587524, -1.580371379852295, 0.8702070116996765, 0.4070904850959778, -0.8279387354850769, 0.09148992598056793, -0.38083091378211975, 0.18876376748085022, -0.04045775160193443, 1.133483648300171, 1.2342103719711304, 0.7195057272911072, -0.29106876254081726, -0.9100660681724548, 0.22742179036140442, -0.12040284276008606, -0.7397406697273254, -1.7976093292236328, -0.33544036746025085, 0.11504005640745163, 0.6111925840377808, -1.2251049280166626, 1.6858108043670654, 0.9067646265029907, 1.9387232065200806, 1.0144059658050537, -0.38802215456962585, 1.6220695972442627, 0.06436730176210403, 1.9125548601150513, -0.5913848280906677, 0.6925501227378845, -0.40913620591163635, -1.1662737131118774, 0.815430223941803, -0.3130285441875458, -1.9843286275863647, -0.7290865182876587, -0.8325208425521851, -0.1822853535413742, -0.7629339098930359, 0.8361123204231262, -0.301178902387619, -1.4208159446716309, 0.24286504089832306, -0.8309351205825806, 0.1645706743001938, -1.1560741662979126, 0.2810414433479309, 0.8396999835968018, -0.5604171752929688, 0.1667434275150299, -0.32895275950431824, -1.2949475049972534, -0.506847620010376, 0.3771543502807617, 1.8713912963867188, -0.7947400808334351, 0.7590281367301941, 1.0922480821609497, -0.6576281189918518, 0.013473122380673885, 0.3233667016029358, -0.24854087829589844, 0.821916401386261, -1.0628645420074463, -0.4930266737937927, 1.3204948902130127, -0.19671925902366638, -0.6110670566558838, 1.4443923234939575, 0.8913630843162537, -0.9646208882331848, -0.15214015543460846, -0.20258481800556183, -0.7771387100219727, 0.03086593747138977, -1.630171537399292, -0.04669062793254852, 0.4609198570251465, -1.5102163553237915, -0.4792804419994354, -0.25725167989730835, 1.2627164125442505, -0.03840487077832222, 1.3133630752563477, -0.3575875163078308, -0.18063169717788696, -0.36730247735977173, -0.4574219882488251, 0.19228647649288177, -0.39617231488227844, -0.5711736679077148, 0.1762002408504486, -0.6971461772918701, 0.37563249468803406, 1.4146705865859985, 0.35197070240974426, 0.1359245330095291, 0.5814070105552673, 1.1030064821243286, 0.35435765981674194, 0.020678605884313583, -0.7533124089241028, -1.5461112260818481, 1.9654005765914917, -1.4748636484146118, 2.026883840560913, 0.7142482399940491, 0.07534875720739365, -1.7373237609863281, -1.9006260633468628, 1.31093430519104, 1.0888694524765015, 2.275543451309204, 0.6504385471343994, 0.3613823652267456, -0.9377878904342651, -0.6369783282279968, 0.2838377058506012, -0.9922007918357849, -0.7858350872993469, 0.13184396922588348, 2.4010305404663086, 1.8001471757888794, -0.47675466537475586, -0.19013024866580963, -1.038102149963379, 1.6232861280441284, -0.2471403330564499, 0.21170318126678467, 1.9833977222442627, -0.16970624029636383, -1.0877296924591064, 1.2461633682250977, -2.404013156890869, 0.15412236750125885, 1.9591313600540161, 0.27932578325271606, 0.15376698970794678, -1.4515421390533447, -0.7653526067733765, -0.24518811702728271, -0.299591064453125, -1.29182767868042, 0.5047699213027954, -0.30226731300354004, -0.7766724228858948, -1.5487968921661377, 0.2188204675912857, -1.0650830268859863, -1.619981050491333, 0.18463122844696045, 1.957594394683838, 2.0152506828308105, -0.7669957280158997, 1.7047899961471558, -0.09040903300046921, 0.21927480399608612, 1.2795934677124023, 1.1897376775741577, 3.049832582473755, 1.907124638557434, -1.1694413423538208, 0.6445649862289429, -0.1748235672712326, -0.44435906410217285, 1.1693000793457031, -1.1798416376113892, 1.1943249702453613, -0.15834537148475647, -1.1614786386489868, -1.2124031782150269, 0.9594355821609497, 0.5750604271888733, -0.027805060148239136, -0.4589678645133972, 1.200037956237793, -0.08544454723596573, 1.3058818578720093, 0.5757457613945007, -0.3359793722629547, 0.5271426439285278, -0.3523869216442108, -0.5482997298240662, 1.5379761457443237, 0.2505452036857605, -1.3897316455841064, -2.2094669342041016, -0.22862829267978668, -0.8019937872886658, -0.05535360053181648, -0.6202277541160583, -1.0275439023971558, 1.628447413444519, 0.39070969820022583, -1.236956000328064, -0.15380354225635529, -0.2963181436061859, -0.5762569308280945, 2.7136383056640625, -1.3725656270980835, -0.37194082140922546, -0.9182623028755188, -0.5126363635063171, 1.5902025699615479, -1.1487171649932861, -0.1592119038105011, -0.9612607955932617, -0.5084171891212463, -1.2574375867843628, -0.5965093970298767, -0.016794275492429733, -0.9160481691360474, 0.8841823935508728, 0.2380022257566452, -1.2387504577636719, -0.36668407917022705, -0.9247897267341614, 0.8716298341751099, -0.10379386693239212, 0.28168559074401855, 1.9361283779144287, 0.44347134232521057, -0.3512771427631378, 0.797986626625061, 1.122297763824463, 0.5849432349205017, -0.6033537983894348, 0.33117765188217163, -0.6003117561340332, 0.3117184042930603, -1.2964880466461182, 0.28812065720558167, -2.912393093109131, 0.6238365769386292, 0.0027870312333106995, -0.1502496600151062, -0.011728743091225624, -1.2754199504852295, 1.1340240240097046, 2.6062581539154053, -1.2450867891311646, 0.5305448174476624, 0.2274705171585083, 1.3482654094696045, -1.6858059167861938, 0.33671945333480835, -0.2959303855895996, 2.1364927291870117, 0.10476475208997726, 1.1730893850326538, -0.4206055998802185, -2.4053454399108887, 0.5301696062088013, -1.4001039266586304, -1.0333290100097656, 0.6390466094017029, -0.9313953518867493, 0.009942646138370037, -1.4812248945236206, -0.1902417689561844, -0.8661190271377563, -1.2439285516738892, 0.6962541341781616, 0.15494291484355927, 0.4194054901599884, -0.5820033550262451, 0.42806923389434814, -2.0828044414520264, -1.4398465156555176, -0.22739249467849731, -0.9246976375579834, 0.4925791919231415, -0.26433825492858887, 0.6852567195892334, -0.24680951237678528, -0.07009530812501907, 0.3267892599105835, 1.4717073440551758, 3.432929515838623, 0.1640322059392929, 0.4014850854873657, -0.1518482267856598, -0.9324663877487183, 1.350615382194519, 0.9099196195602417, -0.17437735199928284, -0.5490515232086182, -1.0814886093139648, 1.3704402446746826, 2.005249261856079, 1.0247766971588135, -0.0028501790948212147, -0.7256510853767395, -0.7306253910064697, -0.03552974388003349, 0.20565001666545868, 0.46515771746635437, 0.8156763911247253, 0.04793114215135574, 0.0027398522943258286, 1.4098477363586426, 1.2443253993988037, -0.49884510040283203, 0.4141335189342499, -0.8561168313026428, -0.4563712477684021, 0.49803510308265686, 0.2083849310874939, -0.09666040539741516, 0.24702177941799164, -1.0753676891326904, -0.2522262632846832, -0.33081674575805664, -0.8162316083908081, -0.6953614354133606, -0.4916580021381378, -0.33958059549331665, 1.6076372861862183, 0.187240332365036, -0.6192553639411926, -0.06579335033893585, -0.6530401706695557, -0.0580071397125721, -1.0035263299942017, 0.179720938205719, -0.13547265529632568, -0.09046561270952225, -0.11597294360399246, 1.766714334487915, -0.9548283219337463, -2.133035182952881, 0.17643260955810547, 0.25827881693840027, -0.3305944800376892, 0.29114487767219543, 1.6697607040405273, 0.5792223215103149, 1.3911126852035522, 1.3724799156188965, 0.9908847212791443, -0.7742099761962891, -1.3384957313537598, 0.6768730282783508, 0.9748374223709106, -1.344456672668457, 0.854527473449707, 0.07409687340259552, -0.48795217275619507, 0.6367375254631042, 1.3595833778381348, 0.4783342778682709, -1.9482544660568237, 0.7558450698852539, -1.0071399211883545, 0.8757407665252686, 0.7197971343994141, 0.7066818475723267, 0.19688567519187927, 0.7207694053649902, -1.299413800239563, -1.1695324182510376, -0.8395513892173767, -0.7909784317016602, 1.906111240386963, -0.21070343255996704, 0.5450844168663025, -0.05510807782411575, -1.3861700296401978, -0.14096686244010925, 0.656711995601654, 0.3913290500640869, -0.5300057530403137, 0.7943316102027893, -0.708726704120636, -1.1250821352005005, -1.382887601852417, -0.5296506285667419, -1.035318374633789, -0.9565796256065369, 1.0056995153427124, 0.8897735476493835, 0.2554662823677063, 1.8258596658706665, 0.6444715857505798, 0.21253986656665802, -2.565617561340332, 0.8812664151191711, 0.3542824983596802, -0.08767005056142807, 0.7233926653862, 0.3359668552875519, 1.0151668787002563, -0.07163124531507492, 0.5573202967643738, -2.342211961746216, 2.274538040161133, -0.23494502902030945, 0.780276894569397, -0.041630081832408905, -0.04467035084962845, 1.0350186824798584, 0.47482651472091675, 0.5859723091125488, -1.0480620861053467, 0.6051919460296631, -0.5255283117294312, 1.2686234712600708, 0.8752743005752563, -0.8140897750854492, -0.11498577147722244, 1.2986677885055542, 0.4035535156726837, -0.6906557679176331, -0.9787737727165222, -0.946804940700531, 0.9234825372695923, 1.6954580545425415, -0.13858561217784882, -0.025161156430840492, 0.9154253005981445, 0.5317820310592651, -1.3410476446151733, -0.037681348621845245, -0.7281344532966614, -0.6334140300750732, 1.7147562503814697, 2.0601277351379395, -0.26236820220947266, -0.19482353329658508, -0.7389698028564453, -1.2842347621917725, 0.6802933216094971, 0.019904568791389465, 0.01889665797352791, 0.6867419481277466, -0.5967409014701843, 1.0395041704177856, 0.8436967730522156, 0.9019099473953247, 0.22212649881839752, 0.25953438878059387, 0.42216989398002625, -0.4173129200935364, -1.1757707595825195, -0.2580224275588989, -1.2040044069290161, -2.4808974266052246, 0.3928426504135132, -0.16911068558692932, -1.3956048488616943, 0.03519809618592262, -1.012285590171814, 1.0258527994155884, -0.4989793002605438, -1.1085768938064575, -1.3374323844909668, 0.27396899461746216, -0.06871213763952255, 0.8339823484420776, -1.6504461765289307, 0.004169167019426823, 1.2461278438568115, 0.9401131272315979, -0.7527583241462708, 1.018198013305664, 0.2754671275615692, 1.164818525314331, 0.9209868311882019, -0.3228064775466919, 0.4836679995059967, -0.04176536574959755, -1.2844864130020142, 0.5246500968933105, 1.1556802988052368, 0.10036454349756241, 1.4067550897598267, -0.5306222438812256, -0.11137637495994568, 0.3139129877090454, -0.5168472528457642, -0.35643988847732544, -0.5123553276062012, 0.6044896245002747, 0.0775361955165863, -0.8790075778961182, 0.07178428024053574, 0.06990903615951538, -0.2516995668411255, 0.22154869139194489, -1.5876991748809814, -0.22796815633773804, -0.2806304693222046, -0.47814688086509705, -1.1963095664978027, -0.0993158370256424, 1.3536354303359985, -0.6371957063674927, -0.2663326561450958, 0.5857368111610413, 0.3795134127140045, 0.6024016737937927, 0.6418282389640808, -0.6320560574531555, -0.3948171138763428, -0.20800980925559998, -0.38378188014030457, 0.3099138140678406, 1.4003803730010986, -0.14845699071884155, -0.953584611415863, 0.7674949169158936, -0.4398098886013031, 0.061515651643276215, 1.797942876815796, 0.049734894186258316, -0.9026403427124023, 0.2133794128894806, -0.7539394497871399, 2.008603096008301, 1.7709200382232666, 1.2872467041015625, -0.15384721755981445, -0.940600574016571, 0.7318825125694275, -0.35214412212371826, -0.4007565677165985, 0.8208659887313843, 0.44809725880622864, -0.26266005635261536, -1.352163553237915, 0.6564913392066956, 1.1924442052841187, -0.8170210719108582, -0.8950716257095337, 0.07132568210363388, -0.7386927008628845, 1.0946142673492432, 0.8026077747344971, 0.3867245316505432, 0.2872309982776642, 1.6964571475982666, 0.8096829652786255, -0.4914509654045105, 0.5368489623069763, 0.5084709525108337, -0.20992514491081238, -2.1098291873931885, -1.2411388158798218, 0.26311221718788147, -0.44869986176490784, -1.6676013469696045, 1.254893183708191, -1.1336166858673096, -0.8546473383903503, 0.6158134341239929, 0.05880682170391083, 1.4523794651031494, 0.3500320613384247, 1.4609887599945068, 2.0671749114990234, 0.861553966999054, 0.36934611201286316, 1.2813020944595337, -0.18019993603229523, -0.4520592987537384, 1.8359711170196533, -0.41280391812324524, 0.5106022953987122, 1.0642964839935303, -0.2862197458744049, -1.1070975065231323, -0.7148729562759399, -1.2028472423553467, -0.6720914840698242, 1.16864812374115, 0.14259810745716095, -1.1603440046310425, 0.27943113446235657, 1.6165122985839844, 0.029912762343883514, -0.3788890540599823, 0.6306380033493042, 0.46316900849342346, -0.8386684060096741, -0.044859882444143295, -0.9148877263069153, 0.43236592411994934, -0.20759545266628265, -0.26294663548469543, 0.49347105622291565, 0.4243553876876831, 1.2882832288742065, 0.1436154842376709, 0.17470428347587585, 1.0802273750305176, -1.3981226682662964, 1.4547399282455444, -0.746991753578186, 0.3252803683280945, -2.3754851818084717, 1.3790396451950073, -0.7371470928192139, 1.9683923721313477, -2.7285289764404297, 0.4570143520832062, -0.5568652153015137, -0.4821127653121948, 0.2808806598186493, -0.34586262702941895, 0.11066611856222153, -0.0809590220451355, -1.1905581951141357, -0.042205795645713806, -0.6310302019119263, 0.46000009775161743, 1.125805377960205, 1.338402271270752, -1.0691481828689575, -0.22454006969928741, -1.731126070022583, -0.17759710550308228, -0.6936092972755432, 0.3338823914527893, -2.0089828968048096, -0.23615208268165588, -1.8184434175491333, -2.285268545150757, -1.2863887548446655, -0.7601588368415833, 1.1348941326141357, 0.06950060278177261, -0.865884006023407, 1.2680699825286865, -0.31352856755256653, -1.8732792139053345, 1.0345348119735718, -2.1360440254211426 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
Hi! I agree it would be nice to have a method like that. Instead of `keep_columns`, we can name it `select_columns` to be more aligned with PyArrow's naming convention (`pa.Table.select`).
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
30
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - Hi! I agree it would be nice to have a method like that. Instead of `keep_columns`, we can name it `select_columns` to be more aligned with PyArrow's naming convention (`pa.Table.select`).
[ -1.1291453838348389, -0.8903515338897705, -0.7809796929359436, 1.5449533462524414, -0.03898512199521065, -1.2388007640838623, 0.24319131672382355, -1.049644112586975, 1.6578035354614258, -0.8081666231155396, 0.3863639533519745, -1.6128418445587158, 0.09286542981863022, -0.7118729948997498, -0.7190418243408203, -0.7643917798995972, -0.4565732479095459, -0.6416263580322266, 0.973964273929596, 2.503964424133301, 1.2538710832595825, -1.3580152988433838, 2.70219349861145, 0.6558758020401001, -0.03443038463592529, -1.0052614212036133, 0.4879789352416992, 0.05734176188707352, -1.2905850410461426, -0.4684077501296997, -0.7772782444953918, -0.20861096680164337, -0.5207818150520325, -0.5121423006057739, -0.062337759882211685, 0.562788188457489, -0.3464084565639496, -0.47752827405929565, -0.5218562483787537, -0.7820927500724792, 0.481395959854126, -0.40734025835990906, 0.9799996614456177, -0.3862420618534088, 1.825683355331421, -0.6456462740898132, 0.5073463916778564, 0.6797603368759155, 1.3276735544204712, 0.2666020393371582, -0.045343849807977676, 0.2832861840724945, 0.4506166875362396, -0.027581829577684402, 0.5931680798530579, 1.111457109451294, 0.700546383857727, 0.5928364992141724, 0.6977214217185974, -2.232438087463379, 1.2649604082107544, -0.9768354296684265, 0.2964428961277008, 1.3204524517059326, -0.9159483909606934, 0.31687313318252563, -1.7880644798278809, -0.08951771259307861, 0.5932455062866211, -2.2862632274627686, 0.2665543258190155, -1.3092478513717651, -0.5035302639007568, 1.033901333808899, 0.36386606097221375, -1.2202153205871582, 0.08653796464204788, -0.3695833086967468, 1.052436351776123, 0.36086297035217285, 1.0260499715805054, -1.6442971229553223, 0.014618144370615482, -0.3190670907497406, 0.11330708861351013, -1.2393006086349487, -1.4665766954421997, 0.5203486680984497, 0.5936006903648376, 0.553622305393219, 0.0038366103544831276, 0.9940770268440247, -1.067353367805481, 0.821545422077179, -1.0959267616271973, -1.6098119020462036, -1.3914395570755005, -2.1615028381347656, -2.3825175762176514, 0.7590159773826599, -0.4532521665096283, -0.4764004051685333, 1.8732810020446777, -0.9137212634086609, -1.7119802236557007, 1.1387063264846802, 0.2289140671491623, 0.018026649951934814, 2.3415775299072266, 0.15819582343101501, -0.6762325763702393, 0.4736357629299164, -0.7987306118011475, 0.7790214419364929, -0.5023547410964966, 1.3018982410430908, 0.48298361897468567, -1.1232162714004517, 1.6216223239898682, -0.464230477809906, 0.5855162143707275, -0.7459141612052917, -0.5714085102081299, -0.7631518840789795, 0.3801974058151245, 1.9892464876174927, -0.20394332706928253, 1.5669447183609009, -0.27891066670417786, -1.5052028894424438, -1.5688599348068237, 0.9864786863327026, 0.39766058325767517, -0.7801814675331116, 0.18204696476459503, -0.4171745181083679, 0.19022531807422638, -0.12806254625320435, 1.136504888534546, 1.2980486154556274, 0.7829098701477051, -0.3417290449142456, -0.7495299577713013, 0.20264197885990143, -0.07640867680311203, -0.7442063689231873, -1.7955777645111084, -0.29331594705581665, 0.07826007902622223, 0.5183836221694946, -1.1542092561721802, 1.7248756885528564, 0.7970419526100159, 1.959740161895752, 0.9208370447158813, -0.27235546708106995, 1.5258688926696777, 0.11267192661762238, 1.9038727283477783, -0.49836406111717224, 0.6541226506233215, -0.4371090233325958, -1.1192277669906616, 0.8460298180580139, -0.4048786163330078, -2.043545722961426, -0.812138557434082, -0.7187936305999756, -0.07873351871967316, -0.8104754686355591, 0.853269636631012, -0.17435570061206818, -1.4754724502563477, 0.2528505027294159, -0.7506001591682434, 0.11448534578084946, -1.302346110343933, 0.3981632590293884, 0.7676769495010376, -0.7427199482917786, 0.11313244700431824, -0.24043604731559753, -1.2289751768112183, -0.42991799116134644, 0.248857781291008, 1.9258265495300293, -0.7485379576683044, 0.8396142721176147, 1.00459623336792, -0.6658085584640503, -0.004652529489248991, 0.23336051404476166, -0.3708573579788208, 0.8169927000999451, -1.1899534463882446, -0.40958327054977417, 1.2697359323501587, -0.2247970849275589, -0.5492119193077087, 1.5218148231506348, 0.7683388590812683, -1.004220724105835, -0.124176524579525, -0.08964566886425018, -0.8159632086753845, 0.09651646018028259, -1.5943400859832764, -0.046743448823690414, 0.41127192974090576, -1.4646055698394775, -0.493440181016922, -0.11978235095739365, 1.2694247961044312, -0.23184604942798615, 1.4844450950622559, -0.36598441004753113, -0.20910699665546417, -0.35653790831565857, -0.32713451981544495, 0.013845742680132389, -0.23870816826820374, -0.7157155871391296, 0.11440162360668182, -0.6712753176689148, 0.3432586193084717, 1.3929084539413452, 0.2915259897708893, 0.07107065618038177, 0.47704222798347473, 1.1555724143981934, 0.33874255418777466, 0.06213250011205673, -0.8444539308547974, -1.4363940954208374, 1.987121343612671, -1.4360979795455933, 2.068654775619507, 0.7806095480918884, -0.05758524313569069, -1.7450388669967651, -1.8108190298080444, 1.3491650819778442, 1.0828415155410767, 2.335563898086548, 0.5108553171157837, 0.41066282987594604, -0.9154261946678162, -0.6860198974609375, 0.31096526980400085, -0.9598935842514038, -0.7437536120414734, 0.18443913757801056, 2.373600721359253, 1.6585561037063599, -0.4716213047504425, -0.23886026442050934, -0.9946756362915039, 1.4226659536361694, -0.28568458557128906, 0.19469356536865234, 2.0471177101135254, -0.18338292837142944, -1.1151654720306396, 1.311230182647705, -2.38248872756958, 0.16468295454978943, 2.0310792922973633, 0.3569456934928894, 0.1312873810529709, -1.3934857845306396, -0.7088145017623901, -0.32754644751548767, -0.33860740065574646, -1.204369306564331, 0.4980316758155823, -0.268456369638443, -0.792952835559845, -1.4448827505111694, 0.2311779260635376, -1.0787140130996704, -1.5743778944015503, 0.20661897957324982, 1.8688199520111084, 1.95075523853302, -0.6801599860191345, 1.5158237218856812, -0.21486896276474, 0.13124853372573853, 1.3262823820114136, 1.2202813625335693, 3.1344797611236572, 1.8596972227096558, -1.2206566333770752, 0.645052969455719, -0.23670518398284912, -0.5775838494300842, 1.2405794858932495, -1.1590198278427124, 1.2434412240982056, -0.21896889805793762, -1.193786859512329, -1.2906345129013062, 0.9039225578308105, 0.4795607328414917, 0.05626317858695984, -0.4627697169780731, 1.2341408729553223, 0.11687594652175903, 1.3841782808303833, 0.6214393377304077, -0.3547540009021759, 0.625022292137146, -0.4588201642036438, -0.4732810854911804, 1.5602999925613403, 0.2639352083206177, -1.4278064966201782, -2.3027231693267822, -0.083309605717659, -0.87436842918396, 0.021626096218824387, -0.6380379796028137, -1.1049423217773438, 1.7442471981048584, 0.4135821759700775, -1.3091617822647095, -0.3270223140716553, -0.2768445611000061, -0.5793066620826721, 2.7418158054351807, -1.4081155061721802, -0.32865145802497864, -0.9200915098190308, -0.6879482865333557, 1.7846096754074097, -1.1703683137893677, -0.23012655973434448, -0.9872556924819946, -0.5164593458175659, -1.180710792541504, -0.5276721119880676, 0.009693573229014874, -0.8906902074813843, 0.8691672682762146, 0.20153287053108215, -1.2838627099990845, -0.3887098431587219, -0.8744874000549316, 0.7793782353401184, -0.09518127888441086, 0.30876851081848145, 1.8489084243774414, 0.38435885310173035, -0.44838041067123413, 0.7759500741958618, 1.1375519037246704, 0.576927125453949, -0.6501734852790833, 0.30124202370643616, -0.5762675404548645, 0.2978256642818451, -1.2653436660766602, 0.30850836634635925, -2.8351807594299316, 0.6076182126998901, -0.03876886144280434, -0.10909346491098404, -0.05299929901957512, -1.358764410018921, 1.0318591594696045, 2.5657618045806885, -1.143498420715332, 0.5176084637641907, 0.2721961736679077, 1.259681224822998, -1.636614441871643, 0.3632775545120239, -0.35946401953697205, 2.096330404281616, 0.20803868770599365, 1.2383195161819458, -0.4752889573574066, -2.3207626342773438, 0.6862346529960632, -1.337138056755066, -1.3069864511489868, 0.8363966941833496, -0.9121795892715454, 0.016797859221696854, -1.3764818906784058, -0.27625370025634766, -0.8178567290306091, -1.3076330423355103, 0.7158564329147339, 0.11149609833955765, 0.4308369755744934, -0.5097989439964294, 0.27543631196022034, -2.2338707447052, -1.3833847045898438, -0.20871157944202423, -0.9495859146118164, 0.3431454598903656, -0.4502677917480469, 0.7077263593673706, -0.18125690519809723, -0.0389154888689518, 0.29670655727386475, 1.4482334852218628, 3.4878945350646973, 0.22308975458145142, 0.3971004784107208, -0.3515872359275818, -0.9070876240730286, 1.4606167078018188, 0.930468738079071, -0.19491606950759888, -0.6056428551673889, -0.9784886837005615, 1.242111325263977, 1.9017748832702637, 0.9591884613037109, 0.017691150307655334, -0.7777838110923767, -0.6492376327514648, -0.20044821500778198, 0.06003700941801071, 0.38997429609298706, 0.9635176062583923, 0.20092163980007172, 0.11767525970935822, 1.3105779886245728, 1.25155508518219, -0.4253237247467041, 0.29421305656433105, -0.7849244475364685, -0.36576998233795166, 0.5721927881240845, 0.31134310364723206, -0.05464805290102959, 0.27138349413871765, -0.938685417175293, -0.22632166743278503, -0.4231303334236145, -0.9219417572021484, -0.7134253978729248, -0.4967443645000458, -0.33249378204345703, 1.7094420194625854, 0.09044960886240005, -0.5037331581115723, -0.11025670170783997, -0.871219277381897, -0.1737884283065796, -1.063207745552063, 0.19360803067684174, -0.11815550178289413, -0.21684019267559052, -0.003636313136667013, 1.8751002550125122, -1.0115184783935547, -2.150250196456909, 0.1935732215642929, 0.23201324045658112, -0.27548226714134216, 0.18770480155944824, 1.606180191040039, 0.4279927909374237, 1.419874906539917, 1.3242379426956177, 0.9538715481758118, -0.6586378216743469, -1.3660932779312134, 0.6015795469284058, 0.987461268901825, -1.5365338325500488, 0.7226535677909851, 0.05841682106256485, -0.3762094974517822, 0.6063879728317261, 1.2745009660720825, 0.5314991474151611, -1.883934736251831, 0.682094156742096, -0.8889439702033997, 0.8433312773704529, 0.7479673027992249, 0.5775157809257507, 0.35454481840133667, 0.7694050669670105, -1.187676191329956, -1.1188859939575195, -0.6928742527961731, -0.7400535345077515, 1.8969736099243164, -0.3653453588485718, 0.5851772427558899, -0.029932934790849686, -1.372194528579712, -0.012510462664067745, 0.8735462427139282, 0.3876362144947052, -0.47896018624305725, 0.7644164562225342, -0.6482100486755371, -1.0208128690719604, -1.3678659200668335, -0.49691957235336304, -1.0874723196029663, -1.0337475538253784, 1.0602174997329712, 0.7961028814315796, 0.2904035151004791, 1.8169498443603516, 0.7552716732025146, 0.31610554456710815, -2.6277055740356445, 0.8236637711524963, 0.25733786821365356, -0.04102366790175438, 0.8985753655433655, 0.43304112553596497, 1.0671839714050293, -0.06835532933473587, 0.5754472017288208, -2.57617449760437, 2.419280529022217, -0.21218590438365936, 0.5998552441596985, -0.06815635412931442, -0.2875187397003174, 1.0921672582626343, 0.5415775179862976, 0.4693536162376404, -1.148868441581726, 0.6892333030700684, -0.5951066017150879, 1.2861799001693726, 0.8732438087463379, -0.8403844833374023, -0.13080056011676788, 1.375554084777832, 0.41237926483154297, -0.5574056506156921, -0.9041184186935425, -0.9931382536888123, 0.9787394404411316, 1.7380619049072266, -0.07225655764341354, 0.0010882364585995674, 0.9465025663375854, 0.5880985260009766, -1.2006994485855103, 0.08110544085502625, -0.7606375813484192, -0.779120683670044, 1.7024980783462524, 2.045657157897949, -0.11957529187202454, -0.20814722776412964, -0.7060203552246094, -1.3373154401779175, 0.7783560156822205, -0.021170586347579956, 0.06582237035036087, 0.5622362494468689, -0.6843656897544861, 1.0644203424453735, 0.8551636338233948, 0.9634770154953003, 0.1219930499792099, 0.33838939666748047, 0.4941142797470093, -0.39638078212738037, -1.2386767864227295, -0.36418572068214417, -1.180702805519104, -2.5497775077819824, 0.4906597137451172, -0.3383491337299347, -1.3798089027404785, 0.0019496576860547066, -0.9970898628234863, 0.9177948832511902, -0.6203344464302063, -1.1568753719329834, -1.5055642127990723, 0.1604292243719101, -0.04043712094426155, 0.9152629375457764, -1.584215760231018, -0.17674671113491058, 1.2228435277938843, 0.8608738780021667, -0.6726636290550232, 0.8820812106132507, 0.23312784731388092, 1.0445502996444702, 0.848692774772644, -0.3378632068634033, 0.5509341955184937, -0.04497764632105827, -1.3288822174072266, 0.607103705406189, 1.2118502855300903, 0.16465193033218384, 1.5742844343185425, -0.44591662287712097, -0.03746016323566437, 0.3194844126701355, -0.5253832936286926, -0.5251107215881348, -0.6454503536224365, 0.7017114758491516, 0.10734390467405319, -0.9182218909263611, 0.027985669672489166, 0.0648932084441185, -0.2392585128545761, 0.09027055650949478, -1.4551386833190918, -0.05779365077614784, -0.2760719656944275, -0.7529466152191162, -1.2269333600997925, -0.07950764894485474, 1.3249638080596924, -0.7306064367294312, -0.17538070678710938, 0.46939387917518616, 0.3649575412273407, 0.5313481092453003, 0.4539163410663605, -0.668653130531311, -0.3657938539981842, -0.29757392406463623, -0.30655452609062195, 0.31730732321739197, 1.3603119850158691, -0.044951293617486954, -0.9886069297790527, 0.7678987383842468, -0.35751092433929443, 0.00848743598908186, 1.9374662637710571, 0.10552553087472916, -0.7271074652671814, 0.3311111032962799, -0.6292067170143127, 2.0263173580169678, 1.8001211881637573, 1.314591884613037, -0.13409475982189178, -0.8885941505432129, 0.6670193076133728, -0.40914881229400635, -0.3193433880805969, 0.8214518427848816, 0.3590209186077118, -0.15139393508434296, -1.519228219985962, 0.769308865070343, 1.2037943601608276, -0.8249648213386536, -0.7441601753234863, 0.09484509378671646, -0.7922531962394714, 1.1216974258422852, 0.610193133354187, 0.4055482745170593, 0.30355867743492126, 1.65860116481781, 0.6976192593574524, -0.34778574109077454, 0.5250371098518372, 0.5437906980514526, -0.154844269156456, -2.0868711471557617, -1.282063603401184, 0.3460324704647064, -0.5903207659721375, -1.5771456956863403, 1.4449886083602905, -1.0652204751968384, -0.9359187483787537, 0.5347711443901062, 0.08006172627210617, 1.473526120185852, 0.36670657992362976, 1.5383174419403076, 2.0442593097686768, 0.8576275110244751, 0.35652613639831543, 1.2144668102264404, -0.19509653747081757, -0.5171579718589783, 1.8796589374542236, -0.44139519333839417, 0.4543788731098175, 1.0761767625808716, -0.30110493302345276, -1.1614395380020142, -0.7434122562408447, -1.2588063478469849, -0.7497194409370422, 1.183804988861084, 0.09109234064817429, -1.0528761148452759, 0.21636192500591278, 1.6169837713241577, 0.08351399004459381, -0.3261350393295288, 0.6287761330604553, 0.36973005533218384, -0.8221210241317749, -0.016869304701685905, -0.9099105000495911, 0.5779542326927185, -0.267245352268219, -0.33463573455810547, 0.4318475127220154, 0.4833669662475586, 1.3204126358032227, -0.1062566414475441, 0.01300585176795721, 1.1070603132247925, -1.5117566585540771, 1.4595876932144165, -0.6540135145187378, 0.2513776421546936, -2.286005735397339, 1.3751330375671387, -0.7400586605072021, 1.840600609779358, -2.6634769439697266, 0.4273785948753357, -0.5930752158164978, -0.3683018684387207, 0.3102151155471802, -0.3397373855113983, 0.12360446155071259, -0.14959348738193512, -1.1424932479858398, -0.02998967096209526, -0.6709043383598328, 0.5316245555877686, 1.0757936239242554, 1.2897976636886597, -1.1974555253982544, -0.2718369960784912, -1.6390882730484009, -0.09963836520910263, -0.6479666829109192, 0.22472365200519562, -1.9677492380142212, -0.13368836045265198, -1.993635654449463, -2.2066659927368164, -1.335678219795227, -0.7029691934585571, 1.083528757095337, 0.11595536768436432, -0.8310328125953674, 1.2936691045761108, -0.3537694215774536, -1.837550163269043, 1.0706514120101929, -2.034372568130493 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
Hi, I am a newbie to open source and would like to contribute. @mariosasko can I take up this issue ?
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
21
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - Hi, I am a newbie to open source and would like to contribute. @mariosasko can I take up this issue ?
[ -1.154079556465149, -0.9099525809288025, -0.8128042817115784, 1.554242491722107, -0.06166444718837738, -1.2450250387191772, 0.19262157380580902, -1.0791751146316528, 1.5956411361694336, -0.8156757950782776, 0.38709521293640137, -1.5716898441314697, 0.083161361515522, -0.7508717775344849, -0.6981855630874634, -0.8359572887420654, -0.44832417368888855, -0.6536073684692383, 0.9584395885467529, 2.529475212097168, 1.2294812202453613, -1.3035317659378052, 2.7473864555358887, 0.7144804000854492, -0.06385185569524765, -0.97625333070755, 0.5306081771850586, 0.05047665908932686, -1.2473217248916626, -0.43612369894981384, -0.7856448292732239, -0.20390023291110992, -0.5156433582305908, -0.49098438024520874, -0.07871951907873154, 0.5606641173362732, -0.32237860560417175, -0.46854984760284424, -0.5262094140052795, -0.7616426348686218, 0.5221449136734009, -0.4005718529224396, 0.9700398445129395, -0.37417250871658325, 1.8410078287124634, -0.6442013382911682, 0.4802352786064148, 0.6679609417915344, 1.3048341274261475, 0.22998930513858795, -0.051619041711091995, 0.2667686641216278, 0.44384801387786865, -0.04527110978960991, 0.5565903186798096, 1.1029434204101562, 0.668731153011322, 0.6335903406143188, 0.7342870235443115, -2.200953245162964, 1.283551812171936, -0.9791032671928406, 0.29284682869911194, 1.3344632387161255, -0.9500032663345337, 0.3512190580368042, -1.7942349910736084, -0.07656573504209518, 0.5718592405319214, -2.3028674125671387, 0.24453319609165192, -1.3201476335525513, -0.5644963383674622, 1.0124799013137817, 0.3954640328884125, -1.2417532205581665, 0.06848196685314178, -0.3856208622455597, 1.0647364854812622, 0.41038778424263, 1.0117839574813843, -1.656739354133606, 0.025400880724191666, -0.3034762442111969, 0.09100423008203506, -1.3018929958343506, -1.4430034160614014, 0.5289331674575806, 0.5721836090087891, 0.5395819544792175, 0.03560826554894447, 0.9984477758407593, -1.0402019023895264, 0.8247758746147156, -1.0503513813018799, -1.5777662992477417, -1.4191488027572632, -2.2177364826202393, -2.3915045261383057, 0.7405909895896912, -0.4539976716041565, -0.49166032671928406, 1.8645135164260864, -0.9502281546592712, -1.7030463218688965, 1.1768906116485596, 0.18201583623886108, 0.016815301030874252, 2.3543927669525146, 0.18896566331386566, -0.7037127614021301, 0.4872835576534271, -0.7963640689849854, 0.7858697175979614, -0.5116621255874634, 1.3074856996536255, 0.49379003047943115, -1.0844374895095825, 1.6385976076126099, -0.4812522828578949, 0.5905832648277283, -0.7135282158851624, -0.5716736316680908, -0.7875341176986694, 0.3980330228805542, 1.947730541229248, -0.20025445520877838, 1.5744870901107788, -0.2780105173587799, -1.485618233680725, -1.5573523044586182, 0.9911885261535645, 0.4167763590812683, -0.7767297625541687, 0.21400323510169983, -0.4038563370704651, 0.14545735716819763, -0.11537325382232666, 1.1345393657684326, 1.3198803663253784, 0.7483099699020386, -0.3440204858779907, -0.7636650204658508, 0.21232417225837708, -0.06699046492576599, -0.7721513509750366, -1.8024728298187256, -0.2858591079711914, 0.08818108588457108, 0.5511390566825867, -1.1235072612762451, 1.6872327327728271, 0.8199764490127563, 1.933481216430664, 0.93613201379776, -0.2451026290655136, 1.4569461345672607, 0.07411430031061172, 1.8672269582748413, -0.5097047686576843, 0.6933088898658752, -0.43757936358451843, -1.0841147899627686, 0.8308094143867493, -0.41012808680534363, -2.0344183444976807, -0.8307488560676575, -0.7227675318717957, -0.07479562610387802, -0.8118467330932617, 0.8944699764251709, -0.22065486013889313, -1.445117473602295, 0.25020071864128113, -0.7494522929191589, 0.1161978542804718, -1.3161520957946777, 0.37998709082603455, 0.7247107625007629, -0.6921653151512146, 0.09293648600578308, -0.22428125143051147, -1.1898727416992188, -0.3867027461528778, 0.23942473530769348, 1.9201711416244507, -0.767279326915741, 0.8792416453361511, 0.9852482676506042, -0.6543360352516174, 0.0007975483313202858, 0.2551971673965454, -0.369180291891098, 0.8433198928833008, -1.1666035652160645, -0.39305299520492554, 1.2388726472854614, -0.2300228774547577, -0.5249028205871582, 1.5484470129013062, 0.7973741292953491, -0.9850127696990967, -0.16440212726593018, -0.12120898067951202, -0.8014113903045654, 0.039998218417167664, -1.6256778240203857, -0.10323132574558258, 0.3905195891857147, -1.470963478088379, -0.5251975059509277, -0.11066777259111404, 1.2589670419692993, -0.23912115395069122, 1.5174485445022583, -0.3779802918434143, -0.22287508845329285, -0.3542369604110718, -0.37291544675827026, 0.03682154789566994, -0.1896440088748932, -0.6688488721847534, 0.10086972266435623, -0.690270185470581, 0.34128355979919434, 1.3778579235076904, 0.2535913586616516, 0.1042771115899086, 0.46468809247016907, 1.1334521770477295, 0.3389155864715576, 0.07783146947622299, -0.8477813601493835, -1.4508922100067139, 1.9910423755645752, -1.4853096008300781, 2.0645198822021484, 0.7983884215354919, -0.048507142812013626, -1.750522255897522, -1.7976129055023193, 1.386530876159668, 1.0919376611709595, 2.311079263687134, 0.5152615308761597, 0.3933875560760498, -0.9488844275474548, -0.6740239262580872, 0.29462525248527527, -0.9778586030006409, -0.7102601528167725, 0.15255099534988403, 2.3653810024261475, 1.6677584648132324, -0.47941601276397705, -0.24819695949554443, -1.011869192123413, 1.377395749092102, -0.2532722055912018, 0.16359753906726837, 2.049079418182373, -0.21149049699306488, -1.123538851737976, 1.3098613023757935, -2.3581624031066895, 0.10273852944374084, 2.0310769081115723, 0.3529493808746338, 0.15849487483501434, -1.3945847749710083, -0.7104862332344055, -0.3071432411670685, -0.3945724368095398, -1.2409460544586182, 0.5083546042442322, -0.2815367579460144, -0.7871286273002625, -1.4302629232406616, 0.1933281272649765, -1.0920169353485107, -1.5662531852722168, 0.21851584315299988, 1.853865385055542, 1.9809211492538452, -0.6871371865272522, 1.5461305379867554, -0.19579312205314636, 0.10866548866033554, 1.3231168985366821, 1.231885313987732, 3.1882760524749756, 1.8572746515274048, -1.2296175956726074, 0.6288658380508423, -0.20479758083820343, -0.5503259897232056, 1.2344309091567993, -1.1235949993133545, 1.2784831523895264, -0.21271423995494843, -1.1909525394439697, -1.2563506364822388, 0.8765649199485779, 0.432524174451828, 0.08491687476634979, -0.4761512577533722, 1.2660553455352783, 0.10761843621730804, 1.3348698616027832, 0.613012969493866, -0.34425705671310425, 0.6222230792045593, -0.5064492225646973, -0.4971672594547272, 1.5566712617874146, 0.2731305658817291, -1.4237252473831177, -2.2961225509643555, -0.07118888944387436, -0.8359038233757019, -0.0148084107786417, -0.6463974714279175, -1.1364480257034302, 1.7468950748443604, 0.4166004955768585, -1.2855393886566162, -0.3402376174926758, -0.3184463083744049, -0.5825126767158508, 2.7477731704711914, -1.4537169933319092, -0.3222908079624176, -0.9084885716438293, -0.6704979538917542, 1.7775262594223022, -1.180801272392273, -0.22026000916957855, -0.9705204963684082, -0.4952468276023865, -1.1954469680786133, -0.5187003016471863, -0.006796603091061115, -0.9288835525512695, 0.8657506108283997, 0.18672683835029602, -1.2588688135147095, -0.3198201656341553, -0.8611576557159424, 0.7958585023880005, -0.09704835712909698, 0.30214956402778625, 1.8526822328567505, 0.32560431957244873, -0.44891229271888733, 0.7677090764045715, 1.1774474382400513, 0.5840284824371338, -0.6978816986083984, 0.25528064370155334, -0.5759521722793579, 0.28744935989379883, -1.2494744062423706, 0.30729931592941284, -2.8297882080078125, 0.6235572099685669, -0.009414038620889187, -0.15629129111766815, -0.012777278199791908, -1.3502780199050903, 1.009274959564209, 2.567072868347168, -1.1459124088287354, 0.5097250938415527, 0.23536856472492218, 1.2515217065811157, -1.6483120918273926, 0.3786007761955261, -0.3715456426143646, 2.076369285583496, 0.2086002081632614, 1.2387146949768066, -0.4595916271209717, -2.3178811073303223, 0.7008286714553833, -1.3277462720870972, -1.3122493028640747, 0.7846124768257141, -0.8886918425559998, 0.02519037202000618, -1.3787286281585693, -0.26672884821891785, -0.8585817813873291, -1.287099838256836, 0.7172204256057739, 0.12798050045967102, 0.43428099155426025, -0.48720988631248474, 0.2543644607067108, -2.2535653114318848, -1.3997154235839844, -0.19379720091819763, -0.9465416073799133, 0.3338339030742645, -0.4827268421649933, 0.6989397406578064, -0.1899893879890442, -0.02477608248591423, 0.29471758008003235, 1.452752709388733, 3.5309154987335205, 0.1884137988090515, 0.3876105546951294, -0.33354029059410095, -0.9425002932548523, 1.4771435260772705, 0.9841914772987366, -0.1397286355495453, -0.637585461139679, -0.9522548317909241, 1.2670236825942993, 1.9037466049194336, 0.956336259841919, 0.0140467444434762, -0.7881340384483337, -0.6048415899276733, -0.1990308314561844, 0.10236629098653793, 0.38527268171310425, 0.9843120574951172, 0.16235804557800293, 0.12647883594036102, 1.384537696838379, 1.21207857131958, -0.4292115271091461, 0.2691068947315216, -0.8166835904121399, -0.303222119808197, 0.5698220729827881, 0.32811298966407776, -0.04257487505674362, 0.276923805475235, -0.8948664665222168, -0.23929914832115173, -0.42493799328804016, -0.936860978603363, -0.6988563537597656, -0.4868009686470032, -0.3099309206008911, 1.6858537197113037, 0.10575255751609802, -0.49649858474731445, -0.13008947670459747, -0.8832563757896423, -0.19743016362190247, -1.0728378295898438, 0.2053002566099167, -0.11682513356208801, -0.19743090867996216, 0.008684349246323109, 1.874518632888794, -1.0168808698654175, -2.1818552017211914, 0.20255428552627563, 0.238297238945961, -0.2900676727294922, 0.19137555360794067, 1.5539374351501465, 0.4666794538497925, 1.4197934865951538, 1.3227038383483887, 0.9516466856002808, -0.6771425604820251, -1.3514807224273682, 0.6044231057167053, 0.9873244762420654, -1.5406187772750854, 0.7638334631919861, 0.02120431512594223, -0.4238574504852295, 0.6060352921485901, 1.3039475679397583, 0.5496044158935547, -1.8771215677261353, 0.6749481558799744, -0.8872416019439697, 0.8390916585922241, 0.7258830666542053, 0.5820881724357605, 0.3598650395870209, 0.7843384146690369, -1.186170220375061, -1.09443998336792, -0.6872549653053284, -0.7244075536727905, 1.9131747484207153, -0.35149943828582764, 0.6023728847503662, -0.10083700716495514, -1.326751947402954, 0.00924366619437933, 0.8786727786064148, 0.3761547803878784, -0.44123005867004395, 0.8009536266326904, -0.6423192620277405, -1.0362838506698608, -1.3550013303756714, -0.46788689494132996, -1.0579490661621094, -1.0083502531051636, 1.0642437934875488, 0.7522112131118774, 0.30403196811676025, 1.8469879627227783, 0.7457724213600159, 0.33664900064468384, -2.5787222385406494, 0.8491607904434204, 0.23050208389759064, 0.02989017963409424, 0.9212462306022644, 0.4259808361530304, 1.0981416702270508, -0.03563210740685463, 0.54973965883255, -2.565892457962036, 2.4001574516296387, -0.1933356672525406, 0.5678130388259888, -0.07154455780982971, -0.2643834054470062, 1.0740609169006348, 0.5806815028190613, 0.481436550617218, -1.1479953527450562, 0.7147901058197021, -0.5922059416770935, 1.2456800937652588, 0.8922035694122314, -0.8233550786972046, -0.11857537180185318, 1.3798381090164185, 0.43985024094581604, -0.541170597076416, -0.9063807129859924, -0.9688583016395569, 0.9771995544433594, 1.7218464612960815, -0.08003788441419601, 0.02383052557706833, 0.9087228178977966, 0.5602450370788574, -1.1843090057373047, 0.09288733452558517, -0.7480743527412415, -0.774073600769043, 1.7097750902175903, 2.0211892127990723, -0.1547955721616745, -0.18061420321464539, -0.6800939440727234, -1.3472638130187988, 0.7881450057029724, -0.04777232185006142, 0.06651584059000015, 0.5733387470245361, -0.6791565418243408, 1.0754014253616333, 0.8793992400169373, 0.9333598613739014, 0.11387059092521667, 0.35570523142814636, 0.5444540977478027, -0.39984139800071716, -1.2146573066711426, -0.39141160249710083, -1.1609984636306763, -2.529965400695801, 0.5202142596244812, -0.3447844982147217, -1.391978144645691, 0.026203900575637817, -1.0030291080474854, 0.9369295835494995, -0.6235268712043762, -1.1049776077270508, -1.533052682876587, 0.1412394493818283, -0.05436599999666214, 0.9243578910827637, -1.5556999444961548, -0.2031308263540268, 1.2302873134613037, 0.8410162329673767, -0.6767058968544006, 0.9143718481063843, 0.22272129356861115, 1.0177781581878662, 0.8080040216445923, -0.3445630669593811, 0.5272571444511414, -0.039223961532115936, -1.3384425640106201, 0.6416113972663879, 1.248363733291626, 0.17820101976394653, 1.5459257364273071, -0.4004737138748169, -0.04853906109929085, 0.31187066435813904, -0.5021141171455383, -0.5372169613838196, -0.6388287544250488, 0.6786359548568726, 0.12283805012702942, -0.8719013333320618, -0.0034859557636082172, 0.03141015022993088, -0.29745885729789734, 0.08428943157196045, -1.4536495208740234, -0.07839448750019073, -0.31992724537849426, -0.7542254328727722, -1.2749212980270386, -0.09922619163990021, 1.3048518896102905, -0.7266232371330261, -0.18379655480384827, 0.4925963282585144, 0.40955355763435364, 0.518328845500946, 0.4375399053096771, -0.6428055167198181, -0.3366033434867859, -0.3217969834804535, -0.30491405725479126, 0.3076906204223633, 1.3221443891525269, -0.06716255843639374, -1.0252755880355835, 0.7559034824371338, -0.36241817474365234, 0.018885578960180283, 1.9408082962036133, 0.09357494860887527, -0.7082863450050354, 0.3335244059562683, -0.605548083782196, 2.0235822200775146, 1.7510802745819092, 1.3510125875473022, -0.1411987692117691, -0.8454841375350952, 0.6256996393203735, -0.36971381306648254, -0.3063839375972748, 0.8296358585357666, 0.3657207489013672, -0.15187415480613708, -1.5572185516357422, 0.7726038694381714, 1.1982616186141968, -0.8466858863830566, -0.7216761708259583, 0.0692828893661499, -0.79389488697052, 1.1000308990478516, 0.581118643283844, 0.4159270226955414, 0.3473118841648102, 1.6955536603927612, 0.6608603596687317, -0.40452396869659424, 0.48405781388282776, 0.515002965927124, -0.1677922010421753, -2.0901992321014404, -1.2584894895553589, 0.3487611413002014, -0.6143898963928223, -1.590323805809021, 1.4009065628051758, -1.0864814519882202, -0.9425700306892395, 0.5490763783454895, 0.0963187888264656, 1.457192063331604, 0.3449062407016754, 1.5381324291229248, 2.037548065185547, 0.8384197950363159, 0.38425928354263306, 1.2083330154418945, -0.18775896728038788, -0.47812220454216003, 1.8755652904510498, -0.4528241753578186, 0.48672163486480713, 1.0606427192687988, -0.28260117769241333, -1.177832007408142, -0.7510523200035095, -1.2477147579193115, -0.7587797045707703, 1.1641204357147217, 0.06560561805963516, -1.064171552658081, 0.17974989116191864, 1.6420013904571533, 0.1219312846660614, -0.3418266177177429, 0.6256383657455444, 0.4014205038547516, -0.8483865261077881, -0.002196023240685463, -0.9623430371284485, 0.6199942827224731, -0.23851540684700012, -0.33957189321517944, 0.4243917763233185, 0.5069214701652527, 1.3250411748886108, -0.11247622221708298, 0.054695047438144684, 1.121515154838562, -1.478415846824646, 1.492515206336975, -0.6519018411636353, 0.2305712103843689, -2.311508893966675, 1.3764545917510986, -0.6876869797706604, 1.8520722389221191, -2.670299768447876, 0.4084341824054718, -0.5936866402626038, -0.41146114468574524, 0.31228527426719666, -0.3345034122467041, 0.1257443130016327, -0.1713605672121048, -1.1165721416473389, 0.012728438712656498, -0.657549262046814, 0.49733489751815796, 1.123560905456543, 1.2813054323196411, -1.2059848308563232, -0.2008635252714157, -1.6603442430496216, -0.10322907567024231, -0.6645132899284363, 0.21382658183574677, -2.0143508911132812, -0.09573821723461151, -1.952505350112915, -2.2355740070343018, -1.355983018875122, -0.7376288175582886, 1.1210988759994507, 0.12407930195331573, -0.8725830912590027, 1.2876410484313965, -0.37847933173179626, -1.839895486831665, 1.0750113725662231, -2.0120832920074463 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
Hey, I also want to work on this issue I am a newbie to open source.
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
16
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - Hey, I also want to work on this issue I am a newbie to open source.
[ -1.1514225006103516, -0.914588987827301, -0.8264305591583252, 1.5600435733795166, -0.06846963614225388, -1.2471632957458496, 0.19848120212554932, -1.0974475145339966, 1.606711506843567, -0.8056549429893494, 0.3895787000656128, -1.5868126153945923, 0.08885469287633896, -0.7562308311462402, -0.6925760507583618, -0.8311765193939209, -0.4346696436405182, -0.6284676790237427, 0.9707947969436646, 2.512012004852295, 1.2437585592269897, -1.316541075706482, 2.7433459758758545, 0.7060327529907227, -0.07137395441532135, -0.9623447060585022, 0.5354310870170593, 0.060969963669776917, -1.2514673471450806, -0.46135297417640686, -0.7735189199447632, -0.19727250933647156, -0.4940361976623535, -0.4962162375450134, -0.07957633584737778, 0.5649270415306091, -0.32246339321136475, -0.4613977372646332, -0.5282701849937439, -0.7652491331100464, 0.49436140060424805, -0.39798402786254883, 0.971796989440918, -0.3796776533126831, 1.8321009874343872, -0.6276234984397888, 0.48515570163726807, 0.6668365001678467, 1.3210937976837158, 0.24271857738494873, -0.05424656718969345, 0.2820200026035309, 0.43570476770401, -0.042672790586948395, 0.5448997616767883, 1.089597463607788, 0.663877546787262, 0.6326675415039062, 0.7396725416183472, -2.2177183628082275, 1.3071855306625366, -0.981702983379364, 0.3003080487251282, 1.3521404266357422, -0.938270092010498, 0.34678494930267334, -1.7772176265716553, -0.09460069984197617, 0.5832561254501343, -2.3241405487060547, 0.2517351806163788, -1.3011550903320312, -0.5820868015289307, 1.0110009908676147, 0.40719616413116455, -1.2268565893173218, 0.06221485882997513, -0.3826967179775238, 1.064389944076538, 0.4119144082069397, 1.0246336460113525, -1.6453304290771484, 0.0443459153175354, -0.3053854703903198, 0.08164486289024353, -1.3138697147369385, -1.4410310983657837, 0.5217529535293579, 0.5675930976867676, 0.5380368232727051, 0.048079896718263626, 0.976946234703064, -1.0209823846817017, 0.840774655342102, -1.048895001411438, -1.5698387622833252, -1.401691198348999, -2.221867322921753, -2.406449556350708, 0.7531130909919739, -0.4691419303417206, -0.4868851900100708, 1.8590770959854126, -0.9141406416893005, -1.7055959701538086, 1.1796849966049194, 0.2065611332654953, 0.03021392971277237, 2.3657243251800537, 0.19273459911346436, -0.696269690990448, 0.47079604864120483, -0.816085934638977, 0.7954420447349548, -0.4938817024230957, 1.3125258684158325, 0.5024693608283997, -1.0920703411102295, 1.6502068042755127, -0.46134400367736816, 0.5956040024757385, -0.7166332006454468, -0.6006201505661011, -0.778436005115509, 0.39563870429992676, 1.967647910118103, -0.20996525883674622, 1.5677815675735474, -0.28874078392982483, -1.4880480766296387, -1.5645142793655396, 0.9972965717315674, 0.4345906376838684, -0.782315194606781, 0.2351764291524887, -0.40166354179382324, 0.1498124599456787, -0.1194247454404831, 1.1357345581054688, 1.3258845806121826, 0.7366929650306702, -0.36528119444847107, -0.7536219358444214, 0.1827566772699356, -0.05229813978075981, -0.7534937858581543, -1.8105900287628174, -0.2928827702999115, 0.07532577961683273, 0.5639769434928894, -1.1248440742492676, 1.6681650876998901, 0.8246284127235413, 1.935323715209961, 0.9144695997238159, -0.2508615553379059, 1.478420615196228, 0.06519849598407745, 1.8458442687988281, -0.5310219526290894, 0.6792588233947754, -0.4518303871154785, -1.0852301120758057, 0.8527703285217285, -0.4068238437175751, -2.016963005065918, -0.8437128067016602, -0.7255048155784607, -0.08389498293399811, -0.8120001554489136, 0.890474259853363, -0.21735672652721405, -1.43891179561615, 0.24982842803001404, -0.7691271901130676, 0.11155817657709122, -1.3170526027679443, 0.38243556022644043, 0.7282924056053162, -0.6990920305252075, 0.1001281663775444, -0.2166156768798828, -1.1860630512237549, -0.4052495062351227, 0.2539733946323395, 1.9312039613723755, -0.7640975713729858, 0.8494988083839417, 0.9837733507156372, -0.6541458964347839, 0.0004657469689846039, 0.2548942565917969, -0.36177679896354675, 0.8302416801452637, -1.1771067380905151, -0.3935762941837311, 1.2387043237686157, -0.2310875952243805, -0.5227340459823608, 1.5703524351119995, 0.7769030332565308, -1.0098336935043335, -0.16073285043239594, -0.10692909359931946, -0.807435929775238, 0.04630986973643303, -1.6166696548461914, -0.09957155585289001, 0.38291043043136597, -1.4722013473510742, -0.5256725549697876, -0.128966823220253, 1.2619675397872925, -0.2329801470041275, 1.5226322412490845, -0.35601118206977844, -0.229335755109787, -0.33046451210975647, -0.37071022391319275, 0.02668704092502594, -0.20237351953983307, -0.6697480082511902, 0.09241318702697754, -0.6930791139602661, 0.3384213149547577, 1.4010785818099976, 0.26152899861335754, 0.08884216099977493, 0.45884254574775696, 1.1428985595703125, 0.35084593296051025, 0.07030511647462845, -0.8508861064910889, -1.4457263946533203, 1.9707995653152466, -1.4915685653686523, 2.05496883392334, 0.7996104955673218, -0.05298863723874092, -1.7596546411514282, -1.8001028299331665, 1.379430890083313, 1.0942134857177734, 2.2923364639282227, 0.5194274187088013, 0.3635062277317047, -0.9545681476593018, -0.6797841191291809, 0.2828284800052643, -0.9908679127693176, -0.7149909734725952, 0.12958036363124847, 2.3656740188598633, 1.6762146949768066, -0.46658793091773987, -0.22329194843769073, -1.0030707120895386, 1.3889728784561157, -0.2550390958786011, 0.1657908856868744, 2.047158718109131, -0.2023783028125763, -1.1167678833007812, 1.3082363605499268, -2.3470840454101562, 0.11230681091547012, 2.0187995433807373, 0.3524622619152069, 0.1707943081855774, -1.3989732265472412, -0.6980205774307251, -0.3119828402996063, -0.3903021812438965, -1.2263274192810059, 0.5061509609222412, -0.2676909863948822, -0.8027872443199158, -1.4251556396484375, 0.20486998558044434, -1.1002576351165771, -1.568374752998352, 0.24380925297737122, 1.8575233221054077, 2.00329852104187, -0.6785192489624023, 1.539301872253418, -0.19624602794647217, 0.10186853259801865, 1.3365803956985474, 1.2439132928848267, 3.1502764225006104, 1.8354758024215698, -1.2282426357269287, 0.6192628145217896, -0.19509568810462952, -0.5610368847846985, 1.256861686706543, -1.1090188026428223, 1.296395182609558, -0.21184132993221283, -1.1717075109481812, -1.2651100158691406, 0.8897477388381958, 0.45946580171585083, 0.0857957974076271, -0.4713456332683563, 1.256367564201355, 0.10670408606529236, 1.3370550870895386, 0.6026577949523926, -0.36044806241989136, 0.6354495882987976, -0.4926711320877075, -0.49543553590774536, 1.5398054122924805, 0.28539958596229553, -1.4285640716552734, -2.3120505809783936, -0.06811238080263138, -0.8323651552200317, -0.011003431864082813, -0.6474578380584717, -1.1492310762405396, 1.7265621423721313, 0.4164060950279236, -1.2718868255615234, -0.34891971945762634, -0.30216705799102783, -0.5823937058448792, 2.738964796066284, -1.4211376905441284, -0.3215572237968445, -0.9062526226043701, -0.6866549849510193, 1.7739404439926147, -1.1802198886871338, -0.2395913302898407, -0.9816829562187195, -0.5078909993171692, -1.2218904495239258, -0.5296392440795898, 0.00003262236714363098, -0.9543264508247375, 0.8707437515258789, 0.16095440089702606, -1.2543935775756836, -0.3228265047073364, -0.845608115196228, 0.8113367557525635, -0.1007629930973053, 0.3115771412849426, 1.8646676540374756, 0.31143873929977417, -0.44099000096321106, 0.7799327969551086, 1.1820968389511108, 0.5760544538497925, -0.6992942094802856, 0.2557254135608673, -0.571368396282196, 0.3012562394142151, -1.244248867034912, 0.3013429641723633, -2.8282997608184814, 0.6131489276885986, -0.012433232739567757, -0.16323061287403107, -0.021284352988004684, -1.347812533378601, 1.0370289087295532, 2.5917139053344727, -1.177589774131775, 0.5168063640594482, 0.2521394193172455, 1.255155086517334, -1.6414833068847656, 0.4001047909259796, -0.38180866837501526, 2.085364818572998, 0.19822575151920319, 1.2461894750595093, -0.4625587463378906, -2.3257827758789062, 0.7090058326721191, -1.3231538534164429, -1.3105895519256592, 0.7886940836906433, -0.9013726115226746, 0.013892051763832569, -1.4088772535324097, -0.2698785662651062, -0.8421263694763184, -1.291306734085083, 0.7077115178108215, 0.1266658902168274, 0.4158482253551483, -0.4942941665649414, 0.2585592269897461, -2.244936227798462, -1.3950872421264648, -0.19699253141880035, -0.943250298500061, 0.36275607347488403, -0.48946842551231384, 0.691457986831665, -0.1676689088344574, -0.03417361155152321, 0.28707075119018555, 1.4563562870025635, 3.5059585571289062, 0.1807907074689865, 0.36827415227890015, -0.3306748867034912, -0.9294754862785339, 1.4763129949569702, 0.9834634065628052, -0.14170807600021362, -0.6191949248313904, -0.9509866237640381, 1.2562501430511475, 1.920778512954712, 0.9512072801589966, 0.020172081887722015, -0.7955426573753357, -0.6190415620803833, -0.20701074600219727, 0.09181847423315048, 0.37602487206459045, 0.9678201079368591, 0.16602998971939087, 0.11463494598865509, 1.369146704673767, 1.2122750282287598, -0.42663758993148804, 0.2785091698169708, -0.8210607767105103, -0.2979193329811096, 0.5839316248893738, 0.31927597522735596, -0.059283945709466934, 0.2900646924972534, -0.904080867767334, -0.21850870549678802, -0.4386751353740692, -0.9172838926315308, -0.6919371485710144, -0.4836069345474243, -0.3269274830818176, 1.6930794715881348, 0.11194919049739838, -0.5169215798377991, -0.12561076879501343, -0.8951224684715271, -0.20325317978858948, -1.065892219543457, 0.19930604100227356, -0.12369591742753983, -0.21410606801509857, 0.00796439964324236, 1.8841910362243652, -1.0311542749404907, -2.1741247177124023, 0.20104831457138062, 0.23835469782352448, -0.28531113266944885, 0.18096081912517548, 1.5512111186981201, 0.46595335006713867, 1.4433295726776123, 1.309717059135437, 0.9497010111808777, -0.6828427910804749, -1.3548799753189087, 0.6097151637077332, 0.9906038045883179, -1.5196382999420166, 0.7328222393989563, 0.02520381659269333, -0.391433447599411, 0.6140564680099487, 1.299019694328308, 0.5510410070419312, -1.8810272216796875, 0.6877375245094299, -0.8695068955421448, 0.8709836602210999, 0.7235714197158813, 0.5664457082748413, 0.3554759621620178, 0.7604493498802185, -1.1647493839263916, -1.1049556732177734, -0.6941108107566833, -0.7373365759849548, 1.9329866170883179, -0.3617878258228302, 0.6089116334915161, -0.07878465950489044, -1.323899269104004, 0.014211910776793957, 0.8637021780014038, 0.37905460596084595, -0.4352229833602905, 0.7980406880378723, -0.6469106674194336, -1.0330675840377808, -1.3698501586914062, -0.4729972779750824, -1.0607460737228394, -1.0160595178604126, 1.08256196975708, 0.7523294687271118, 0.28537717461586, 1.8523422479629517, 0.7377177476882935, 0.34568464756011963, -2.575324773788452, 0.8613339066505432, 0.2491472065448761, 0.033712271600961685, 0.9194864630699158, 0.43859151005744934, 1.0941952466964722, -0.036828238517045975, 0.5430828332901001, -2.542952060699463, 2.3983559608459473, -0.18816471099853516, 0.5690411329269409, -0.05336674302816391, -0.2755042612552643, 1.083639144897461, 0.573424756526947, 0.4873983860015869, -1.157562494277954, 0.7099178433418274, -0.5832295417785645, 1.249678373336792, 0.8793530464172363, -0.8231730461120605, -0.11874598264694214, 1.397628664970398, 0.4373090863227844, -0.5344052314758301, -0.8962799310684204, -0.9780581593513489, 0.9875246286392212, 1.7165940999984741, -0.07498951256275177, 0.016800452023744583, 0.905937135219574, 0.5530634522438049, -1.1929417848587036, 0.07617056369781494, -0.7574671506881714, -0.7572603225708008, 1.6899744272232056, 2.018637180328369, -0.15594689548015594, -0.1855408400297165, -0.6949861645698547, -1.3493983745574951, 0.7729911208152771, -0.05156518146395683, 0.06102471798658371, 0.5693041086196899, -0.6808875799179077, 1.0778758525848389, 0.8786770105361938, 0.9211059212684631, 0.10825018584728241, 0.3573090732097626, 0.5323458313941956, -0.3984236717224121, -1.2077999114990234, -0.40204304456710815, -1.155824899673462, -2.560732841491699, 0.5090568661689758, -0.3583332896232605, -1.3857063055038452, 0.013094053603708744, -1.0172234773635864, 0.9482552409172058, -0.6172918081283569, -1.1075947284698486, -1.5502660274505615, 0.15704485774040222, -0.0507982075214386, 0.9351169466972351, -1.5581740140914917, -0.20878268778324127, 1.2422094345092773, 0.8475914001464844, -0.6813147068023682, 0.9204740524291992, 0.2321065068244934, 1.0306538343429565, 0.798642635345459, -0.3550475239753723, 0.542201817035675, -0.03430112823843956, -1.3491663932800293, 0.6467049717903137, 1.2251282930374146, 0.18644075095653534, 1.541480541229248, -0.40541771054267883, -0.04641878977417946, 0.32404786348342896, -0.5081586837768555, -0.5444743037223816, -0.6044288277626038, 0.6967691779136658, 0.12715236842632294, -0.9017853140830994, 0.0011614207178354263, 0.042037494480609894, -0.31315988302230835, 0.10924726724624634, -1.4613268375396729, -0.09873299300670624, -0.32838740944862366, -0.7497050762176514, -1.2629737854003906, -0.0800345167517662, 1.2799386978149414, -0.727730929851532, -0.1853531301021576, 0.48205485939979553, 0.4086102843284607, 0.4949313998222351, 0.46267709136009216, -0.6535060405731201, -0.3348182439804077, -0.30909183621406555, -0.2990866005420685, 0.30407753586769104, 1.3148030042648315, -0.06656000018119812, -1.0353842973709106, 0.7482216358184814, -0.3440075218677521, 0.021441716700792313, 1.9451472759246826, 0.08806028217077255, -0.7188117504119873, 0.3396286964416504, -0.6129094958305359, 2.0310957431793213, 1.7527084350585938, 1.3420472145080566, -0.14411045610904694, -0.8565834164619446, 0.6268055438995361, -0.36443719267845154, -0.28404849767684937, 0.8420574069023132, 0.362644225358963, -0.1594499796628952, -1.5473383665084839, 0.7524595260620117, 1.2084511518478394, -0.8579708337783813, -0.7242259979248047, 0.08596913516521454, -0.7931625247001648, 1.1075382232666016, 0.589338481426239, 0.41019195318222046, 0.3339364230632782, 1.6771754026412964, 0.6489239931106567, -0.39905932545661926, 0.4822685122489929, 0.500037431716919, -0.16171342134475708, -2.089481830596924, -1.2574214935302734, 0.3386465311050415, -0.6264970898628235, -1.5818849802017212, 1.4178425073623657, -1.0676857233047485, -0.9418025612831116, 0.5383302569389343, 0.10805141180753708, 1.450865626335144, 0.34508174657821655, 1.547877311706543, 2.032238006591797, 0.8167140483856201, 0.35992729663848877, 1.1995347738265991, -0.20591825246810913, -0.47209057211875916, 1.8776695728302002, -0.4542202353477478, 0.47351303696632385, 1.063527226448059, -0.28315335512161255, -1.1779018640518188, -0.7354558110237122, -1.2521121501922607, -0.7693235874176025, 1.142349123954773, 0.07870147377252579, -1.054670810699463, 0.1885712593793869, 1.6295222043991089, 0.12670068442821503, -0.323101282119751, 0.607470691204071, 0.416218638420105, -0.8575442433357239, 0.0008752970024943352, -0.9594772458076477, 0.6106300354003906, -0.2501772940158844, -0.3346172273159027, 0.41623654961586, 0.4777960777282715, 1.3379956483840942, -0.11190792173147202, 0.0758630707859993, 1.1023740768432617, -1.478835940361023, 1.4947255849838257, -0.6514900326728821, 0.2324557602405548, -2.308722734451294, 1.3608161211013794, -0.7044675350189209, 1.8436775207519531, -2.685913562774658, 0.4290641248226166, -0.5993081331253052, -0.37700822949409485, 0.29658883810043335, -0.31682753562927246, 0.11276958137750626, -0.1710955947637558, -1.112273931503296, 0.01292766910046339, -0.6543229818344116, 0.5079106688499451, 1.1251763105392456, 1.2860569953918457, -1.1988598108291626, -0.2113558053970337, -1.660652756690979, -0.1004491075873375, -0.6874378323554993, 0.22241930663585663, -2.010380506515503, -0.10183350741863251, -1.9368432760238647, -2.2516121864318848, -1.3578414916992188, -0.7217652797698975, 1.116869330406189, 0.13622048497200012, -0.8520237803459167, 1.2900928258895874, -0.3580811619758606, -1.8200600147247314, 1.0782690048217773, -2.000223159790039 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
This sounds related to https://github.com/huggingface/datasets/issues/5474 I'm fine with `select_columns`, or we could also override `select` to also accept a list of columns maybe ?
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
24
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - This sounds related to https://github.com/huggingface/datasets/issues/5474 I'm fine with `select_columns`, or we could also override `select` to also accept a list of columns maybe ?
[ -1.1184251308441162, -0.908778727054596, -0.8135619759559631, 1.5733529329299927, -0.02999010682106018, -1.2494052648544312, 0.2329113781452179, -1.049363613128662, 1.6241936683654785, -0.7745755910873413, 0.370052695274353, -1.6105045080184937, 0.04719815403223038, -0.7533395886421204, -0.7092140316963196, -0.7820127606391907, -0.4075644612312317, -0.6277782320976257, 0.9514874219894409, 2.5029213428497314, 1.2775287628173828, -1.3392664194107056, 2.6978378295898438, 0.6853175759315491, -0.08166524022817612, -0.9707900881767273, 0.5064398646354675, 0.04332515597343445, -1.2455048561096191, -0.45461350679397583, -0.7685065865516663, -0.1719185709953308, -0.5005282163619995, -0.4769386649131775, -0.07534728199243546, 0.5783877372741699, -0.3536190390586853, -0.4434181749820709, -0.5378422141075134, -0.774467945098877, 0.46879276633262634, -0.38637596368789673, 0.9373596906661987, -0.3550334870815277, 1.8409942388534546, -0.655700147151947, 0.47763559222221375, 0.6794798970222473, 1.3286502361297607, 0.2601425051689148, -0.02232666127383709, 0.2810826599597931, 0.4258144199848175, -0.05837962403893471, 0.5740187764167786, 1.1332513093948364, 0.6797309517860413, 0.6038808822631836, 0.7359844446182251, -2.2565643787384033, 1.2717005014419556, -0.9754794239997864, 0.2852761149406433, 1.3266358375549316, -0.9062213897705078, 0.34803107380867004, -1.8220510482788086, -0.06737663596868515, 0.5856777429580688, -2.316286563873291, 0.28209489583969116, -1.297823429107666, -0.5406575202941895, 1.002467393875122, 0.36078745126724243, -1.21433424949646, 0.09722025692462921, -0.38674119114875793, 1.0543320178985596, 0.3949418067932129, 1.0667587518692017, -1.63930082321167, -0.021937232464551926, -0.29107511043548584, 0.10001526772975922, -1.3062820434570312, -1.4847344160079956, 0.5292401313781738, 0.5778504610061646, 0.5902388095855713, -0.009166664443910122, 0.9907128810882568, -1.0413427352905273, 0.8134613633155823, -1.073583722114563, -1.5908780097961426, -1.415867805480957, -2.1765620708465576, -2.38211989402771, 0.7696356773376465, -0.46371039748191833, -0.46489056944847107, 1.859671711921692, -0.8941981792449951, -1.7126985788345337, 1.1353715658187866, 0.28789305686950684, 0.017760802060365677, 2.3573765754699707, 0.20284289121627808, -0.7065896987915039, 0.4840238690376282, -0.8065070509910583, 0.7688184380531311, -0.47362956404685974, 1.3008606433868408, 0.4934616982936859, -1.121956467628479, 1.6549558639526367, -0.49764421582221985, 0.578464925289154, -0.7635272741317749, -0.572486162185669, -0.7868376970291138, 0.3722084164619446, 1.9587523937225342, -0.21915268898010254, 1.5845173597335815, -0.30335378646850586, -1.4922534227371216, -1.5649468898773193, 0.9692386984825134, 0.4167858958244324, -0.8227348923683167, 0.1576785296201706, -0.43225666880607605, 0.1714022308588028, -0.11839742958545685, 1.117978572845459, 1.2934560775756836, 0.7380024790763855, -0.3654930293560028, -0.7156065702438354, 0.20068857073783875, -0.07203109562397003, -0.7559065818786621, -1.8073804378509521, -0.28071334958076477, 0.13494662940502167, 0.5022452473640442, -1.172340750694275, 1.715690016746521, 0.8084617853164673, 1.944656252861023, 0.91530841588974, -0.29392388463020325, 1.5063725709915161, 0.06077387556433678, 1.8895561695098877, -0.5205382704734802, 0.677398681640625, -0.4395535886287689, -1.1081013679504395, 0.8491729497909546, -0.40181758999824524, -2.0397391319274902, -0.8421776294708252, -0.7179359793663025, -0.06964263319969177, -0.8052971959114075, 0.8681129813194275, -0.21633121371269226, -1.4526684284210205, 0.23474495112895966, -0.7393081188201904, 0.14884965121746063, -1.3204219341278076, 0.34144699573516846, 0.7601204514503479, -0.7419872879981995, 0.08164069056510925, -0.21975959837436676, -1.2243732213974, -0.4210471510887146, 0.27457138895988464, 1.9336929321289062, -0.7245584726333618, 0.8324187397956848, 0.9861420392990112, -0.6609569787979126, 0.06259503960609436, 0.23367929458618164, -0.36703765392303467, 0.8398489952087402, -1.1533317565917969, -0.4083508253097534, 1.2616584300994873, -0.2062380611896515, -0.572525143623352, 1.541338562965393, 0.7944201827049255, -0.9715200066566467, -0.15735015273094177, -0.09383636713027954, -0.8055329918861389, 0.06068319454789162, -1.5779190063476562, -0.07844279706478119, 0.3750760853290558, -1.428086280822754, -0.507567822933197, -0.14808981120586395, 1.2778631448745728, -0.2865430414676666, 1.4878183603286743, -0.3631022870540619, -0.2144140601158142, -0.3563956618309021, -0.3594532310962677, 0.005230855196714401, -0.2565242350101471, -0.7156038880348206, 0.1371202915906906, -0.6791543960571289, 0.330460786819458, 1.3663394451141357, 0.28532084822654724, 0.07501915097236633, 0.4627860188484192, 1.160888671875, 0.3529401421546936, 0.054889533668756485, -0.8442422747612, -1.4651728868484497, 1.9482734203338623, -1.4586513042449951, 2.066756248474121, 0.7907114624977112, -0.07203846424818039, -1.7454324960708618, -1.8113666772842407, 1.359154462814331, 1.0901082754135132, 2.3618767261505127, 0.5023213028907776, 0.4024362862110138, -0.9399417042732239, -0.6965371370315552, 0.2759789228439331, -0.9639070630073547, -0.7217469811439514, 0.15557578206062317, 2.371960163116455, 1.7016030550003052, -0.486441969871521, -0.26746466755867004, -1.0074068307876587, 1.3674033880233765, -0.2697005867958069, 0.19010119140148163, 2.043229579925537, -0.2069292515516281, -1.1049506664276123, 1.3199642896652222, -2.3801398277282715, 0.1543203443288803, 2.0176217555999756, 0.3508969843387604, 0.14913466572761536, -1.3923672437667847, -0.7130306959152222, -0.31974953413009644, -0.37413477897644043, -1.2080738544464111, 0.4798237383365631, -0.2325134128332138, -0.8233286142349243, -1.436673641204834, 0.20119082927703857, -1.1002585887908936, -1.57489013671875, 0.24033182859420776, 1.8862438201904297, 1.9914922714233398, -0.6923158764839172, 1.5132566690444946, -0.21578745543956757, 0.10671255737543106, 1.3069857358932495, 1.2572648525238037, 3.1372716426849365, 1.8152309656143188, -1.2719876766204834, 0.6439886689186096, -0.23127371072769165, -0.5488486886024475, 1.2255163192749023, -1.1052355766296387, 1.2421953678131104, -0.22438354790210724, -1.197884440422058, -1.3054401874542236, 0.9136925339698792, 0.4850247800350189, 0.07671009749174118, -0.489064484834671, 1.2227157354354858, 0.10481508821249008, 1.3649382591247559, 0.6364561915397644, -0.36092236638069153, 0.5993850231170654, -0.4416641294956207, -0.48195409774780273, 1.572485327720642, 0.24866099655628204, -1.4516335725784302, -2.291780948638916, -0.07299652695655823, -0.8771347403526306, -0.029824189841747284, -0.663485586643219, -1.1260424852371216, 1.7498910427093506, 0.42104247212409973, -1.2903908491134644, -0.3163127601146698, -0.2696645259857178, -0.5689772963523865, 2.7098388671875, -1.4065226316452026, -0.31579533219337463, -0.9335026741027832, -0.6511003971099854, 1.7776349782943726, -1.122090458869934, -0.21610277891159058, -0.9687394499778748, -0.5463496446609497, -1.2250828742980957, -0.5077027082443237, 0.014880380593240261, -0.9159104228019714, 0.877298891544342, 0.17267853021621704, -1.248347282409668, -0.36024266481399536, -0.8720996379852295, 0.8490644693374634, -0.11919578164815903, 0.29979145526885986, 1.8703917264938354, 0.3731772005558014, -0.43252894282341003, 0.7821341156959534, 1.1596075296401978, 0.572843074798584, -0.6738070845603943, 0.25989118218421936, -0.5811290144920349, 0.30626121163368225, -1.3034359216690063, 0.2828494906425476, -2.8242526054382324, 0.6193770170211792, -0.04355687275528908, -0.1366233229637146, -0.03545520827174187, -1.368050217628479, 1.0521231889724731, 2.568253993988037, -1.1503299474716187, 0.5070756077766418, 0.3018497824668884, 1.258959174156189, -1.6574441194534302, 0.3617124557495117, -0.3597449064254761, 2.083944082260132, 0.18247556686401367, 1.2361257076263428, -0.4965057671070099, -2.259856700897217, 0.6342479586601257, -1.3084015846252441, -1.2608658075332642, 0.8466611504554749, -0.9101940989494324, 0.045522112399339676, -1.4283809661865234, -0.2686193883419037, -0.8331429362297058, -1.306014060974121, 0.7267752289772034, 0.11128740757703781, 0.4286807179450989, -0.5005960464477539, 0.29493609070777893, -2.2529842853546143, -1.3808226585388184, -0.20598803460597992, -0.9786750674247742, 0.36681944131851196, -0.4589286148548126, 0.7033551931381226, -0.1215272769331932, -0.021291431039571762, 0.2567048668861389, 1.452046275138855, 3.490328550338745, 0.2256198227405548, 0.3740895986557007, -0.3271937668323517, -0.9199222922325134, 1.473915457725525, 0.9570307731628418, -0.15763020515441895, -0.5984771847724915, -0.9667305946350098, 1.2838218212127686, 1.9368598461151123, 1.011452078819275, 0.027105458080768585, -0.834810197353363, -0.6428020596504211, -0.18535064160823822, 0.1025533601641655, 0.40508365631103516, 0.9702656865119934, 0.1386713683605194, 0.14637145400047302, 1.3407795429229736, 1.2571368217468262, -0.4172590970993042, 0.3372959494590759, -0.8338760137557983, -0.34322819113731384, 0.5419302582740784, 0.30028602480888367, -0.022342311218380928, 0.30680444836616516, -0.9750981330871582, -0.24140650033950806, -0.4306575655937195, -0.9028575420379639, -0.7102483510971069, -0.5265499353408813, -0.3210318088531494, 1.6819469928741455, 0.09160386770963669, -0.4910420775413513, -0.06840083003044128, -0.8831560611724854, -0.2212207168340683, -1.0648483037948608, 0.20708219707012177, -0.12950168550014496, -0.17314623296260834, 0.0010438710451126099, 1.8306756019592285, -1.0201932191848755, -2.16564679145813, 0.18143989145755768, 0.2509081959724426, -0.3057444393634796, 0.17334887385368347, 1.6166244745254517, 0.4643264710903168, 1.3952299356460571, 1.3001031875610352, 0.9543887972831726, -0.6752899885177612, -1.3289287090301514, 0.6050776839256287, 0.9882611036300659, -1.4845894575119019, 0.7658419609069824, 0.00005614757537841797, -0.41371867060661316, 0.614906907081604, 1.3009817600250244, 0.49930915236473083, -1.8996647596359253, 0.6966485381126404, -0.8694177269935608, 0.841314435005188, 0.7168868184089661, 0.596825361251831, 0.33827924728393555, 0.7725356817245483, -1.2065174579620361, -1.0964893102645874, -0.6897957921028137, -0.7232179045677185, 1.9010685682296753, -0.32755592465400696, 0.5745412111282349, -0.03348473459482193, -1.3392349481582642, -0.0031015868298709393, 0.9076216816902161, 0.40936949849128723, -0.4799615740776062, 0.8039652705192566, -0.6119186282157898, -0.9726991653442383, -1.324574589729309, -0.47138866782188416, -1.0594236850738525, -1.0219635963439941, 1.0678259134292603, 0.7914091944694519, 0.31047162413597107, 1.82457435131073, 0.7536687254905701, 0.3367498517036438, -2.5917153358459473, 0.8716756701469421, 0.24225346744060516, -0.03916917368769646, 0.8899855017662048, 0.4300517141819, 1.1051537990570068, -0.03141913563013077, 0.5853185057640076, -2.5372495651245117, 2.384631633758545, -0.1762874871492386, 0.5967831611633301, -0.07188642024993896, -0.26810935139656067, 1.1158313751220703, 0.5325495600700378, 0.4810626804828644, -1.1811362504959106, 0.7023717164993286, -0.5815069675445557, 1.2302905321121216, 0.8876227140426636, -0.8659691214561462, -0.09990305453538895, 1.372023105621338, 0.42881783843040466, -0.5285268425941467, -0.9218770265579224, -0.9369351267814636, 0.991471529006958, 1.6951757669448853, -0.0644269809126854, 0.004528401419520378, 0.9726971983909607, 0.5728774666786194, -1.224114179611206, 0.09650836139917374, -0.7558352947235107, -0.7247745990753174, 1.7280091047286987, 2.0200560092926025, -0.13028289377689362, -0.22200503945350647, -0.7188416719436646, -1.354433536529541, 0.7691282033920288, -0.03772721812129021, 0.10742764919996262, 0.6095139384269714, -0.7281960844993591, 1.097561240196228, 0.8204756379127502, 0.9426379799842834, 0.09903218597173691, 0.3414388597011566, 0.526604950428009, -0.4175378084182739, -1.2212611436843872, -0.3943968415260315, -1.1910929679870605, -2.516205310821533, 0.4937669336795807, -0.31199905276298523, -1.3630223274230957, 0.013680578209459782, -1.0139551162719727, 0.9431653022766113, -0.6739353537559509, -1.1354068517684937, -1.5306682586669922, 0.1942480057477951, -0.08182351291179657, 0.8809950947761536, -1.5897465944290161, -0.18666774034500122, 1.2525643110275269, 0.8346554636955261, -0.6406807899475098, 0.9013367891311646, 0.2290370911359787, 1.0181204080581665, 0.8198022842407227, -0.32416096329689026, 0.5434436202049255, -0.04658883437514305, -1.3333919048309326, 0.5984414219856262, 1.2156732082366943, 0.1881883442401886, 1.561453938484192, -0.4297492802143097, -0.032643917948007584, 0.34574416279792786, -0.5049567818641663, -0.5598617792129517, -0.6084021925926208, 0.6670888662338257, 0.13244539499282837, -0.9558098316192627, 0.004732273519039154, 0.03939049690961838, -0.2660493552684784, 0.0921504870057106, -1.4437923431396484, -0.06496630609035492, -0.30043646693229675, -0.7501378059387207, -1.239545464515686, -0.029948081821203232, 1.2997653484344482, -0.7561545372009277, -0.19430822134017944, 0.49440237879753113, 0.3805787265300751, 0.5096939206123352, 0.47890210151672363, -0.6776085495948792, -0.32729971408843994, -0.31417912244796753, -0.3009602725505829, 0.30872243642807007, 1.320517659187317, -0.07667409628629684, -1.0246320962905884, 0.7677715420722961, -0.38426753878593445, 0.03296099603176117, 1.9588924646377563, 0.07526884973049164, -0.7197746634483337, 0.33401307463645935, -0.6489452719688416, 2.0149497985839844, 1.7866328954696655, 1.34373939037323, -0.1349957138299942, -0.8624069094657898, 0.6412222385406494, -0.3804391920566559, -0.2877108156681061, 0.8507937788963318, 0.35761788487434387, -0.14878301322460175, -1.5656510591506958, 0.7229840755462646, 1.2418004274368286, -0.8640592694282532, -0.7106262445449829, 0.09313216805458069, -0.8224729895591736, 1.1279791593551636, 0.6043097972869873, 0.37889203429222107, 0.3339708149433136, 1.6387431621551514, 0.6437745094299316, -0.35334643721580505, 0.48039987683296204, 0.5383692979812622, -0.19042998552322388, -2.074610471725464, -1.2636723518371582, 0.3452147841453552, -0.5647841095924377, -1.5683726072311401, 1.421025037765503, -1.061443567276001, -0.9404041767120361, 0.5244265794754028, 0.11580066382884979, 1.4719078540802002, 0.33804139494895935, 1.5847867727279663, 2.0491089820861816, 0.8349077701568604, 0.3180842101573944, 1.194251298904419, -0.20979838073253632, -0.5263815522193909, 1.8693982362747192, -0.4481384754180908, 0.46730610728263855, 1.0270832777023315, -0.30486273765563965, -1.2044981718063354, -0.7471223473548889, -1.2750037908554077, -0.7471657991409302, 1.2140556573867798, 0.08782150596380234, -1.0092660188674927, 0.20631293952465057, 1.6166925430297852, 0.11973792314529419, -0.3362676799297333, 0.6555467247962952, 0.4170590937137604, -0.8319359421730042, -0.003027640748769045, -0.889240562915802, 0.591469407081604, -0.19712971150875092, -0.3172161877155304, 0.3672954738140106, 0.4811055064201355, 1.331283450126648, -0.10525743663311005, 0.0365244522690773, 1.12409508228302, -1.4749172925949097, 1.5153015851974487, -0.6771997809410095, 0.26469504833221436, -2.312553644180298, 1.3858815431594849, -0.726828932762146, 1.803871989250183, -2.658242702484131, 0.4410478472709656, -0.5875552296638489, -0.36989933252334595, 0.3176027536392212, -0.34937623143196106, 0.13983029127120972, -0.1462593376636505, -1.1151725053787231, -0.03951741009950638, -0.6727238297462463, 0.4891139268875122, 1.0990186929702759, 1.267502784729004, -1.2015050649642944, -0.2454875260591507, -1.6596828699111938, -0.12235686928033829, -0.6924077868461609, 0.21889202296733856, -1.973802924156189, -0.11845894902944565, -1.9667401313781738, -2.2512612342834473, -1.3671120405197144, -0.7056079506874084, 1.085965633392334, 0.1199345737695694, -0.875036358833313, 1.2996809482574463, -0.37448030710220337, -1.8184857368469238, 1.0911754369735718, -2.0299923419952393 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
@lhoestq, I am planning to add a member function to the dataset class to perform the selection operation. Do you think its the right way to proceed? or there is a better option ?
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
34
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - @lhoestq, I am planning to add a member function to the dataset class to perform the selection operation. Do you think its the right way to proceed? or there is a better option ?
[ -1.1540052890777588, -0.9093753695487976, -0.8194781541824341, 1.5442306995391846, -0.05323059856891632, -1.2564054727554321, 0.1866016536951065, -1.096221685409546, 1.6075315475463867, -0.7959123253822327, 0.37741926312446594, -1.6004903316497803, 0.09928056597709656, -0.7280531525611877, -0.7274735569953918, -0.8332752585411072, -0.44815748929977417, -0.6346567273139954, 0.9477201700210571, 2.5019004344940186, 1.2393275499343872, -1.3407137393951416, 2.7143118381500244, 0.6818200945854187, -0.056759823113679886, -0.9636459946632385, 0.5219265222549438, 0.058315180242061615, -1.2207072973251343, -0.4624926745891571, -0.8193760514259338, -0.2233348935842514, -0.5298749208450317, -0.5140283703804016, -0.06858377903699875, 0.5379970073699951, -0.3395431637763977, -0.46196919679641724, -0.5234460234642029, -0.765296459197998, 0.49945876002311707, -0.38181549310684204, 0.9401585459709167, -0.37359362840652466, 1.8504278659820557, -0.6536516547203064, 0.5042138695716858, 0.6866848468780518, 1.3603191375732422, 0.23952525854110718, -0.04701206833124161, 0.3093465268611908, 0.4099579453468323, -0.04138799384236336, 0.5527045726776123, 1.1157578229904175, 0.6680397987365723, 0.6260010004043579, 0.7122982144355774, -2.2248694896698, 1.303432583808899, -1.0142319202423096, 0.320045530796051, 1.309397578239441, -0.9455800652503967, 0.3764408528804779, -1.8038599491119385, -0.0695754736661911, 0.5819689631462097, -2.31172776222229, 0.247870534658432, -1.2801451683044434, -0.5788359045982361, 1.0095528364181519, 0.3595131039619446, -1.229028582572937, 0.11400585621595383, -0.4073244333267212, 1.0722941160202026, 0.4083538055419922, 1.0451231002807617, -1.66354501247406, 0.03892766684293747, -0.3219450116157532, 0.11280087381601334, -1.307299256324768, -1.486946940422058, 0.5433724522590637, 0.5460917353630066, 0.5300865769386292, 0.02335399016737938, 0.9977224469184875, -1.0191823244094849, 0.8487902879714966, -1.0695881843566895, -1.6001802682876587, -1.416616678237915, -2.1689443588256836, -2.381765365600586, 0.7410628795623779, -0.46967869997024536, -0.49774181842803955, 1.9083818197250366, -0.8984718918800354, -1.7168266773223877, 1.17396879196167, 0.22035101056098938, 0.010930175893008709, 2.3816051483154297, 0.16920962929725647, -0.6891388297080994, 0.4783075749874115, -0.7874100804328918, 0.7830587029457092, -0.5203322768211365, 1.288301944732666, 0.4868448078632355, -1.0837544202804565, 1.6163314580917358, -0.4706478714942932, 0.5748454332351685, -0.7188963294029236, -0.5916682481765747, -0.7752918004989624, 0.4091947376728058, 1.9905633926391602, -0.23156414926052094, 1.5936291217803955, -0.30290377140045166, -1.4819269180297852, -1.552313208580017, 1.024556040763855, 0.40016302466392517, -0.8197901248931885, 0.22223146259784698, -0.38188233971595764, 0.16156351566314697, -0.13100558519363403, 1.1179077625274658, 1.2993630170822144, 0.715312123298645, -0.347063273191452, -0.7790731191635132, 0.18357622623443604, -0.09403209388256073, -0.7333596348762512, -1.7802094221115112, -0.3182554841041565, 0.07603315263986588, 0.5522477626800537, -1.1530895233154297, 1.6751790046691895, 0.8240705132484436, 1.9137824773788452, 0.9268680810928345, -0.2826109826564789, 1.47443425655365, 0.07169581949710846, 1.8735754489898682, -0.5186850428581238, 0.652569055557251, -0.4835127592086792, -1.1034722328186035, 0.8706890344619751, -0.4125177562236786, -2.034198522567749, -0.8620648384094238, -0.7257280945777893, -0.10349268466234207, -0.8183563351631165, 0.887016236782074, -0.19361594319343567, -1.431077003479004, 0.27437901496887207, -0.757173478603363, 0.1152520403265953, -1.3171038627624512, 0.41107332706451416, 0.7349708080291748, -0.6944963335990906, 0.10374920815229416, -0.24758265912532806, -1.2118427753448486, -0.40335628390312195, 0.24447590112686157, 1.9361635446548462, -0.7505630254745483, 0.8672308325767517, 0.9763645529747009, -0.6638472080230713, -0.018122753128409386, 0.27233076095581055, -0.33531254529953003, 0.8643744587898254, -1.1452709436416626, -0.42073526978492737, 1.238016128540039, -0.23141111433506012, -0.5528637170791626, 1.5205981731414795, 0.7780783176422119, -0.9965015649795532, -0.13757294416427612, -0.134282186627388, -0.8186100125312805, 0.027365591377019882, -1.5939069986343384, -0.07904408127069473, 0.3632509708404541, -1.482405185699463, -0.5294355750083923, -0.1276652216911316, 1.2384766340255737, -0.21043474972248077, 1.5238229036331177, -0.3649950623512268, -0.22407807409763336, -0.3687737286090851, -0.3633236587047577, 0.015895508229732513, -0.21026785671710968, -0.6933135390281677, 0.11970652639865875, -0.6928027272224426, 0.3611358404159546, 1.365878939628601, 0.29085296392440796, 0.09623159468173981, 0.49086669087409973, 1.1308051347732544, 0.33126839995384216, 0.06291394680738449, -0.8580003976821899, -1.4626344442367554, 1.9724515676498413, -1.4704878330230713, 2.0630667209625244, 0.7989116907119751, -0.04609065502882004, -1.8005478382110596, -1.7903480529785156, 1.3836159706115723, 1.104562759399414, 2.300093650817871, 0.5423204302787781, 0.402964323759079, -0.9486162662506104, -0.6787139773368835, 0.28561311960220337, -1.007886290550232, -0.7251041531562805, 0.12446652352809906, 2.381864070892334, 1.6807936429977417, -0.4638548791408539, -0.2453661561012268, -0.98357754945755, 1.39698326587677, -0.2582171559333801, 0.19130071997642517, 2.0114974975585938, -0.25957342982292175, -1.0660219192504883, 1.3070650100708008, -2.365206003189087, 0.08182936161756516, 2.042724370956421, 0.34057095646858215, 0.14559662342071533, -1.3700337409973145, -0.6696028113365173, -0.29156166315078735, -0.3836981952190399, -1.2282387018203735, 0.4628996253013611, -0.2529125213623047, -0.7769926190376282, -1.4403538703918457, 0.1893633008003235, -1.095137596130371, -1.5413386821746826, 0.22452205419540405, 1.8932241201400757, 1.9636945724487305, -0.6679597496986389, 1.5519875288009644, -0.2378411889076233, 0.12545832991600037, 1.3252924680709839, 1.2352595329284668, 3.1550724506378174, 1.8601847887039185, -1.2290457487106323, 0.6167814135551453, -0.2310056984424591, -0.561953604221344, 1.2386763095855713, -1.119667649269104, 1.2987627983093262, -0.19822561740875244, -1.1705963611602783, -1.2772510051727295, 0.9019445180892944, 0.4433831572532654, 0.06990065425634384, -0.4964213967323303, 1.25655198097229, 0.10370001941919327, 1.3411376476287842, 0.5983717441558838, -0.38591450452804565, 0.6172124743461609, -0.4863301217556, -0.5064689517021179, 1.5900933742523193, 0.27469488978385925, -1.413718819618225, -2.3043928146362305, -0.07289234548807144, -0.8324480056762695, 0.005963874980807304, -0.6543444991111755, -1.1524040699005127, 1.7323545217514038, 0.40935271978378296, -1.271531343460083, -0.3442497253417969, -0.3150222599506378, -0.6018780469894409, 2.713012218475342, -1.4642415046691895, -0.29243600368499756, -0.9092508554458618, -0.6633029580116272, 1.7405513525009155, -1.1890360116958618, -0.22122415900230408, -0.9654049277305603, -0.5355679392814636, -1.1898289918899536, -0.5283811688423157, 0.003071294166147709, -0.9418434500694275, 0.8802160024642944, 0.1704385131597519, -1.2425966262817383, -0.3105401396751404, -0.8274720907211304, 0.8046635389328003, -0.1124371886253357, 0.3079296052455902, 1.8701262474060059, 0.3369443714618683, -0.43918296694755554, 0.7610912919044495, 1.195937156677246, 0.5828308463096619, -0.68428635597229, 0.23950836062431335, -0.57075434923172, 0.2989445924758911, -1.2394927740097046, 0.2865236699581146, -2.80497145652771, 0.5975255370140076, -0.023339074105024338, -0.14743191003799438, -0.004537624306976795, -1.3551133871078491, 1.0408895015716553, 2.6056084632873535, -1.1476742029190063, 0.48179060220718384, 0.2608617842197418, 1.2248198986053467, -1.6168016195297241, 0.3857696056365967, -0.3951084315776825, 2.0802762508392334, 0.19980964064598083, 1.2164462804794312, -0.47964733839035034, -2.3122637271881104, 0.6554405689239502, -1.3059959411621094, -1.3236850500106812, 0.8205583095550537, -0.8819140195846558, 0.04399227723479271, -1.4121026992797852, -0.258085161447525, -0.8497642278671265, -1.2898645401000977, 0.7276473045349121, 0.11137029528617859, 0.4341198801994324, -0.5065106153488159, 0.27291545271873474, -2.2381033897399902, -1.3980392217636108, -0.19667160511016846, -0.9369862079620361, 0.36401602625846863, -0.44004544615745544, 0.6981855630874634, -0.1553718000650406, 0.013619811274111271, 0.26585307717323303, 1.4364900588989258, 3.4947025775909424, 0.20935970544815063, 0.3900420367717743, -0.3499305546283722, -0.9317500591278076, 1.4797695875167847, 0.9819201231002808, -0.12909553945064545, -0.6029822826385498, -0.940553605556488, 1.2508764266967773, 1.9360384941101074, 0.9580990672111511, 0.016578517854213715, -0.7840288281440735, -0.5764645338058472, -0.17422527074813843, 0.11628575623035431, 0.4035651385784149, 0.9767975211143494, 0.15505389869213104, 0.16006611287593842, 1.343610405921936, 1.253154993057251, -0.4276145398616791, 0.2915325164794922, -0.8284783959388733, -0.3363831043243408, 0.5507728457450867, 0.3272860646247864, -0.06012658029794693, 0.2644476890563965, -0.910516619682312, -0.2617461085319519, -0.46189627051353455, -0.9301474094390869, -0.7002761960029602, -0.47832468152046204, -0.3232973515987396, 1.7305032014846802, 0.10955945402383804, -0.5010798573493958, -0.10254319757223129, -0.894284188747406, -0.18326400220394135, -1.1093721389770508, 0.1977584809064865, -0.0814795047044754, -0.20381607115268707, 0.01365495566278696, 1.8886008262634277, -1.0431978702545166, -2.143420934677124, 0.21132352948188782, 0.2419675588607788, -0.28475773334503174, 0.19261683523654938, 1.5718029737472534, 0.46990787982940674, 1.4504969120025635, 1.3035097122192383, 0.9562793374061584, -0.7031841278076172, -1.3383527994155884, 0.5878390073776245, 0.9739958047866821, -1.5170609951019287, 0.7557721138000488, 0.05198821425437927, -0.4369024634361267, 0.5992828011512756, 1.2841501235961914, 0.5166187882423401, -1.906653881072998, 0.7092840075492859, -0.870125412940979, 0.8509526252746582, 0.6960307359695435, 0.5891569256782532, 0.38960129022598267, 0.7854734063148499, -1.166971206665039, -1.127946376800537, -0.7217553853988647, -0.7072761058807373, 1.9328750371932983, -0.391434907913208, 0.6111021041870117, -0.07530608028173447, -1.3475910425186157, -0.018003016710281372, 0.8966135382652283, 0.3943573236465454, -0.4372342526912689, 0.7968283891677856, -0.6082378625869751, -1.0246120691299438, -1.3674252033233643, -0.4853569269180298, -1.0476404428482056, -0.9907568693161011, 1.0879640579223633, 0.7871891260147095, 0.29506832361221313, 1.8540241718292236, 0.7171337604522705, 0.3045834004878998, -2.596320629119873, 0.8456918001174927, 0.2611148953437805, -0.037129368633031845, 0.8992645740509033, 0.43604427576065063, 1.0932759046554565, -0.023065458983182907, 0.5453925728797913, -2.52477765083313, 2.3735926151275635, -0.1539139300584793, 0.6022012233734131, -0.047417424619197845, -0.24830643832683563, 1.0698317289352417, 0.5680404901504517, 0.488988995552063, -1.1518474817276, 0.6750831604003906, -0.5906599164009094, 1.2659730911254883, 0.9406856894493103, -0.8139227628707886, -0.10265131294727325, 1.4161852598190308, 0.42969340085983276, -0.5655491948127747, -0.949833869934082, -0.9757400155067444, 1.0104477405548096, 1.741100788116455, -0.056202538311481476, 0.053003232926130295, 0.9310397505760193, 0.5924142599105835, -1.1957887411117554, 0.1187024712562561, -0.7802998423576355, -0.7871232032775879, 1.6687763929367065, 2.009209632873535, -0.1604730486869812, -0.17125721275806427, -0.6968018412590027, -1.3650710582733154, 0.7955856323242188, -0.038820866495370865, 0.1025172770023346, 0.5612198114395142, -0.6847142577171326, 1.1018800735473633, 0.8514659404754639, 0.9573876857757568, 0.13316486775875092, 0.3452339768409729, 0.5033393502235413, -0.38958871364593506, -1.1876927614212036, -0.33253198862075806, -1.1508294343948364, -2.5277554988861084, 0.4875909388065338, -0.34327489137649536, -1.3681613206863403, 0.00019669346511363983, -0.9963623285293579, 0.9540913701057434, -0.5926862955093384, -1.1505047082901, -1.577363133430481, 0.14793610572814941, -0.0354149267077446, 0.9331324696540833, -1.5719032287597656, -0.17575743794441223, 1.2090404033660889, 0.8559908270835876, -0.6678932905197144, 0.9286351799964905, 0.24851974844932556, 1.0088191032409668, 0.7916768789291382, -0.35091689229011536, 0.5275986194610596, -0.03226422518491745, -1.3284542560577393, 0.6328832507133484, 1.2206069231033325, 0.18571336567401886, 1.5322142839431763, -0.4164099097251892, -0.060959845781326294, 0.34368112683296204, -0.48284047842025757, -0.5431272983551025, -0.6437259912490845, 0.6741729378700256, 0.11349856108427048, -0.8980896472930908, 0.025483302772045135, 0.03298087418079376, -0.2933100461959839, 0.06687411665916443, -1.428802251815796, -0.08255867660045624, -0.31205201148986816, -0.7560856938362122, -1.2509130239486694, -0.05659087002277374, 1.3198332786560059, -0.7354660630226135, -0.19400672614574432, 0.4639221727848053, 0.4235077202320099, 0.48876145482063293, 0.4583207070827484, -0.6363589763641357, -0.33559924364089966, -0.32422417402267456, -0.2945113480091095, 0.3115066885948181, 1.3206614255905151, -0.1237289309501648, -1.0227293968200684, 0.7363711595535278, -0.34667783975601196, -0.012274164706468582, 1.9545177221298218, 0.09118812531232834, -0.7004124522209167, 0.34466245770454407, -0.6160486936569214, 2.002802848815918, 1.742887258529663, 1.3471639156341553, -0.17770667374134064, -0.8864712119102478, 0.6599214673042297, -0.36960265040397644, -0.3000623285770416, 0.8396201729774475, 0.3589390516281128, -0.15092161297798157, -1.5576114654541016, 0.7195735573768616, 1.2219268083572388, -0.8508603572845459, -0.7240867018699646, 0.08022172749042511, -0.7956971526145935, 1.0994863510131836, 0.6010919213294983, 0.4082689583301544, 0.2947237491607666, 1.6776634454727173, 0.6605045199394226, -0.42857053875923157, 0.5059858560562134, 0.5279375314712524, -0.15974611043930054, -2.0768983364105225, -1.2588353157043457, 0.33626627922058105, -0.6050471067428589, -1.5679725408554077, 1.4247874021530151, -1.0972979068756104, -0.9397298097610474, 0.5346554517745972, 0.09469068050384521, 1.479048728942871, 0.29662057757377625, 1.5480337142944336, 2.036583662033081, 0.8639720678329468, 0.40251535177230835, 1.2273478507995605, -0.20171590149402618, -0.46288415789604187, 1.8801662921905518, -0.4673621356487274, 0.45047232508659363, 1.0594795942306519, -0.3115353286266327, -1.1692731380462646, -0.7322248816490173, -1.261175274848938, -0.7730718851089478, 1.1590014696121216, 0.04739731177687645, -1.0110188722610474, 0.18412210047245026, 1.6338257789611816, 0.12970854341983795, -0.33872318267822266, 0.5936455726623535, 0.42269811034202576, -0.8060142993927002, -0.015342962928116322, -0.944455623626709, 0.5755826234817505, -0.2042972892522812, -0.32736992835998535, 0.40673360228538513, 0.4673493802547455, 1.3218145370483398, -0.09399692714214325, 0.07349307090044022, 1.1271748542785645, -1.515005111694336, 1.5123645067214966, -0.6291170716285706, 0.21736636757850647, -2.3382420539855957, 1.3963929414749146, -0.6925315260887146, 1.8373113870620728, -2.6677169799804688, 0.4173029661178589, -0.6390703320503235, -0.34863701462745667, 0.33235394954681396, -0.3496960997581482, 0.12012235820293427, -0.16660065948963165, -1.103773593902588, -0.013299587182700634, -0.6644060611724854, 0.5149800181388855, 1.0904020071029663, 1.277137041091919, -1.1770033836364746, -0.23179544508457184, -1.6327310800552368, -0.11486722528934479, -0.6909176707267761, 0.2391338050365448, -2.005211591720581, -0.09734711796045303, -1.9683265686035156, -2.243870258331299, -1.3651349544525146, -0.7053045034408569, 1.099044680595398, 0.13604742288589478, -0.8707552552223206, 1.2798564434051514, -0.37178537249565125, -1.8201287984848022, 1.0945435762405396, -2.0023443698883057 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
Unless @mariosasko thinks otherwise, I think it can go in `Dataset.select()` :) Though some parameters like keep_in_memory, indices_cache_file_name or writer_batch_size wouldn't when selecting columns, so we would need to update the docstring as well
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
34
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - Unless @mariosasko thinks otherwise, I think it can go in `Dataset.select()` :) Though some parameters like keep_in_memory, indices_cache_file_name or writer_batch_size wouldn't when selecting columns, so we would need to update the docstring as well
[ -1.1602294445037842, -0.8891732096672058, -0.7769017219543457, 1.5607486963272095, -0.04427981376647949, -1.2542165517807007, 0.21812741458415985, -1.0332354307174683, 1.5975195169448853, -0.8014072179794312, 0.37465348839759827, -1.5837072134017944, 0.07537930458784103, -0.7242907285690308, -0.6841228008270264, -0.8166851997375488, -0.43943291902542114, -0.6662043333053589, 0.991025984287262, 2.485639810562134, 1.2512296438217163, -1.3748432397842407, 2.692746162414551, 0.6831731796264648, -0.08518584817647934, -1.010337233543396, 0.5037654638290405, 0.017315074801445007, -1.2619402408599854, -0.4829845428466797, -0.7810185551643372, -0.17787976562976837, -0.5044323801994324, -0.45119234919548035, -0.07518193870782852, 0.5755713582038879, -0.3460243046283722, -0.4650755822658539, -0.5161855220794678, -0.7833091020584106, 0.481397807598114, -0.39245444536209106, 0.9524990916252136, -0.33565542101860046, 1.8119328022003174, -0.6551703214645386, 0.5183674097061157, 0.6855934262275696, 1.2994872331619263, 0.23873396217823029, -0.06474877148866653, 0.2820209264755249, 0.39465081691741943, -0.03711533173918724, 0.596295952796936, 1.0879456996917725, 0.6923046708106995, 0.5954213738441467, 0.6839936375617981, -2.2520322799682617, 1.2527308464050293, -1.022821068763733, 0.27252197265625, 1.3207459449768066, -0.9192620515823364, 0.3377775549888611, -1.7922152280807495, -0.06890565901994705, 0.586553156375885, -2.2885923385620117, 0.29757681488990784, -1.3020317554473877, -0.4875595271587372, 1.02252197265625, 0.3843826949596405, -1.2290290594100952, 0.08567932993173599, -0.3530697226524353, 1.0525684356689453, 0.37998855113983154, 0.9935159087181091, -1.656683325767517, 0.03309793770313263, -0.2737690210342407, 0.07506725937128067, -1.2916001081466675, -1.4918490648269653, 0.5386859178543091, 0.5562342405319214, 0.5760238170623779, -0.0019105859100818634, 1.0202707052230835, -1.0725187063217163, 0.8055915832519531, -1.0994865894317627, -1.5803366899490356, -1.425168752670288, -2.208753824234009, -2.3941128253936768, 0.74022376537323, -0.4931942820549011, -0.48120570182800293, 1.923153042793274, -0.9108197689056396, -1.6758235692977905, 1.1843202114105225, 0.22351929545402527, 0.03360997885465622, 2.3490703105926514, 0.18691730499267578, -0.6990835070610046, 0.49456197023391724, -0.8205103278160095, 0.7881646156311035, -0.4405271112918854, 1.3022691011428833, 0.4914237856864929, -1.0907427072525024, 1.6300326585769653, -0.48398807644844055, 0.5647790431976318, -0.7150683403015137, -0.6057578921318054, -0.8047587871551514, 0.36472558975219727, 1.98137366771698, -0.19896858930587769, 1.5556000471115112, -0.2888058125972748, -1.4887501001358032, -1.5171964168548584, 0.9784478545188904, 0.4135216176509857, -0.849223256111145, 0.17748814821243286, -0.4419656991958618, 0.20349188148975372, -0.15200287103652954, 1.1323212385177612, 1.2994204759597778, 0.7329529523849487, -0.4043610095977783, -0.774063229560852, 0.21233896911144257, -0.11681670695543289, -0.741546094417572, -1.8038544654846191, -0.289899080991745, 0.10106630623340607, 0.5331987738609314, -1.15011727809906, 1.7408511638641357, 0.8381185531616211, 1.9310054779052734, 0.9264397025108337, -0.2876690924167633, 1.4429991245269775, 0.0796910747885704, 1.9146665334701538, -0.49469971656799316, 0.6733834743499756, -0.41655200719833374, -1.0960373878479004, 0.8859708309173584, -0.3853277266025543, -2.0217530727386475, -0.859774649143219, -0.6814099550247192, -0.11809644848108292, -0.7958008646965027, 0.8788747191429138, -0.19892077147960663, -1.488015055656433, 0.23266661167144775, -0.7355986833572388, 0.16824692487716675, -1.3055716753005981, 0.36657992005348206, 0.724938690662384, -0.7270615696907043, 0.0898943617939949, -0.22793251276016235, -1.2408453226089478, -0.4060913622379303, 0.27247872948646545, 1.9234856367111206, -0.7578575611114502, 0.8800603151321411, 1.0162265300750732, -0.6467769742012024, 0.0431891530752182, 0.21499072015285492, -0.35715699195861816, 0.8505946397781372, -1.1440815925598145, -0.4564172327518463, 1.2617701292037964, -0.26102685928344727, -0.5645164251327515, 1.517085313796997, 0.7378647923469543, -0.9885637760162354, -0.15220923721790314, -0.11316431313753128, -0.8573662638664246, 0.07734706252813339, -1.6119422912597656, -0.07746897637844086, 0.4170311987400055, -1.4763751029968262, -0.47570177912712097, -0.11630845814943314, 1.3015146255493164, -0.27836424112319946, 1.5093035697937012, -0.4154305160045624, -0.18507827818393707, -0.3401118516921997, -0.3613935112953186, 0.06379405409097672, -0.2211533486843109, -0.6656307578086853, 0.10581480711698532, -0.6989482045173645, 0.335054486989975, 1.3753221035003662, 0.27568861842155457, 0.07828666269779205, 0.4382438659667969, 1.1515171527862549, 0.36457493901252747, 0.05596848577260971, -0.8396267890930176, -1.4684475660324097, 1.9988714456558228, -1.462643027305603, 2.04789400100708, 0.7687896490097046, -0.05792084336280823, -1.7399729490280151, -1.7759053707122803, 1.3353805541992188, 1.0788702964782715, 2.308350086212158, 0.4852761924266815, 0.4023821949958801, -0.942756712436676, -0.6778309345245361, 0.30100926756858826, -0.9723729491233826, -0.6925300359725952, 0.16064226627349854, 2.3720343112945557, 1.660342812538147, -0.44087570905685425, -0.22034978866577148, -0.962774932384491, 1.4060933589935303, -0.2918141186237335, 0.225655198097229, 2.0468709468841553, -0.21462929248809814, -1.1228920221328735, 1.346130132675171, -2.4129745960235596, 0.15353231132030487, 2.053088426589966, 0.38314297795295715, 0.1526801586151123, -1.3828696012496948, -0.7045862674713135, -0.3212134540081024, -0.36677858233451843, -1.201862096786499, 0.5302160978317261, -0.25513631105422974, -0.8095905184745789, -1.395524501800537, 0.21894018352031708, -1.0913424491882324, -1.6039342880249023, 0.24152375757694244, 1.8892890214920044, 2.0031332969665527, -0.6831802725791931, 1.5438398122787476, -0.2345646321773529, 0.11365646123886108, 1.3114991188049316, 1.2454885244369507, 3.1266043186187744, 1.8295220136642456, -1.27114737033844, 0.6237471103668213, -0.20721371471881866, -0.549611508846283, 1.201401710510254, -1.1427956819534302, 1.2615094184875488, -0.1645599603652954, -1.1967357397079468, -1.2850878238677979, 0.9040408730506897, 0.44085443019866943, 0.08166849613189697, -0.4986884295940399, 1.239776611328125, 0.11890905350446701, 1.3720248937606812, 0.617615282535553, -0.39453282952308655, 0.5741006731987, -0.5013375878334045, -0.549879252910614, 1.56022047996521, 0.24428845942020416, -1.43767249584198, -2.2972381114959717, -0.09195946156978607, -0.8492822647094727, 0.013423729687929153, -0.65474933385849, -1.1088203191757202, 1.7137809991836548, 0.3858778178691864, -1.2837321758270264, -0.34676337242126465, -0.2753557562828064, -0.5522705912590027, 2.749403476715088, -1.3817487955093384, -0.2983858287334442, -0.929187536239624, -0.7089211344718933, 1.7795641422271729, -1.185072422027588, -0.25924620032310486, -0.9979905486106873, -0.5345718264579773, -1.1963319778442383, -0.5162330269813538, 0.0329761803150177, -0.9409356713294983, 0.8809365630149841, 0.19041721522808075, -1.263504981994629, -0.3666829466819763, -0.8575656414031982, 0.8515385985374451, -0.10662942379713058, 0.30952516198158264, 1.8023263216018677, 0.31954553723335266, -0.43562987446784973, 0.8130955100059509, 1.1511173248291016, 0.6032506227493286, -0.6467438340187073, 0.21984077990055084, -0.5582142472267151, 0.3357684910297394, -1.2784465551376343, 0.3091852068901062, -2.8597421646118164, 0.6090656518936157, -0.0496528297662735, -0.12201187759637833, -0.07948044687509537, -1.3837344646453857, 1.057362675666809, 2.544764280319214, -1.152585744857788, 0.5411394834518433, 0.3151119649410248, 1.2495595216751099, -1.633432149887085, 0.3924630284309387, -0.38347017765045166, 2.127013921737671, 0.19241729378700256, 1.256859540939331, -0.4578222930431366, -2.3182733058929443, 0.6771273612976074, -1.3063749074935913, -1.2862852811813354, 0.8264755606651306, -0.9134204387664795, 0.09815508872270584, -1.4179377555847168, -0.28948134183883667, -0.8561884164810181, -1.2874318361282349, 0.7110300660133362, 0.13073121011257172, 0.3899628818035126, -0.4757480323314667, 0.2660438120365143, -2.2777326107025146, -1.3774003982543945, -0.19548039138317108, -0.9798961281776428, 0.3530227541923523, -0.47119858860969543, 0.6643315553665161, -0.12576858699321747, -0.016792215406894684, 0.28050321340560913, 1.4972432851791382, 3.5018200874328613, 0.21904654800891876, 0.3754301071166992, -0.3075575828552246, -0.9352691769599915, 1.4692195653915405, 0.9359416961669922, -0.16765213012695312, -0.6008798480033875, -0.9756536483764648, 1.2617462873458862, 1.9294474124908447, 0.9226694703102112, -0.007168538868427277, -0.7847025990486145, -0.6346524953842163, -0.1930285394191742, 0.07366170734167099, 0.43116334080696106, 0.9733209609985352, 0.1576610803604126, 0.09279368817806244, 1.3687877655029297, 1.2070419788360596, -0.38996970653533936, 0.3043636679649353, -0.8443562388420105, -0.3419875502586365, 0.5296614766120911, 0.3020173907279968, -0.028273582458496094, 0.3034721612930298, -0.9090840220451355, -0.23620308935642242, -0.4048269987106323, -0.8822034597396851, -0.708538830280304, -0.5064194798469543, -0.36528316140174866, 1.670719861984253, 0.1314334273338318, -0.5000048279762268, -0.07746761292219162, -0.8492963910102844, -0.22161079943180084, -1.0930886268615723, 0.2155272215604782, -0.10306703299283981, -0.19299598038196564, -0.043745510280132294, 1.8416881561279297, -1.0090728998184204, -2.1388514041900635, 0.1819458156824112, 0.2463637739419937, -0.2359834462404251, 0.17145003378391266, 1.6194031238555908, 0.44263723492622375, 1.4301986694335938, 1.279812216758728, 0.9347577691078186, -0.6860492825508118, -1.3564190864562988, 0.6513823866844177, 0.9934982657432556, -1.500360369682312, 0.7812679409980774, 0.0022286707535386086, -0.3925631642341614, 0.5997454524040222, 1.2934205532073975, 0.5269190073013306, -1.9215648174285889, 0.7329896688461304, -0.9412012100219727, 0.8285247087478638, 0.7519411444664001, 0.5986632108688354, 0.3274635076522827, 0.7847375273704529, -1.1941819190979004, -1.0972449779510498, -0.6870442628860474, -0.7692861557006836, 1.9203380346298218, -0.41799110174179077, 0.5730688571929932, -0.025034481659531593, -1.334342360496521, -0.013125834986567497, 0.889926552772522, 0.38306716084480286, -0.43861526250839233, 0.801976203918457, -0.6230358481407166, -1.0230607986450195, -1.3696783781051636, -0.46512147784233093, -1.0718088150024414, -1.0106096267700195, 1.0398428440093994, 0.7643080949783325, 0.2882882058620453, 1.8221156597137451, 0.7535499930381775, 0.3440414369106293, -2.5992510318756104, 0.889040470123291, 0.2270023673772812, -0.02340509369969368, 0.8906216025352478, 0.43104472756385803, 1.1162418127059937, -0.007668225094676018, 0.5810422301292419, -2.5809404850006104, 2.373272657394409, -0.2066413164138794, 0.599755048751831, -0.07682023197412491, -0.3062545657157898, 1.0844167470932007, 0.5551833510398865, 0.49190449714660645, -1.157242774963379, 0.7066859006881714, -0.5970499515533447, 1.2345794439315796, 0.9145495295524597, -0.8407040238380432, -0.10978812724351883, 1.3986282348632812, 0.3997275233268738, -0.5506680607795715, -0.9330358505249023, -0.9485220909118652, 0.9766142964363098, 1.7173206806182861, -0.08267543464899063, -0.015917107462882996, 0.9115996956825256, 0.6014896035194397, -1.1355984210968018, 0.10416202247142792, -0.7453911900520325, -0.805133581161499, 1.705013632774353, 2.038879632949829, -0.13583892583847046, -0.2073521912097931, -0.7122457027435303, -1.33879554271698, 0.7780795693397522, -0.07104505598545074, 0.06576146185398102, 0.5677779912948608, -0.6888346076011658, 1.0386650562286377, 0.8486024141311646, 0.9752498269081116, 0.1193884089589119, 0.3056005835533142, 0.5321764349937439, -0.3653997480869293, -1.211287260055542, -0.3691127300262451, -1.1961525678634644, -2.540438413619995, 0.48239362239837646, -0.3224198818206787, -1.395460605621338, 0.05974479019641876, -1.0131361484527588, 0.9428823590278625, -0.6437122821807861, -1.1804990768432617, -1.5319050550460815, 0.1633038967847824, -0.06727804988622665, 0.8936654329299927, -1.5559883117675781, -0.22525180876255035, 1.2418829202651978, 0.8346373438835144, -0.6470913887023926, 0.9206099510192871, 0.20235732197761536, 1.0041037797927856, 0.7855986952781677, -0.34013548493385315, 0.5844510793685913, -0.030605673789978027, -1.3287043571472168, 0.6390436291694641, 1.2184118032455444, 0.16421683132648468, 1.5789507627487183, -0.41500407457351685, -0.04460573196411133, 0.3447248637676239, -0.555975079536438, -0.5369888544082642, -0.6026610136032104, 0.7039068937301636, 0.11428295820951462, -0.8947193026542664, -0.00042679812759160995, 0.03168756514787674, -0.2827235460281372, 0.06919742375612259, -1.4491201639175415, -0.09552410244941711, -0.29333192110061646, -0.7113741040229797, -1.2411187887191772, -0.11068028956651688, 1.318673849105835, -0.7165846824645996, -0.17473362386226654, 0.4978940486907959, 0.4068252444267273, 0.5292311906814575, 0.5051133632659912, -0.6470078825950623, -0.30572640895843506, -0.33595311641693115, -0.2787046432495117, 0.33201223611831665, 1.3466769456863403, -0.03130849450826645, -0.9938780069351196, 0.7561947107315063, -0.3457934260368347, 0.054551862180233, 1.9733831882476807, 0.10286442190408707, -0.6945080161094666, 0.37542667984962463, -0.6464641094207764, 2.004047155380249, 1.7560347318649292, 1.2934342622756958, -0.13162867724895477, -0.8947836756706238, 0.6716397404670715, -0.4270654320716858, -0.29437097907066345, 0.8317093253135681, 0.3687134087085724, -0.16120193898677826, -1.5290268659591675, 0.7819299697875977, 1.1740639209747314, -0.8428990244865417, -0.6993411183357239, 0.10212557017803192, -0.8073922991752625, 1.120982050895691, 0.5782154202461243, 0.3958092927932739, 0.3155399560928345, 1.6603574752807617, 0.6967642903327942, -0.36503008008003235, 0.48502346873283386, 0.5656781792640686, -0.19480453431606293, -2.0718562602996826, -1.287906527519226, 0.353295236825943, -0.6072720885276794, -1.546228051185608, 1.4543468952178955, -1.0389968156814575, -0.9536547660827637, 0.5501547455787659, 0.06485861539840698, 1.424032211303711, 0.36939793825149536, 1.56279718875885, 2.058187484741211, 0.8494665026664734, 0.3766614496707916, 1.2243931293487549, -0.24538925290107727, -0.5176259279251099, 1.8611552715301514, -0.41811397671699524, 0.45310765504837036, 1.0707632303237915, -0.3129575848579407, -1.160960078239441, -0.7613295912742615, -1.2516565322875977, -0.7490398287773132, 1.160058617591858, 0.06834640353918076, -1.027482271194458, 0.21582423150539398, 1.6218559741973877, 0.11688750237226486, -0.3042272627353668, 0.6502172946929932, 0.3811795711517334, -0.8242809176445007, -0.03445013612508774, -0.8965703845024109, 0.5797942280769348, -0.25262895226478577, -0.32002660632133484, 0.3709534704685211, 0.46550723910331726, 1.353649616241455, -0.09852335602045059, 0.049073874950408936, 1.0666929483413696, -1.5156418085098267, 1.5015075206756592, -0.6596086621284485, 0.2536356747150421, -2.2822563648223877, 1.3408293724060059, -0.7143386602401733, 1.8730844259262085, -2.64398455619812, 0.4399639368057251, -0.579677939414978, -0.4285988211631775, 0.31825152039527893, -0.36364713311195374, 0.13042981922626495, -0.14184752106666565, -1.1135696172714233, -0.04406766593456268, -0.618334174156189, 0.535155177116394, 1.0737028121948242, 1.2557790279388428, -1.1825777292251587, -0.22830073535442352, -1.6439101696014404, -0.09635977447032928, -0.6928488612174988, 0.22708362340927124, -1.9630457162857056, -0.09625234454870224, -1.9822083711624146, -2.22811222076416, -1.2978577613830566, -0.7381791472434998, 1.0954492092132568, 0.142536461353302, -0.8725569844245911, 1.31906259059906, -0.3318600356578827, -1.8150532245635986, 1.0850763320922852, -2.026965379714966 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
If someone wants to give it a shot, feel free to comment `#self-assign` and it will assign the issue to you. Feel free to ping us here if you have questions or if we can help :)
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
37
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - If someone wants to give it a shot, feel free to comment `#self-assign` and it will assign the issue to you. Feel free to ping us here if you have questions or if we can help :)
[ -1.160651683807373, -0.895520031452179, -0.8101415038108826, 1.591101050376892, -0.07814791053533554, -1.243514895439148, 0.18331453204154968, -1.0582562685012817, 1.6232577562332153, -0.8004816770553589, 0.3806670308113098, -1.590840458869934, 0.13563409447669983, -0.7386615872383118, -0.7162583470344543, -0.8262709975242615, -0.4790814518928528, -0.6510462164878845, 0.9488600492477417, 2.4905402660369873, 1.2684320211410522, -1.394940972328186, 2.6823694705963135, 0.6887387037277222, -0.05364587903022766, -0.9821079969406128, 0.5109079480171204, 0.039574917405843735, -1.2488088607788086, -0.4753544330596924, -0.8250448107719421, -0.1949673891067505, -0.5338613390922546, -0.5015234351158142, -0.05557781085371971, 0.5400781035423279, -0.3196672797203064, -0.4625328481197357, -0.5318565368652344, -0.8023829460144043, 0.5114974975585938, -0.3792823255062103, 0.9148225784301758, -0.4017653167247772, 1.8420357704162598, -0.6406956911087036, 0.511526346206665, 0.6652923822402954, 1.362412452697754, 0.24628965556621552, -0.04118698090314865, 0.28453150391578674, 0.40881603956222534, -0.06125335022807121, 0.5547615885734558, 1.1093242168426514, 0.6695800423622131, 0.5919175148010254, 0.719667911529541, -2.2210116386413574, 1.2937155961990356, -0.9974411725997925, 0.2927023470401764, 1.342918038368225, -0.9341878890991211, 0.3260226249694824, -1.809550404548645, -0.09784162789583206, 0.5849967002868652, -2.28879714012146, 0.2758907377719879, -1.2737205028533936, -0.5578679442405701, 1.0332279205322266, 0.39472493529319763, -1.2094712257385254, 0.10883432626724243, -0.3996492922306061, 1.062843918800354, 0.39485353231430054, 1.0243754386901855, -1.6393557786941528, 0.014623076654970646, -0.31436869502067566, 0.09990732371807098, -1.2964826822280884, -1.4881855249404907, 0.5387958288192749, 0.5822254419326782, 0.5470436811447144, 0.018215462565422058, 0.9973621368408203, -1.0101747512817383, 0.8465670347213745, -1.0874234437942505, -1.5949065685272217, -1.397796630859375, -2.1806626319885254, -2.4110236167907715, 0.7533705234527588, -0.4478117525577545, -0.483136385679245, 1.9186385869979858, -0.9007911682128906, -1.7075966596603394, 1.162766695022583, 0.19567273557186127, -0.006304448936134577, 2.35729718208313, 0.16477711498737335, -0.6841095089912415, 0.47731003165245056, -0.7880094647407532, 0.7862606048583984, -0.5108268857002258, 1.3137041330337524, 0.4450599253177643, -1.0954952239990234, 1.6339906454086304, -0.4875548481941223, 0.5904132723808289, -0.7297976613044739, -0.5938073992729187, -0.769398033618927, 0.39058008790016174, 1.9717034101486206, -0.2299177497625351, 1.565890908241272, -0.28689342737197876, -1.5026512145996094, -1.564013123512268, 0.9874562621116638, 0.41374215483665466, -0.7862701416015625, 0.18732187151908875, -0.38477975130081177, 0.17519795894622803, -0.10297317802906036, 1.1008269786834717, 1.320427656173706, 0.7470568418502808, -0.365505576133728, -0.7938113212585449, 0.17193341255187988, -0.0696932002902031, -0.7396559715270996, -1.7867873907089233, -0.32613980770111084, 0.06565068662166595, 0.55030757188797, -1.1765648126602173, 1.7047204971313477, 0.8331201672554016, 1.961065411567688, 0.9437374472618103, -0.26665568351745605, 1.497134804725647, 0.09338654577732086, 1.8798396587371826, -0.494889497756958, 0.6827152371406555, -0.45917388796806335, -1.1227402687072754, 0.8393732309341431, -0.4299378991127014, -2.027144193649292, -0.8351205587387085, -0.7372920513153076, -0.07517368346452713, -0.7906062006950378, 0.896135151386261, -0.2095329910516739, -1.4459762573242188, 0.26487064361572266, -0.7275760173797607, 0.14044155180454254, -1.2974458932876587, 0.4009065628051758, 0.7297109961509705, -0.7250927090644836, 0.11849287897348404, -0.23809315264225006, -1.208844542503357, -0.41158270835876465, 0.28409552574157715, 1.9340851306915283, -0.760783851146698, 0.8651781678199768, 1.0029484033584595, -0.6443347930908203, -0.0046041724272072315, 0.28728851675987244, -0.34739288687705994, 0.8587719202041626, -1.174695372581482, -0.44413939118385315, 1.2679551839828491, -0.2278144508600235, -0.571938693523407, 1.52192223072052, 0.7579050064086914, -0.9946108460426331, -0.12869159877300262, -0.11041293293237686, -0.8212118744850159, 0.03792468458414078, -1.5891454219818115, -0.06948001682758331, 0.38971224427223206, -1.4718965291976929, -0.5096930265426636, -0.10462996363639832, 1.2539660930633545, -0.2487868070602417, 1.5201767683029175, -0.37575259804725647, -0.2312111258506775, -0.32571372389793396, -0.356017142534256, 0.040004536509513855, -0.2147061675786972, -0.6802636981010437, 0.11881231516599655, -0.7101143002510071, 0.3418913781642914, 1.3970203399658203, 0.26837286353111267, 0.05307498574256897, 0.43756136298179626, 1.166215181350708, 0.34903717041015625, 0.0518806129693985, -0.8523467779159546, -1.4385708570480347, 1.9714181423187256, -1.4291260242462158, 2.0668187141418457, 0.8010591268539429, -0.07213369756937027, -1.7762398719787598, -1.7809925079345703, 1.3764731884002686, 1.1016278266906738, 2.3584296703338623, 0.5376426577568054, 0.3907180726528168, -0.980093240737915, -0.6960300803184509, 0.2998473346233368, -0.9962042570114136, -0.7518799901008606, 0.12867799401283264, 2.4213967323303223, 1.6895318031311035, -0.445819228887558, -0.2245861440896988, -0.992051362991333, 1.3992066383361816, -0.2597487270832062, 0.2001010924577713, 2.0027177333831787, -0.2111203670501709, -1.072088599205017, 1.2923588752746582, -2.3786799907684326, 0.110224649310112, 2.0464704036712646, 0.3529690206050873, 0.1592121422290802, -1.403458833694458, -0.6717325448989868, -0.2999390661716461, -0.3595688045024872, -1.2249349355697632, 0.48818933963775635, -0.263837605714798, -0.7919622659683228, -1.4076189994812012, 0.21745966374874115, -1.1041927337646484, -1.5393388271331787, 0.23070219159126282, 1.8738272190093994, 1.9808146953582764, -0.67399001121521, 1.5660557746887207, -0.23958170413970947, 0.14289195835590363, 1.3525813817977905, 1.2483981847763062, 3.16196608543396, 1.866441249847412, -1.2531832456588745, 0.6100674867630005, -0.18825939297676086, -0.5555105805397034, 1.238317847251892, -1.1310317516326904, 1.2847843170166016, -0.21453063189983368, -1.1900222301483154, -1.2691283226013184, 0.9166247248649597, 0.4646655321121216, 0.0836104080080986, -0.48698586225509644, 1.2424222230911255, 0.09900826215744019, 1.3389911651611328, 0.5891262292861938, -0.35520222783088684, 0.6044061183929443, -0.47099143266677856, -0.5017375946044922, 1.552245020866394, 0.28148671984672546, -1.4223579168319702, -2.290456771850586, -0.05701366066932678, -0.8491950035095215, -0.02319074422121048, -0.6727349758148193, -1.1351184844970703, 1.7304314374923706, 0.3829467296600342, -1.2985942363739014, -0.3460662066936493, -0.26876258850097656, -0.5965467691421509, 2.7092833518981934, -1.4196972846984863, -0.3039602041244507, -0.9231821298599243, -0.6984023451805115, 1.7452583312988281, -1.1618388891220093, -0.2480786293745041, -0.9679616093635559, -0.534254252910614, -1.1991891860961914, -0.5316233038902283, 0.01672232523560524, -0.9191438555717468, 0.8845337629318237, 0.16547231376171112, -1.264235496520996, -0.3413466513156891, -0.8640845417976379, 0.7675050497055054, -0.10114577412605286, 0.3035532534122467, 1.859417200088501, 0.3449111580848694, -0.44638311862945557, 0.7746789455413818, 1.2112243175506592, 0.5615221858024597, -0.6672098636627197, 0.2498159557580948, -0.5772208571434021, 0.3248244524002075, -1.2506893873214722, 0.2929827570915222, -2.8295211791992188, 0.6054131984710693, 0.004440225660800934, -0.14223340153694153, 0.003973975777626038, -1.3280069828033447, 1.0409494638442993, 2.579240322113037, -1.1634126901626587, 0.5076686143875122, 0.28723767399787903, 1.248759388923645, -1.6400518417358398, 0.3559246361255646, -0.40243813395500183, 2.1062252521514893, 0.16921451687812805, 1.2389731407165527, -0.4988645911216736, -2.308288335800171, 0.6727296113967896, -1.3148815631866455, -1.2885464429855347, 0.7996640205383301, -0.912878692150116, 0.027074165642261505, -1.3743230104446411, -0.29388323426246643, -0.8284206986427307, -1.2899694442749023, 0.6981791853904724, 0.1152164414525032, 0.4418390989303589, -0.4835244119167328, 0.2715628147125244, -2.222193956375122, -1.4071202278137207, -0.17244075238704681, -0.9590731263160706, 0.3505600392818451, -0.48512470722198486, 0.678681492805481, -0.15094755589962006, -0.02641519159078598, 0.2756664752960205, 1.4341474771499634, 3.445765972137451, 0.21421661972999573, 0.37414783239364624, -0.32853400707244873, -0.9503496289253235, 1.4715747833251953, 0.9568282961845398, -0.12464205175638199, -0.5882848501205444, -0.9369121789932251, 1.24552583694458, 1.888044834136963, 0.9688974022865295, 0.019968852400779724, -0.7942816019058228, -0.6461645364761353, -0.19301438331604004, 0.09208867698907852, 0.3826761245727539, 0.9487719535827637, 0.1330028772354126, 0.13898657262325287, 1.332647442817688, 1.2291061878204346, -0.4055929481983185, 0.28783127665519714, -0.8116729259490967, -0.34730052947998047, 0.5694912075996399, 0.3031136691570282, -0.048794519156217575, 0.26837238669395447, -0.9146386384963989, -0.2512882947921753, -0.4287447929382324, -0.8798092603683472, -0.6939340829849243, -0.5158414244651794, -0.3070189356803894, 1.6862518787384033, 0.11198276281356812, -0.5299221873283386, -0.10508254170417786, -0.9208093881607056, -0.17347010970115662, -1.0723166465759277, 0.22284573316574097, -0.09203293174505234, -0.21150919795036316, -0.010277346707880497, 1.8873097896575928, -1.0338085889816284, -2.1713812351226807, 0.1883765310049057, 0.1981300264596939, -0.2751181125640869, 0.15798760950565338, 1.5978323221206665, 0.468645840883255, 1.4510830640792847, 1.3301700353622437, 0.9596471786499023, -0.6887087225914001, -1.3360116481781006, 0.6230318546295166, 1.020266056060791, -1.5262962579727173, 0.7450722455978394, 0.020991500467061996, -0.42730894684791565, 0.6073023676872253, 1.264394998550415, 0.5439461469650269, -1.86724054813385, 0.7170117497444153, -0.8828045129776001, 0.852023720741272, 0.7269861102104187, 0.5695326328277588, 0.36715489625930786, 0.7804456949234009, -1.1993106603622437, -1.11525297164917, -0.6769536733627319, -0.7261941432952881, 1.923084020614624, -0.38167479634284973, 0.5880453586578369, -0.07718085497617722, -1.3572044372558594, -0.052940741181373596, 0.8851298093795776, 0.3891037702560425, -0.469087690114975, 0.785676896572113, -0.6252280473709106, -1.0012843608856201, -1.3666059970855713, -0.516402006149292, -1.0394831895828247, -0.9961965084075928, 1.087607502937317, 0.7936394810676575, 0.29850316047668457, 1.8703720569610596, 0.7421609163284302, 0.32001250982284546, -2.588759660720825, 0.8378503322601318, 0.2600845396518707, -0.022809937596321106, 0.8902460932731628, 0.4534582793712616, 1.0640398263931274, -0.04471335932612419, 0.5311115980148315, -2.5296268463134766, 2.4151952266693115, -0.21107237040996552, 0.6006420850753784, -0.05964255705475807, -0.22969086468219757, 1.1305747032165527, 0.540215253829956, 0.4721771776676178, -1.1339462995529175, 0.6790826320648193, -0.5756824016571045, 1.2854679822921753, 0.8604785203933716, -0.8516271710395813, -0.10830704867839813, 1.3814316987991333, 0.4097672700881958, -0.5574312806129456, -0.9388647079467773, -0.9564993977546692, 0.9965192079544067, 1.7389726638793945, -0.04200294241309166, 0.034261930733919144, 0.9531516432762146, 0.5733364820480347, -1.1934537887573242, 0.08033537864685059, -0.7711313962936401, -0.7753753662109375, 1.6706037521362305, 2.021392583847046, -0.14338737726211548, -0.1847546398639679, -0.6937982439994812, -1.3571112155914307, 0.7870863676071167, -0.02798338234424591, 0.06553706526756287, 0.5568751096725464, -0.6732167601585388, 1.0719066858291626, 0.9069609045982361, 0.9184824228286743, 0.1302710771560669, 0.3177480101585388, 0.5287070274353027, -0.4229566752910614, -1.2056474685668945, -0.32013657689094543, -1.128760814666748, -2.5459706783294678, 0.492064893245697, -0.29603275656700134, -1.3770066499710083, 0.01846468821167946, -0.9924299716949463, 0.9736524820327759, -0.6163545846939087, -1.130776047706604, -1.5622398853302002, 0.15959112346172333, -0.05316460505127907, 0.9325888752937317, -1.5694142580032349, -0.17827513813972473, 1.2081104516983032, 0.8446205258369446, -0.6508269309997559, 0.8905162811279297, 0.22443196177482605, 1.06094229221344, 0.8165364861488342, -0.3536088466644287, 0.5185278058052063, -0.01947537064552307, -1.3563668727874756, 0.5731667280197144, 1.2174471616744995, 0.12613365054130554, 1.5521674156188965, -0.40331465005874634, -0.0767778754234314, 0.32312262058258057, -0.5069440007209778, -0.5059887170791626, -0.6327334642410278, 0.6539524793624878, 0.09545164555311203, -0.9089202284812927, 0.014179293997585773, 0.048801545053720474, -0.29848912358283997, 0.08742231875658035, -1.4737576246261597, -0.04320330545306206, -0.28479593992233276, -0.7552786469459534, -1.2414134740829468, -0.04105088859796524, 1.3261244297027588, -0.7199320793151855, -0.2041831910610199, 0.5053038001060486, 0.39001524448394775, 0.5282167792320251, 0.4859922230243683, -0.6700870990753174, -0.33594539761543274, -0.2918992042541504, -0.31865134835243225, 0.2930231988430023, 1.3256561756134033, -0.06733869016170502, -1.0093379020690918, 0.7593092322349548, -0.3643532991409302, 0.019575942307710648, 1.9513691663742065, 0.12467091530561447, -0.701054036617279, 0.3504413962364197, -0.6477373242378235, 2.0258262157440186, 1.7627770900726318, 1.3409676551818848, -0.16618241369724274, -0.8650449514389038, 0.6728716492652893, -0.3868630528450012, -0.30236315727233887, 0.8242064714431763, 0.33908170461654663, -0.16918641328811646, -1.5483741760253906, 0.7254525423049927, 1.191572904586792, -0.856572687625885, -0.7476983070373535, 0.11860861629247665, -0.7886762619018555, 1.1067285537719727, 0.614820122718811, 0.43098124861717224, 0.3081500232219696, 1.6500838994979858, 0.6820282340049744, -0.3816196322441101, 0.5240639448165894, 0.523033857345581, -0.14975246787071228, -2.0888121128082275, -1.28018057346344, 0.3311742842197418, -0.6246694326400757, -1.5730878114700317, 1.435102939605713, -1.0868982076644897, -0.9328218102455139, 0.5207691192626953, 0.0935523584485054, 1.4785451889038086, 0.33880022168159485, 1.5294932126998901, 2.0386924743652344, 0.8480857610702515, 0.3628545105457306, 1.2503949403762817, -0.22375060617923737, -0.459789901971817, 1.8927096128463745, -0.49250316619873047, 0.4531571567058563, 1.0399916172027588, -0.2931828796863556, -1.1764658689498901, -0.7160822749137878, -1.2582476139068604, -0.7569541931152344, 1.1390454769134521, 0.05460628122091293, -0.9934843182563782, 0.18813902139663696, 1.660787582397461, 0.07971417903900146, -0.3227950632572174, 0.6001091599464417, 0.41756394505500793, -0.8412757515907288, -0.023400984704494476, -0.9188814163208008, 0.6053965091705322, -0.22024384140968323, -0.3223949670791626, 0.3941638469696045, 0.4562426805496216, 1.3300738334655762, -0.09585002064704895, 0.025589805096387863, 1.105996012687683, -1.500761866569519, 1.4816535711288452, -0.6621544361114502, 0.23305043578147888, -2.3429863452911377, 1.3601073026657104, -0.6890783905982971, 1.820847988128662, -2.653003215789795, 0.4269162714481354, -0.6191118955612183, -0.39127129316329956, 0.3343309760093689, -0.3612983822822571, 0.13276472687721252, -0.15091381967067719, -1.1270469427108765, -0.00996627751737833, -0.6239405870437622, 0.5177217125892639, 1.097787857055664, 1.289111614227295, -1.1800485849380493, -0.2316734492778778, -1.662291169166565, -0.09631723165512085, -0.6869161128997803, 0.23622968792915344, -1.980681300163269, -0.10817742347717285, -1.9279377460479736, -2.2115478515625, -1.3328447341918945, -0.7049399614334106, 1.0933315753936768, 0.15006501972675323, -0.8703271150588989, 1.2808564901351929, -0.35260719060897827, -1.835057020187378, 1.0700030326843262, -2.03456711769104 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
I would rather have this functionality as a separate method. IMO it's always better to be explicit than to have an API where a single method can do different/uncorrelated things (somewhat reminds me of Pandas, and there is probably a good reason why PyArrow is more rigid in this aspect).
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
50
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - I would rather have this functionality as a separate method. IMO it's always better to be explicit than to have an API where a single method can do different/uncorrelated things (somewhat reminds me of Pandas, and there is probably a good reason why PyArrow is more rigid in this aspect).
[ -1.1706547737121582, -0.9165715575218201, -0.7993765473365784, 1.5321871042251587, -0.061782486736774445, -1.2707600593566895, 0.18224802613258362, -1.0692819356918335, 1.6468626260757446, -0.820591151714325, 0.3929552733898163, -1.61613929271698, 0.0563240572810173, -0.7124407887458801, -0.7173117995262146, -0.8338614106178284, -0.44860076904296875, -0.6726514101028442, 0.9627649188041687, 2.5321578979492188, 1.2435921430587769, -1.3757411241531372, 2.724281072616577, 0.6994807124137878, -0.06432970613241196, -0.9591619968414307, 0.5134848356246948, 0.055885814130306244, -1.2597792148590088, -0.46860820055007935, -0.8264302611351013, -0.18377073109149933, -0.4984416961669922, -0.48402976989746094, -0.08770280331373215, 0.5365912914276123, -0.344089537858963, -0.45861703157424927, -0.5263957381248474, -0.792336106300354, 0.4927683174610138, -0.39524033665657043, 0.9654092788696289, -0.36577484011650085, 1.811010479927063, -0.6121169328689575, 0.47976207733154297, 0.6807569265365601, 1.34019136428833, 0.2672850787639618, -0.02160894125699997, 0.29652661085128784, 0.4115077555179596, -0.0652405172586441, 0.5882880091667175, 1.108346700668335, 0.6819533109664917, 0.6053850650787354, 0.7173164486885071, -2.2237842082977295, 1.2992433309555054, -0.9889841079711914, 0.30472373962402344, 1.2964104413986206, -0.9410412907600403, 0.3693232834339142, -1.7846561670303345, -0.07816089689731598, 0.6045218706130981, -2.2874436378479004, 0.25076618790626526, -1.2615258693695068, -0.5059570670127869, 1.0033639669418335, 0.3695724308490753, -1.2139936685562134, 0.08524690568447113, -0.3950808048248291, 1.046267032623291, 0.4136457145214081, 1.0485107898712158, -1.657729983329773, -0.0022141062654554844, -0.3118855357170105, 0.12294933944940567, -1.2836902141571045, -1.4791507720947266, 0.5131446719169617, 0.5790547728538513, 0.5698111057281494, 0.022595779970288277, 0.9833777546882629, -1.0507608652114868, 0.8282557725906372, -1.024436593055725, -1.5945731401443481, -1.4173721075057983, -2.2151308059692383, -2.3784544467926025, 0.7657086253166199, -0.45616549253463745, -0.4942711591720581, 1.8705509901046753, -0.9217406511306763, -1.7168176174163818, 1.1894229650497437, 0.24460157752037048, 0.021927155554294586, 2.3685779571533203, 0.18390214443206787, -0.7394523024559021, 0.5057356357574463, -0.7912076711654663, 0.7603753209114075, -0.48997223377227783, 1.337973713874817, 0.49078071117401123, -1.0908448696136475, 1.6210061311721802, -0.4760640859603882, 0.5584959983825684, -0.7488849759101868, -0.5983596444129944, -0.7858005166053772, 0.3959486782550812, 1.9260680675506592, -0.22911016643047333, 1.5923715829849243, -0.2759416103363037, -1.4709112644195557, -1.5965508222579956, 0.960317850112915, 0.4322233498096466, -0.7930372953414917, 0.17967551946640015, -0.41459763050079346, 0.17680557072162628, -0.09813161194324493, 1.0880436897277832, 1.274335265159607, 0.7213338613510132, -0.37656497955322266, -0.8006796836853027, 0.1839739829301834, -0.0777173787355423, -0.7058462500572205, -1.7979801893234253, -0.2925034165382385, 0.09141378104686737, 0.5301267504692078, -1.1558767557144165, 1.698896884918213, 0.8476235270500183, 1.950070858001709, 0.9460618495941162, -0.2891503572463989, 1.5078016519546509, 0.10359089821577072, 1.8630536794662476, -0.5160727500915527, 0.6802806854248047, -0.42405980825424194, -1.1189697980880737, 0.8514634370803833, -0.4280434846878052, -2.0507919788360596, -0.8357663750648499, -0.7069146633148193, -0.09338761866092682, -0.8021376729011536, 0.8819610476493835, -0.1968340128660202, -1.4397097826004028, 0.28033000230789185, -0.7491165995597839, 0.0986882746219635, -1.2831659317016602, 0.3617006242275238, 0.7313686013221741, -0.7018089294433594, 0.1211475059390068, -0.24089273810386658, -1.2119677066802979, -0.4042407274246216, 0.23780851066112518, 1.890910267829895, -0.7436425685882568, 0.8357800841331482, 0.9901233315467834, -0.6399036645889282, 0.021023521199822426, 0.2509640157222748, -0.34207186102867126, 0.874191164970398, -1.1423516273498535, -0.38790929317474365, 1.268196940422058, -0.22119273245334625, -0.5447234511375427, 1.5078990459442139, 0.7689769864082336, -0.9880601167678833, -0.16030438244342804, -0.1088881567120552, -0.8497301340103149, 0.01819944754242897, -1.5937469005584717, -0.07747960835695267, 0.3509317636489868, -1.4578840732574463, -0.4777897596359253, -0.15693658590316772, 1.28300142288208, -0.22935014963150024, 1.4907206296920776, -0.3676641285419464, -0.18786904215812683, -0.36853960156440735, -0.3653920590877533, 0.05484879016876221, -0.24609503149986267, -0.6358984708786011, 0.13740362226963043, -0.700899600982666, 0.3321474492549896, 1.3808679580688477, 0.32566437125205994, 0.09408140182495117, 0.48894330859184265, 1.1279542446136475, 0.3453082740306854, 0.052264027297496796, -0.8194018602371216, -1.470973014831543, 2.0014076232910156, -1.4532663822174072, 2.0475471019744873, 0.8267163634300232, -0.02153158001601696, -1.7680665254592896, -1.776425838470459, 1.3413442373275757, 1.1029855012893677, 2.333580493927002, 0.5249229669570923, 0.381003201007843, -0.9217251539230347, -0.686531662940979, 0.3240028917789459, -1.0172581672668457, -0.7693737149238586, 0.15595141053199768, 2.3754889965057373, 1.6927056312561035, -0.45013391971588135, -0.21405993402004242, -0.9671361446380615, 1.432215690612793, -0.2591836452484131, 0.17728061974048615, 2.044522523880005, -0.20323321223258972, -1.0931706428527832, 1.304048776626587, -2.3732051849365234, 0.11453824490308762, 1.9833002090454102, 0.3591577708721161, 0.12955859303474426, -1.4067561626434326, -0.7075443863868713, -0.31428584456443787, -0.38961395621299744, -1.2132986783981323, 0.5007064342498779, -0.2910733222961426, -0.7931019067764282, -1.4717671871185303, 0.20008425414562225, -1.0937391519546509, -1.5608290433883667, 0.21053527295589447, 1.8548818826675415, 2.0105276107788086, -0.696937620639801, 1.5416715145111084, -0.20820872485637665, 0.13519935309886932, 1.3260806798934937, 1.2437387704849243, 3.151866912841797, 1.8327045440673828, -1.2376095056533813, 0.6132184863090515, -0.2166309952735901, -0.569513201713562, 1.2138545513153076, -1.1630648374557495, 1.2626224756240845, -0.18053892254829407, -1.189761996269226, -1.264119267463684, 0.9324425458908081, 0.4585459530353546, 0.05947123467922211, -0.5001571178436279, 1.2327896356582642, 0.12481435388326645, 1.3707102537155151, 0.5760167241096497, -0.31471487879753113, 0.5802745223045349, -0.46160784363746643, -0.5222825407981873, 1.5670835971832275, 0.2652072012424469, -1.4037361145019531, -2.3068041801452637, -0.08852178603410721, -0.8437320590019226, -0.033089250326156616, -0.6484405994415283, -1.1079201698303223, 1.7386051416397095, 0.3884419798851013, -1.2875206470489502, -0.3113381266593933, -0.2848668098449707, -0.5642667412757874, 2.72273588180542, -1.3894964456558228, -0.3197470009326935, -0.8948580026626587, -0.6524534225463867, 1.751204490661621, -1.1697707176208496, -0.20139433443546295, -0.9582659602165222, -0.5647475123405457, -1.2187271118164062, -0.5317151546478271, -0.01971863955259323, -0.9196993708610535, 0.8415124416351318, 0.21147499978542328, -1.2549471855163574, -0.33951807022094727, -0.8785732388496399, 0.8009617328643799, -0.10860192775726318, 0.33738231658935547, 1.8576172590255737, 0.34057164192199707, -0.43774664402008057, 0.799125075340271, 1.1602256298065186, 0.5872254371643066, -0.6710734367370605, 0.22985665500164032, -0.5989503860473633, 0.31902119517326355, -1.2437900304794312, 0.3024308979511261, -2.860316514968872, 0.6253252625465393, -0.010739339515566826, -0.15953437983989716, -0.06149601936340332, -1.3228733539581299, 1.0389155149459839, 2.571899175643921, -1.1214555501937866, 0.5310441255569458, 0.28207603096961975, 1.248745083808899, -1.664560317993164, 0.4006160795688629, -0.3753904700279236, 2.1110334396362305, 0.18811041116714478, 1.2455761432647705, -0.471303790807724, -2.3398025035858154, 0.66299968957901, -1.335758090019226, -1.2557445764541626, 0.8239596486091614, -0.9163093566894531, 0.047671496868133545, -1.3988460302352905, -0.24244986474514008, -0.8210503458976746, -1.2985923290252686, 0.709923267364502, 0.11081769317388535, 0.4073542058467865, -0.5010061264038086, 0.2921253442764282, -2.2033820152282715, -1.4007763862609863, -0.21407927572727203, -0.9538444876670837, 0.38015657663345337, -0.42782655358314514, 0.7133544087409973, -0.1622225046157837, -0.04031737148761749, 0.2978754937648773, 1.4486192464828491, 3.4693615436553955, 0.2018798589706421, 0.4150714874267578, -0.29155826568603516, -0.9255008101463318, 1.4826644659042358, 0.9130803942680359, -0.16938069462776184, -0.6369836926460266, -0.9930763244628906, 1.285476565361023, 1.938401222229004, 0.9622592926025391, 0.028410932049155235, -0.8024488687515259, -0.6507688760757446, -0.1647661328315735, 0.10748140513896942, 0.38117626309394836, 0.9320361614227295, 0.1505148708820343, 0.13029657304286957, 1.3938848972320557, 1.2543797492980957, -0.4601551294326782, 0.3186718821525574, -0.8402822613716125, -0.37259307503700256, 0.5423052906990051, 0.30332309007644653, -0.0477115735411644, 0.2782120108604431, -0.9269390106201172, -0.23820582032203674, -0.42615461349487305, -0.9032418727874756, -0.6821109056472778, -0.5039197206497192, -0.32092922925949097, 1.734596848487854, 0.10872545093297958, -0.5167120695114136, -0.06924166530370712, -0.870865523815155, -0.18342919647693634, -1.0675474405288696, 0.20627236366271973, -0.10025805979967117, -0.18788619339466095, -0.0022594123147428036, 1.8828139305114746, -1.0052447319030762, -2.1754937171936035, 0.19211174547672272, 0.26269999146461487, -0.31234392523765564, 0.17537875473499298, 1.5973618030548096, 0.4446481168270111, 1.4284064769744873, 1.3176994323730469, 0.9345200061798096, -0.6765668392181396, -1.3557077646255493, 0.6081979274749756, 1.0010100603103638, -1.4834907054901123, 0.7939894199371338, 0.026303580030798912, -0.433428019285202, 0.5894263386726379, 1.2738686800003052, 0.5264343023300171, -1.9092903137207031, 0.7407370209693909, -0.8757845163345337, 0.838591992855072, 0.7434888482093811, 0.574260413646698, 0.3339906334877014, 0.7510757446289062, -1.1928085088729858, -1.1131986379623413, -0.7354032397270203, -0.7234341502189636, 1.9068329334259033, -0.35014572739601135, 0.6137173175811768, -0.0559157058596611, -1.3755614757537842, 0.002541591413319111, 0.8542547821998596, 0.35296404361724854, -0.457520067691803, 0.7786740064620972, -0.6669062376022339, -1.0453768968582153, -1.3947241306304932, -0.44039902091026306, -1.0610458850860596, -0.9939287304878235, 1.085778832435608, 0.7647885084152222, 0.25473660230636597, 1.8669103384017944, 0.7343992590904236, 0.3265712559223175, -2.6276230812072754, 0.8470034003257751, 0.23403577506542206, -0.00817358959466219, 0.9179882407188416, 0.3885132968425751, 1.0671212673187256, -0.022740047425031662, 0.563666582107544, -2.5463576316833496, 2.356940984725952, -0.194404736161232, 0.6045469045639038, -0.03429345041513443, -0.27774909138679504, 1.0817025899887085, 0.5315128564834595, 0.5067993402481079, -1.1567000150680542, 0.6876840591430664, -0.5948206782341003, 1.26835036277771, 0.8679974675178528, -0.8338572978973389, -0.1115482747554779, 1.3462861776351929, 0.4250284731388092, -0.5457816123962402, -0.9247651696205139, -0.9749071002006531, 0.967119038105011, 1.7389193773269653, -0.05799092352390289, 0.0027066515758633614, 0.9255995750427246, 0.5632939338684082, -1.1950355768203735, 0.07111520320177078, -0.7395122647285461, -0.8027639985084534, 1.6964558362960815, 2.035496711730957, -0.1619933545589447, -0.2093495875597, -0.6476855874061584, -1.3626291751861572, 0.7894788384437561, -0.015793807804584503, 0.09868234395980835, 0.5546393990516663, -0.6925037503242493, 1.0644783973693848, 0.8647409677505493, 0.927178144454956, 0.15082383155822754, 0.30208513140678406, 0.49369940161705017, -0.3864291310310364, -1.1834492683410645, -0.3450877368450165, -1.17154061794281, -2.5568840503692627, 0.47668859362602234, -0.3069080710411072, -1.3768298625946045, 0.019873524084687233, -1.0009219646453857, 0.9369558691978455, -0.5993653535842896, -1.131027340888977, -1.5053482055664062, 0.20154249668121338, -0.042513489723205566, 0.9162998795509338, -1.5790903568267822, -0.16776813566684723, 1.2390528917312622, 0.873317539691925, -0.6539164185523987, 0.918758749961853, 0.24027439951896667, 1.010751724243164, 0.8432877659797668, -0.36673784255981445, 0.5471805930137634, -0.008355595171451569, -1.3353080749511719, 0.5898757576942444, 1.2183024883270264, 0.17019008100032806, 1.5736688375473022, -0.4314963221549988, -0.0416717454791069, 0.329643189907074, -0.5179733037948608, -0.508063793182373, -0.6344927549362183, 0.7089326977729797, 0.11968182772397995, -0.9313066005706787, 0.009581726044416428, 0.03984270989894867, -0.29019513726234436, 0.08386115729808807, -1.4502803087234497, -0.0619504451751709, -0.3070255517959595, -0.7207085490226746, -1.228062391281128, -0.06174078583717346, 1.3124786615371704, -0.7563027739524841, -0.18440239131450653, 0.48316359519958496, 0.42377007007598877, 0.5411700010299683, 0.5091355443000793, -0.6941333413124084, -0.3573591709136963, -0.27985814213752747, -0.2934989333152771, 0.3517020046710968, 1.2913976907730103, -0.08340383321046829, -1.0012297630310059, 0.7755090594291687, -0.3571312725543976, 0.016217758879065514, 1.9477862119674683, 0.12326853722333908, -0.7224298119544983, 0.32906022667884827, -0.6342838406562805, 2.011502981185913, 1.7671798467636108, 1.3509204387664795, -0.1313115805387497, -0.8881939649581909, 0.6622360944747925, -0.3745984435081482, -0.33610665798187256, 0.8508291840553284, 0.35997021198272705, -0.1593732237815857, -1.5435314178466797, 0.7182738184928894, 1.1908074617385864, -0.8467006683349609, -0.7014013528823853, 0.06022702902555466, -0.7952259182929993, 1.1238294839859009, 0.6247649788856506, 0.42437902092933655, 0.29859963059425354, 1.6946265697479248, 0.6790544986724854, -0.38788431882858276, 0.4918840229511261, 0.5196827054023743, -0.16270843148231506, -2.0857150554656982, -1.2194312810897827, 0.3304450511932373, -0.5897098183631897, -1.5358924865722656, 1.402533769607544, -1.1018890142440796, -0.9417064785957336, 0.542869508266449, 0.04407580941915512, 1.494768738746643, 0.3152240514755249, 1.54518723487854, 2.0440776348114014, 0.8753699660301208, 0.3220231235027313, 1.2025748491287231, -0.2095840722322464, -0.4472654163837433, 1.8782715797424316, -0.42926040291786194, 0.4498000144958496, 1.0579590797424316, -0.3134831488132477, -1.1544432640075684, -0.7294623255729675, -1.2131221294403076, -0.7626696228981018, 1.1586456298828125, 0.09231244772672653, -1.0465844869613647, 0.24030126631259918, 1.636636734008789, 0.08252256363630295, -0.3614842891693115, 0.5726717114448547, 0.4256639778614044, -0.8127809762954712, 0.004294544458389282, -0.9359215497970581, 0.5678035020828247, -0.23964077234268188, -0.33248448371887207, 0.39825212955474854, 0.4473392069339752, 1.3302850723266602, -0.07266991585493088, 0.07854399085044861, 1.1026493310928345, -1.4915119409561157, 1.4533886909484863, -0.6910827159881592, 0.24773451685905457, -2.327338933944702, 1.3823566436767578, -0.745731770992279, 1.8782130479812622, -2.6827878952026367, 0.45728519558906555, -0.6004192233085632, -0.37990400195121765, 0.31575214862823486, -0.34245365858078003, 0.14249064028263092, -0.15662741661071777, -1.1301054954528809, -0.03545811399817467, -0.6686022281646729, 0.4946429431438446, 1.0712538957595825, 1.2458910942077637, -1.1657594442367554, -0.24410812556743622, -1.633012056350708, -0.1339167356491089, -0.7129623889923096, 0.21928416192531586, -1.9758528470993042, -0.1040937602519989, -1.975283145904541, -2.256154775619507, -1.3451882600784302, -0.7172073721885681, 1.0855042934417725, 0.1474158614873886, -0.8768752217292786, 1.2721738815307617, -0.37503451108932495, -1.8444011211395264, 1.1089094877243042, -2.0381059646606445 ]
https://github.com/huggingface/datasets/issues/5468
Allow opposite of remove_columns on Dataset and DatasetDict
In the end I also think it would be nice to have it as a separate method, this way we can also have it for `IterableDataset` (which can't have `select` for indices)
### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution -
325
32
Allow opposite of remove_columns on Dataset and DatasetDict ### Feature request In this blog post https://huggingface.co/blog/audio-datasets, I noticed the following code: ```python COLUMNS_TO_KEEP = ["text", "audio"] all_columns = gigaspeech["train"].column_names columns_to_remove = set(all_columns) - set(COLUMNS_TO_KEEP) gigaspeech = gigaspeech.remove_columns(columns_to_remove) ``` This kind of thing happens a lot when you don't need to keep all columns from the dataset. It would be more convenient (and less error prone) if you could just write: ```python gigaspeech = gigaspeech.keep_columns(["text", "audio"]) ``` Internally, `keep_columns` could still call `remove_columns`, but it expresses more clearly what the user's intent is. ### Motivation Less code to write for the user of the dataset. ### Your contribution - In the end I also think it would be nice to have it as a separate method, this way we can also have it for `IterableDataset` (which can't have `select` for indices)
[ -1.1840059757232666, -0.908944845199585, -0.8097745180130005, 1.5823670625686646, -0.048173509538173676, -1.2653944492340088, 0.17485898733139038, -1.0706654787063599, 1.6354033946990967, -0.8036683797836304, 0.397324800491333, -1.597825288772583, 0.09538523852825165, -0.7207145690917969, -0.7104935646057129, -0.8016704320907593, -0.4447552561759949, -0.6707202792167664, 0.9614158868789673, 2.488274097442627, 1.2406083345413208, -1.3640220165252686, 2.714116096496582, 0.6460839509963989, -0.06416472047567368, -0.9773939251899719, 0.5118533968925476, 0.01852717250585556, -1.239803433418274, -0.48982295393943787, -0.8073814511299133, -0.20594412088394165, -0.5075117349624634, -0.5023173093795776, -0.07231450825929642, 0.5659136772155762, -0.3461996614933014, -0.45315220952033997, -0.4861134886741638, -0.7797852754592896, 0.49864891171455383, -0.3670937120914459, 0.9804072380065918, -0.3706086575984955, 1.833119511604309, -0.6122428774833679, 0.5042749643325806, 0.6494685411453247, 1.3427402973175049, 0.2609974145889282, -0.04395856335759163, 0.2864759564399719, 0.4059773087501526, -0.04121534526348114, 0.6005489230155945, 1.108286738395691, 0.6712017059326172, 0.6432337164878845, 0.724157989025116, -2.2421631813049316, 1.2612013816833496, -1.0219093561172485, 0.29057466983795166, 1.3233295679092407, -0.9164617657661438, 0.35299018025398254, -1.7980557680130005, -0.05892832204699516, 0.5763866901397705, -2.273764133453369, 0.25360816717147827, -1.3152625560760498, -0.5080098509788513, 1.0539124011993408, 0.34436362981796265, -1.2428609132766724, 0.09710174053907394, -0.3715417981147766, 1.0635892152786255, 0.37447285652160645, 1.0246776342391968, -1.6471797227859497, 0.04568510875105858, -0.3114975392818451, 0.12717729806900024, -1.2560979127883911, -1.4631133079528809, 0.5347157716751099, 0.5948640704154968, 0.5583181977272034, 0.029345843940973282, 1.0075387954711914, -1.0422296524047852, 0.8162590861320496, -1.0697970390319824, -1.5988304615020752, -1.415828824043274, -2.1609714031219482, -2.4042584896087646, 0.7516538500785828, -0.46544113755226135, -0.48936915397644043, 1.892400860786438, -0.9223487377166748, -1.6957288980484009, 1.164807915687561, 0.23266690969467163, 0.028873223811388016, 2.375375986099243, 0.16573603451251984, -0.6853858828544617, 0.5085842609405518, -0.7708501815795898, 0.7798364162445068, -0.48631003499031067, 1.306207537651062, 0.45927369594573975, -1.0810779333114624, 1.645740032196045, -0.4835827350616455, 0.5664268732070923, -0.6940073370933533, -0.5957465171813965, -0.7893528342247009, 0.4065428674221039, 2.0058398246765137, -0.20148281753063202, 1.5572882890701294, -0.2710733115673065, -1.5179681777954102, -1.5353935956954956, 0.975852906703949, 0.3925599753856659, -0.79624342918396, 0.19536180794239044, -0.3799852132797241, 0.1819852739572525, -0.11285252869129181, 1.1214303970336914, 1.2750917673110962, 0.7497646808624268, -0.34939509630203247, -0.7771047949790955, 0.2123110145330429, -0.06641323119401932, -0.7610810399055481, -1.750101923942566, -0.30479535460472107, 0.07887949049472809, 0.5403723120689392, -1.1455496549606323, 1.7192291021347046, 0.8371431827545166, 1.9483102560043335, 0.931655764579773, -0.24941781163215637, 1.497001051902771, 0.11528225988149643, 1.889312982559204, -0.48132577538490295, 0.6425365805625916, -0.45805802941322327, -1.1211804151535034, 0.8457269668579102, -0.4215795695781708, -1.9967347383499146, -0.8330093026161194, -0.7475907802581787, -0.08028851449489594, -0.8086630702018738, 0.8777806758880615, -0.1900898665189743, -1.4731701612472534, 0.29287654161453247, -0.7388721108436584, 0.11896774172782898, -1.3215703964233398, 0.3967256247997284, 0.7434936165809631, -0.7505012154579163, 0.11680695414543152, -0.25844326615333557, -1.2068793773651123, -0.4184606671333313, 0.24461621046066284, 1.9439783096313477, -0.755950927734375, 0.8544915914535522, 0.9779145121574402, -0.6450115442276001, -0.02555248513817787, 0.26379504799842834, -0.3477107882499695, 0.8327815532684326, -1.1865299940109253, -0.44605332612991333, 1.2996073961257935, -0.21570703387260437, -0.5402824282646179, 1.513610601425171, 0.7550593614578247, -0.99750155210495, -0.15617375075817108, -0.12886294722557068, -0.8050658702850342, 0.032861050218343735, -1.588137149810791, -0.056970130652189255, 0.38827627897262573, -1.4527894258499146, -0.5009294152259827, -0.10955370962619781, 1.2311186790466309, -0.2204299122095108, 1.5002150535583496, -0.35331928730010986, -0.21731916069984436, -0.3528916537761688, -0.37163278460502625, 0.006385178305208683, -0.20426073670387268, -0.687122106552124, 0.11217773705720901, -0.6783333420753479, 0.3519730269908905, 1.3812708854675293, 0.2702908515930176, 0.03863319754600525, 0.4649781286716461, 1.1762471199035645, 0.3585471510887146, 0.07962936908006668, -0.8646592497825623, -1.4294356107711792, 1.9751743078231812, -1.476496934890747, 2.0496795177459717, 0.771774172782898, -0.04330730438232422, -1.7626434564590454, -1.7629314661026, 1.3724639415740967, 1.1050704717636108, 2.3305602073669434, 0.5315949320793152, 0.38719943165779114, -0.9469572901725769, -0.6604717969894409, 0.33197006583213806, -1.007189393043518, -0.7555728554725647, 0.15596787631511688, 2.3826920986175537, 1.7051223516464233, -0.4552435278892517, -0.25498783588409424, -0.9539915323257446, 1.3960464000701904, -0.26846280694007874, 0.1797362118959427, 2.0032241344451904, -0.19522131979465485, -1.1109658479690552, 1.321755290031433, -2.388303756713867, 0.12140698730945587, 2.031454086303711, 0.36407268047332764, 0.15754173696041107, -1.4308356046676636, -0.6977322697639465, -0.26922211050987244, -0.34097710251808167, -1.2445259094238281, 0.48909440636634827, -0.27126187086105347, -0.772336483001709, -1.431809663772583, 0.23031161725521088, -1.0993162393569946, -1.5500463247299194, 0.19110316038131714, 1.8601458072662354, 1.9867870807647705, -0.6859138011932373, 1.5373389720916748, -0.21346579492092133, 0.169117271900177, 1.37334406375885, 1.2198652029037476, 3.1608328819274902, 1.8554017543792725, -1.245825171470642, 0.6208730340003967, -0.23553290963172913, -0.5596407651901245, 1.2715431451797485, -1.1398155689239502, 1.2712501287460327, -0.232302725315094, -1.2100995779037476, -1.2591142654418945, 0.9022224545478821, 0.44011494517326355, 0.08367643505334854, -0.4838947653770447, 1.2234997749328613, 0.11449569463729858, 1.3531849384307861, 0.5974307656288147, -0.3792944550514221, 0.6048159003257751, -0.4808628559112549, -0.4736366271972656, 1.5680798292160034, 0.2553580105304718, -1.4066036939620972, -2.2816548347473145, -0.05068537965416908, -0.8450174927711487, -0.01244970690459013, -0.6564922332763672, -1.1080487966537476, 1.7068644762039185, 0.38188013434410095, -1.3053501844406128, -0.32766732573509216, -0.29313743114471436, -0.5934435129165649, 2.693077325820923, -1.419873833656311, -0.32649120688438416, -0.9401910305023193, -0.7052528858184814, 1.7660975456237793, -1.1757324934005737, -0.22661784291267395, -0.9484847187995911, -0.5517635345458984, -1.216506838798523, -0.5368372797966003, 0.02164508029818535, -0.8943033218383789, 0.8829749226570129, 0.19289381802082062, -1.2683053016662598, -0.35079139471054077, -0.8603147268295288, 0.7875053286552429, -0.12050735205411911, 0.3017524778842926, 1.8529107570648193, 0.3316134512424469, -0.4289117753505707, 0.7985774278640747, 1.157056450843811, 0.5776242017745972, -0.6694472432136536, 0.28168630599975586, -0.5988298654556274, 0.3462907075881958, -1.2636743783950806, 0.30791354179382324, -2.8446028232574463, 0.6182633638381958, -0.012104861438274384, -0.13121330738067627, -0.01772126741707325, -1.3396151065826416, 1.0270494222640991, 2.5753886699676514, -1.1257069110870361, 0.49777933955192566, 0.25763702392578125, 1.2583664655685425, -1.6804097890853882, 0.3969274163246155, -0.3856258988380432, 2.1206865310668945, 0.15710046887397766, 1.2470868825912476, -0.472763329744339, -2.344271183013916, 0.6688956022262573, -1.345187783241272, -1.3140406608581543, 0.8227921724319458, -0.9142867922782898, -0.0036029103212058544, -1.3906099796295166, -0.2654291093349457, -0.8505032062530518, -1.2927340269088745, 0.7464107275009155, 0.11423715949058533, 0.410494327545166, -0.4704456627368927, 0.2982815206050873, -2.220616102218628, -1.4050132036209106, -0.17970286309719086, -0.9741535186767578, 0.33211156725883484, -0.48469480872154236, 0.6916705369949341, -0.16731393337249756, -0.02678995579481125, 0.29222264885902405, 1.426218867301941, 3.484950065612793, 0.2101576179265976, 0.3998694121837616, -0.3323354423046112, -0.9553645849227905, 1.4553502798080444, 0.94732266664505, -0.1836329847574234, -0.6089321970939636, -0.9620693922042847, 1.2523527145385742, 1.903613567352295, 0.9310682415962219, 0.03465614095330238, -0.7750499844551086, -0.6188338994979858, -0.1986922323703766, 0.06476649641990662, 0.38909342885017395, 0.9462743997573853, 0.18213340640068054, 0.14189225435256958, 1.3334563970565796, 1.1965123414993286, -0.3979940712451935, 0.26748237013816833, -0.7885245084762573, -0.3468572199344635, 0.5958600044250488, 0.3185676038265228, -0.037877682596445084, 0.2602041959762573, -0.8970924019813538, -0.24550598859786987, -0.43356919288635254, -0.9306063652038574, -0.696574330329895, -0.48712068796157837, -0.2890734076499939, 1.6747591495513916, 0.09942954778671265, -0.5495394468307495, -0.10927607864141464, -0.904374361038208, -0.17300555109977722, -1.08585524559021, 0.17386040091514587, -0.1267041265964508, -0.21732139587402344, -0.006470291875302792, 1.8830056190490723, -1.0248931646347046, -2.1601781845092773, 0.21243584156036377, 0.2466859519481659, -0.2616354525089264, 0.16813723742961884, 1.584657073020935, 0.44909384846687317, 1.428876519203186, 1.3218449354171753, 0.9700262546539307, -0.6854692697525024, -1.376996397972107, 0.6271121501922607, 0.977642834186554, -1.5177810192108154, 0.7334926128387451, 0.04445403814315796, -0.3978944420814514, 0.588710367679596, 1.2666844129562378, 0.529604971408844, -1.862413763999939, 0.6825758218765259, -0.896152675151825, 0.8338190913200378, 0.7415893077850342, 0.5975467562675476, 0.3579787015914917, 0.7645740509033203, -1.1563975811004639, -1.1090338230133057, -0.6856734752655029, -0.7358531951904297, 1.9156981706619263, -0.34948161244392395, 0.5839257836341858, -0.04836869239807129, -1.379186749458313, -0.006439600605517626, 0.8801912069320679, 0.37050727009773254, -0.4755227267742157, 0.778921902179718, -0.6756405830383301, -0.9959007501602173, -1.3782755136489868, -0.4924853444099426, -1.0511140823364258, -1.005179524421692, 1.0574111938476562, 0.7946032285690308, 0.27857711911201477, 1.851009488105774, 0.7654830813407898, 0.3251701891422272, -2.617788314819336, 0.8431735634803772, 0.24654898047447205, -0.014597732573747635, 0.8841474652290344, 0.4424010217189789, 1.0635871887207031, -0.016036417335271835, 0.5436479449272156, -2.5374064445495605, 2.416642189025879, -0.2064409703016281, 0.6050958037376404, -0.062101732939481735, -0.3048984110355377, 1.1169403791427612, 0.5319471955299377, 0.4977397620677948, -1.1761988401412964, 0.6867689490318298, -0.5839083194732666, 1.2625987529754639, 0.8932172656059265, -0.8566886782646179, -0.11615736782550812, 1.3748760223388672, 0.4281999468803406, -0.6001090407371521, -0.9360023736953735, -0.9559904932975769, 1.0053774118423462, 1.7016375064849854, -0.05240260437130928, -0.009546521119773388, 0.9447288513183594, 0.5784415602684021, -1.180730938911438, 0.08073592185974121, -0.7501255869865417, -0.8013584017753601, 1.701583743095398, 2.0124495029449463, -0.129999577999115, -0.20015594363212585, -0.718458890914917, -1.334744930267334, 0.7729746699333191, 0.026279468089342117, 0.07384616881608963, 0.5960625410079956, -0.7110542058944702, 1.0858089923858643, 0.8967204689979553, 0.9529128074645996, 0.150349423289299, 0.3341659605503082, 0.5080360770225525, -0.4019394516944885, -1.2120788097381592, -0.34309330582618713, -1.1660163402557373, -2.535616636276245, 0.4949796497821808, -0.3179776668548584, -1.3582274913787842, 0.026735298335552216, -0.9689463973045349, 0.9438231587409973, -0.6230051517486572, -1.1549204587936401, -1.5243538618087769, 0.17412863671779633, -0.04785871505737305, 0.9169729351997375, -1.6162060499191284, -0.17462319135665894, 1.2030946016311646, 0.9058445692062378, -0.6805424690246582, 0.900415301322937, 0.21941569447517395, 1.022932767868042, 0.8742799758911133, -0.3691120445728302, 0.567230761051178, -0.035692326724529266, -1.335323452949524, 0.6063080430030823, 1.1993086338043213, 0.1390306055545807, 1.5671969652175903, -0.3991629481315613, -0.06636805832386017, 0.3181614279747009, -0.5361932516098022, -0.5256834626197815, -0.6741441488265991, 0.6824727654457092, 0.1252530962228775, -0.8844664096832275, 0.010198439471423626, 0.040790628641843796, -0.25585436820983887, 0.0734005942940712, -1.4911667108535767, -0.05676400661468506, -0.27477461099624634, -0.7370330691337585, -1.2171964645385742, -0.09155968576669693, 1.3261990547180176, -0.7524281144142151, -0.1708352267742157, 0.48103317618370056, 0.37233635783195496, 0.5182924866676331, 0.4372909367084503, -0.6802292466163635, -0.34019166231155396, -0.30235907435417175, -0.2889871895313263, 0.3159264624118805, 1.3628528118133545, -0.0638425350189209, -1.0354207754135132, 0.7384577393531799, -0.3428877294063568, -0.002725645899772644, 1.9481072425842285, 0.09669429808855057, -0.7106343507766724, 0.35944482684135437, -0.641687273979187, 2.025320053100586, 1.7607663869857788, 1.3069179058074951, -0.13647650182247162, -0.8730159997940063, 0.6888130903244019, -0.4060176908969879, -0.3170454204082489, 0.8078521490097046, 0.35366809368133545, -0.16834916174411774, -1.5711333751678467, 0.7283370494842529, 1.1820017099380493, -0.8363721966743469, -0.6902241110801697, 0.07707778364419937, -0.7719141244888306, 1.0981042385101318, 0.6113761067390442, 0.4419381022453308, 0.3092893958091736, 1.677131175994873, 0.6878889799118042, -0.3813621699810028, 0.5034462809562683, 0.546209990978241, -0.14304861426353455, -2.093965530395508, -1.2914882898330688, 0.33618226647377014, -0.6048842072486877, -1.5479758977890015, 1.4219906330108643, -1.0766122341156006, -0.9210066199302673, 0.5506426095962524, 0.07089584320783615, 1.4744845628738403, 0.3556991517543793, 1.5384764671325684, 2.036247968673706, 0.8308653831481934, 0.3615536689758301, 1.2080049514770508, -0.22374862432479858, -0.4759288728237152, 1.8771165609359741, -0.45200151205062866, 0.4621814489364624, 1.0588375329971313, -0.3083389103412628, -1.1846219301223755, -0.7455360293388367, -1.2783427238464355, -0.7749457359313965, 1.1265138387680054, 0.08777498453855515, -1.0345044136047363, 0.22719115018844604, 1.6380679607391357, 0.05764782801270485, -0.32770460844039917, 0.5983625650405884, 0.4015430212020874, -0.8373889327049255, -0.018531817942857742, -0.9042292833328247, 0.5742048621177673, -0.23490622639656067, -0.32167646288871765, 0.41198983788490295, 0.4536409080028534, 1.3478072881698608, -0.06655246764421463, 0.0490574836730957, 1.1259936094284058, -1.4828581809997559, 1.4796595573425293, -0.6914234757423401, 0.2626532018184662, -2.293848752975464, 1.340876579284668, -0.7389461398124695, 1.8217365741729736, -2.6943583488464355, 0.42975348234176636, -0.6309590339660645, -0.41492506861686707, 0.34568074345588684, -0.3490912914276123, 0.14843790233135223, -0.18132814764976501, -1.1031408309936523, -0.01701253280043602, -0.62978196144104, 0.5389844179153442, 1.071251392364502, 1.2952226400375366, -1.1966279745101929, -0.24976831674575806, -1.679371953010559, -0.06304530054330826, -0.6338699460029602, 0.2173333317041397, -1.9961259365081787, -0.09471537917852402, -1.9558537006378174, -2.225348472595215, -1.341369390487671, -0.6936132907867432, 1.0987882614135742, 0.14714452624320984, -0.8591594099998474, 1.2931462526321411, -0.36847615242004395, -1.813413143157959, 1.0936803817749023, -1.9861655235290527 ]
https://github.com/huggingface/datasets/issues/5464
NonMatchingChecksumError for hendrycks_test
Thanks for reporting, @sarahwie. Please note this issue was already fixed in `datasets` 2.6.0 version: - #5040 If you update your `datasets` version, you will be able to load the dataset: ``` pip install -U datasets ```
### Describe the bug The checksum of the file has likely changed on the remote host. ### Steps to reproduce the bug `dataset = nlp.load_dataset("hendrycks_test", "anatomy")` ### Expected behavior no error thrown ### Environment info - `datasets` version: 2.2.1 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.9.13 - PyArrow version: 9.0.0 - Pandas version: 1.5.1
326
37
NonMatchingChecksumError for hendrycks_test ### Describe the bug The checksum of the file has likely changed on the remote host. ### Steps to reproduce the bug `dataset = nlp.load_dataset("hendrycks_test", "anatomy")` ### Expected behavior no error thrown ### Environment info - `datasets` version: 2.2.1 - Platform: macOS-13.1-arm64-arm-64bit - Python version: 3.9.13 - PyArrow version: 9.0.0 - Pandas version: 1.5.1 Thanks for reporting, @sarahwie. Please note this issue was already fixed in `datasets` 2.6.0 version: - #5040 If you update your `datasets` version, you will be able to load the dataset: ``` pip install -U datasets ```
[ -1.1270794868469238, -0.8291107416152954, -0.736801028251648, 1.4307700395584106, -0.1305014193058014, -1.2828882932662964, 0.15632571280002594, -1.0467504262924194, 1.7284445762634277, -0.8059728145599365, 0.35828888416290283, -1.7001981735229492, 0.025911666452884674, -0.604555070400238, -0.6539289951324463, -0.8631787300109863, -0.36345815658569336, -0.604840874671936, 0.9716989994049072, 2.5158870220184326, 1.155055284500122, -1.2815104722976685, 2.677262544631958, 0.7015857696533203, -0.18199346959590912, -0.860669732093811, 0.5706382393836975, 0.0031172987073659897, -1.3926423788070679, -0.3230108618736267, -0.9349943399429321, -0.14643600583076477, -0.5083620548248291, -0.5810016989707947, -0.005096266511827707, 0.4056428372859955, -0.35757890343666077, -0.49369314312934875, -0.42395612597465515, -0.8729421496391296, 0.3962293565273285, -0.35464370250701904, 0.9680529832839966, -0.484611451625824, 1.8114259243011475, -0.5573350191116333, 0.4896481931209564, 0.7388603687286377, 1.1914525032043457, 0.10334544628858566, 0.02497238665819168, 0.3975340723991394, 0.35363736748695374, 0.018730144947767258, 0.4514259994029999, 1.0172110795974731, 0.5347021222114563, 0.5495026111602783, 0.6353795528411865, -2.237527847290039, 1.257826566696167, -0.9924455285072327, 0.24024106562137604, 1.328935146331787, -0.9999992847442627, 0.27581045031547546, -1.6696767807006836, -0.08186706155538559, 0.470232754945755, -2.239339828491211, 0.29263418912887573, -1.3243565559387207, -0.5413530468940735, 1.0563304424285889, 0.45677781105041504, -1.2130736112594604, -0.03992338106036186, -0.384248286485672, 0.9838480353355408, 0.4106411039829254, 1.117543339729309, -1.6499296426773071, -0.0003931652754545212, -0.37687891721725464, -0.06366518139839172, -1.327965259552002, -1.491105556488037, 0.5737071633338928, 0.7192413806915283, 0.6079295873641968, -0.0328635647892952, 0.8897834420204163, -0.9230060577392578, 0.7198255658149719, -0.9550344347953796, -1.8858885765075684, -1.3845645189285278, -2.4037482738494873, -2.3099212646484375, 0.7507967352867126, -0.4565673768520355, -0.4739595055580139, 2.032764196395874, -1.0455877780914307, -1.8008809089660645, 1.1315865516662598, 0.28829777240753174, -0.14200885593891144, 2.3216381072998047, 0.29521146416664124, -0.5952630043029785, 0.5148677825927734, -0.7983455061912537, 0.6726379990577698, -0.4415052533149719, 1.295637845993042, 0.41049379110336304, -1.1306370496749878, 1.5298393964767456, -0.49359095096588135, 0.6548235416412354, -0.6479006409645081, -0.4606613516807556, -0.7891567945480347, 0.25795888900756836, 1.8633018732070923, -0.29886940121650696, 1.4751646518707275, -0.31332316994667053, -1.544420599937439, -1.5893276929855347, 0.7619801759719849, 0.47462204098701477, -0.5695080161094666, 0.17404550313949585, -0.2276279628276825, 0.05188857764005661, -0.015873348340392113, 1.166505217552185, 1.242569088935852, 0.763949990272522, -0.25417768955230713, -0.866218090057373, 0.2739909589290619, 0.03272482752799988, -0.7668784260749817, -1.7580931186676025, -0.28430983424186707, 0.09387066960334778, 0.5929649472236633, -1.2169828414916992, 1.7299811840057373, 0.8633708357810974, 1.8661242723464966, 1.0420417785644531, -0.26135125756263733, 1.4450823068618774, 0.06442271173000336, 1.9112067222595215, -0.41927841305732727, 0.7020185589790344, -0.3218036890029907, -1.0618942975997925, 0.819896936416626, -0.361685186624527, -2.101613998413086, -0.6117450594902039, -0.9275808930397034, -0.16577628254890442, -0.8330457806587219, 1.0847901105880737, -0.27654802799224854, -1.309940218925476, 0.2500777244567871, -0.7658107876777649, 0.04837628826498985, -1.3035519123077393, 0.25151577591896057, 0.7903985977172852, -0.5957136154174805, 0.05955492705106735, -0.3198157548904419, -1.2958279848098755, -0.4178130328655243, 0.4095877707004547, 1.812756061553955, -0.8759373426437378, 1.1020433902740479, 0.957832396030426, -0.8224911093711853, -0.11973435431718826, 0.41567328572273254, -0.3439416289329529, 0.9216389060020447, -1.0723661184310913, -0.46436581015586853, 1.1584821939468384, -0.22863571345806122, -0.6107656955718994, 1.4797292947769165, 0.6448425054550171, -1.0377553701400757, -0.11447431147098541, -0.19760839641094208, -0.7829902768135071, 0.11118541657924652, -1.7559903860092163, -0.08079198747873306, 0.274341344833374, -1.4780330657958984, -0.4950788915157318, -0.13566772639751434, 1.3020915985107422, -0.08775141835212708, 1.340166687965393, -0.1876259446144104, -0.3323495090007782, -0.5659447908401489, -0.3971903920173645, 0.12254634499549866, -0.1576029509305954, -0.5359120965003967, 0.2848198711872101, -0.734536349773407, 0.2911766469478607, 1.3587315082550049, 0.28215330839157104, 0.10980402678251266, 0.6672624349594116, 0.9917133450508118, 0.302545964717865, -0.19634981453418732, -0.9164929389953613, -1.5865086317062378, 2.077085494995117, -1.3964741230010986, 1.9170969724655151, 0.6972014307975769, -0.14685505628585815, -1.9363975524902344, -2.009648084640503, 1.431374192237854, 1.1586904525756836, 2.3125882148742676, 0.6102612614631653, 0.4444059729576111, -0.8147624731063843, -0.6927065849304199, 0.35192397236824036, -1.0160547494888306, -0.751987636089325, 0.14202500879764557, 2.3935201168060303, 1.7040789127349854, -0.4125196933746338, -0.15345795452594757, -1.1855090856552124, 1.3501218557357788, -0.04283663257956505, 0.1487836390733719, 1.9631404876708984, -0.33376169204711914, -1.0651493072509766, 1.2381373643875122, -2.2798268795013428, 0.1284642517566681, 1.9287790060043335, 0.21785643696784973, 0.03151141479611397, -1.430597186088562, -0.7894330024719238, -0.20895130932331085, -0.34753313660621643, -1.247152328491211, 0.6537231206893921, -0.17632198333740234, -0.7643101215362549, -1.4179221391677856, 0.19944769144058228, -1.0848478078842163, -1.756988525390625, 0.15417297184467316, 1.8369988203048706, 2.0562500953674316, -0.7779393196105957, 1.5180186033248901, -0.2607126235961914, 0.21896275877952576, 1.3049159049987793, 1.1302193403244019, 3.1696786880493164, 2.060790538787842, -1.3063603639602661, 0.8290577530860901, 0.05427505075931549, -0.43963170051574707, 1.2566174268722534, -1.149910569190979, 1.387102484703064, -0.18286587297916412, -1.2386723756790161, -1.2479267120361328, 0.8077789545059204, 0.38712820410728455, 0.041208963841199875, -0.4435369670391083, 1.217692494392395, 0.05485127866268158, 1.3573483228683472, 0.6145802140235901, -0.28785425424575806, 0.726065993309021, -0.45005592703819275, -0.35626479983329773, 1.5703356266021729, 0.3076220750808716, -1.3666425943374634, -2.361039876937866, -0.2613762319087982, -0.8865604400634766, -0.061567485332489014, -0.6416515707969666, -1.0112382173538208, 1.5987542867660522, 0.5024285912513733, -1.100816249847412, -0.3033796548843384, -0.3492293655872345, -0.6417801380157471, 2.745419979095459, -1.5483651161193848, -0.2082822173833847, -1.0595530271530151, -0.5930532813072205, 1.619769811630249, -1.166588544845581, -0.21751262247562408, -1.0840567350387573, -0.5611187815666199, -1.353225588798523, -0.5682677030563354, -0.02853686362504959, -0.8801553845405579, 0.9234334826469421, 0.08575288206338882, -1.2805310487747192, -0.26671868562698364, -0.9700372219085693, 0.7442271113395691, -0.1289929896593094, 0.3090764284133911, 1.845005750656128, 0.4572809040546417, -0.3722602427005768, 0.7204353213310242, 1.1087911128997803, 0.7035682797431946, -0.6581047177314758, 0.3859553933143616, -0.7267552614212036, 0.23559753596782684, -1.1710875034332275, 0.26971831917762756, -2.900867462158203, 0.5321976542472839, -0.09678930789232254, -0.11977037042379379, -0.05680747702717781, -1.290734887123108, 1.0578629970550537, 2.5126144886016846, -1.266734004020691, 0.5324005484580994, 0.24684736132621765, 1.1842825412750244, -1.4987937211990356, 0.24598512053489685, -0.4657112658023834, 2.149475574493408, 0.14234024286270142, 1.1282635927200317, -0.4978697597980499, -2.1639256477355957, 0.7205302715301514, -1.3470455408096313, -1.1984646320343018, 0.8582344651222229, -0.7575317025184631, 0.08071310818195343, -1.3110994100570679, -0.13345080614089966, -0.7106394171714783, -1.3121764659881592, 0.6109662055969238, 0.08899684250354767, 0.5599241256713867, -0.5425258874893188, 0.3347061276435852, -2.233464002609253, -1.3743816614151, -0.2765900790691376, -0.8530157804489136, 0.41444671154022217, -0.3404276669025421, 0.8187342286109924, -0.24613820016384125, -0.07976539433002472, 0.4171302020549774, 1.3092759847640991, 3.4325363636016846, 0.11902762949466705, 0.3691239058971405, -0.10383343696594238, -0.9819841384887695, 1.3994650840759277, 0.9868155717849731, -0.12286186218261719, -0.5402218699455261, -0.9893492460250854, 1.1702483892440796, 1.9391264915466309, 1.0370053052902222, 0.06947287172079086, -0.850339412689209, -0.7144268155097961, 0.04882882162928581, 0.10643398761749268, 0.4699292778968811, 0.8487593531608582, 0.13132397830486298, 0.07398616522550583, 1.5390417575836182, 1.109628677368164, -0.3319958746433258, 0.3675571382045746, -0.7648859620094299, -0.4394248425960541, 0.6414583921432495, 0.39203205704689026, 0.05175559222698212, 0.25225627422332764, -1.0355114936828613, -0.33730295300483704, -0.3017112612724304, -0.9203519821166992, -0.7635658383369446, -0.40559643507003784, -0.41961807012557983, 1.6691570281982422, 0.006839253939688206, -0.5024498105049133, -0.09798431396484375, -0.8375643491744995, -0.03484313562512398, -0.9552419781684875, 0.36210396885871887, -0.22441625595092773, -0.05733095481991768, -0.0939158946275711, 1.8288625478744507, -1.0743694305419922, -2.052478075027466, 0.3116438388824463, 0.24807217717170715, -0.3284767270088196, 0.20440424978733063, 1.5690126419067383, 0.6264331340789795, 1.462496280670166, 1.3378703594207764, 1.0309979915618896, -0.6907827258110046, -1.4017164707183838, 0.6245332360267639, 1.019166350364685, -1.5354806184768677, 0.622259259223938, -0.034859370440244675, -0.5165579915046692, 0.5923725962638855, 1.2580567598342896, 0.4489347040653229, -1.8625308275222778, 0.6898444294929504, -0.8734779953956604, 0.8414462804794312, 0.8132766485214233, 0.8548460006713867, 0.07572215050458908, 0.7529923319816589, -1.3254244327545166, -1.0431561470031738, -0.644353985786438, -0.6238619685173035, 1.9433265924453735, -0.2919652462005615, 0.5595604777336121, -0.23941031098365784, -1.4319549798965454, -0.0009205285459756851, 0.6896429657936096, 0.35457465052604675, -0.4537510871887207, 0.7248608469963074, -0.6186540126800537, -1.080588936805725, -1.4150280952453613, -0.4183776080608368, -1.051154375076294, -0.918542206287384, 1.041968822479248, 0.8805986046791077, 0.45160284638404846, 1.8155982494354248, 0.6111388802528381, 0.25297868251800537, -2.6066532135009766, 0.9214503765106201, 0.2766910195350647, 0.009765787981450558, 0.7836608290672302, 0.31967267394065857, 1.0513391494750977, -0.1626511514186859, 0.6588432192802429, -2.36401104927063, 2.351327657699585, -0.25335556268692017, 0.5756279826164246, 0.024504508823156357, -0.09041959792375565, 1.0451018810272217, 0.4688205420970917, 0.5995922088623047, -1.0685102939605713, 0.7806946039199829, -0.5951817631721497, 1.3462196588516235, 0.9756726026535034, -0.8038650751113892, -0.060794975608587265, 1.2701468467712402, 0.5119137167930603, -0.3836909830570221, -0.845483124256134, -0.9714308381080627, 0.9974896311759949, 1.7187377214431763, 0.016636259853839874, 0.031574610620737076, 0.8582973480224609, 0.5960697531700134, -1.3332059383392334, 0.05595197528600693, -0.7952757477760315, -0.6416376829147339, 1.6222048997879028, 2.044950008392334, -0.10541129857301712, -0.1429138034582138, -0.9106758236885071, -1.1740056276321411, 0.8462688326835632, 0.2117961347103119, 0.030530553311109543, 0.7216684818267822, -0.5484156608581543, 1.0745985507965088, 0.9509592056274414, 0.9230020642280579, 0.25347402691841125, 0.30917099118232727, 0.280176043510437, -0.2628145217895508, -1.1973141431808472, -0.27852243185043335, -0.9639149308204651, -2.524172306060791, 0.4836271405220032, -0.3287810683250427, -1.423492670059204, -0.05411830171942711, -1.0642786026000977, 0.8813328146934509, -0.49853605031967163, -1.0624620914459229, -1.5720242261886597, 0.1819847673177719, -0.1252901256084442, 0.9207493662834167, -1.5427805185317993, -0.0847167894244194, 1.2916723489761353, 0.9571937322616577, -0.7214980721473694, 1.0269579887390137, 0.23055507242679596, 1.0359195470809937, 0.8789860606193542, -0.29944679141044617, 0.4531134068965912, 0.17694279551506042, -1.4121971130371094, 0.4315844476222992, 1.2092503309249878, 0.14842642843723297, 1.4764586687088013, -0.6576848030090332, 0.02743273228406906, 0.39814817905426025, -0.36031830310821533, -0.48654690384864807, -0.7169003486633301, 0.727323591709137, 0.13638758659362793, -0.8271178603172302, 0.08918900042772293, -0.0021459884010255337, -0.1082366555929184, 0.17595496773719788, -1.506639003753662, -0.08834803104400635, -0.3354402184486389, -0.7671837210655212, -1.2996835708618164, -0.10015735030174255, 1.3078027963638306, -0.7599132061004639, -0.13438914716243744, 0.5322355031967163, 0.20558978617191315, 0.5289111137390137, 0.6604279279708862, -0.6214757561683655, -0.33109399676322937, -0.2702513635158539, -0.3117532432079315, 0.3751392662525177, 1.403241515159607, -0.07432772219181061, -1.0253784656524658, 0.7381442785263062, -0.4004605710506439, 0.07942371815443039, 1.9738636016845703, 0.11688306927680969, -0.9338883757591248, 0.3104315996170044, -0.7163287997245789, 2.0045177936553955, 1.6315330266952515, 1.3312885761260986, -0.029649604111909866, -1.0458732843399048, 0.5976942777633667, -0.20244203507900238, -0.39345934987068176, 0.9637231230735779, 0.43270260095596313, -0.21407265961170197, -1.326395869255066, 0.6991018056869507, 1.309257984161377, -0.9652504920959473, -0.9027838110923767, 0.17213241755962372, -0.8133252263069153, 1.0076531171798706, 0.8077861666679382, 0.49505671858787537, 0.2825179100036621, 1.5542452335357666, 0.7566685080528259, -0.5613411664962769, 0.4826706647872925, 0.4644031822681427, -0.10797399282455444, -1.9943008422851562, -1.187761902809143, 0.47044047713279724, -0.5627812147140503, -1.620280146598816, 1.388475775718689, -1.2254143953323364, -0.8842697143554688, 0.5831720232963562, 0.16352032124996185, 1.4389392137527466, 0.29048457741737366, 1.536836862564087, 1.9564756155014038, 0.9422169923782349, 0.3296545445919037, 1.3453706502914429, -0.2744593620300293, -0.3972945511341095, 1.773391604423523, -0.48981547355651855, 0.5632809996604919, 1.1098076105117798, -0.3868722915649414, -1.1167035102844238, -0.756007194519043, -1.1478371620178223, -0.6388745307922363, 1.2301877737045288, 0.1304003894329071, -1.1589150428771973, 0.25743794441223145, 1.484126091003418, 0.04999883472919464, -0.27755650877952576, 0.6987556219100952, 0.37891238927841187, -0.8627665042877197, -0.04767507314682007, -0.9888533353805542, 0.5671768188476562, -0.25641658902168274, -0.37729379534721375, 0.22830842435359955, 0.46700748801231384, 1.2966148853302002, -0.028820794075727463, 0.12741608917713165, 1.2402992248535156, -1.3347795009613037, 1.4291391372680664, -0.7362334728240967, 0.179353266954422, -2.3328700065612793, 1.408593773841858, -0.8632544875144958, 1.7549710273742676, -2.6778082847595215, 0.40619081258773804, -0.47512173652648926, -0.39603087306022644, 0.27840691804885864, -0.2579202353954315, 0.21032795310020447, -0.23150448501110077, -1.2139414548873901, -0.1478426456451416, -0.8705455660820007, 0.6039109826087952, 1.1913405656814575, 1.3734630346298218, -1.081294059753418, -0.25599271059036255, -1.7222434282302856, -0.14957588911056519, -0.7040058970451355, 0.37904098629951477, -1.9233466386795044, -0.1912790834903717, -1.7678844928741455, -2.486586332321167, -1.2195628881454468, -0.8304038047790527, 1.1679729223251343, 0.08876460045576096, -0.9122482538223267, 1.1269944906234741, -0.37818920612335205, -1.850512146949768, 1.1422624588012695, -2.230931043624878 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Ccing @dwofk (the author of `fast-depth`). Thanks, @awsaf49 for reporting this. I believe this is because the NYU Depth V2 shipped from `fast-depth` is already preprocessed. If you think it might be better to have the NYU Depth V2 dataset from BTS [here](https://huggingface.co/datasets/sayakpaul/nyu_depth_v2) feel free to open a PR, I am happy to provide guidance :)
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
56
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Ccing @dwofk (the author of `fast-depth`). Thanks, @awsaf49 for reporting this. I believe this is because the NYU Depth V2 shipped from `fast-depth` is already preprocessed. If you think it might be better to have the NYU Depth V2 dataset from BTS [here](https://huggingface.co/datasets/sayakpaul/nyu_depth_v2) feel free to open a PR, I am happy to provide guidance :)
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Good catch ! Ideally it would be nice to have the datasets in the raw form, this way users can choose whatever processing they want to apply
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
27
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Good catch ! Ideally it would be nice to have the datasets in the raw form, this way users can choose whatever processing they want to apply
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
> Ccing @dwofk (the author of `fast-depth`). > > Thanks, @awsaf49 for reporting this. I believe this is because the NYU Depth V2 shipped from `fast-depth` is already preprocessed. > > If you think it might be better to have the NYU Depth V2 dataset from BTS [here](https://huggingface.co/datasets/sayakpaul/nyu_depth_v2) feel free to open a PR, I am happy to provide guidance :) @sayakpaul I would love to create a PR on this. As this will be my first PR here, some guidance would be helpful. Need a bit of advice on the dataset, there are three publicly available datasets. Which one should I consider for PR? 1. [BTS](https://github.com/cleinc/bts): Containst train/test: 36K/654 data, dtype = `uint16` hence more precise 2. [DenseDepth](https://github.com/ialhashim/DenseDepth) It contains train/test: 50K/654 data, dtype = `uint8` hence less precise 3. [Official](https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html#raw_parts): Size is big 400GB+, requires **MatLab** code for fixing **projection** and **sync**, DataType: `pgm` and `dump` hence can't be used directly. cc: @lhoestq
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
155
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 > Ccing @dwofk (the author of `fast-depth`). > > Thanks, @awsaf49 for reporting this. I believe this is because the NYU Depth V2 shipped from `fast-depth` is already preprocessed. > > If you think it might be better to have the NYU Depth V2 dataset from BTS [here](https://huggingface.co/datasets/sayakpaul/nyu_depth_v2) feel free to open a PR, I am happy to provide guidance :) @sayakpaul I would love to create a PR on this. As this will be my first PR here, some guidance would be helpful. Need a bit of advice on the dataset, there are three publicly available datasets. Which one should I consider for PR? 1. [BTS](https://github.com/cleinc/bts): Containst train/test: 36K/654 data, dtype = `uint16` hence more precise 2. [DenseDepth](https://github.com/ialhashim/DenseDepth) It contains train/test: 50K/654 data, dtype = `uint8` hence less precise 3. [Official](https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html#raw_parts): Size is big 400GB+, requires **MatLab** code for fixing **projection** and **sync**, DataType: `pgm` and `dump` hence can't be used directly. cc: @lhoestq
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
I think BTS. Repositories like https://github.com/vinvino02/GLPDepth usually use BTS. Also, just for clarity, the PR will be to https://huggingface.co/datasets/sayakpaul/nyu_depth_v2. Once we have worked it out, we can update the following things: * https://github.com/huggingface/blog/pull/718 * https://huggingface.co/docs/datasets/main/en/depth_estimation Don't worry about it if it seems overwhelming. We will work it out together :) @lhoestq what do you think?
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
55
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 think BTS. Repositories like https://github.com/vinvino02/GLPDepth usually use BTS. Also, just for clarity, the PR will be to https://huggingface.co/datasets/sayakpaul/nyu_depth_v2. Once we have worked it out, we can update the following things: * https://github.com/huggingface/blog/pull/718 * https://huggingface.co/docs/datasets/main/en/depth_estimation Don't worry about it if it seems overwhelming. We will work it out together :) @lhoestq what do you think?
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
@sayakpaul If I get this right I have to, 1. Create a PR on https://huggingface.co/datasets/sayakpaul/nyu_depth_v2 2. Create a PR on https://github.com/huggingface/blog 3. Create a PR on https://github.com/huggingface/datasets to update https://github.com/huggingface/datasets/blob/main/docs/source/depth_estimation.mdx
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
30
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 @sayakpaul If I get this right I have to, 1. Create a PR on https://huggingface.co/datasets/sayakpaul/nyu_depth_v2 2. Create a PR on https://github.com/huggingface/blog 3. Create a PR on https://github.com/huggingface/datasets to update https://github.com/huggingface/datasets/blob/main/docs/source/depth_estimation.mdx
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Yup opening a PR to use BTS on https://huggingface.co/datasets/sayakpaul/nyu_depth_v2 sounds good :) Thanks for the help !
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
17
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Yup opening a PR to use BTS on https://huggingface.co/datasets/sayakpaul/nyu_depth_v2 sounds good :) Thanks for the help !
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Finally, I have found the origin of the **discretized depth map**. When I first loaded the datasets from HF I noticed it was 30GB but in DenseDepth data is only 4GB with dtype=uint8. This means data from fast-depth (before loading to HF) must have high precision. So when I tried to dig deeper by directly loading depth_map from `h5py`, I found depth_map from `h5py` came with `float32`. But when the data is processed in HF with `datasets.Image()` it was directly converted to `uint8` from `float32` hence the **discretized** depth map. https://github.com/huggingface/datasets/blob/c78559cacbb0ca6e0bc8bfc313cc0359f8c23ead/src/datasets/features/image.py#L91-L93 ## Solutions: #### 1. Array2D Use `Array2D` feature with `float32` for depth_map * Code: ```py Features({'depth_map': Array2D(shape=(480, 640), dtype='float32')}) ``` * Pros: No precision loss. * Cons: As depth_map is saved as Array I think it can't be visuzlied in [hf.co/dataset](https://huggingface.co/datasets/sayakpaul/nyu_depth_v2) page like segmentation mask. #### 2. Uint16 Use `uint16` as dtype for Image in `_h5_loader` for saving depth maps and accept `uint16` dtype in `datasets.Image()` feature. * Code ```py depth = np.array(h5f["depth"]) depth /= 10.0 # [0, max_depth] -> [0, 1] depth *= (2**16 -1) # transform from [0, 1] -> [0, 2^16 - 1] depth = depth.astype('uint16') ``` * Pros: * We can visualize depth map in hf.co/datasets page like segmentation mask. * No need for post-processing. * Cons: * We need to make two change * Modify `_h5_loader` in https://huggingface.co/datasets/sayakpaul/nyu_depth_v2 to convert depth_map from `float32` to `uint16`. * Make sure `datasets.Image()` converts `np.ndarray` to `uint16` checking max value * Precision loss due to `float32` to `uint16` * Post-processing required for depth_map to transform from `[0, 2^16 - 1]` to `[0, max_depth]` before feeding them to model.
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
270
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Finally, I have found the origin of the **discretized depth map**. When I first loaded the datasets from HF I noticed it was 30GB but in DenseDepth data is only 4GB with dtype=uint8. This means data from fast-depth (before loading to HF) must have high precision. So when I tried to dig deeper by directly loading depth_map from `h5py`, I found depth_map from `h5py` came with `float32`. But when the data is processed in HF with `datasets.Image()` it was directly converted to `uint8` from `float32` hence the **discretized** depth map. https://github.com/huggingface/datasets/blob/c78559cacbb0ca6e0bc8bfc313cc0359f8c23ead/src/datasets/features/image.py#L91-L93 ## Solutions: #### 1. Array2D Use `Array2D` feature with `float32` for depth_map * Code: ```py Features({'depth_map': Array2D(shape=(480, 640), dtype='float32')}) ``` * Pros: No precision loss. * Cons: As depth_map is saved as Array I think it can't be visuzlied in [hf.co/dataset](https://huggingface.co/datasets/sayakpaul/nyu_depth_v2) page like segmentation mask. #### 2. Uint16 Use `uint16` as dtype for Image in `_h5_loader` for saving depth maps and accept `uint16` dtype in `datasets.Image()` feature. * Code ```py depth = np.array(h5f["depth"]) depth /= 10.0 # [0, max_depth] -> [0, 1] depth *= (2**16 -1) # transform from [0, 1] -> [0, 2^16 - 1] depth = depth.astype('uint16') ``` * Pros: * We can visualize depth map in hf.co/datasets page like segmentation mask. * No need for post-processing. * Cons: * We need to make two change * Modify `_h5_loader` in https://huggingface.co/datasets/sayakpaul/nyu_depth_v2 to convert depth_map from `float32` to `uint16`. * Make sure `datasets.Image()` converts `np.ndarray` to `uint16` checking max value * Precision loss due to `float32` to `uint16` * Post-processing required for depth_map to transform from `[0, 2^16 - 1]` to `[0, max_depth]` before feeding them to model.
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Thanks so much for digging into this. Since the second solution entails changes to core datatypes in `datasets`, I think it's better to go with the first solution. @lhoestq WDYT?
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
30
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 so much for digging into this. Since the second solution entails changes to core datatypes in `datasets`, I think it's better to go with the first solution. @lhoestq WDYT?
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
@sayakpaul Yes, Solution 1 requires minimal change and provides no precision loss. But I think support for `uint16` image would be a great addition as many datasets come with `uint16` image. For example [UW-Madison GI Tract Image Segmentation](https://www.kaggle.com/competitions/uw-madison-gi-tract-image-segmentation) dataset, here the image itself comes with `uint16` dtype rather than mask. So, saving `uint16` image with `uint8` will result in precision loss. Perhaps we can adapt solution 1 for this issue and Add support for `uint16` image separately?
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
77
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 @sayakpaul Yes, Solution 1 requires minimal change and provides no precision loss. But I think support for `uint16` image would be a great addition as many datasets come with `uint16` image. For example [UW-Madison GI Tract Image Segmentation](https://www.kaggle.com/competitions/uw-madison-gi-tract-image-segmentation) dataset, here the image itself comes with `uint16` dtype rather than mask. So, saving `uint16` image with `uint8` will result in precision loss. Perhaps we can adapt solution 1 for this issue and Add support for `uint16` image separately?
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Using Array2D makes it not practical to use to train a model - in `transformers` we expect an image type. There is a pull request to support more precision than uint8 in Image() here: https://github.com/huggingface/datasets/pull/5365/files we can probably merge it today and do a release right away
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
47
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Using Array2D makes it not practical to use to train a model - in `transformers` we expect an image type. There is a pull request to support more precision than uint8 in Image() here: https://github.com/huggingface/datasets/pull/5365/files we can probably merge it today and do a release right away
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Fantastic, @lhoestq! @awsaf49 then let's wait for the PR to get merged and then take the next steps?
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
18
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Fantastic, @lhoestq! @awsaf49 then let's wait for the PR to get merged and then take the next steps?
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
The PR adds support for uint16 which is ok for BTS if I understand correctly, would it be ok for you ?
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
22
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 The PR adds support for uint16 which is ok for BTS if I understand correctly, would it be ok for you ?
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
If the main issue with the current version of NYU we have on the Hub is related to the precision loss stemming from `Image()`, I'd prefer if `Image()` supported float32 as well.
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
32
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 If the main issue with the current version of NYU we have on the Hub is related to the precision loss stemming from `Image()`, I'd prefer if `Image()` supported float32 as well.
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
I also prefer `float32` as it offers more precision. But I'm not sure if we'll be able to visualize image with `float32` precision.
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
23
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 also prefer `float32` as it offers more precision. But I'm not sure if we'll be able to visualize image with `float32` precision.
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
We could have a separate loading for the float32 one using Array2D, but I feel like it's less convenient to use due to the amount of disk space and because it's not an Image() type. That's why I think uint16 is a better solution for users
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
46
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 We could have a separate loading for the float32 one using Array2D, but I feel like it's less convenient to use due to the amount of disk space and because it's not an Image() type. That's why I think uint16 is a better solution for users
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Yep. I just tested from the PR and it works: ```python >>> train_dataset = load_dataset("sayakpaul/nyu_depth_v2", split="train", streaming=True) Downloading readme: 100%|██████████████████| 8.71k/8.71k [00:00<00:00, 3.60MB/s] >>> next(iter(train_dataset)) {'image': <PIL.PngImagePlugin.PngImageFile image mode=RGB size=640x480 at 0x1382ED7F0>, 'depth_map': <PIL.TiffImagePlugin.TiffImageFile image mode=F size=640x480 at 0x1382EDF28>} >>> x = next(iter(train_dataset)) >>> np.asarray(x["depth_map"]) array([[0. , 0. , 0. , ..., 0. , 0. , 0. ], [0. , 0. , 0. , ..., 0. , 0. , 0. ], [0. , 0. , 0. , ..., 0. , 0. , 0. ], ..., [0. , 2.2861192, 2.2861192, ..., 2.234162 , 2.234162 , 0. ], [0. , 2.2861192, 2.2861192, ..., 2.234162 , 2.234162 , 0. ], [0. , 2.2861192, 2.2861192, ..., 2.234162 , 2.234162 , 0. ]], dtype=float32) ```
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
120
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Yep. I just tested from the PR and it works: ```python >>> train_dataset = load_dataset("sayakpaul/nyu_depth_v2", split="train", streaming=True) Downloading readme: 100%|██████████████████| 8.71k/8.71k [00:00<00:00, 3.60MB/s] >>> next(iter(train_dataset)) {'image': <PIL.PngImagePlugin.PngImageFile image mode=RGB size=640x480 at 0x1382ED7F0>, 'depth_map': <PIL.TiffImagePlugin.TiffImageFile image mode=F size=640x480 at 0x1382EDF28>} >>> x = next(iter(train_dataset)) >>> np.asarray(x["depth_map"]) array([[0. , 0. , 0. , ..., 0. , 0. , 0. ], [0. , 0. , 0. , ..., 0. , 0. , 0. ], [0. , 0. , 0. , ..., 0. , 0. , 0. ], ..., [0. , 2.2861192, 2.2861192, ..., 2.234162 , 2.234162 , 0. ], [0. , 2.2861192, 2.2861192, ..., 2.234162 , 2.234162 , 0. ], [0. , 2.2861192, 2.2861192, ..., 2.234162 , 2.234162 , 0. ]], dtype=float32) ```
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Great! the case is closed! This issue has been solved and I have to say, it was quite the thrill ride. I felt like Sherlock Holmes, solving a mystery and finding the bug🕵️‍♂️. But in all seriousness, it was a pleasure working on this issue and I'm glad we could get to the bottom of it. On another note, should I consider closing the issue? I think we still need to make updates on https://github.com/huggingface/blog and https://github.com/huggingface/datasets/blob/main/docs/source/depth_estimation.mdx
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
77
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Great! the case is closed! This issue has been solved and I have to say, it was quite the thrill ride. I felt like Sherlock Holmes, solving a mystery and finding the bug🕵️‍♂️. But in all seriousness, it was a pleasure working on this issue and I'm glad we could get to the bottom of it. On another note, should I consider closing the issue? I think we still need to make updates on https://github.com/huggingface/blog and https://github.com/huggingface/datasets/blob/main/docs/source/depth_estimation.mdx
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Haha thanks Mr Holmes :p maybe let's close this issue when we're done updating the blog post and the documentation
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
20
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Haha thanks Mr Holmes :p maybe let's close this issue when we're done updating the blog post and the documentation
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
@awsaf49 thank you for your hard work! I am a little unsure why the other links need to be updated, though. They all rely on datasets internally.
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
27
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 @awsaf49 thank you for your hard work! I am a little unsure why the other links need to be updated, though. They all rely on datasets internally.
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
I think depth_map still shows discretized version. It would be nice to have corrected one. <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/depth_est_target_viz.png" width = 300>
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
20
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 think depth_map still shows discretized version. It would be nice to have corrected one. <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/depth_est_target_viz.png" width = 300>
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Also, I think we need to make some changes in the code to visualize depth_map as it is `float32` . `plot.imshow()` supports either [0, 1] + float32 or [0. 255] + uint8
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
32
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Also, I think we need to make some changes in the code to visualize depth_map as it is `float32` . `plot.imshow()` supports either [0, 1] + float32 or [0. 255] + uint8
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5461
Discrepancy in `nyu_depth_v2` dataset
Oh yes! Do you want to start with the fixes? Please feel free to say no but I wanted to make sure your contributions are reflected properly in our doc and the blog :)
### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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
327
34
Discrepancy in `nyu_depth_v2` dataset ### Describe the bug I think there is a discrepancy between depth map of `nyu_depth_v2` dataset [here](https://huggingface.co/docs/datasets/main/en/depth_estimation) and actual depth map. Depth values somehow got **discretized/clipped** resulting in depth maps that are different from actual ones. Here is a side-by-side comparison, ![image](https://user-images.githubusercontent.com/36858976/214381162-1d9582c2-6750-4114-a01a-61ca1cd5f872.png) I tried to find the origin of this issue but sadly as I mentioned in tensorflow/datasets/issues/4674, the download link from `fast-depth` doesn't work anymore hence couldn't verify if the error originated there or during porting data from there to HF. Hi @sayakpaul, as you worked on huggingface/datasets/issues/5255, if you still have access to that data could you please share the data or perhaps checkout this issue? ### Steps to reproduce the bug This [notebook](https://colab.research.google.com/drive/1K3ZU8XUPRDOYD38MQS9nreQXJYitlKSW?usp=sharing#scrollTo=UEW7QSh0jf0i) from @sayakpaul could be used to generate depth maps and actual ground truths could be checked from this [dataset](https://www.kaggle.com/datasets/awsaf49/nyuv2-bts-dataset) from BTS repo. > Note: BTS dataset has only 36K data compared to the train-test 50K. They sampled the data as adjacent frames look quite the same ### Expected behavior Expected depth maps should be smooth rather than discrete/clipped. ### Environment info - `datasets` version: 2.8.1.dev0 - 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 Oh yes! Do you want to start with the fixes? Please feel free to say no but I wanted to make sure your contributions are reflected properly in our doc and the blog :)
[ -1.2323219776153564, -0.9139350652694702, -0.7461334466934204, 1.4001511335372925, -0.17456850409507751, -1.2431707382202148, 0.08405475318431854, -1.0615496635437012, 1.6305798292160034, -0.7169316411018372, 0.2860521078109741, -1.66029691696167, -0.011840286664664745, -0.5992560386657715, -0.6953736543655396, -0.7965812683105469, -0.3857293725013733, -0.8061683177947998, 1.0200289487838745, 2.4998791217803955, 1.167893409729004, -1.3956151008605957, 2.794293165206909, 0.7337911128997803, -0.27156129479408264, -0.9142760038375854, 0.4537856876850128, 0.11800426244735718, -1.3919907808303833, -0.4148898720741272, -0.9597042202949524, -0.007874526083469391, -0.5638155937194824, -0.5370649695396423, 0.08195154368877411, 0.3678964376449585, -0.1836310625076294, -0.427743524312973, -0.5719905495643616, -0.6722671985626221, 0.446140855550766, -0.3335036039352417, 0.9452931880950928, -0.3077825605869293, 1.8451873064041138, -0.574225902557373, 0.390824556350708, 0.6821630597114563, 1.281654715538025, 0.12990349531173706, 0.012448031455278397, 0.34029635787010193, 0.38874152302742004, -0.04795759171247482, 0.4871836304664612, 1.2196555137634277, 0.6677457094192505, 0.43898966908454895, 0.7339512705802917, -2.1761105060577393, 1.3057891130447388, -0.9079874157905579, 0.3679487705230713, 1.3854330778121948, -0.9984912276268005, 0.4593672454357147, -1.834285020828247, -0.04812052845954895, 0.5144379138946533, -2.2734296321868896, 0.19932402670383453, -1.3053923845291138, -0.5634886622428894, 0.9741311073303223, 0.2848989963531494, -1.247175931930542, 0.17296358942985535, -0.5464081168174744, 1.054668664932251, 0.37940481305122375, 1.1901471614837646, -1.6627570390701294, -0.06155624985694885, -0.2812512218952179, 0.12102735042572021, -1.2682186365127563, -1.6015996932983398, 0.5601747632026672, 0.7018895745277405, 0.6613218784332275, -0.178788423538208, 0.9496041536331177, -0.9908232688903809, 0.8285631537437439, -0.8953981995582581, -1.68039071559906, -1.3805837631225586, -2.2533488273620605, -2.27335262298584, 0.8427225351333618, -0.48952943086624146, -0.48272502422332764, 2.034759759902954, -1.0719380378723145, -1.8026206493377686, 1.1043645143508911, 0.3168218433856964, -0.01301286555826664, 2.3331382274627686, 0.27802929282188416, -0.7352905869483948, 0.4310437738895416, -0.7467105984687805, 0.7970104217529297, -0.32168176770210266, 1.295877456665039, 0.4481554329395294, -1.0309009552001953, 1.6116987466812134, -0.4027547240257263, 0.5657147765159607, -0.7121942639350891, -0.48879915475845337, -0.7503159642219543, 0.2535947859287262, 1.9104292392730713, -0.28089964389801025, 1.6308356523513794, -0.382698655128479, -1.5854336023330688, -1.5195717811584473, 0.7635946273803711, 0.5529265999794006, -0.8067412376403809, 0.08221779763698578, -0.4212104082107544, 0.12577597796916962, 0.04388817027211189, 1.113938570022583, 1.2950507402420044, 0.6631616950035095, -0.2981172800064087, -0.8601584434509277, 0.18686933815479279, -0.046599358320236206, -0.7099756598472595, -1.830454707145691, -0.319680392742157, 0.18615923821926117, 0.6436948180198669, -1.3068009614944458, 1.7096482515335083, 0.8232471346855164, 1.9236414432525635, 1.0141315460205078, -0.35126206278800964, 1.5348103046417236, 0.07626046240329742, 1.8128466606140137, -0.5496343970298767, 0.6653687357902527, -0.3895276188850403, -1.0823994874954224, 0.7594269514083862, -0.3432791531085968, -2.06611967086792, -0.680063009262085, -0.8032090067863464, -0.19282981753349304, -0.7322292327880859, 0.9142317175865173, -0.28576961159706116, -1.398676872253418, 0.20016032457351685, -0.679329514503479, 0.17491485178470612, -1.2203078269958496, 0.2434636503458023, 0.7426518797874451, -0.6372488737106323, 0.030247081071138382, -0.2861906886100769, -1.3181287050247192, -0.46038615703582764, 0.366929292678833, 1.8502224683761597, -0.805014431476593, 0.9532463550567627, 1.0512350797653198, -0.6577302813529968, 0.0332232266664505, 0.3726118505001068, -0.34534791111946106, 0.8907855749130249, -1.162060022354126, -0.3360643684864044, 1.1009268760681152, -0.18165424466133118, -0.5364325642585754, 1.3763197660446167, 0.7973071336746216, -1.0268199443817139, -0.29032325744628906, -0.11312325298786163, -0.8275874257087708, -0.05673952400684357, -1.6421360969543457, -0.20830807089805603, 0.2348834127187729, -1.4830591678619385, -0.46948984265327454, -0.2584792971611023, 1.31281316280365, -0.1262311339378357, 1.4635584354400635, -0.30079472064971924, -0.2307252585887909, -0.3772124648094177, -0.47442397475242615, 0.13331450521945953, -0.21035881340503693, -0.5932518243789673, 0.264983206987381, -0.8239473700523376, 0.29958996176719666, 1.4571830034255981, 0.33849209547042847, 0.05472880229353905, 0.5192252993583679, 1.0514953136444092, 0.36855411529541016, -0.10918533802032471, -0.8690221309661865, -1.6369775533676147, 2.0351855754852295, -1.5047023296356201, 1.9399513006210327, 0.833870530128479, 0.00815560296177864, -1.7942451238632202, -1.8813738822937012, 1.3750563859939575, 1.167304515838623, 2.438889265060425, 0.5511987805366516, 0.37327444553375244, -0.7715137600898743, -0.6570478081703186, 0.31502261757850647, -0.9503150582313538, -0.7625398635864258, 0.146457701921463, 2.419851064682007, 1.8097333908081055, -0.48255690932273865, -0.27659040689468384, -0.9859944581985474, 1.284056544303894, -0.16187448799610138, 0.20161278545856476, 2.0102930068969727, -0.2629464268684387, -1.0536311864852905, 1.2694172859191895, -2.325827121734619, 0.18646706640720367, 1.9579782485961914, 0.23460811376571655, 0.0415165051817894, -1.3713475465774536, -0.6961532235145569, -0.2568921446800232, -0.41727712750434875, -1.2233307361602783, 0.581613302230835, -0.3009263277053833, -0.8556992411613464, -1.4979687929153442, 0.04918350279331207, -1.1648004055023193, -1.6720575094223022, 0.36009612679481506, 1.896374225616455, 2.0197317600250244, -0.7824186682701111, 1.4586178064346313, -0.28537365794181824, 0.14694996178150177, 1.202763557434082, 1.2650731801986694, 3.171320915222168, 1.911705493927002, -1.3255232572555542, 0.6734470129013062, -0.12440952658653259, -0.46458297967910767, 1.1128391027450562, -1.1086610555648804, 1.2048957347869873, -0.18933451175689697, -1.2731444835662842, -1.1960649490356445, 0.9915363192558289, 0.5063247084617615, 0.05595190450549126, -0.4845018684864044, 1.255779504776001, 0.08886498212814331, 1.322007417678833, 0.5172652006149292, -0.4003276526927948, 0.5981543660163879, -0.35894718766212463, -0.528727114200592, 1.5402061939239502, 0.11995725333690643, -1.4776750802993774, -2.3624675273895264, -0.19732345640659332, -0.8265008330345154, -0.00566118024289608, -0.6986992359161377, -1.0318868160247803, 1.6191844940185547, 0.4444270133972168, -1.2080999612808228, -0.26252761483192444, -0.3374589681625366, -0.5421313643455505, 2.5702788829803467, -1.4286155700683594, -0.2223731428384781, -0.9830209612846375, -0.5501588582992554, 1.6144230365753174, -1.104309320449829, -0.2633667290210724, -1.0586159229278564, -0.6363030672073364, -1.284410834312439, -0.5640177726745605, -0.015312634408473969, -0.895716667175293, 0.7711606621742249, 0.053438056260347366, -1.111890196800232, -0.23652566969394684, -0.916318416595459, 0.9136311411857605, -0.12634456157684326, 0.23200087249279022, 1.8745797872543335, 0.4194072484970093, -0.40905314683914185, 0.6902249455451965, 1.2487330436706543, 0.6294957995414734, -0.7074962854385376, 0.17786216735839844, -0.6978656053543091, 0.34992387890815735, -1.3914796113967896, 0.2727367579936981, -2.8798999786376953, 0.6885128617286682, -0.060960713773965836, -0.06193405017256737, 0.03520316258072853, -1.3572256565093994, 1.060479998588562, 2.60748028755188, -1.1788288354873657, 0.43475785851478577, 0.359305739402771, 1.1506433486938477, -1.570438027381897, 0.27166447043418884, -0.4537293016910553, 2.0804526805877686, 0.18462321162223816, 1.1905484199523926, -0.5085489153862, -2.2646708488464355, 0.5319777131080627, -1.167697548866272, -1.082575798034668, 0.8091537356376648, -0.8569878339767456, 0.11032386124134064, -1.460365891456604, -0.15225672721862793, -0.8632104992866516, -1.2652050256729126, 0.6599567532539368, 0.18237057328224182, 0.49187424778938293, -0.642767071723938, 0.33145269751548767, -2.107008218765259, -1.3385121822357178, -0.16721007227897644, -0.9659671187400818, 0.4850926399230957, -0.3059897720813751, 0.6639378666877747, -0.11899995803833008, 0.047425128519535065, 0.2752452790737152, 1.3897526264190674, 3.3673312664031982, 0.18709474802017212, 0.2943917512893677, -0.12814611196517944, -0.9430081248283386, 1.3977688550949097, 0.9824666380882263, -0.1273265928030014, -0.6037864089012146, -1.0350897312164307, 1.2624794244766235, 1.9988912343978882, 1.0769048929214478, 0.05035712569952011, -0.8644797801971436, -0.7830715179443359, 0.0725783258676529, 0.23393166065216064, 0.4756545126438141, 1.0065921545028687, 0.08186347782611847, 0.1393321305513382, 1.4176734685897827, 1.2198127508163452, -0.43200093507766724, 0.43384984135627747, -0.8842636942863464, -0.4469090402126312, 0.41284337639808655, 0.3722291886806488, 0.11482557654380798, 0.34205275774002075, -1.082127332687378, -0.22376500070095062, -0.3888733983039856, -0.939014732837677, -0.7401524782180786, -0.393431693315506, -0.34720635414123535, 1.6075818538665771, 0.10428719222545624, -0.4549075663089752, -0.028032919391989708, -0.7665731310844421, -0.1322432905435562, -1.0068764686584473, 0.3256603479385376, -0.16333246231079102, 0.006328050047159195, -0.07292842864990234, 1.7585927248001099, -0.8887980580329895, -2.104940891265869, 0.21186231076717377, 0.2247282862663269, -0.39727070927619934, 0.11425644159317017, 1.7245219945907593, 0.592430055141449, 1.4417357444763184, 1.3740527629852295, 0.9776522517204285, -0.5804680585861206, -1.2537814378738403, 0.7030884027481079, 0.9496356248855591, -1.3960601091384888, 0.7888072729110718, -0.10089357197284698, -0.5501800179481506, 0.7192034125328064, 1.310149908065796, 0.39124104380607605, -2.0262835025787354, 0.8519179821014404, -0.8979071974754333, 0.7172250151634216, 0.6820904016494751, 0.761448323726654, 0.21385595202445984, 0.8520559668540955, -1.3378734588623047, -1.090907335281372, -0.75129234790802, -0.548547089099884, 1.944392442703247, -0.2335326373577118, 0.4711785912513733, -0.26712411642074585, -1.2637375593185425, -0.07942265272140503, 0.7017166018486023, 0.3149535357952118, -0.45108699798583984, 0.7922713756561279, -0.641438364982605, -1.0882596969604492, -1.3126858472824097, -0.4467308521270752, -0.9317711591720581, -0.8969967365264893, 0.9846599698066711, 0.8501668572425842, 0.4346872866153717, 1.9202773571014404, 0.5805532932281494, 0.2626208961009979, -2.6611666679382324, 0.9484284520149231, 0.2590363323688507, -0.09781248867511749, 0.9742460250854492, 0.2485622614622116, 1.0896662473678589, -0.000535871833562851, 0.5626658201217651, -2.3885955810546875, 2.21403431892395, -0.18407931923866272, 0.6912851333618164, 0.01965300180017948, -0.14726869761943817, 1.1267664432525635, 0.5085875988006592, 0.6102052330970764, -1.1116068363189697, 0.8125633597373962, -0.5901521444320679, 1.100745439529419, 0.863141655921936, -0.8478313088417053, 0.013651702553033829, 1.3426076173782349, 0.45637252926826477, -0.47692182660102844, -0.9048529863357544, -0.8994099497795105, 0.909415602684021, 1.786508321762085, -0.021902499720454216, 0.009139025583863258, 0.8301740288734436, 0.7252194881439209, -1.3133455514907837, 0.04420560970902443, -0.6615776419639587, -0.7201073169708252, 1.6770668029785156, 2.1010942459106445, -0.07907557487487793, -0.15972256660461426, -0.7536216974258423, -1.2610377073287964, 0.7458326816558838, 0.00007935985922813416, 0.12860873341560364, 0.6887850165367126, -0.685008704662323, 1.1936653852462769, 0.7552140355110168, 0.9141415953636169, 0.13166989386081696, 0.3094886541366577, 0.3770348131656647, -0.3110197186470032, -1.247934103012085, -0.37728941440582275, -1.0487147569656372, -2.4165003299713135, 0.4785192906856537, -0.21488015353679657, -1.4621353149414062, 0.0889066755771637, -1.0373609066009521, 0.8705325722694397, -0.6220061182975769, -1.098707675933838, -1.520721673965454, 0.2862570583820343, -0.1684000939130783, 0.8690915107727051, -1.6150964498519897, -0.06240163370966911, 1.1900173425674438, 0.914089024066925, -0.5661832094192505, 0.999480664730072, 0.27145159244537354, 0.9773176908493042, 0.9360830783843994, -0.3311914801597595, 0.4651753902435303, 0.17328184843063354, -1.3470635414123535, 0.432891845703125, 1.210198163986206, 0.2205759882926941, 1.4131754636764526, -0.5188155174255371, 0.030850913375616074, 0.5090531706809998, -0.4863300621509552, -0.478500097990036, -0.5169093012809753, 0.6505467891693115, 0.117261603474617, -0.9716989994049072, -0.0924573540687561, -0.06681133061647415, -0.24311406910419464, 0.2257453054189682, -1.4782062768936157, -0.2200680822134018, -0.35413306951522827, -0.5691598653793335, -1.263388991355896, 0.039421986788511276, 1.4017622470855713, -0.8381630778312683, -0.25301918387413025, 0.5609930753707886, 0.3741437792778015, 0.5238731503486633, 0.6375331878662109, -0.6644546985626221, -0.3344633877277374, -0.19634893536567688, -0.3860269784927368, 0.29460689425468445, 1.2920953035354614, -0.11986695230007172, -0.9749387502670288, 0.6879858374595642, -0.4469706118106842, 0.1064671128988266, 1.9584401845932007, 0.051763344556093216, -0.8678264021873474, 0.37457889318466187, -0.7452419400215149, 1.876537561416626, 1.7298831939697266, 1.3277274370193481, -0.12791447341442108, -0.9525400400161743, 0.572801411151886, -0.24182957410812378, -0.34389737248420715, 0.944525957107544, 0.44480961561203003, -0.17357169091701508, -1.3849458694458008, 0.5572223663330078, 1.3419451713562012, -0.9403785467147827, -0.7578255534172058, 0.14480377733707428, -0.8765910267829895, 1.0773077011108398, 0.7253261804580688, 0.31156426668167114, 0.2189885973930359, 1.6041918992996216, 0.6743377447128296, -0.4584476947784424, 0.5160513520240784, 0.4866429269313812, -0.17900316417217255, -2.084585666656494, -1.0715774297714233, 0.336412250995636, -0.40616267919540405, -1.609689474105835, 1.3335648775100708, -1.1911122798919678, -0.9779792428016663, 0.4743609130382538, 0.09175960719585419, 1.3938837051391602, 0.2906569838523865, 1.6543866395950317, 2.1289889812469482, 0.9394662380218506, 0.31079748272895813, 1.305374026298523, -0.12444005906581879, -0.4507576525211334, 1.806941270828247, -0.505362331867218, 0.5473419427871704, 1.0635998249053955, -0.3717973828315735, -1.0609163045883179, -0.7288522720336914, -1.2084095478057861, -0.683832585811615, 1.1976169347763062, 0.1168292760848999, -1.1678216457366943, 0.23603445291519165, 1.5686331987380981, 0.09291993081569672, -0.27935776114463806, 0.6497092843055725, 0.46513259410858154, -0.7560765743255615, -0.13118711113929749, -0.9745330214500427, 0.5460807085037231, -0.19477403163909912, -0.33908647298812866, 0.2676640450954437, 0.4748587906360626, 1.2705299854278564, 0.04623112082481384, 0.06291024386882782, 1.2468974590301514, -1.4398287534713745, 1.5334513187408447, -0.6580905914306641, 0.3260277509689331, -2.443864107131958, 1.4568703174591064, -0.7950262427330017, 1.8815048933029175, -2.5806658267974854, 0.4289732277393341, -0.585528552532196, -0.49401798844337463, 0.30050018429756165, -0.25634658336639404, 0.17018400132656097, -0.12440350651741028, -1.0314208269119263, -0.08628429472446442, -0.7722461819648743, 0.5770489573478699, 1.1799769401550293, 1.338469386100769, -1.1129379272460938, -0.3098520338535309, -1.735874056816101, -0.2749764323234558, -0.6664917469024658, 0.3056076169013977, -1.9654532670974731, -0.11326827108860016, -1.933815598487854, -2.463470220565796, -1.4286490678787231, -0.8733401894569397, 1.0834466218948364, 0.13075383007526398, -0.9128121137619019, 1.1182348728179932, -0.41110390424728394, -1.839603066444397, 1.1233439445495605, -2.178095579147339 ]
https://github.com/huggingface/datasets/issues/5458
slice split while streaming
Hi! Yes, that's correct. When `streaming` is `True`, only split names can be specified as `split`, and for slicing, you have to use `.skip`/`.take` instead. E.g. `load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train[:3]")` rewritten with `.skip`/`.take`: `load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train").take(3)`
### Describe the bug When using the `load_dataset` function with streaming set to True, slicing splits is apparently not supported. Did I miss this in the documentation? ### Steps to reproduce the bug `load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train[:3]")` causes ValueError: Bad split: train[:3]. Available splits: ['train', 'test'] in builder.py, line 1213, in as_streaming_dataset ### Expected behavior The first 3 entries of the dataset as a stream ### Environment info - `datasets` version: 2.8.0 - Platform: Windows-10-10.0.19045-SP0 - Python version: 3.10.9 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
328
35
slice split while streaming ### Describe the bug When using the `load_dataset` function with streaming set to True, slicing splits is apparently not supported. Did I miss this in the documentation? ### Steps to reproduce the bug `load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train[:3]")` causes ValueError: Bad split: train[:3]. Available splits: ['train', 'test'] in builder.py, line 1213, in as_streaming_dataset ### Expected behavior The first 3 entries of the dataset as a stream ### Environment info - `datasets` version: 2.8.0 - Platform: Windows-10-10.0.19045-SP0 - Python version: 3.10.9 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 Hi! Yes, that's correct. When `streaming` is `True`, only split names can be specified as `split`, and for slicing, you have to use `.skip`/`.take` instead. E.g. `load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train[:3]")` rewritten with `.skip`/`.take`: `load_dataset("lhoestq/demo1",revision=None, streaming=True, split="train").take(3)`
[ -1.167305827140808, -0.9285175800323486, -0.6649534702301025, 1.4969956874847412, -0.1945435255765915, -1.1529728174209595, 0.1905038207769394, -1.076942801475525, 1.6675045490264893, -0.7395195960998535, 0.3413146436214447, -1.6742693185806274, -0.03626634180545807, -0.6227717399597168, -0.7047578692436218, -0.8739689588546753, -0.4742625057697296, -0.6914011240005493, 1.0258232355117798, 2.5301365852355957, 1.2174347639083862, -1.3584245443344116, 2.6809117794036865, 0.7074298858642578, -0.10264080762863159, -0.9989497661590576, 0.569733202457428, 0.008519904688000679, -1.2494109869003296, -0.379003643989563, -0.9817168116569519, -0.2270631045103073, -0.573604166507721, -0.555406391620636, 0.045265406370162964, 0.33669817447662354, -0.3447442054748535, -0.41019871830940247, -0.42115581035614014, -0.8712015748023987, 0.49960851669311523, -0.42677146196365356, 0.8889013528823853, -0.3351130187511444, 1.7534153461456299, -0.6130703091621399, 0.5808496475219727, 0.7859542369842529, 1.1767529249191284, 0.15334980189800262, -0.022960763424634933, 0.3860316574573517, 0.4665044844150543, -0.015558493323624134, 0.5430041551589966, 1.117850422859192, 0.6428616046905518, 0.4658753275871277, 0.7950699925422668, -2.2539267539978027, 1.1654586791992188, -1.0507800579071045, 0.25696808099746704, 1.3420367240905762, -0.914038360118866, 0.36112940311431885, -1.7731505632400513, -0.036837298423051834, 0.5884232521057129, -2.213038921356201, 0.292356938123703, -1.3120843172073364, -0.5202981233596802, 1.0515114068984985, 0.3865547478199005, -1.202808141708374, 0.06314932554960251, -0.39338675141334534, 1.0050033330917358, 0.47763311862945557, 1.0861456394195557, -1.797462821006775, -0.06565788388252258, -0.3453484773635864, 0.1421070098876953, -1.2754325866699219, -1.3941936492919922, 0.524712324142456, 0.6463728547096252, 0.546057403087616, -0.09385877847671509, 0.9883018136024475, -1.0189615488052368, 0.7340587377548218, -1.1116220951080322, -1.7233210802078247, -1.3669897317886353, -2.2778921127319336, -2.2553560733795166, 0.7662333846092224, -0.43883243203163147, -0.5150514245033264, 2.045140266418457, -0.9803443551063538, -1.7309428453445435, 1.1974644660949707, 0.281602144241333, -0.08258657157421112, 2.4194071292877197, 0.2963373064994812, -0.684853196144104, 0.4824761152267456, -0.8510551452636719, 0.560235321521759, -0.45873427391052246, 1.3553065061569214, 0.36566850543022156, -1.1216791868209839, 1.6527140140533447, -0.44401073455810547, 0.6236810088157654, -0.7358488440513611, -0.49997079372406006, -0.6395626068115234, 0.3194981813430786, 1.968295931816101, -0.32465147972106934, 1.4025423526763916, -0.3113265931606293, -1.479709267616272, -1.5477203130722046, 0.9216028451919556, 0.4138096868991852, -0.6496272683143616, 0.15834100544452667, -0.213173970580101, 0.12766772508621216, -0.15489521622657776, 1.0313936471939087, 1.2462629079818726, 0.7781853675842285, -0.21614010632038116, -0.8854846954345703, 0.21929872035980225, -0.08470078557729721, -0.8066444396972656, -1.7079565525054932, -0.3731648921966553, 0.02025669999420643, 0.6502071022987366, -1.2328931093215942, 1.7926291227340698, 0.8681297898292542, 1.8412630558013916, 0.9463962316513062, -0.37866753339767456, 1.479048252105713, 0.13289037346839905, 1.921514630317688, -0.5006271004676819, 0.6636181473731995, -0.44183626770973206, -1.210237741470337, 0.8725408911705017, -0.23262931406497955, -1.997517466545105, -0.659443199634552, -0.8913742899894714, -0.16454274952411652, -0.7861011028289795, 1.0111268758773804, -0.24738343060016632, -1.3931699991226196, 0.27072590589523315, -0.8108921647071838, 0.054061129689216614, -1.3004934787750244, 0.3448794484138489, 0.746165931224823, -0.6096280813217163, 0.17111873626708984, -0.30062487721443176, -1.2606287002563477, -0.49780434370040894, 0.2896255552768707, 1.8977183103561401, -0.7818300724029541, 0.9022428393363953, 1.03246009349823, -0.7876719236373901, -0.14966998994350433, 0.4122401475906372, -0.31318092346191406, 0.8416948914527893, -0.9932191967964172, -0.5102619528770447, 1.242121696472168, -0.14991974830627441, -0.6949495673179626, 1.480607509613037, 0.7057703137397766, -1.0271693468093872, -0.19971591234207153, -0.2508125305175781, -0.7097440958023071, 0.03655146062374115, -1.6226640939712524, -0.030930211767554283, 0.43467938899993896, -1.5159976482391357, -0.47289320826530457, -0.15764117240905762, 1.3928515911102295, -0.041121065616607666, 1.4410420656204224, -0.2783110737800598, -0.23286400735378265, -0.38860809803009033, -0.35062170028686523, 0.18486365675926208, -0.2818598747253418, -0.6047447323799133, 0.20992736518383026, -0.6869839429855347, 0.3619671165943146, 1.4668477773666382, 0.263130247592926, 0.07755274325609207, 0.595242977142334, 0.9931460618972778, 0.40368708968162537, -0.017679588869214058, -0.9845527410507202, -1.4689266681671143, 2.0104947090148926, -1.4491256475448608, 2.0233354568481445, 0.7078259587287903, -0.09859026968479156, -1.7770687341690063, -1.9060993194580078, 1.395067572593689, 1.2022101879119873, 2.3398447036743164, 0.5944886207580566, 0.48289042711257935, -0.8703012466430664, -0.600921630859375, 0.19692349433898926, -1.035911202430725, -0.7712465524673462, 0.2762373387813568, 2.5215301513671875, 1.7238543033599854, -0.44600918889045715, -0.16532102227210999, -1.1233948469161987, 1.4232183694839478, -0.17045100033283234, 0.16276173293590546, 1.9095239639282227, -0.27718690037727356, -1.0262099504470825, 1.2183340787887573, -2.342111825942993, 0.12467692047357559, 1.886023998260498, 0.2722795307636261, 0.12610052525997162, -1.3738019466400146, -0.7136189937591553, -0.28141507506370544, -0.4475107789039612, -1.209385871887207, 0.5219585299491882, -0.22908036410808563, -0.7478110790252686, -1.4011070728302002, 0.18604576587677002, -1.0404047966003418, -1.7589185237884521, 0.15272866189479828, 1.7789965867996216, 1.9809677600860596, -0.8360934853553772, 1.6145434379577637, -0.25987860560417175, 0.21724672615528107, 1.315564513206482, 1.2784178256988525, 3.063570261001587, 2.004833221435547, -1.2847397327423096, 0.710006833076477, -0.11103161424398422, -0.4651581346988678, 1.1932142972946167, -1.2150802612304688, 1.3124781847000122, -0.1651810109615326, -1.1762319803237915, -1.2562055587768555, 0.8988536596298218, 0.43772444128990173, 0.07666490226984024, -0.5022724866867065, 1.208548903465271, 0.17517094314098358, 1.4128384590148926, 0.5721222162246704, -0.29057928919792175, 0.7498020529747009, -0.4155721664428711, -0.3979770541191101, 1.5933504104614258, 0.2480727583169937, -1.4114983081817627, -2.303762197494507, -0.21477802097797394, -0.9792201519012451, -0.011132209561765194, -0.6085657477378845, -0.9453446865081787, 1.6634446382522583, 0.4111514687538147, -1.2182050943374634, -0.22324509918689728, -0.3304232954978943, -0.6078821420669556, 2.8202319145202637, -1.469556212425232, -0.3142038881778717, -1.0429706573486328, -0.6770259737968445, 1.6828978061676025, -1.2341901063919067, -0.15533241629600525, -1.0317378044128418, -0.5228638052940369, -1.2834168672561646, -0.5174042582511902, -0.06223762780427933, -0.9725813865661621, 0.9047400951385498, 0.2166343629360199, -1.3232301473617554, -0.40675899386405945, -0.8698692321777344, 0.8131615519523621, -0.10035823285579681, 0.2650187015533447, 1.8885648250579834, 0.42480820417404175, -0.40486717224121094, 0.6338828802108765, 1.160606026649475, 0.6148298978805542, -0.5878848433494568, 0.35512566566467285, -0.6698012948036194, 0.2848568558692932, -1.2467139959335327, 0.15649265050888062, -2.8217289447784424, 0.5547885298728943, -0.05415438115596771, -0.02355925738811493, -0.07124842703342438, -1.2382969856262207, 1.1028906106948853, 2.584737777709961, -1.1599221229553223, 0.47250333428382874, 0.3253907263278961, 1.1705689430236816, -1.548754334449768, 0.28978416323661804, -0.42038702964782715, 2.1490650177001953, 0.14333048462867737, 1.1405059099197388, -0.4173944890499115, -2.3125743865966797, 0.5875967741012573, -1.3132902383804321, -1.202662467956543, 0.7417894601821899, -0.7581527829170227, 0.0994395837187767, -1.2934085130691528, -0.1049809679389, -0.7844031453132629, -1.2653241157531738, 0.7377682328224182, 0.13360315561294556, 0.502446174621582, -0.5916945934295654, 0.4074494242668152, -2.125013828277588, -1.343615174293518, -0.30700570344924927, -0.8345430493354797, 0.4258636236190796, -0.26588186621665955, 0.8198415040969849, -0.3039891719818115, -0.06112057715654373, 0.373234361410141, 1.4008049964904785, 3.3986752033233643, 0.21916139125823975, 0.3927499055862427, -0.22707244753837585, -0.9599763751029968, 1.4612170457839966, 0.9759752154350281, -0.1684284210205078, -0.4637874364852905, -1.0027936697006226, 1.200239896774292, 1.9415531158447266, 1.0737262964248657, 0.055955126881599426, -0.7817971110343933, -0.7285817861557007, 0.0036665182560682297, 0.13556329905986786, 0.39769476652145386, 0.8955011367797852, 0.08258649706840515, 0.007692219689488411, 1.4186588525772095, 1.150439739227295, -0.4363906681537628, 0.31692153215408325, -0.790379524230957, -0.43180739879608154, 0.6777374148368835, 0.34618309140205383, 0.024111809208989143, 0.25887322425842285, -1.061934232711792, -0.27664679288864136, -0.256887286901474, -0.8595852851867676, -0.705964207649231, -0.4183996021747589, -0.35461631417274475, 1.6615711450576782, 0.032503560185432434, -0.4512230455875397, 0.01948069967329502, -0.844459056854248, 0.04120979458093643, -1.0832353830337524, 0.24404765665531158, -0.17793437838554382, -0.0686529353260994, -0.12814456224441528, 1.8332937955856323, -0.9494985342025757, -2.016831636428833, 0.26221275329589844, 0.20767931640148163, -0.33490312099456787, 0.271529883146286, 1.6549335718154907, 0.6094827651977539, 1.4576771259307861, 1.2978110313415527, 0.9946818351745605, -0.6107934713363647, -1.3023598194122314, 0.6924176812171936, 1.065281629562378, -1.4775891304016113, 0.7207109928131104, 0.13792705535888672, -0.4259774386882782, 0.5682460069656372, 1.2217445373535156, 0.48499539494514465, -1.9799058437347412, 0.6341810822486877, -0.8928140997886658, 0.8135923147201538, 0.7893176674842834, 0.6926751136779785, 0.15837322175502777, 0.7603031992912292, -1.220901608467102, -1.1413406133651733, -0.6807324290275574, -0.6185065507888794, 1.9231643676757812, -0.19886414706707, 0.5608140826225281, -0.3001948297023773, -1.439909815788269, 0.01339017041027546, 0.6402643918991089, 0.32364919781684875, -0.5845380425453186, 0.7145174145698547, -0.6056167483329773, -1.0925109386444092, -1.2998425960540771, -0.5016117095947266, -1.0539476871490479, -0.9685816168785095, 1.0822443962097168, 0.7901819944381714, 0.2742515504360199, 1.854943871498108, 0.6601101756095886, 0.20770412683486938, -2.577740430831909, 0.9053972363471985, 0.31393077969551086, -0.08072855323553085, 0.8149157762527466, 0.36706411838531494, 0.9705877304077148, -0.10526882857084274, 0.5786511898040771, -2.567182779312134, 2.3508200645446777, -0.17593830823898315, 0.5613598227500916, 0.11740026623010635, -0.09253733605146408, 1.0111172199249268, 0.5603348016738892, 0.4366960823535919, -0.9967065453529358, 0.5521825551986694, -0.6117709279060364, 1.4013091325759888, 0.8575125932693481, -0.872244656085968, -0.00045013427734375, 1.3320250511169434, 0.5766186714172363, -0.5381834506988525, -0.98407381772995, -1.0422747135162354, 1.0215250253677368, 1.6611751317977905, -0.17898118495941162, -0.0679827630519867, 0.9012537002563477, 0.6518503427505493, -1.3577452898025513, -0.016772978007793427, -0.7825290560722351, -0.7544654011726379, 1.6683263778686523, 2.1251251697540283, -0.1834372878074646, -0.21028119325637817, -0.7553186416625977, -1.2291847467422485, 0.8616073727607727, 0.012170620262622833, 0.1124211922287941, 0.7067607045173645, -0.4963951110839844, 1.108663558959961, 0.8833247423171997, 0.8495460748672485, 0.40307408571243286, 0.25968027114868164, 0.24497734010219574, -0.4014636278152466, -1.185056209564209, -0.11662562191486359, -1.0857962369918823, -2.619903802871704, 0.46608930826187134, -0.17781513929367065, -1.3627859354019165, -0.0044515859335660934, -1.1024659872055054, 0.9092708230018616, -0.5076942443847656, -1.1397947072982788, -1.461355447769165, 0.16939608752727509, -0.07059241086244583, 0.9809236526489258, -1.608441948890686, -0.010815233923494816, 1.2717217206954956, 0.9218459725379944, -0.791400671005249, 0.9755365252494812, 0.25068965554237366, 1.2200778722763062, 0.883777379989624, -0.2791024446487427, 0.6656706929206848, 0.021159613505005836, -1.4117680788040161, 0.42351144552230835, 1.1629652976989746, 0.25064805150032043, 1.469498872756958, -0.5955625772476196, 0.03571490943431854, 0.3770037293434143, -0.493185818195343, -0.6196305155754089, -0.6902140974998474, 0.583964467048645, 0.010774215683341026, -0.9560352563858032, 0.07080089300870895, -0.001059969887137413, -0.21044456958770752, 0.20830872654914856, -1.4557220935821533, -0.05554870516061783, -0.3426889479160309, -0.6337052583694458, -1.2428337335586548, -0.11508287489414215, 1.3220218420028687, -0.7065801024436951, -0.17170654237270355, 0.46093204617500305, 0.2736395597457886, 0.49681252241134644, 0.6221358776092529, -0.652458131313324, -0.41347846388816833, -0.19702939689159393, -0.4212663173675537, 0.42689770460128784, 1.4195258617401123, -0.12005198001861572, -1.0284810066223145, 0.7502361536026001, -0.38154348731040955, 0.07098730653524399, 1.8991563320159912, 0.028201455250382423, -0.8630502820014954, 0.22787290811538696, -0.6823403835296631, 1.9501020908355713, 1.6956748962402344, 1.2547175884246826, -0.1712256819009781, -0.9364159107208252, 0.6515699625015259, -0.3376753330230713, -0.5223512053489685, 0.8288023471832275, 0.32399165630340576, -0.34456461668014526, -1.3907434940338135, 0.6569134593009949, 1.2661986351013184, -0.7056236863136292, -0.8611568212509155, 0.18052978813648224, -0.7973452210426331, 0.9849268794059753, 0.7874886989593506, 0.4117937386035919, 0.2874571979045868, 1.6204354763031006, 0.872495710849762, -0.536675751209259, 0.5459693670272827, 0.48186102509498596, -0.1447262465953827, -2.092522621154785, -1.1921879053115845, 0.33998116850852966, -0.614601194858551, -1.6403241157531738, 1.3795212507247925, -1.166043758392334, -1.0359153747558594, 0.5663188695907593, 0.11090206354856491, 1.4061070680618286, 0.3616734445095062, 1.478075623512268, 1.9630963802337646, 0.8540321588516235, 0.3518526256084442, 1.2902476787567139, -0.20271475613117218, -0.4858147203922272, 1.810762882232666, -0.45926859974861145, 0.4818747341632843, 1.1266286373138428, -0.21266858279705048, -1.055810809135437, -0.7712916135787964, -1.3066251277923584, -0.6991584897041321, 1.177448034286499, 0.054576724767684937, -1.1117357015609741, 0.28300878405570984, 1.5068023204803467, 0.016086401417851448, -0.37546733021736145, 0.7393578886985779, 0.2868979871273041, -0.8515893816947937, 0.023691503331065178, -0.9504573345184326, 0.524847686290741, -0.10117131471633911, -0.27672654390335083, 0.31113123893737793, 0.4866246283054352, 1.3499131202697754, 0.029606027528643608, 0.2761543393135071, 1.1130177974700928, -1.353501796722412, 1.5212963819503784, -0.7971621155738831, 0.2777739465236664, -2.3164896965026855, 1.3109544515609741, -0.7653295993804932, 1.7807098627090454, -2.678117275238037, 0.3864592909812927, -0.4680013060569763, -0.44949987530708313, 0.25105348229408264, -0.42977720499038696, 0.17333298921585083, -0.147821307182312, -1.224380612373352, -0.06944144517183304, -0.7244204878807068, 0.5396101474761963, 1.0303847789764404, 1.4407706260681152, -1.159210205078125, -0.29551035165786743, -1.7859538793563843, -0.06336264312267303, -0.7628210783004761, 0.3574759066104889, -1.9491453170776367, -0.2055516541004181, -1.8228517770767212, -2.2941267490386963, -1.3304786682128906, -0.7831848859786987, 1.144113302230835, 0.056077100336551666, -0.8638033866882324, 1.1244518756866455, -0.4215395748615265, -1.8819857835769653, 1.0945844650268555, -2.1940386295318604 ]
https://github.com/huggingface/datasets/issues/5457
prebuilt dataset relies on `downloads/extracted`
Hi! This issue is due to our audio/image datasets not being self-contained. This allows us to save disk space (files are written only once) but also leads to the issues like this one. We plan to make all our datasets self-contained in Datasets 3.0. In the meantime, you can run the following map to ensure your dataset is self-contained: ```python from datasets.table import embed_table_storage # load_dataset ... dset = dset.with_format("arrow") dset.map(embed_table_storage, batched=True) dset = dset.with_format("python") ```
### Describe the bug I pre-built the dataset: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` and it can be used just fine. now I wipe out `downloads/extracted` and it no longer works. ``` rm -r ~/.cache/huggingface/datasets/downloads ``` That is I can still load it: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing No config specified, defaulting to: general-pmd-synthetic-testing/100.unique Found cached dataset general-pmd-synthetic-testing (/home/stas/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing/100.unique/1.1.1/86bc445e3e48cb5ef79de109eb4e54ff85b318cd55c3835c4ee8f86eae33d9d2) ``` but if I try to use it: ``` E stderr: Traceback (most recent call last): E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/main.py", line 116, in <module> E stderr: train_loader, val_loader = get_dataloaders( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 170, in get_dataloaders E stderr: train_loader = get_dataloader_from_config( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 443, in get_dataloader_from_config E stderr: dataloader = get_dataloader( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 264, in get_dataloader E stderr: is_pmd = "meta" in hf_dataset[0] and "source" in hf_dataset[0] E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2601, in __getitem__ E stderr: return self._getitem( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2586, in _getitem E stderr: formatted_output = format_table( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 634, in format_table E stderr: return formatter(pa_table, query_type=query_type) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 406, in __call__ E stderr: return self.format_row(pa_table) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 442, in format_row E stderr: row = self.python_features_decoder.decode_row(row) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 225, in decode_row E stderr: return self.features.decode_example(row) if self.features else row E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1846, in decode_example E stderr: return { E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1847, in <dictcomp> E stderr: column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1304, in decode_nested_example E stderr: return decode_nested_example([schema.feature], obj) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1296, in decode_nested_example E stderr: if decode_nested_example(sub_schema, first_elmt) != first_elmt: E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1309, in decode_nested_example E stderr: return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/image.py", line 144, in decode_example E stderr: image = PIL.Image.open(path) E stderr: File "/home/stas/anaconda3/envs/py38-pt113/lib/python3.8/site-packages/PIL/Image.py", line 3092, in open E stderr: fp = builtins.open(filename, "rb") E stderr: FileNotFoundError: [Errno 2] No such file or directory: '/mnt/nvme0/code/data/cache/huggingface/datasets/downloads/extracted/134227b9b94c4eccf19b205bf3021d4492d0227b9be6c2ddb6bf517d8d55a8cb/data/101/images_01.jpg' ``` Only if I wipe out the cached dir and rebuild then it starts working as `download/extracted` is back again with extracted files. ``` rm -r ~/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` I think there are 2 issues here: 1. why does it still rely on extracted files after `arrow` files were printed - did I do something incorrectly when creating this dataset? 2. why doesn't the dataset know that it has been gutted and loads just fine? If it has a dependency on `download/extracted` then `load_dataset` should check if it's there and fail or force rebuilding. I am sure this could be a very expensive operation, so probably really solving #1 will not require this check. and this second item is probably an overkill. Other than perhaps if it had an optional `check_consistency` flag to do that. ### Environment info datasets@main
329
76
prebuilt dataset relies on `downloads/extracted` ### Describe the bug I pre-built the dataset: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` and it can be used just fine. now I wipe out `downloads/extracted` and it no longer works. ``` rm -r ~/.cache/huggingface/datasets/downloads ``` That is I can still load it: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing No config specified, defaulting to: general-pmd-synthetic-testing/100.unique Found cached dataset general-pmd-synthetic-testing (/home/stas/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing/100.unique/1.1.1/86bc445e3e48cb5ef79de109eb4e54ff85b318cd55c3835c4ee8f86eae33d9d2) ``` but if I try to use it: ``` E stderr: Traceback (most recent call last): E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/main.py", line 116, in <module> E stderr: train_loader, val_loader = get_dataloaders( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 170, in get_dataloaders E stderr: train_loader = get_dataloader_from_config( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 443, in get_dataloader_from_config E stderr: dataloader = get_dataloader( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 264, in get_dataloader E stderr: is_pmd = "meta" in hf_dataset[0] and "source" in hf_dataset[0] E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2601, in __getitem__ E stderr: return self._getitem( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2586, in _getitem E stderr: formatted_output = format_table( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 634, in format_table E stderr: return formatter(pa_table, query_type=query_type) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 406, in __call__ E stderr: return self.format_row(pa_table) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 442, in format_row E stderr: row = self.python_features_decoder.decode_row(row) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 225, in decode_row E stderr: return self.features.decode_example(row) if self.features else row E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1846, in decode_example E stderr: return { E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1847, in <dictcomp> E stderr: column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1304, in decode_nested_example E stderr: return decode_nested_example([schema.feature], obj) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1296, in decode_nested_example E stderr: if decode_nested_example(sub_schema, first_elmt) != first_elmt: E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1309, in decode_nested_example E stderr: return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/image.py", line 144, in decode_example E stderr: image = PIL.Image.open(path) E stderr: File "/home/stas/anaconda3/envs/py38-pt113/lib/python3.8/site-packages/PIL/Image.py", line 3092, in open E stderr: fp = builtins.open(filename, "rb") E stderr: FileNotFoundError: [Errno 2] No such file or directory: '/mnt/nvme0/code/data/cache/huggingface/datasets/downloads/extracted/134227b9b94c4eccf19b205bf3021d4492d0227b9be6c2ddb6bf517d8d55a8cb/data/101/images_01.jpg' ``` Only if I wipe out the cached dir and rebuild then it starts working as `download/extracted` is back again with extracted files. ``` rm -r ~/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` I think there are 2 issues here: 1. why does it still rely on extracted files after `arrow` files were printed - did I do something incorrectly when creating this dataset? 2. why doesn't the dataset know that it has been gutted and loads just fine? If it has a dependency on `download/extracted` then `load_dataset` should check if it's there and fail or force rebuilding. I am sure this could be a very expensive operation, so probably really solving #1 will not require this check. and this second item is probably an overkill. Other than perhaps if it had an optional `check_consistency` flag to do that. ### Environment info datasets@main Hi! This issue is due to our audio/image datasets not being self-contained. This allows us to save disk space (files are written only once) but also leads to the issues like this one. We plan to make all our datasets self-contained in Datasets 3.0. In the meantime, you can run the following map to ensure your dataset is self-contained: ```python from datasets.table import embed_table_storage # load_dataset ... dset = dset.with_format("arrow") dset.map(embed_table_storage, batched=True) dset = dset.with_format("python") ```
[ -1.157984972000122, -0.9018886685371399, -0.7691069841384888, 1.5294994115829468, -0.02931012213230133, -1.293380618095398, 0.09620700776576996, -0.9256891012191772, 1.568138599395752, -0.7634966373443604, 0.3926277160644531, -1.7433313131332397, -0.05582356080412865, -0.556559681892395, -0.7673988938331604, -0.8401334881782532, -0.30731990933418274, -0.8780004978179932, 1.0327248573303223, 2.483889102935791, 1.256667971611023, -1.3280977010726929, 2.7115321159362793, 0.5494146943092346, -0.22845765948295593, -1.064637541770935, 0.4908820688724518, -0.005875271745026112, -1.3109532594680786, -0.3900667428970337, -0.9020878672599792, 0.016872728243470192, -0.6424660086631775, -0.5583204030990601, 0.0908704400062561, 0.5014263391494751, -0.18404588103294373, -0.3565676212310791, -0.5104509592056274, -0.7590959668159485, 0.5338250994682312, -0.34065553545951843, 0.8746982216835022, -0.3162156045436859, 1.7897379398345947, -0.6835340261459351, 0.35858097672462463, 0.659488320350647, 1.3121075630187988, 0.2502102255821228, 0.07271555066108704, 0.2982543706893921, 0.34615668654441833, -0.005837457720190287, 0.590077817440033, 1.2063130140304565, 0.5562772154808044, 0.5134234428405762, 0.7021572589874268, -2.2171974182128906, 1.2826733589172363, -0.8752508759498596, 0.28996047377586365, 1.2778717279434204, -0.9827455282211304, 0.31247565150260925, -1.905935287475586, -0.10832654684782028, 0.4485771656036377, -2.181408166885376, 0.3143487870693207, -1.2743415832519531, -0.4379717707633972, 0.9948943257331848, 0.29304808378219604, -1.3167810440063477, 0.17819151282310486, -0.3956676721572876, 1.066782832145691, 0.38387686014175415, 1.1705988645553589, -1.6284565925598145, -0.06206665188074112, -0.29178524017333984, 0.1143781915307045, -1.2623229026794434, -1.632226824760437, 0.5446866154670715, 0.5952348709106445, 0.6425530910491943, -0.18691161274909973, 1.0238882303237915, -0.9884000420570374, 0.8086668848991394, -1.0080312490463257, -1.7871332168579102, -1.3644065856933594, -2.310821294784546, -2.2314727306365967, 0.792395293712616, -0.4524671137332916, -0.5505805611610413, 1.9946502447128296, -1.029003620147705, -1.8410134315490723, 1.0040066242218018, 0.3495233356952667, 0.012090541422367096, 2.3037049770355225, 0.2737666964530945, -0.8371889591217041, 0.4887513518333435, -0.7382646799087524, 0.8114804625511169, -0.2742845118045807, 1.36411452293396, 0.4970305263996124, -0.9877829551696777, 1.6257859468460083, -0.4567895233631134, 0.5660240650177002, -0.7695775032043457, -0.5148786902427673, -0.7018333673477173, 0.24765226244926453, 1.9602237939834595, -0.34010812640190125, 1.554905891418457, -0.23548373579978943, -1.5549770593643188, -1.5024288892745972, 0.8016633987426758, 0.5146824717521667, -0.7836923599243164, 0.04752910137176514, -0.406074196100235, 0.18305641412734985, 0.04269753023982048, 1.058669090270996, 1.1883362531661987, 0.7240806221961975, -0.3558725416660309, -0.8595330715179443, 0.1727384328842163, -0.03586484119296074, -0.5876819491386414, -1.7975362539291382, -0.30680468678474426, 0.2341974675655365, 0.6564494967460632, -1.20138418674469, 1.8113991022109985, 0.8862157464027405, 2.008007049560547, 1.0614880323410034, -0.27622050046920776, 1.5074127912521362, 0.02341720461845398, 1.9486074447631836, -0.4533669054508209, 0.6016449928283691, -0.3565186560153961, -1.1926498413085938, 0.7635951638221741, -0.37574008107185364, -2.004359245300293, -0.7051652073860168, -0.9048943519592285, -0.0633002519607544, -0.761955976486206, 0.8988728523254395, -0.2785142958164215, -1.557352900505066, 0.13958311080932617, -0.6333264112472534, 0.16117364168167114, -1.2863054275512695, 0.20949888229370117, 0.7040509581565857, -0.6866886019706726, -0.04064767062664032, -0.3246406018733978, -1.3040028810501099, -0.5199638605117798, 0.37177011370658875, 1.8561763763427734, -0.7245920896530151, 1.008305549621582, 1.0636879205703735, -0.6898788809776306, 0.09549728780984879, 0.34359943866729736, -0.343868613243103, 0.8567549586296082, -1.0321295261383057, -0.34581536054611206, 1.0926357507705688, -0.2243330180644989, -0.7004097104072571, 1.461223840713501, 0.9107902646064758, -1.0236579179763794, -0.20238789916038513, -0.1397680640220642, -0.7901456356048584, 0.018478890880942345, -1.5707881450653076, -0.10122963041067123, 0.33386680483818054, -1.3752080202102661, -0.4536018967628479, -0.18325847387313843, 1.3303885459899902, -0.21185937523841858, 1.342037320137024, -0.2221977710723877, -0.17640584707260132, -0.365045428276062, -0.5002453327178955, 0.09511629492044449, -0.1527719795703888, -0.6695703864097595, 0.3066140413284302, -0.7612776756286621, 0.27450308203697205, 1.4311909675598145, 0.3487668037414551, 0.02999723330140114, 0.4807904064655304, 1.2396448850631714, 0.3535330891609192, 0.010368367657065392, -0.8815065622329712, -1.6269378662109375, 2.0183799266815186, -1.4748927354812622, 1.9862841367721558, 0.8098092079162598, 0.004040963016450405, -1.7509915828704834, -1.799989104270935, 1.4385000467300415, 1.0801736116409302, 2.585456132888794, 0.5605701804161072, 0.3527689278125763, -0.7373578548431396, -0.6892363429069519, 0.4115125834941864, -0.964044988155365, -0.7626830339431763, 0.1580491065979004, 2.4210097789764404, 1.8110181093215942, -0.4236581027507782, -0.2458573877811432, -0.929714024066925, 1.2689199447631836, -0.20968681573867798, 0.2332785427570343, 2.0019338130950928, -0.2696772515773773, -1.0502561330795288, 1.287663221359253, -2.3393802642822266, 0.2541549801826477, 2.173007011413574, 0.34100350737571716, 0.054832570254802704, -1.4022560119628906, -0.6752874255180359, -0.19372132420539856, -0.5024992227554321, -1.2853120565414429, 0.5440969467163086, -0.24181318283081055, -0.822980523109436, -1.4425984621047974, 0.091510109603405, -1.116807222366333, -1.6761448383331299, 0.4034885764122009, 1.8363373279571533, 2.0045313835144043, -0.7837043404579163, 1.403233528137207, -0.362205445766449, 0.19106832146644592, 1.2653998136520386, 1.3371350765228271, 3.1843631267547607, 1.8444231748580933, -1.2969520092010498, 0.7777996063232422, -0.22771736979484558, -0.5913159847259521, 1.2230603694915771, -1.0380674600601196, 1.0583521127700806, -0.28733694553375244, -1.2562757730484009, -1.2839746475219727, 0.9700114727020264, 0.45477643609046936, -0.005155379418283701, -0.5026472806930542, 1.1908103227615356, 0.2184460461139679, 1.2489670515060425, 0.5682829022407532, -0.30806785821914673, 0.590596616268158, -0.3537909686565399, -0.541519820690155, 1.5458605289459229, 0.1797780990600586, -1.4462019205093384, -2.311396598815918, -0.19574788212776184, -0.9410027265548706, -0.05517992004752159, -0.629150390625, -1.0262773036956787, 1.6051234006881714, 0.39599478244781494, -1.226996898651123, -0.13327091932296753, -0.3800278902053833, -0.595646858215332, 2.613614320755005, -1.3770188093185425, -0.20746099948883057, -1.0652164220809937, -0.5461310148239136, 1.5850718021392822, -1.1144529581069946, -0.21425855159759521, -1.054153561592102, -0.5242819786071777, -1.2766066789627075, -0.48567724227905273, 0.036238331347703934, -0.8769649863243103, 0.7337302565574646, 0.06324930489063263, -1.2415622472763062, -0.3098658323287964, -0.9564481377601624, 0.9299454092979431, -0.14420351386070251, 0.17150816321372986, 1.8046177625656128, 0.46748486161231995, -0.5293445587158203, 0.6537202000617981, 1.171640396118164, 0.5921565294265747, -0.5987398624420166, 0.1981821060180664, -0.6535900235176086, 0.31609877943992615, -1.4223401546478271, 0.22381648421287537, -2.8837599754333496, 0.727634847164154, -0.005641441326588392, -0.049744609743356705, -0.06323494017124176, -1.4284604787826538, 1.0498021841049194, 2.6033127307891846, -1.1025936603546143, 0.44591912627220154, 0.42607998847961426, 1.193570613861084, -1.6426113843917847, 0.22106501460075378, -0.4828348755836487, 2.0794641971588135, 0.10549615323543549, 1.1878602504730225, -0.555360734462738, -2.2086143493652344, 0.5936951041221619, -1.2842768430709839, -1.011549472808838, 0.8836694955825806, -0.8314642310142517, 0.1852467954158783, -1.367526650428772, -0.18809157609939575, -0.9240565299987793, -1.177812099456787, 0.8375434875488281, 0.066709004342556, 0.4731062650680542, -0.6457405090332031, 0.3233986496925354, -2.1221470832824707, -1.3964531421661377, -0.22672200202941895, -0.9853991270065308, 0.44697386026382446, -0.3860090374946594, 0.6084615588188171, -0.08534910529851913, 0.08113476634025574, 0.3192371726036072, 1.388244390487671, 3.3110265731811523, 0.12879961729049683, 0.366223007440567, -0.15180623531341553, -1.0215436220169067, 1.5220577716827393, 0.9292741417884827, -0.18708357214927673, -0.5430803298950195, -0.9645490646362305, 1.2722036838531494, 2.010064125061035, 1.1730436086654663, 0.07005050778388977, -0.8896204829216003, -0.9306647777557373, 0.02114821784198284, 0.13058939576148987, 0.512612521648407, 0.8789763450622559, 0.03622526675462723, 0.16935700178146362, 1.278831958770752, 1.1041969060897827, -0.40754881501197815, 0.49045953154563904, -0.9543810486793518, -0.37907344102859497, 0.4064372181892395, 0.2909395396709442, 0.06981175392866135, 0.354325532913208, -1.084324598312378, -0.31341806054115295, -0.18506214022636414, -0.8944347500801086, -0.7622154951095581, -0.5189328789710999, -0.3833272159099579, 1.6403318643569946, 0.0005270075052976608, -0.4944845139980316, -0.042572829872369766, -0.7646126747131348, -0.09841689467430115, -1.092226505279541, 0.18417036533355713, -0.11065753549337387, -0.04454652592539787, -0.08497434854507446, 1.6620821952819824, -1.050601601600647, -2.178846597671509, 0.29087597131729126, 0.32291680574417114, -0.4552711546421051, 0.08993423730134964, 1.7530826330184937, 0.5576749444007874, 1.3007621765136719, 1.3635914325714111, 1.0303574800491333, -0.6511361002922058, -1.2806864976882935, 0.6901265382766724, 0.9315986633300781, -1.3408045768737793, 0.9605597853660583, -0.11503849923610687, -0.4468928575515747, 0.6083035469055176, 1.3191022872924805, 0.4227551221847534, -2.0002243518829346, 0.7309991121292114, -0.8402354717254639, 0.6257820129394531, 0.7015941143035889, 0.8147265315055847, 0.21724572777748108, 0.8403462171554565, -1.30000901222229, -1.1329002380371094, -0.6752362847328186, -0.6486737728118896, 1.8816152811050415, -0.158542662858963, 0.5058835744857788, -0.16356629133224487, -1.268004059791565, -0.12330760806798935, 0.783664882183075, 0.34079161286354065, -0.49438583850860596, 0.7650524973869324, -0.6163695454597473, -1.0111801624298096, -1.2872846126556396, -0.4270128905773163, -0.9381608963012695, -0.8684700131416321, 0.9368348121643066, 0.765698254108429, 0.4625500738620758, 1.9772987365722656, 0.6777856349945068, 0.25730371475219727, -2.6085565090179443, 0.9082106947898865, 0.26614436507225037, -0.03712678700685501, 0.8026958703994751, 0.24959796667099, 1.111956238746643, -0.04360020533204079, 0.6914243102073669, -2.375014305114746, 2.260610818862915, -0.2854408323764801, 0.6605627536773682, -0.04155229404568672, -0.20418143272399902, 1.1521663665771484, 0.5574027299880981, 0.5974584817886353, -1.095636010169983, 0.785642683506012, -0.6769924163818359, 1.1259703636169434, 0.8880115151405334, -0.9415240287780762, 0.06104675680398941, 1.3518174886703491, 0.4046509265899658, -0.39195993542671204, -1.022297978401184, -0.7720015645027161, 0.9747938513755798, 1.7416918277740479, 0.01607881486415863, 0.025769006460905075, 0.9512986540794373, 0.7189590334892273, -1.3326469659805298, 0.0308881476521492, -0.5714532136917114, -0.7835452556610107, 1.7955251932144165, 2.0583395957946777, -0.14685657620429993, -0.15743115544319153, -0.8148829936981201, -1.1785783767700195, 0.8102733492851257, 0.014849381521344185, 0.021123677492141724, 0.7743707299232483, -0.6995232701301575, 1.2480065822601318, 0.667851448059082, 0.9589447975158691, 0.07008461654186249, 0.2753771245479584, 0.27682915329933167, -0.3081407845020294, -1.2239185571670532, -0.3311338424682617, -1.0596674680709839, -2.5066542625427246, 0.43085187673568726, -0.1800687313079834, -1.3776761293411255, 0.12941792607307434, -1.0237947702407837, 0.7880989909172058, -0.6375488042831421, -1.1914469003677368, -1.4338657855987549, 0.3238435983657837, -0.16648325324058533, 0.8033803105354309, -1.6806703805923462, -0.09226009249687195, 1.1903207302093506, 0.9455503225326538, -0.5948151350021362, 0.8884039521217346, 0.21006450057029724, 0.9795218706130981, 0.9429990649223328, -0.33391302824020386, 0.5724684000015259, 0.12407293170690536, -1.2802094221115112, 0.3549158275127411, 1.2378286123275757, 0.19368168711662292, 1.4232783317565918, -0.4391869902610779, 0.09528926014900208, 0.47773680090904236, -0.5366156101226807, -0.53065025806427, -0.648536741733551, 0.7547900080680847, 0.08516628295183182, -1.0300763845443726, -0.01736197993159294, -0.015505470335483551, -0.11191508919000626, 0.27822253108024597, -1.4886175394058228, -0.18368521332740784, -0.2954029440879822, -0.5654408931732178, -1.3403918743133545, 0.023180637508630753, 1.3721575736999512, -0.7771228551864624, -0.24962279200553894, 0.4721466302871704, 0.21720460057258606, 0.5194107890129089, 0.5308895707130432, -0.7440518736839294, -0.23472851514816284, -0.28734150528907776, -0.4134179949760437, 0.27170389890670776, 1.2762371301651, -0.049450963735580444, -0.9863206744194031, 0.7108765244483948, -0.3593219220638275, 0.10671354085206985, 1.968758463859558, 0.002607423812150955, -0.7616755962371826, 0.3504655957221985, -0.6858899593353271, 1.8200432062149048, 1.732683539390564, 1.3200215101242065, -0.10783857107162476, -0.906446635723114, 0.6049748659133911, -0.25199660658836365, -0.3827621340751648, 0.9497557878494263, 0.39214035868644714, -0.1790568232536316, -1.4527716636657715, 0.581536054611206, 1.3546432256698608, -0.8198617100715637, -0.7517701387405396, 0.03486696630716324, -0.9133383631706238, 1.173040509223938, 0.6425280570983887, 0.392089307308197, 0.27556028962135315, 1.5238314867019653, 0.6685925126075745, -0.43876785039901733, 0.4956154525279999, 0.507265567779541, -0.17687684297561646, -2.153785228729248, -1.0879918336868286, 0.29361197352409363, -0.34875643253326416, -1.600003719329834, 1.3631032705307007, -1.1940562725067139, -0.9256626963615417, 0.5736918449401855, 0.10214884579181671, 1.4899907112121582, 0.3430565297603607, 1.715362548828125, 2.0348689556121826, 0.8981470465660095, 0.3620311915874481, 1.165465235710144, -0.18715515732765198, -0.43484804034233093, 1.8258599042892456, -0.4832223355770111, 0.5321669578552246, 0.9573061466217041, -0.33460867404937744, -1.1984959840774536, -0.871846616268158, -1.2369874715805054, -0.6535732746124268, 1.1492871046066284, 0.08465047925710678, -1.1601142883300781, 0.24661502242088318, 1.6317483186721802, 0.03324399143457413, -0.18632730841636658, 0.7425920963287354, 0.32680100202560425, -0.7263093590736389, 0.01249907910823822, -0.9426732063293457, 0.5162360668182373, -0.13394072651863098, -0.2630364000797272, 0.18509814143180847, 0.5894579887390137, 1.270688533782959, 0.05367793142795563, 0.07167764008045197, 1.2777565717697144, -1.4219512939453125, 1.435197353363037, -0.7175813913345337, 0.36047306656837463, -2.485616683959961, 1.457843542098999, -0.9096781611442566, 1.8430193662643433, -2.5488121509552, 0.41678592562675476, -0.5462754964828491, -0.5718673467636108, 0.28893402218818665, -0.41723212599754333, 0.07960084080696106, -0.057733941823244095, -0.9854103326797485, 0.03661205992102623, -0.7967093586921692, 0.5891032218933105, 1.1809419393539429, 1.3606101274490356, -1.028653860092163, -0.27355319261550903, -1.8401422500610352, -0.2566843330860138, -0.6644596457481384, 0.35458698868751526, -1.964013934135437, -0.1665564775466919, -2.002016544342041, -2.3128981590270996, -1.3582998514175415, -0.9499583840370178, 0.9885714054107666, 0.21441593766212463, -0.9199655652046204, 1.0610123872756958, -0.40682676434516907, -1.8013482093811035, 1.1183918714523315, -2.153059720993042 ]
https://github.com/huggingface/datasets/issues/5457
prebuilt dataset relies on `downloads/extracted`
Understood. Thank you, Mario. Perhaps the solution could be very simple - move the extracted files into the directory of the cached dataset? Which would make it self-contained already and won't require waiting for a new major release. Unless I'm missing some back-compat nuance. But regardless if X relies on Y - it could check if Y is still there when loading X. so not checking full consistency but just the top-level directory it relies on.
### Describe the bug I pre-built the dataset: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` and it can be used just fine. now I wipe out `downloads/extracted` and it no longer works. ``` rm -r ~/.cache/huggingface/datasets/downloads ``` That is I can still load it: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing No config specified, defaulting to: general-pmd-synthetic-testing/100.unique Found cached dataset general-pmd-synthetic-testing (/home/stas/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing/100.unique/1.1.1/86bc445e3e48cb5ef79de109eb4e54ff85b318cd55c3835c4ee8f86eae33d9d2) ``` but if I try to use it: ``` E stderr: Traceback (most recent call last): E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/main.py", line 116, in <module> E stderr: train_loader, val_loader = get_dataloaders( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 170, in get_dataloaders E stderr: train_loader = get_dataloader_from_config( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 443, in get_dataloader_from_config E stderr: dataloader = get_dataloader( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 264, in get_dataloader E stderr: is_pmd = "meta" in hf_dataset[0] and "source" in hf_dataset[0] E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2601, in __getitem__ E stderr: return self._getitem( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2586, in _getitem E stderr: formatted_output = format_table( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 634, in format_table E stderr: return formatter(pa_table, query_type=query_type) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 406, in __call__ E stderr: return self.format_row(pa_table) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 442, in format_row E stderr: row = self.python_features_decoder.decode_row(row) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 225, in decode_row E stderr: return self.features.decode_example(row) if self.features else row E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1846, in decode_example E stderr: return { E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1847, in <dictcomp> E stderr: column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1304, in decode_nested_example E stderr: return decode_nested_example([schema.feature], obj) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1296, in decode_nested_example E stderr: if decode_nested_example(sub_schema, first_elmt) != first_elmt: E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1309, in decode_nested_example E stderr: return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/image.py", line 144, in decode_example E stderr: image = PIL.Image.open(path) E stderr: File "/home/stas/anaconda3/envs/py38-pt113/lib/python3.8/site-packages/PIL/Image.py", line 3092, in open E stderr: fp = builtins.open(filename, "rb") E stderr: FileNotFoundError: [Errno 2] No such file or directory: '/mnt/nvme0/code/data/cache/huggingface/datasets/downloads/extracted/134227b9b94c4eccf19b205bf3021d4492d0227b9be6c2ddb6bf517d8d55a8cb/data/101/images_01.jpg' ``` Only if I wipe out the cached dir and rebuild then it starts working as `download/extracted` is back again with extracted files. ``` rm -r ~/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` I think there are 2 issues here: 1. why does it still rely on extracted files after `arrow` files were printed - did I do something incorrectly when creating this dataset? 2. why doesn't the dataset know that it has been gutted and loads just fine? If it has a dependency on `download/extracted` then `load_dataset` should check if it's there and fail or force rebuilding. I am sure this could be a very expensive operation, so probably really solving #1 will not require this check. and this second item is probably an overkill. Other than perhaps if it had an optional `check_consistency` flag to do that. ### Environment info datasets@main
329
76
prebuilt dataset relies on `downloads/extracted` ### Describe the bug I pre-built the dataset: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` and it can be used just fine. now I wipe out `downloads/extracted` and it no longer works. ``` rm -r ~/.cache/huggingface/datasets/downloads ``` That is I can still load it: ``` python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing No config specified, defaulting to: general-pmd-synthetic-testing/100.unique Found cached dataset general-pmd-synthetic-testing (/home/stas/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing/100.unique/1.1.1/86bc445e3e48cb5ef79de109eb4e54ff85b318cd55c3835c4ee8f86eae33d9d2) ``` but if I try to use it: ``` E stderr: Traceback (most recent call last): E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/main.py", line 116, in <module> E stderr: train_loader, val_loader = get_dataloaders( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 170, in get_dataloaders E stderr: train_loader = get_dataloader_from_config( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 443, in get_dataloader_from_config E stderr: dataloader = get_dataloader( E stderr: File "/mnt/nvme0/code/huggingface/m4-master-6/m4/training/dataset.py", line 264, in get_dataloader E stderr: is_pmd = "meta" in hf_dataset[0] and "source" in hf_dataset[0] E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2601, in __getitem__ E stderr: return self._getitem( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/arrow_dataset.py", line 2586, in _getitem E stderr: formatted_output = format_table( E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 634, in format_table E stderr: return formatter(pa_table, query_type=query_type) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 406, in __call__ E stderr: return self.format_row(pa_table) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 442, in format_row E stderr: row = self.python_features_decoder.decode_row(row) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/formatting/formatting.py", line 225, in decode_row E stderr: return self.features.decode_example(row) if self.features else row E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1846, in decode_example E stderr: return { E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1847, in <dictcomp> E stderr: column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1304, in decode_nested_example E stderr: return decode_nested_example([schema.feature], obj) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1296, in decode_nested_example E stderr: if decode_nested_example(sub_schema, first_elmt) != first_elmt: E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/features.py", line 1309, in decode_nested_example E stderr: return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) E stderr: File "/mnt/nvme0/code/huggingface/datasets-master/src/datasets/features/image.py", line 144, in decode_example E stderr: image = PIL.Image.open(path) E stderr: File "/home/stas/anaconda3/envs/py38-pt113/lib/python3.8/site-packages/PIL/Image.py", line 3092, in open E stderr: fp = builtins.open(filename, "rb") E stderr: FileNotFoundError: [Errno 2] No such file or directory: '/mnt/nvme0/code/data/cache/huggingface/datasets/downloads/extracted/134227b9b94c4eccf19b205bf3021d4492d0227b9be6c2ddb6bf517d8d55a8cb/data/101/images_01.jpg' ``` Only if I wipe out the cached dir and rebuild then it starts working as `download/extracted` is back again with extracted files. ``` rm -r ~/.cache/huggingface/datasets/HuggingFaceM4___general-pmd-synthetic-testing python -c 'import sys; from datasets import load_dataset; ds=load_dataset(sys.argv[1])' HuggingFaceM4/general-pmd-synthetic-testing ``` I think there are 2 issues here: 1. why does it still rely on extracted files after `arrow` files were printed - did I do something incorrectly when creating this dataset? 2. why doesn't the dataset know that it has been gutted and loads just fine? If it has a dependency on `download/extracted` then `load_dataset` should check if it's there and fail or force rebuilding. I am sure this could be a very expensive operation, so probably really solving #1 will not require this check. and this second item is probably an overkill. Other than perhaps if it had an optional `check_consistency` flag to do that. ### Environment info datasets@main Understood. Thank you, Mario. Perhaps the solution could be very simple - move the extracted files into the directory of the cached dataset? Which would make it self-contained already and won't require waiting for a new major release. Unless I'm missing some back-compat nuance. But regardless if X relies on Y - it could check if Y is still there when loading X. so not checking full consistency but just the top-level directory it relies on.
[ -1.157984972000122, -0.9018886685371399, -0.7691069841384888, 1.5294994115829468, -0.02931012213230133, -1.293380618095398, 0.09620700776576996, -0.9256891012191772, 1.568138599395752, -0.7634966373443604, 0.3926277160644531, -1.7433313131332397, -0.05582356080412865, -0.556559681892395, -0.7673988938331604, -0.8401334881782532, -0.30731990933418274, -0.8780004978179932, 1.0327248573303223, 2.483889102935791, 1.256667971611023, -1.3280977010726929, 2.7115321159362793, 0.5494146943092346, -0.22845765948295593, -1.064637541770935, 0.4908820688724518, -0.005875271745026112, -1.3109532594680786, -0.3900667428970337, -0.9020878672599792, 0.016872728243470192, -0.6424660086631775, -0.5583204030990601, 0.0908704400062561, 0.5014263391494751, -0.18404588103294373, -0.3565676212310791, -0.5104509592056274, -0.7590959668159485, 0.5338250994682312, -0.34065553545951843, 0.8746982216835022, -0.3162156045436859, 1.7897379398345947, -0.6835340261459351, 0.35858097672462463, 0.659488320350647, 1.3121075630187988, 0.2502102255821228, 0.07271555066108704, 0.2982543706893921, 0.34615668654441833, -0.005837457720190287, 0.590077817440033, 1.2063130140304565, 0.5562772154808044, 0.5134234428405762, 0.7021572589874268, -2.2171974182128906, 1.2826733589172363, -0.8752508759498596, 0.28996047377586365, 1.2778717279434204, -0.9827455282211304, 0.31247565150260925, -1.905935287475586, -0.10832654684782028, 0.4485771656036377, -2.181408166885376, 0.3143487870693207, -1.2743415832519531, -0.4379717707633972, 0.9948943257331848, 0.29304808378219604, -1.3167810440063477, 0.17819151282310486, -0.3956676721572876, 1.066782832145691, 0.38387686014175415, 1.1705988645553589, -1.6284565925598145, -0.06206665188074112, -0.29178524017333984, 0.1143781915307045, -1.2623229026794434, -1.632226824760437, 0.5446866154670715, 0.5952348709106445, 0.6425530910491943, -0.18691161274909973, 1.0238882303237915, -0.9884000420570374, 0.8086668848991394, -1.0080312490463257, -1.7871332168579102, -1.3644065856933594, -2.310821294784546, -2.2314727306365967, 0.792395293712616, -0.4524671137332916, -0.5505805611610413, 1.9946502447128296, -1.029003620147705, -1.8410134315490723, 1.0040066242218018, 0.3495233356952667, 0.012090541422367096, 2.3037049770355225, 0.2737666964530945, -0.8371889591217041, 0.4887513518333435, -0.7382646799087524, 0.8114804625511169, -0.2742845118045807, 1.36411452293396, 0.4970305263996124, -0.9877829551696777, 1.6257859468460083, -0.4567895233631134, 0.5660240650177002, -0.7695775032043457, -0.5148786902427673, -0.7018333673477173, 0.24765226244926453, 1.9602237939834595, -0.34010812640190125, 1.554905891418457, -0.23548373579978943, -1.5549770593643188, -1.5024288892745972, 0.8016633987426758, 0.5146824717521667, -0.7836923599243164, 0.04752910137176514, -0.406074196100235, 0.18305641412734985, 0.04269753023982048, 1.058669090270996, 1.1883362531661987, 0.7240806221961975, -0.3558725416660309, -0.8595330715179443, 0.1727384328842163, -0.03586484119296074, -0.5876819491386414, -1.7975362539291382, -0.30680468678474426, 0.2341974675655365, 0.6564494967460632, -1.20138418674469, 1.8113991022109985, 0.8862157464027405, 2.008007049560547, 1.0614880323410034, -0.27622050046920776, 1.5074127912521362, 0.02341720461845398, 1.9486074447631836, -0.4533669054508209, 0.6016449928283691, -0.3565186560153961, -1.1926498413085938, 0.7635951638221741, -0.37574008107185364, -2.004359245300293, -0.7051652073860168, -0.9048943519592285, -0.0633002519607544, -0.761955976486206, 0.8988728523254395, -0.2785142958164215, -1.557352900505066, 0.13958311080932617, -0.6333264112472534, 0.16117364168167114, -1.2863054275512695, 0.20949888229370117, 0.7040509581565857, -0.6866886019706726, -0.04064767062664032, -0.3246406018733978, -1.3040028810501099, -0.5199638605117798, 0.37177011370658875, 1.8561763763427734, -0.7245920896530151, 1.008305549621582, 1.0636879205703735, -0.6898788809776306, 0.09549728780984879, 0.34359943866729736, -0.343868613243103, 0.8567549586296082, -1.0321295261383057, -0.34581536054611206, 1.0926357507705688, -0.2243330180644989, -0.7004097104072571, 1.461223840713501, 0.9107902646064758, -1.0236579179763794, -0.20238789916038513, -0.1397680640220642, -0.7901456356048584, 0.018478890880942345, -1.5707881450653076, -0.10122963041067123, 0.33386680483818054, -1.3752080202102661, -0.4536018967628479, -0.18325847387313843, 1.3303885459899902, -0.21185937523841858, 1.342037320137024, -0.2221977710723877, -0.17640584707260132, -0.365045428276062, -0.5002453327178955, 0.09511629492044449, -0.1527719795703888, -0.6695703864097595, 0.3066140413284302, -0.7612776756286621, 0.27450308203697205, 1.4311909675598145, 0.3487668037414551, 0.02999723330140114, 0.4807904064655304, 1.2396448850631714, 0.3535330891609192, 0.010368367657065392, -0.8815065622329712, -1.6269378662109375, 2.0183799266815186, -1.4748927354812622, 1.9862841367721558, 0.8098092079162598, 0.004040963016450405, -1.7509915828704834, -1.799989104270935, 1.4385000467300415, 1.0801736116409302, 2.585456132888794, 0.5605701804161072, 0.3527689278125763, -0.7373578548431396, -0.6892363429069519, 0.4115125834941864, -0.964044988155365, -0.7626830339431763, 0.1580491065979004, 2.4210097789764404, 1.8110181093215942, -0.4236581027507782, -0.2458573877811432, -0.929714024066925, 1.2689199447631836, -0.20968681573867798, 0.2332785427570343, 2.0019338130950928, -0.2696772515773773, -1.0502561330795288, 1.287663221359253, -2.3393802642822266, 0.2541549801826477, 2.173007011413574, 0.34100350737571716, 0.054832570254802704, -1.4022560119628906, -0.6752874255180359, -0.19372132420539856, -0.5024992227554321, -1.2853120565414429, 0.5440969467163086, -0.24181318283081055, -0.822980523109436, -1.4425984621047974, 0.091510109603405, -1.116807222366333, -1.6761448383331299, 0.4034885764122009, 1.8363373279571533, 2.0045313835144043, -0.7837043404579163, 1.403233528137207, -0.362205445766449, 0.19106832146644592, 1.2653998136520386, 1.3371350765228271, 3.1843631267547607, 1.8444231748580933, -1.2969520092010498, 0.7777996063232422, -0.22771736979484558, -0.5913159847259521, 1.2230603694915771, -1.0380674600601196, 1.0583521127700806, -0.28733694553375244, -1.2562757730484009, -1.2839746475219727, 0.9700114727020264, 0.45477643609046936, -0.005155379418283701, -0.5026472806930542, 1.1908103227615356, 0.2184460461139679, 1.2489670515060425, 0.5682829022407532, -0.30806785821914673, 0.590596616268158, -0.3537909686565399, -0.541519820690155, 1.5458605289459229, 0.1797780990600586, -1.4462019205093384, -2.311396598815918, -0.19574788212776184, -0.9410027265548706, -0.05517992004752159, -0.629150390625, -1.0262773036956787, 1.6051234006881714, 0.39599478244781494, -1.226996898651123, -0.13327091932296753, -0.3800278902053833, -0.595646858215332, 2.613614320755005, -1.3770188093185425, -0.20746099948883057, -1.0652164220809937, -0.5461310148239136, 1.5850718021392822, -1.1144529581069946, -0.21425855159759521, -1.054153561592102, -0.5242819786071777, -1.2766066789627075, -0.48567724227905273, 0.036238331347703934, -0.8769649863243103, 0.7337302565574646, 0.06324930489063263, -1.2415622472763062, -0.3098658323287964, -0.9564481377601624, 0.9299454092979431, -0.14420351386070251, 0.17150816321372986, 1.8046177625656128, 0.46748486161231995, -0.5293445587158203, 0.6537202000617981, 1.171640396118164, 0.5921565294265747, -0.5987398624420166, 0.1981821060180664, -0.6535900235176086, 0.31609877943992615, -1.4223401546478271, 0.22381648421287537, -2.8837599754333496, 0.727634847164154, -0.005641441326588392, -0.049744609743356705, -0.06323494017124176, -1.4284604787826538, 1.0498021841049194, 2.6033127307891846, -1.1025936603546143, 0.44591912627220154, 0.42607998847961426, 1.193570613861084, -1.6426113843917847, 0.22106501460075378, -0.4828348755836487, 2.0794641971588135, 0.10549615323543549, 1.1878602504730225, -0.555360734462738, -2.2086143493652344, 0.5936951041221619, -1.2842768430709839, -1.011549472808838, 0.8836694955825806, -0.8314642310142517, 0.1852467954158783, -1.367526650428772, -0.18809157609939575, -0.9240565299987793, -1.177812099456787, 0.8375434875488281, 0.066709004342556, 0.4731062650680542, -0.6457405090332031, 0.3233986496925354, -2.1221470832824707, -1.3964531421661377, -0.22672200202941895, -0.9853991270065308, 0.44697386026382446, -0.3860090374946594, 0.6084615588188171, -0.08534910529851913, 0.08113476634025574, 0.3192371726036072, 1.388244390487671, 3.3110265731811523, 0.12879961729049683, 0.366223007440567, -0.15180623531341553, -1.0215436220169067, 1.5220577716827393, 0.9292741417884827, -0.18708357214927673, -0.5430803298950195, -0.9645490646362305, 1.2722036838531494, 2.010064125061035, 1.1730436086654663, 0.07005050778388977, -0.8896204829216003, -0.9306647777557373, 0.02114821784198284, 0.13058939576148987, 0.512612521648407, 0.8789763450622559, 0.03622526675462723, 0.16935700178146362, 1.278831958770752, 1.1041969060897827, -0.40754881501197815, 0.49045953154563904, -0.9543810486793518, -0.37907344102859497, 0.4064372181892395, 0.2909395396709442, 0.06981175392866135, 0.354325532913208, -1.084324598312378, -0.31341806054115295, -0.18506214022636414, -0.8944347500801086, -0.7622154951095581, -0.5189328789710999, -0.3833272159099579, 1.6403318643569946, 0.0005270075052976608, -0.4944845139980316, -0.042572829872369766, -0.7646126747131348, -0.09841689467430115, -1.092226505279541, 0.18417036533355713, -0.11065753549337387, -0.04454652592539787, -0.08497434854507446, 1.6620821952819824, -1.050601601600647, -2.178846597671509, 0.29087597131729126, 0.32291680574417114, -0.4552711546421051, 0.08993423730134964, 1.7530826330184937, 0.5576749444007874, 1.3007621765136719, 1.3635914325714111, 1.0303574800491333, -0.6511361002922058, -1.2806864976882935, 0.6901265382766724, 0.9315986633300781, -1.3408045768737793, 0.9605597853660583, -0.11503849923610687, -0.4468928575515747, 0.6083035469055176, 1.3191022872924805, 0.4227551221847534, -2.0002243518829346, 0.7309991121292114, -0.8402354717254639, 0.6257820129394531, 0.7015941143035889, 0.8147265315055847, 0.21724572777748108, 0.8403462171554565, -1.30000901222229, -1.1329002380371094, -0.6752362847328186, -0.6486737728118896, 1.8816152811050415, -0.158542662858963, 0.5058835744857788, -0.16356629133224487, -1.268004059791565, -0.12330760806798935, 0.783664882183075, 0.34079161286354065, -0.49438583850860596, 0.7650524973869324, -0.6163695454597473, -1.0111801624298096, -1.2872846126556396, -0.4270128905773163, -0.9381608963012695, -0.8684700131416321, 0.9368348121643066, 0.765698254108429, 0.4625500738620758, 1.9772987365722656, 0.6777856349945068, 0.25730371475219727, -2.6085565090179443, 0.9082106947898865, 0.26614436507225037, -0.03712678700685501, 0.8026958703994751, 0.24959796667099, 1.111956238746643, -0.04360020533204079, 0.6914243102073669, -2.375014305114746, 2.260610818862915, -0.2854408323764801, 0.6605627536773682, -0.04155229404568672, -0.20418143272399902, 1.1521663665771484, 0.5574027299880981, 0.5974584817886353, -1.095636010169983, 0.785642683506012, -0.6769924163818359, 1.1259703636169434, 0.8880115151405334, -0.9415240287780762, 0.06104675680398941, 1.3518174886703491, 0.4046509265899658, -0.39195993542671204, -1.022297978401184, -0.7720015645027161, 0.9747938513755798, 1.7416918277740479, 0.01607881486415863, 0.025769006460905075, 0.9512986540794373, 0.7189590334892273, -1.3326469659805298, 0.0308881476521492, -0.5714532136917114, -0.7835452556610107, 1.7955251932144165, 2.0583395957946777, -0.14685657620429993, -0.15743115544319153, -0.8148829936981201, -1.1785783767700195, 0.8102733492851257, 0.014849381521344185, 0.021123677492141724, 0.7743707299232483, -0.6995232701301575, 1.2480065822601318, 0.667851448059082, 0.9589447975158691, 0.07008461654186249, 0.2753771245479584, 0.27682915329933167, -0.3081407845020294, -1.2239185571670532, -0.3311338424682617, -1.0596674680709839, -2.5066542625427246, 0.43085187673568726, -0.1800687313079834, -1.3776761293411255, 0.12941792607307434, -1.0237947702407837, 0.7880989909172058, -0.6375488042831421, -1.1914469003677368, -1.4338657855987549, 0.3238435983657837, -0.16648325324058533, 0.8033803105354309, -1.6806703805923462, -0.09226009249687195, 1.1903207302093506, 0.9455503225326538, -0.5948151350021362, 0.8884039521217346, 0.21006450057029724, 0.9795218706130981, 0.9429990649223328, -0.33391302824020386, 0.5724684000015259, 0.12407293170690536, -1.2802094221115112, 0.3549158275127411, 1.2378286123275757, 0.19368168711662292, 1.4232783317565918, -0.4391869902610779, 0.09528926014900208, 0.47773680090904236, -0.5366156101226807, -0.53065025806427, -0.648536741733551, 0.7547900080680847, 0.08516628295183182, -1.0300763845443726, -0.01736197993159294, -0.015505470335483551, -0.11191508919000626, 0.27822253108024597, -1.4886175394058228, -0.18368521332740784, -0.2954029440879822, -0.5654408931732178, -1.3403918743133545, 0.023180637508630753, 1.3721575736999512, -0.7771228551864624, -0.24962279200553894, 0.4721466302871704, 0.21720460057258606, 0.5194107890129089, 0.5308895707130432, -0.7440518736839294, -0.23472851514816284, -0.28734150528907776, -0.4134179949760437, 0.27170389890670776, 1.2762371301651, -0.049450963735580444, -0.9863206744194031, 0.7108765244483948, -0.3593219220638275, 0.10671354085206985, 1.968758463859558, 0.002607423812150955, -0.7616755962371826, 0.3504655957221985, -0.6858899593353271, 1.8200432062149048, 1.732683539390564, 1.3200215101242065, -0.10783857107162476, -0.906446635723114, 0.6049748659133911, -0.25199660658836365, -0.3827621340751648, 0.9497557878494263, 0.39214035868644714, -0.1790568232536316, -1.4527716636657715, 0.581536054611206, 1.3546432256698608, -0.8198617100715637, -0.7517701387405396, 0.03486696630716324, -0.9133383631706238, 1.173040509223938, 0.6425280570983887, 0.392089307308197, 0.27556028962135315, 1.5238314867019653, 0.6685925126075745, -0.43876785039901733, 0.4956154525279999, 0.507265567779541, -0.17687684297561646, -2.153785228729248, -1.0879918336868286, 0.29361197352409363, -0.34875643253326416, -1.600003719329834, 1.3631032705307007, -1.1940562725067139, -0.9256626963615417, 0.5736918449401855, 0.10214884579181671, 1.4899907112121582, 0.3430565297603607, 1.715362548828125, 2.0348689556121826, 0.8981470465660095, 0.3620311915874481, 1.165465235710144, -0.18715515732765198, -0.43484804034233093, 1.8258599042892456, -0.4832223355770111, 0.5321669578552246, 0.9573061466217041, -0.33460867404937744, -1.1984959840774536, -0.871846616268158, -1.2369874715805054, -0.6535732746124268, 1.1492871046066284, 0.08465047925710678, -1.1601142883300781, 0.24661502242088318, 1.6317483186721802, 0.03324399143457413, -0.18632730841636658, 0.7425920963287354, 0.32680100202560425, -0.7263093590736389, 0.01249907910823822, -0.9426732063293457, 0.5162360668182373, -0.13394072651863098, -0.2630364000797272, 0.18509814143180847, 0.5894579887390137, 1.270688533782959, 0.05367793142795563, 0.07167764008045197, 1.2777565717697144, -1.4219512939453125, 1.435197353363037, -0.7175813913345337, 0.36047306656837463, -2.485616683959961, 1.457843542098999, -0.9096781611442566, 1.8430193662643433, -2.5488121509552, 0.41678592562675476, -0.5462754964828491, -0.5718673467636108, 0.28893402218818665, -0.41723212599754333, 0.07960084080696106, -0.057733941823244095, -0.9854103326797485, 0.03661205992102623, -0.7967093586921692, 0.5891032218933105, 1.1809419393539429, 1.3606101274490356, -1.028653860092163, -0.27355319261550903, -1.8401422500610352, -0.2566843330860138, -0.6644596457481384, 0.35458698868751526, -1.964013934135437, -0.1665564775466919, -2.002016544342041, -2.3128981590270996, -1.3582998514175415, -0.9499583840370178, 0.9885714054107666, 0.21441593766212463, -0.9199655652046204, 1.0610123872756958, -0.40682676434516907, -1.8013482093811035, 1.1183918714523315, -2.153059720993042 ]
https://github.com/huggingface/datasets/issues/5454
Save and resume the state of a DataLoader
Something that'd be nice to have is "manual update of state". One of the learning from training LLMs is the ability to skip some batches whenever we notice huge spike might be handy.
It would be nice when using `datasets` with a PyTorch DataLoader to be able to resume a training from a DataLoader state (e.g. to resume a training that crashed) What I have in mind (but lmk if you have other ideas or comments): For map-style datasets, this requires to have a PyTorch Sampler state that can be saved and reloaded per node and worker. For iterable datasets, this requires to save the state of the dataset iterator, which includes: - the current shard idx and row position in the current shard - the epoch number - the rng state - the shuffle buffer Right now you can already resume the data loading of an iterable dataset by using `IterableDataset.skip` but it takes a lot of time because it re-iterates on all the past data until it reaches the resuming point. cc @stas00 @sgugger
330
33
Save and resume the state of a DataLoader It would be nice when using `datasets` with a PyTorch DataLoader to be able to resume a training from a DataLoader state (e.g. to resume a training that crashed) What I have in mind (but lmk if you have other ideas or comments): For map-style datasets, this requires to have a PyTorch Sampler state that can be saved and reloaded per node and worker. For iterable datasets, this requires to save the state of the dataset iterator, which includes: - the current shard idx and row position in the current shard - the epoch number - the rng state - the shuffle buffer Right now you can already resume the data loading of an iterable dataset by using `IterableDataset.skip` but it takes a lot of time because it re-iterates on all the past data until it reaches the resuming point. cc @stas00 @sgugger Something that'd be nice to have is "manual update of state". One of the learning from training LLMs is the ability to skip some batches whenever we notice huge spike might be handy.
[ -1.210391640663147, -0.9462154507637024, -0.8508016467094421, 1.3852672576904297, -0.17072966694831848, -1.3206204175949097, 0.04050850868225098, -1.0508242845535278, 1.6814910173416138, -0.917292058467865, 0.3468030095100403, -1.7072945833206177, 0.19839245080947876, -0.5438280701637268, -0.7913631200790405, -0.8917762637138367, -0.44929563999176025, -0.7922196388244629, 1.0227078199386597, 2.5154032707214355, 1.139653205871582, -1.4126524925231934, 2.6747467517852783, 0.6674246191978455, -0.10133173316717148, -1.0190423727035522, 0.48350298404693604, 0.047879889607429504, -1.266754150390625, -0.48026835918426514, -0.8876606822013855, -0.07326450943946838, -0.6117507815361023, -0.626440167427063, -0.041145846247673035, 0.3155859112739563, -0.2978266775608063, -0.40812209248542786, -0.5087285041809082, -0.7931066155433655, 0.4770427346229553, -0.3698098361492157, 1.0492552518844604, -0.3928632438182831, 1.908243179321289, -0.45479249954223633, 0.38679197430610657, 0.6623622179031372, 1.40886652469635, 0.21646319329738617, -0.06097112596035004, 0.2602806091308594, 0.3256283104419708, -0.10530305653810501, 0.4048998951911926, 1.0938786268234253, 0.6800702214241028, 0.4909067153930664, 0.7489051818847656, -2.1816463470458984, 1.4492026567459106, -1.1184780597686768, 0.31203514337539673, 1.3470369577407837, -1.012458324432373, 0.3984545171260834, -1.7311303615570068, -0.1706618070602417, 0.4930877983570099, -2.2807536125183105, 0.15653835237026215, -1.1931860446929932, -0.5078051686286926, 1.0279322862625122, 0.23269307613372803, -1.2250574827194214, 0.24656257033348083, -0.46688219904899597, 1.016838550567627, 0.4986114799976349, 1.2302800416946411, -1.7496126890182495, -0.025704285129904747, -0.2896478772163391, 0.14422157406806946, -1.441152572631836, -1.5068236589431763, 0.6322407722473145, 0.6702458262443542, 0.47082820534706116, 0.012169923633337021, 1.0024123191833496, -0.9357581734657288, 0.8908661007881165, -0.9405291676521301, -1.5562188625335693, -1.344357967376709, -2.298407554626465, -2.358130693435669, 0.832533061504364, -0.4799063801765442, -0.6395649909973145, 2.0741283893585205, -1.136791467666626, -1.7504243850708008, 1.198697566986084, 0.2591642439365387, 0.004207945428788662, 2.4956963062286377, 0.1305028200149536, -0.69652259349823, 0.4677684009075165, -0.6787235140800476, 0.8685234189033508, -0.47940564155578613, 1.4198942184448242, 0.46151354908943176, -0.9717534184455872, 1.5859122276306152, -0.46176499128341675, 0.5161279439926147, -0.6625203490257263, -0.6078733801841736, -0.8463274240493774, 0.44906386733055115, 1.8403522968292236, -0.25084736943244934, 1.6152807474136353, -0.28195083141326904, -1.575034737586975, -1.6140018701553345, 0.9234395027160645, 0.4059617221355438, -0.8523839712142944, 0.10756851732730865, -0.300473153591156, 0.13821904361248016, 0.017776940017938614, 1.0822349786758423, 1.1522881984710693, 0.6366435289382935, -0.2337447702884674, -0.9646679162979126, 0.25497737526893616, -0.10689862072467804, -0.7160245180130005, -1.712834358215332, -0.40634313225746155, 0.1372840404510498, 0.7073630690574646, -1.1700865030288696, 1.6668998003005981, 0.9546939134597778, 1.8814960718154907, 1.017613172531128, -0.26382583379745483, 1.4429842233657837, 0.004244196228682995, 1.8521461486816406, -0.4960854649543762, 0.699894905090332, -0.4483216404914856, -1.1198315620422363, 0.7968533039093018, -0.3809083104133606, -2.089573860168457, -0.7114585041999817, -0.8957879543304443, -0.23407909274101257, -0.6918317675590515, 0.9847457408905029, -0.29163190722465515, -1.2959396839141846, 0.41095060110092163, -0.6104810833930969, 0.15715737640857697, -1.21867835521698, 0.3962137699127197, 0.7909297347068787, -0.7099210023880005, -0.025704097002744675, -0.26845961809158325, -1.355971097946167, -0.4587506353855133, 0.2680688798427582, 1.9493542909622192, -0.8153655529022217, 0.8918905854225159, 0.9840214252471924, -0.6874591708183289, -0.06031849980354309, 0.3826906979084015, -0.281036376953125, 0.8302586078643799, -1.033535122871399, -0.3913853168487549, 1.1878933906555176, -0.21408599615097046, -0.5471293330192566, 1.4659271240234375, 0.7261173725128174, -0.997786283493042, -0.14647942781448364, -0.18843404948711395, -0.9117052555084229, -0.055670857429504395, -1.6601582765579224, -0.10238209366798401, 0.16826441884040833, -1.4777764081954956, -0.5227655172348022, -0.1359415203332901, 1.1853827238082886, -0.1739802211523056, 1.4440133571624756, -0.4036535620689392, -0.32629531621932983, -0.43657490611076355, -0.36975666880607605, 0.08712932467460632, -0.16076155006885529, -0.6331165432929993, 0.2962217330932617, -0.80129075050354, 0.3456292152404785, 1.4518470764160156, 0.4509694278240204, 0.08121257275342941, 0.5342556238174438, 1.1107985973358154, 0.26617884635925293, 0.06924884766340256, -0.8130443692207336, -1.5251013040542603, 2.0181145668029785, -1.496379017829895, 1.9673030376434326, 0.732413649559021, -0.04835112392902374, -1.6874021291732788, -1.7505892515182495, 1.3831126689910889, 1.1941639184951782, 2.3299946784973145, 0.6167453527450562, 0.2522422671318054, -0.8250530362129211, -0.5679851174354553, 0.44042566418647766, -1.0170139074325562, -0.8164663314819336, 0.13760149478912354, 2.2847535610198975, 1.8016189336776733, -0.49807316064834595, -0.15351291000843048, -1.0121842622756958, 1.3552122116088867, -0.1264374852180481, 0.19011805951595306, 1.9386396408081055, -0.33746570348739624, -1.144967794418335, 1.3049026727676392, -2.355816602706909, 0.09121926128864288, 1.9183164834976196, 0.4549943208694458, 0.041910454630851746, -1.369909644126892, -0.5936458706855774, -0.30593639612197876, -0.40112221240997314, -1.1862834692001343, 0.5094789266586304, -0.3044847548007965, -0.7704867720603943, -1.405208945274353, 0.14878299832344055, -1.189204216003418, -1.6061772108078003, 0.351978063583374, 1.705235242843628, 2.0819990634918213, -0.6027811765670776, 1.5818021297454834, -0.2622797191143036, 0.2583080232143402, 1.2710071802139282, 1.186156153678894, 3.2542521953582764, 1.9819899797439575, -1.2379661798477173, 0.5076025724411011, -0.0846824198961258, -0.5612632036209106, 1.2255610227584839, -1.16340172290802, 1.2756537199020386, -0.16735363006591797, -1.2231991291046143, -1.2280222177505493, 0.945609450340271, 0.3897944688796997, 0.13596464693546295, -0.5666880011558533, 1.2032012939453125, 0.021711019799113274, 1.2899900674819946, 0.4506133198738098, -0.34225350618362427, 0.48225274682044983, -0.49462276697158813, -0.5954220294952393, 1.6080787181854248, 0.07780428230762482, -1.4398902654647827, -2.2548751831054688, -0.20237432420253754, -0.6875708699226379, 0.006869877688586712, -0.691596508026123, -0.9454929828643799, 1.6517564058303833, 0.3532267212867737, -1.3710014820098877, -0.3088582456111908, -0.44796350598335266, -0.6776019930839539, 2.676161289215088, -1.5163568258285522, -0.33156275749206543, -0.9284438490867615, -0.6388594508171082, 1.5393551588058472, -1.249051809310913, -0.18978996574878693, -0.9651937484741211, -0.6348398327827454, -1.3960210084915161, -0.5746015906333923, -0.1341557800769806, -0.8835847973823547, 0.7859421968460083, 0.18333834409713745, -1.1520345211029053, -0.3402518928050995, -0.8883200287818909, 0.7552739977836609, -0.1852339655160904, 0.33141183853149414, 1.7882351875305176, 0.4567413628101349, -0.4570789635181427, 0.6513970494270325, 1.1609479188919067, 0.6469355225563049, -0.6107154488563538, 0.1796398162841797, -0.7121119499206543, 0.32051852345466614, -1.135596752166748, 0.4044550657272339, -2.870790719985962, 0.6188188195228577, -0.003344806842505932, -0.03963839262723923, 0.05136534571647644, -1.200136661529541, 1.0444306135177612, 2.6679604053497314, -1.1702733039855957, 0.5139424204826355, 0.2726883590221405, 1.2040351629257202, -1.6217327117919922, 0.3353312015533447, -0.41259321570396423, 2.142090082168579, 0.13235314190387726, 1.1928181648254395, -0.5366652011871338, -2.268371820449829, 0.6014099717140198, -1.277100682258606, -1.2490692138671875, 0.7895247936248779, -0.8703815340995789, 0.024449238553643227, -1.3865647315979004, -0.12144334614276886, -0.8892231583595276, -1.2713074684143066, 0.8670607805252075, 0.16595545411109924, 0.4392116069793701, -0.5327212810516357, 0.28206759691238403, -2.2052440643310547, -1.3830368518829346, -0.29554152488708496, -0.9859375953674316, 0.4771904945373535, -0.42013606429100037, 0.6983978748321533, -0.1691632717847824, 0.0012816227972507477, 0.40704602003097534, 1.3284227848052979, 3.356954336166382, 0.323253333568573, 0.5690935850143433, -0.19007608294487, -0.8642286062240601, 1.4031745195388794, 0.9566371440887451, -0.15865573287010193, -0.49403756856918335, -0.979255199432373, 1.2744958400726318, 1.896193027496338, 0.9980721473693848, 0.03719682991504669, -0.7572148442268372, -0.5790295004844666, -0.04648824781179428, 0.2068299651145935, 0.4380553364753723, 0.9655908346176147, -0.05238465219736099, 0.1825075000524521, 1.361851453781128, 1.3118152618408203, -0.46663007140159607, 0.29545095562934875, -0.695490300655365, -0.4496819078922272, 0.6136479377746582, 0.3737371861934662, -0.044132620096206665, 0.36264973878860474, -0.9058876633644104, -0.24161238968372345, -0.3898773193359375, -0.9897533655166626, -0.5947014093399048, -0.5026858448982239, -0.299542099237442, 1.7211332321166992, 0.12297128140926361, -0.5611013174057007, -0.08662236481904984, -0.8653820157051086, -0.07803437113761902, -0.9824565649032593, 0.22841286659240723, -0.026118360459804535, -0.17616631090641022, -0.07866239547729492, 1.7980496883392334, -1.024193286895752, -2.165205240249634, 0.34533870220184326, 0.23745180666446686, -0.3659113347530365, 0.15360139310359955, 1.576422095298767, 0.4080972671508789, 1.4561713933944702, 1.4468210935592651, 1.0119438171386719, -0.711394727230072, -1.4000251293182373, 0.7871001958847046, 0.9048508405685425, -1.5273829698562622, 0.8671272397041321, 0.0471622571349144, -0.501587450504303, 0.7010558247566223, 1.2135369777679443, 0.3833441734313965, -1.9081974029541016, 0.7628674507141113, -0.9520299434661865, 0.7738529443740845, 0.622077465057373, 0.7431742548942566, 0.17806899547576904, 0.8736122846603394, -1.1956746578216553, -1.1020522117614746, -0.8682042360305786, -0.636381208896637, 1.895682692527771, -0.18327006697654724, 0.5580060482025146, -0.1489383578300476, -1.3029175996780396, -0.031103065237402916, 0.678460419178009, 0.335378497838974, -0.31885889172554016, 0.8423189520835876, -0.7543502449989319, -1.1930482387542725, -1.4622695446014404, -0.436962366104126, -0.9549380540847778, -0.8662079572677612, 1.1406991481781006, 0.7901633381843567, 0.05261045694351196, 1.8746097087860107, 0.6026473641395569, 0.1841425597667694, -2.616575241088867, 0.8384989500045776, 0.26515012979507446, -0.017008353024721146, 0.8951480388641357, 0.31626665592193604, 0.999136209487915, -0.06908203661441803, 0.4260522425174713, -2.4022037982940674, 2.3131790161132812, -0.3428891897201538, 0.8200854063034058, -0.004592088051140308, -0.15213656425476074, 1.078158974647522, 0.5746619701385498, 0.5343486070632935, -1.1746681928634644, 0.7566683888435364, -0.5831169486045837, 1.224856972694397, 0.9865094423294067, -0.7811872959136963, 0.017729954794049263, 1.2867469787597656, 0.4754532277584076, -0.5182133316993713, -0.9259935021400452, -0.8589817881584167, 0.9465340375900269, 1.8291571140289307, -0.0006755851209163666, 0.05876999348402023, 0.8556409478187561, 0.763091504573822, -1.2371762990951538, 0.14206227660179138, -0.7862066030502319, -0.9658881425857544, 1.5763486623764038, 1.9959352016448975, -0.08401372283697128, -0.208829864859581, -0.73372483253479, -1.156925082206726, 0.7981200218200684, 0.15361811220645905, 0.11289858818054199, 0.6798219084739685, -0.7105594873428345, 1.1809202432632446, 1.0846269130706787, 0.8331113457679749, 0.1333581507205963, 0.21823516488075256, 0.31012120842933655, -0.23769371211528778, -1.0657061338424683, -0.17116723954677582, -1.052718997001648, -2.569439172744751, 0.5220319628715515, -0.1990315020084381, -1.450819730758667, 0.007125576958060265, -1.0026679039001465, 0.9689776301383972, -0.4399707317352295, -1.102352499961853, -1.5721033811569214, 0.10126975178718567, -0.050648123025894165, 0.8758918046951294, -1.636167049407959, -0.09787342697381973, 1.2503834962844849, 0.8996210098266602, -0.5684216022491455, 1.0366758108139038, 0.21170753240585327, 0.9837191700935364, 0.9067806005477905, -0.4651344120502472, 0.4592879116535187, 0.18610328435897827, -1.3570654392242432, 0.43215227127075195, 1.148295283317566, 0.11005763709545135, 1.4180293083190918, -0.5213646292686462, 0.06296192854642868, 0.3200131356716156, -0.4799667000770569, -0.4579774737358093, -0.7544242143630981, 0.8798439502716064, 0.05066337436437607, -0.7329695224761963, 0.09747247397899628, -0.20599915087223053, -0.2631107270717621, 0.1890992969274521, -1.481188416481018, -0.22827070951461792, -0.3369969129562378, -0.5524376034736633, -1.2269909381866455, -0.1141890436410904, 1.4620535373687744, -0.870621383190155, -0.10221508890390396, 0.4987398087978363, 0.41993165016174316, 0.5886566042900085, 0.5804279446601868, -0.6095571517944336, -0.3470571041107178, -0.16322264075279236, -0.2994130551815033, 0.29100093245506287, 1.3196061849594116, -0.10411104559898376, -0.9158318638801575, 0.7803848385810852, -0.16526232659816742, 0.00931650772690773, 1.933358907699585, 0.1320563405752182, -0.7314537167549133, 0.3931899070739746, -0.69185870885849, 1.870381236076355, 1.6590830087661743, 1.3551955223083496, -0.18266303837299347, -0.9677603244781494, 0.6825500130653381, -0.2731280028820038, -0.3410971760749817, 0.8610589504241943, 0.45407652854919434, -0.2321188747882843, -1.4063762426376343, 0.5316195487976074, 1.1346070766448975, -0.7885323762893677, -0.7363650798797607, -0.009720510803163052, -0.7487830519676208, 1.0091545581817627, 0.6936225295066833, 0.4581659734249115, 0.23535682260990143, 1.6872434616088867, 0.6923224329948425, -0.5241355299949646, 0.5110394358634949, 0.571572482585907, -0.13190682232379913, -2.0834436416625977, -1.151784062385559, 0.33483871817588806, -0.40537121891975403, -1.5414782762527466, 1.2952083349227905, -1.1865202188491821, -0.8826575875282288, 0.6318877935409546, 0.08365542441606522, 1.5387358665466309, 0.24639388918876648, 1.6035137176513672, 2.106715679168701, 0.8429366946220398, 0.32960471510887146, 1.343919038772583, -0.13949209451675415, -0.37671950459480286, 1.8849036693572998, -0.39735013246536255, 0.4997425377368927, 1.0821247100830078, -0.39362677931785583, -1.0263910293579102, -0.7500075101852417, -1.2009786367416382, -0.6429280042648315, 1.1333210468292236, 0.04584583640098572, -1.0829155445098877, 0.18822543323040009, 1.571671962738037, 0.0390525683760643, -0.24223624169826508, 0.4352024793624878, 0.4710322320461273, -0.7268459796905518, -0.05819441378116608, -0.9914823770523071, 0.49763646721839905, -0.2469041794538498, -0.38110145926475525, 0.3677513003349304, 0.40355393290519714, 1.283356785774231, 0.06891229003667831, 0.16414187848567963, 1.2401978969573975, -1.4782665967941284, 1.3587490320205688, -0.6446141600608826, 0.15764862298965454, -2.357919454574585, 1.440346360206604, -0.8333746194839478, 1.943383812904358, -2.6609368324279785, 0.38911372423171997, -0.813920259475708, -0.5000766515731812, 0.44687962532043457, -0.3443821370601654, 0.18287841975688934, -0.2035178244113922, -0.9932249784469604, -0.04075147956609726, -0.6915917992591858, 0.593626856803894, 1.1211835145950317, 1.2809593677520752, -1.0631990432739258, -0.36958277225494385, -1.7165887355804443, -0.199211984872818, -0.6032016277313232, 0.3204338550567627, -1.9998881816864014, -0.20620660483837128, -2.027330160140991, -2.3321449756622314, -1.4203925132751465, -0.8194645047187805, 1.2075515985488892, 0.14289839565753937, -0.9465433359146118, 1.1234173774719238, -0.47240158915519714, -1.792799711227417, 1.1218501329421997, -2.0241358280181885 ]
https://github.com/huggingface/datasets/issues/5454
Save and resume the state of a DataLoader
Your outline spec is very sound and clear, @lhoestq - thank you! @thomasw21, indeed that would be a wonderful extra feature. In Megatron-Deepspeed we manually drained the dataloader for the range we wanted. I wasn't very satisfied with the way we did it, since its behavior would change if you were to do multiple range skips. I think it should remember all the ranges it skipped and not just skip the last range - since otherwise the data is inconsistent (but we probably should discuss this in a separate issue not to derail this much bigger one).
It would be nice when using `datasets` with a PyTorch DataLoader to be able to resume a training from a DataLoader state (e.g. to resume a training that crashed) What I have in mind (but lmk if you have other ideas or comments): For map-style datasets, this requires to have a PyTorch Sampler state that can be saved and reloaded per node and worker. For iterable datasets, this requires to save the state of the dataset iterator, which includes: - the current shard idx and row position in the current shard - the epoch number - the rng state - the shuffle buffer Right now you can already resume the data loading of an iterable dataset by using `IterableDataset.skip` but it takes a lot of time because it re-iterates on all the past data until it reaches the resuming point. cc @stas00 @sgugger
330
97
Save and resume the state of a DataLoader It would be nice when using `datasets` with a PyTorch DataLoader to be able to resume a training from a DataLoader state (e.g. to resume a training that crashed) What I have in mind (but lmk if you have other ideas or comments): For map-style datasets, this requires to have a PyTorch Sampler state that can be saved and reloaded per node and worker. For iterable datasets, this requires to save the state of the dataset iterator, which includes: - the current shard idx and row position in the current shard - the epoch number - the rng state - the shuffle buffer Right now you can already resume the data loading of an iterable dataset by using `IterableDataset.skip` but it takes a lot of time because it re-iterates on all the past data until it reaches the resuming point. cc @stas00 @sgugger Your outline spec is very sound and clear, @lhoestq - thank you! @thomasw21, indeed that would be a wonderful extra feature. In Megatron-Deepspeed we manually drained the dataloader for the range we wanted. I wasn't very satisfied with the way we did it, since its behavior would change if you were to do multiple range skips. I think it should remember all the ranges it skipped and not just skip the last range - since otherwise the data is inconsistent (but we probably should discuss this in a separate issue not to derail this much bigger one).
[ -1.2777979373931885, -0.9837959408760071, -0.755339503288269, 1.356204867362976, -0.17536111176013947, -1.2910062074661255, 0.03848791867494583, -1.072117805480957, 1.6808425188064575, -0.8867015242576599, 0.33993273973464966, -1.6807563304901123, 0.16393020749092102, -0.521294355392456, -0.8046399354934692, -0.8817135095596313, -0.47741058468818665, -0.8306180238723755, 1.0639166831970215, 2.488229990005493, 1.125900149345398, -1.4690651893615723, 2.6668386459350586, 0.6302432417869568, -0.09295631945133209, -1.015272617340088, 0.46181565523147583, -0.033078961074352264, -1.3192650079727173, -0.4681800603866577, -0.9406957030296326, -0.07073113322257996, -0.618556559085846, -0.5640382170677185, -0.038489848375320435, 0.3168301582336426, -0.2533257305622101, -0.38643839955329895, -0.4824306070804596, -0.7723373174667358, 0.49816685914993286, -0.3616126775741577, 0.9931373596191406, -0.3332137167453766, 1.890488862991333, -0.500369668006897, 0.44188183546066284, 0.6875583529472351, 1.3766236305236816, 0.21615305542945862, -0.011794024147093296, 0.2752724885940552, 0.32464998960494995, -0.10622872412204742, 0.4460618793964386, 1.0886434316635132, 0.6809844970703125, 0.43078458309173584, 0.6855784058570862, -2.1886327266693115, 1.3903385400772095, -1.121924877166748, 0.3277244567871094, 1.3935742378234863, -0.9956931471824646, 0.4116577208042145, -1.782425880432129, -0.13607372343540192, 0.5306193232536316, -2.2674760818481445, 0.1338023841381073, -1.1648849248886108, -0.47398972511291504, 1.0532312393188477, 0.22130689024925232, -1.224697232246399, 0.22610467672348022, -0.4275178611278534, 1.0598036050796509, 0.4742495119571686, 1.2190656661987305, -1.7532292604446411, -0.04213424399495125, -0.3118228316307068, 0.18173173069953918, -1.370443344116211, -1.5205104351043701, 0.548457145690918, 0.6821557283401489, 0.45542943477630615, -0.005450568161904812, 1.0417391061782837, -0.9527183771133423, 0.9071705341339111, -0.9520971775054932, -1.5461187362670898, -1.3555376529693604, -2.2841291427612305, -2.3691980838775635, 0.8513200283050537, -0.5062420964241028, -0.5942156910896301, 2.065805435180664, -1.1432121992111206, -1.7271264791488647, 1.1772873401641846, 0.25161439180374146, 0.005938654765486717, 2.498176336288452, 0.16954174637794495, -0.7421814799308777, 0.5243670344352722, -0.7419584393501282, 0.8070331811904907, -0.44703203439712524, 1.3673639297485352, 0.42181137204170227, -0.9774699807167053, 1.5258729457855225, -0.42601704597473145, 0.4945984482765198, -0.6823073029518127, -0.5782518982887268, -0.8263349533081055, 0.4356580376625061, 1.869042992591858, -0.2912400960922241, 1.627233624458313, -0.2905873656272888, -1.5820012092590332, -1.5735828876495361, 0.9154194593429565, 0.4285989999771118, -0.8641030192375183, 0.06736928224563599, -0.284708172082901, 0.133235365152359, 0.029080066829919815, 0.9894766807556152, 1.1438953876495361, 0.6743943095207214, -0.2713729739189148, -0.9412925839424133, 0.2846946120262146, -0.10687047243118286, -0.6678202152252197, -1.6885273456573486, -0.37493085861206055, 0.11331285536289215, 0.6727133393287659, -1.180351734161377, 1.715304970741272, 0.9685912132263184, 1.8749635219573975, 1.0117062330245972, -0.2974971830844879, 1.4842270612716675, 0.07213445007801056, 1.8821858167648315, -0.46738380193710327, 0.6761385798454285, -0.4179273843765259, -1.1754192113876343, 0.7873536944389343, -0.3805232644081116, -2.0789785385131836, -0.6365810036659241, -0.869094967842102, -0.19956310093402863, -0.7071471214294434, 0.9877324104309082, -0.2671043276786804, -1.3648920059204102, 0.3874155580997467, -0.5873696804046631, 0.149084210395813, -1.230578899383545, 0.4022356867790222, 0.7806311249732971, -0.7520512938499451, 0.021158367395401, -0.2753007709980011, -1.3328547477722168, -0.46471095085144043, 0.26264718174934387, 1.898266315460205, -0.7611032724380493, 0.8937323093414307, 1.024421215057373, -0.6575454473495483, -0.04771047085523605, 0.37093502283096313, -0.24159085750579834, 0.8540701866149902, -1.0157955884933472, -0.41802433133125305, 1.2111656665802002, -0.22850999236106873, -0.5539886355400085, 1.3874915838241577, 0.7004262804985046, -1.0021315813064575, -0.1693548709154129, -0.17953623831272125, -0.9014745354652405, -0.023753084242343903, -1.6504590511322021, -0.09276334941387177, 0.2156553715467453, -1.5222227573394775, -0.4619606137275696, -0.18672604858875275, 1.1903321743011475, -0.18213416635990143, 1.4591524600982666, -0.3932308256626129, -0.21655471622943878, -0.5005354881286621, -0.42455029487609863, 0.11990946531295776, -0.16499537229537964, -0.6333574056625366, 0.2797071933746338, -0.838274359703064, 0.3032534718513489, 1.4683228731155396, 0.4155925214290619, 0.08670733869075775, 0.5136132836341858, 1.0546603202819824, 0.28045931458473206, -0.016774464398622513, -0.8294516801834106, -1.5224114656448364, 2.085484504699707, -1.4785181283950806, 2.0067856311798096, 0.7637704610824585, -0.07042773067951202, -1.7287636995315552, -1.7763175964355469, 1.3892351388931274, 1.2005928754806519, 2.388939142227173, 0.5709599852561951, 0.35157397389411926, -0.8493457436561584, -0.5691390633583069, 0.43255361914634705, -0.9712002873420715, -0.8495148420333862, 0.12969420850276947, 2.333616018295288, 1.7576309442520142, -0.4714658260345459, -0.16260704398155212, -1.008362889289856, 1.3327616453170776, -0.0810479074716568, 0.2012503445148468, 1.9385113716125488, -0.3276281952857971, -1.1378051042556763, 1.2651864290237427, -2.3845226764678955, 0.03818104788661003, 1.959439992904663, 0.4440609812736511, 0.08337898552417755, -1.3767400979995728, -0.562275230884552, -0.2559598684310913, -0.40730032324790955, -1.2054740190505981, 0.5150105953216553, -0.3165237307548523, -0.7858141660690308, -1.4564615488052368, 0.1263781487941742, -1.1931822299957275, -1.6274476051330566, 0.2782522141933441, 1.7222185134887695, 2.0660300254821777, -0.674705445766449, 1.5554615259170532, -0.2609032690525055, 0.2986133098602295, 1.233801007270813, 1.1763180494308472, 3.228328227996826, 1.9420578479766846, -1.272143006324768, 0.4870210886001587, -0.1337844729423523, -0.5229136347770691, 1.1493266820907593, -1.1603633165359497, 1.30177640914917, -0.1438388079404831, -1.2696337699890137, -1.201791763305664, 0.967492401599884, 0.40540003776550293, 0.0954696536064148, -0.5478848814964294, 1.2208138704299927, 0.07662278413772583, 1.2985851764678955, 0.38635462522506714, -0.3042316734790802, 0.5131211280822754, -0.4860420823097229, -0.6268086433410645, 1.6098579168319702, 0.09485404193401337, -1.456680417060852, -2.237091541290283, -0.17581377923488617, -0.7479055523872375, 0.010593576356768608, -0.6926355361938477, -0.8892775774002075, 1.6369348764419556, 0.3535357415676117, -1.3682804107666016, -0.27441319823265076, -0.45304518938064575, -0.6703078746795654, 2.6694931983947754, -1.483701467514038, -0.3107505738735199, -0.9002830386161804, -0.6212701201438904, 1.5171693563461304, -1.252779483795166, -0.17288826406002045, -0.9517799615859985, -0.6489003896713257, -1.339866042137146, -0.5566052198410034, -0.09671302139759064, -0.9020010828971863, 0.7414045929908752, 0.20306380093097687, -1.1217306852340698, -0.3283466398715973, -0.9168899059295654, 0.7497140169143677, -0.13780845701694489, 0.31704723834991455, 1.7676094770431519, 0.396817147731781, -0.38364943861961365, 0.6995686292648315, 1.1550184488296509, 0.6622530817985535, -0.5767613053321838, 0.13765272498130798, -0.7342445850372314, 0.3394941985607147, -1.1400554180145264, 0.3549828827381134, -2.873464822769165, 0.6649990677833557, 0.029045753180980682, -0.013262142427265644, -0.00045373430475592613, -1.259622573852539, 1.0288275480270386, 2.672886848449707, -1.1419336795806885, 0.4887448251247406, 0.3723166286945343, 1.1847193241119385, -1.5907517671585083, 0.31845822930336, -0.4512522220611572, 2.1533844470977783, 0.16972434520721436, 1.1879780292510986, -0.5360705852508545, -2.3167288303375244, 0.5533007979393005, -1.2487205266952515, -1.2325971126556396, 0.8100219964981079, -0.8613313436508179, 0.028891194611787796, -1.328175663948059, -0.13553939759731293, -0.8809572458267212, -1.2628538608551025, 0.8406514525413513, 0.16546882688999176, 0.4836876392364502, -0.5644253492355347, 0.27994057536125183, -2.2346670627593994, -1.3804011344909668, -0.273675799369812, -1.0143269300460815, 0.4123864471912384, -0.4042576849460602, 0.697861909866333, -0.18517598509788513, -0.017962541431188583, 0.38241973519325256, 1.3042107820510864, 3.3794872760772705, 0.2987479865550995, 0.556253969669342, -0.18572834134101868, -0.8590036034584045, 1.461188793182373, 0.9329758286476135, -0.20977570116519928, -0.48119795322418213, -0.964909553527832, 1.3113340139389038, 1.9211335182189941, 0.9992053508758545, 0.050143174827098846, -0.7230632901191711, -0.6386739611625671, -0.0005804169923067093, 0.1836862415075302, 0.4576067328453064, 0.9293392896652222, -0.05360804498195648, 0.18734809756278992, 1.4139924049377441, 1.2873679399490356, -0.5237262845039368, 0.34077179431915283, -0.7163880467414856, -0.47659826278686523, 0.5913171172142029, 0.3601027727127075, -0.0006624050438404083, 0.37513455748558044, -0.9064921140670776, -0.23901763558387756, -0.36629682779312134, -0.9978986978530884, -0.6483214497566223, -0.4416292905807495, -0.3090476989746094, 1.7363972663879395, 0.12214361131191254, -0.5218507051467896, 0.011818952858448029, -0.869862973690033, -0.11645005643367767, -0.9988292455673218, 0.2560877799987793, -0.01729709655046463, -0.1358867734670639, -0.09210430085659027, 1.795405626296997, -1.0131690502166748, -2.1873202323913574, 0.3027574121952057, 0.24926523864269257, -0.33207905292510986, 0.13080589473247528, 1.63484525680542, 0.3948991298675537, 1.4620064496994019, 1.4450361728668213, 1.0375723838806152, -0.6858686804771423, -1.3382374048233032, 0.8270344734191895, 0.9396987557411194, -1.497472882270813, 0.8393802642822266, 0.03615831211209297, -0.5002565383911133, 0.6633450984954834, 1.1747992038726807, 0.4175677001476288, -1.961861252784729, 0.7874132394790649, -0.9483227133750916, 0.7913585305213928, 0.6240243315696716, 0.7501697540283203, 0.14068125188350677, 0.8943532109260559, -1.195527195930481, -1.0833982229232788, -0.7997905611991882, -0.6340797543525696, 1.8985291719436646, -0.1791575700044632, 0.5560023188591003, -0.15773387253284454, -1.3209846019744873, -0.01965847611427307, 0.6911259889602661, 0.3254562318325043, -0.37934190034866333, 0.8290432095527649, -0.804937481880188, -1.19852614402771, -1.447975754737854, -0.41393396258354187, -1.013573169708252, -0.8492081165313721, 1.1065226793289185, 0.797791063785553, 0.11621193587779999, 1.8968170881271362, 0.6362938284873962, 0.20857712626457214, -2.6463639736175537, 0.8939756155014038, 0.26956650614738464, -0.06336405873298645, 0.8836827278137207, 0.30275440216064453, 0.9375332593917847, -0.046722788363695145, 0.46278518438339233, -2.4173715114593506, 2.326524257659912, -0.348926842212677, 0.8677792549133301, 0.020536070689558983, -0.16768258810043335, 1.0693787336349487, 0.6057645678520203, 0.4989968538284302, -1.1638586521148682, 0.7592983841896057, -0.5928065776824951, 1.2337199449539185, 1.0383089780807495, -0.8084173798561096, 0.001550082117319107, 1.2324206829071045, 0.44613784551620483, -0.5302188396453857, -0.966503918170929, -0.8847043514251709, 0.9505192637443542, 1.8156579732894897, -0.03373164311051369, 0.03376840054988861, 0.8395031094551086, 0.7691738605499268, -1.2104814052581787, 0.13435392081737518, -0.8196634650230408, -0.9793702960014343, 1.5685405731201172, 1.9753228425979614, -0.09123952686786652, -0.14761804044246674, -0.6691533923149109, -1.229706883430481, 0.8312976360321045, 0.09507326781749725, 0.16549725830554962, 0.6436113715171814, -0.6972542405128479, 1.1649531126022339, 1.0646806955337524, 0.83441561460495, 0.20335711538791656, 0.16221468150615692, 0.30155277252197266, -0.24058595299720764, -1.0572551488876343, -0.21496272087097168, -1.0581117868423462, -2.5744996070861816, 0.46883800625801086, -0.15316706895828247, -1.4591225385665894, 0.026774585247039795, -0.9372077584266663, 0.9354888796806335, -0.45322999358177185, -1.0867037773132324, -1.525277018547058, 0.12753432989120483, -0.0772562175989151, 0.8780557513237, -1.6745389699935913, -0.07943548262119293, 1.1993975639343262, 0.9339158535003662, -0.5742321610450745, 1.0408188104629517, 0.22455023229122162, 0.9953161478042603, 0.9359505772590637, -0.4215841293334961, 0.5051372051239014, 0.22587376832962036, -1.3917169570922852, 0.39689287543296814, 1.1323533058166504, 0.10318972170352936, 1.4132217168807983, -0.4903360605239868, 0.03529304265975952, 0.32959702610969543, -0.5010769367218018, -0.4936143457889557, -0.7822698950767517, 0.8334177136421204, 0.02836499735713005, -0.7919061779975891, 0.10076616704463959, -0.17625680565834045, -0.2164028286933899, 0.1858578324317932, -1.4924931526184082, -0.19777128100395203, -0.3306804299354553, -0.5485909581184387, -1.259670615196228, -0.11823113262653351, 1.4849507808685303, -0.857194185256958, -0.10323244333267212, 0.4780494272708893, 0.43372881412506104, 0.5517217516899109, 0.6315568089485168, -0.6201467514038086, -0.3555371165275574, -0.1734931915998459, -0.26099586486816406, 0.3626965284347534, 1.2920727729797363, -0.11463703215122223, -0.9240087866783142, 0.7463030815124512, -0.22337904572486877, 0.03306950256228447, 1.889755129814148, 0.14890393614768982, -0.7854331135749817, 0.35921016335487366, -0.7036002278327942, 1.8515065908432007, 1.7133575677871704, 1.3657581806182861, -0.17990104854106903, -0.9735766649246216, 0.7105590105056763, -0.340401828289032, -0.34330886602401733, 0.9064078330993652, 0.4362083971500397, -0.231061190366745, -1.4441534280776978, 0.5442925691604614, 1.1546008586883545, -0.7392538189888, -0.7374841570854187, -0.01543329656124115, -0.708489716053009, 1.0434917211532593, 0.7145240306854248, 0.4550270438194275, 0.17211169004440308, 1.7109899520874023, 0.7842310667037964, -0.5177015662193298, 0.5418053269386292, 0.5683258175849915, -0.14702147245407104, -2.0960700511932373, -1.1985859870910645, 0.3315393626689911, -0.4177669882774353, -1.5205929279327393, 1.3443646430969238, -1.1979702711105347, -0.9172366261482239, 0.5992817878723145, 0.002971063368022442, 1.5078848600387573, 0.22866390645503998, 1.5764026641845703, 2.084746837615967, 0.8787528276443481, 0.35634636878967285, 1.347316026687622, -0.188502237200737, -0.3404009938240051, 1.8595305681228638, -0.4002355635166168, 0.4519965946674347, 1.083956003189087, -0.4339466691017151, -0.9967076182365417, -0.7666553258895874, -1.1682698726654053, -0.6764712929725647, 1.134442687034607, 0.02187507040798664, -1.055240273475647, 0.21818995475769043, 1.5712264776229858, 0.0017337678000330925, -0.28320688009262085, 0.4909886121749878, 0.4447806775569916, -0.7428101301193237, -0.03235156089067459, -0.9650068283081055, 0.4894524812698364, -0.2131344974040985, -0.406583309173584, 0.38715827465057373, 0.3615838289260864, 1.2278258800506592, 0.06674909591674805, 0.16390666365623474, 1.2254979610443115, -1.4351794719696045, 1.3411295413970947, -0.6828125715255737, 0.21225221455097198, -2.3354482650756836, 1.4057191610336304, -0.8100196719169617, 1.9115347862243652, -2.658576726913452, 0.4281831681728363, -0.74403977394104, -0.5412638187408447, 0.4891899824142456, -0.3795488476753235, 0.18246647715568542, -0.21838156878948212, -1.0102962255477905, -0.11284130811691284, -0.7007274031639099, 0.6126195192337036, 1.08926260471344, 1.2816646099090576, -0.9994813799858093, -0.34486374258995056, -1.6760227680206299, -0.15415014326572418, -0.6091731190681458, 0.29237788915634155, -2.004490852355957, -0.18453720211982727, -2.0538783073425293, -2.3080289363861084, -1.3691556453704834, -0.8115306496620178, 1.2282946109771729, 0.19288744032382965, -0.9553811550140381, 1.1555404663085938, -0.4333731234073639, -1.826120376586914, 1.1438789367675781, -2.0532026290893555 ]
https://github.com/huggingface/datasets/issues/5451
ImageFolder BadZipFile: Bad offset for central directory
Hi ! Could you share the full stack trace ? Which dataset did you try to load ? it may be related to https://github.com/huggingface/datasets/pull/5640
### Describe the bug I'm getting the following exception: ``` lib/python3.10/zipfile.py:1353 in _RealGetContents │ │ │ │ 1350 │ │ # self.start_dir: Position of start of central directory │ │ 1351 │ │ self.start_dir = offset_cd + concat │ │ 1352 │ │ if self.start_dir < 0: │ │ ❱ 1353 │ │ │ raise BadZipFile("Bad offset for central directory") │ │ 1354 │ │ fp.seek(self.start_dir, 0) │ │ 1355 │ │ data = fp.read(size_cd) │ │ 1356 │ │ fp = io.BytesIO(data) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ BadZipFile: Bad offset for central directory Extracting data files: 35%|█████████████████▊ | 38572/110812 [00:10<00:20, 3576.26it/s] ``` ### Steps to reproduce the bug ``` load_dataset( args.dataset_name, args.dataset_config_name, cache_dir=args.cache_dir, ), ``` ### Expected behavior loads the dataset ### Environment info datasets==2.8.0 Python 3.10.8 Linux 129-146-3-202 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
331
24
ImageFolder BadZipFile: Bad offset for central directory ### Describe the bug I'm getting the following exception: ``` lib/python3.10/zipfile.py:1353 in _RealGetContents │ │ │ │ 1350 │ │ # self.start_dir: Position of start of central directory │ │ 1351 │ │ self.start_dir = offset_cd + concat │ │ 1352 │ │ if self.start_dir < 0: │ │ ❱ 1353 │ │ │ raise BadZipFile("Bad offset for central directory") │ │ 1354 │ │ fp.seek(self.start_dir, 0) │ │ 1355 │ │ data = fp.read(size_cd) │ │ 1356 │ │ fp = io.BytesIO(data) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ BadZipFile: Bad offset for central directory Extracting data files: 35%|█████████████████▊ | 38572/110812 [00:10<00:20, 3576.26it/s] ``` ### Steps to reproduce the bug ``` load_dataset( args.dataset_name, args.dataset_config_name, cache_dir=args.cache_dir, ), ``` ### Expected behavior loads the dataset ### Environment info datasets==2.8.0 Python 3.10.8 Linux 129-146-3-202 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Hi ! Could you share the full stack trace ? Which dataset did you try to load ? it may be related to https://github.com/huggingface/datasets/pull/5640
[ -1.1801573038101196, -0.8495473861694336, -0.6627269387245178, 1.5185000896453857, -0.19597958028316498, -1.228810429573059, 0.24361631274223328, -1.032873272895813, 1.5680439472198486, -0.7590497732162476, 0.3073175847530365, -1.6794732809066772, 0.13305480778217316, -0.5226603746414185, -0.7124097347259521, -0.9384174346923828, -0.565440833568573, -0.8262912631034851, 1.096670150756836, 2.5076892375946045, 1.2161840200424194, -1.3884021043777466, 2.6809258460998535, 0.6958085894584656, -0.32776811718940735, -1.0754035711288452, 0.39959439635276794, 0.06281666457653046, -1.364692211151123, -0.4069046974182129, -1.039144515991211, -0.17250683903694153, -0.5154732465744019, -0.613544225692749, 0.12186405062675476, 0.41922813653945923, -0.2963135242462158, -0.4092024862766266, -0.46500423550605774, -0.7094538807868958, 0.4566919803619385, -0.41817349195480347, 0.9226108193397522, -0.2522640824317932, 1.7968844175338745, -0.5623717904090881, 0.5097558498382568, 0.7215766310691833, 1.260571837425232, 0.10662997514009476, -0.031720928847789764, 0.3761969804763794, 0.4345088601112366, -0.029774613678455353, 0.42173370718955994, 1.1972025632858276, 0.7539730072021484, 0.45926961302757263, 0.6918438076972961, -2.1599979400634766, 1.3405019044876099, -0.9926841259002686, 0.34424057602882385, 1.4554760456085205, -1.0051054954528809, 0.3640036880970001, -1.6688270568847656, -0.04243497923016548, 0.6064868569374084, -2.126868486404419, 0.2391626387834549, -1.2871620655059814, -0.49117931723594666, 1.063827633857727, 0.3589041829109192, -1.215890645980835, 0.215425506234169, -0.45326098799705505, 1.0846893787384033, 0.3126871883869171, 1.1470060348510742, -1.7415114641189575, 0.06267096102237701, -0.33490675687789917, -0.008231572806835175, -1.24189293384552, -1.5239696502685547, 0.5182625651359558, 0.5909703969955444, 0.5835521221160889, -0.10193054378032684, 1.0474557876586914, -1.018428087234497, 0.7767967581748962, -0.9509796500205994, -1.7138460874557495, -1.3875365257263184, -2.431939125061035, -2.3343734741210938, 0.6400909423828125, -0.3804709017276764, -0.5101773738861084, 2.0061211585998535, -0.9637361764907837, -1.6260488033294678, 1.0039691925048828, 0.30858370661735535, -0.034135852009058, 2.3605380058288574, 0.2805419862270355, -0.7733235359191895, 0.37704119086265564, -0.8254765868186951, 0.8747504949569702, -0.39321649074554443, 1.3503165245056152, 0.5226359963417053, -1.0090291500091553, 1.422729253768921, -0.3151792585849762, 0.5141129493713379, -0.6915289759635925, -0.42400050163269043, -0.8447928428649902, 0.29595133662223816, 1.857896327972412, -0.29063382744789124, 1.5608735084533691, -0.3450951874256134, -1.531031847000122, -1.588821530342102, 0.7470691204071045, 0.46644458174705505, -0.8253927230834961, 0.21266241371631622, -0.43936794996261597, 0.055556293576955795, 0.015020000748336315, 1.1384625434875488, 1.2805794477462769, 0.655543863773346, -0.42739272117614746, -1.0325719118118286, 0.18697433173656464, -0.06517744064331055, -0.7093417644500732, -1.8792411088943481, -0.27743643522262573, 0.06591376662254333, 0.5764907598495483, -1.2466152906417847, 1.6990940570831299, 0.8624206185340881, 1.9484750032424927, 1.0728940963745117, -0.5085406303405762, 1.5284920930862427, -0.04914900287985802, 1.844598650932312, -0.6192649602890015, 0.639168918132782, -0.3285003900527954, -1.2324166297912598, 0.8218511343002319, -0.2703927457332611, -2.155503034591675, -0.8021480441093445, -0.76571124792099, -0.20098702609539032, -0.8033987283706665, 0.927254319190979, -0.2373674362897873, -1.4642854928970337, 0.26807984709739685, -0.6772304773330688, 0.11499485373497009, -1.2082231044769287, 0.3383696675300598, 0.7518121004104614, -0.5583412051200867, 0.0808873102068901, -0.27161967754364014, -1.3632779121398926, -0.41975441575050354, 0.26670190691947937, 1.7124674320220947, -0.6671872735023499, 0.9605516791343689, 1.037939190864563, -0.581069827079773, 0.137363463640213, 0.15641434490680695, -0.24374908208847046, 0.8955186605453491, -1.22527015209198, -0.3431684970855713, 1.1496998071670532, -0.2744884788990021, -0.687187671661377, 1.4443302154541016, 0.740283191204071, -1.0177412033081055, -0.17659123241901398, -0.06326163560152054, -0.9608598947525024, 0.16320674121379852, -1.6907835006713867, -0.1775333285331726, 0.43675827980041504, -1.4840197563171387, -0.5288394093513489, -0.28699058294296265, 1.3124830722808838, -0.19116443395614624, 1.3725796937942505, -0.3312717378139496, -0.20701198279857635, -0.5207627415657043, -0.392782598733902, 0.23780862987041473, -0.2775271534919739, -0.5400198101997375, 0.2433512806892395, -0.7791221141815186, 0.3664431571960449, 1.400026798248291, 0.24481001496315002, 0.10227753221988678, 0.5013821721076965, 1.1101864576339722, 0.37986937165260315, -0.08517538756132126, -0.874663770198822, -1.6495283842086792, 2.033738851547241, -1.4014312028884888, 1.974217176437378, 0.8421877026557922, 0.07190211862325668, -1.7484480142593384, -1.7982845306396484, 1.3426135778427124, 1.16359543800354, 2.3714075088500977, 0.5508307218551636, 0.312747597694397, -0.8296531438827515, -0.7833943367004395, 0.3369574546813965, -1.1270207166671753, -0.7153132557868958, 0.19858522713184357, 2.4800407886505127, 1.771186113357544, -0.35866332054138184, -0.1680375635623932, -1.011328935623169, 1.3186136484146118, -0.0705753043293953, 0.2017369419336319, 1.9960346221923828, -0.18387989699840546, -1.0599530935287476, 1.2211875915527344, -2.3073978424072266, 0.1992170810699463, 2.057760715484619, 0.28043901920318604, 0.11695702373981476, -1.459425926208496, -0.7183417081832886, -0.2995896637439728, -0.42057299613952637, -1.2782520055770874, 0.5706902146339417, -0.2525113821029663, -0.7634403705596924, -1.5206220149993896, 0.20299333333969116, -1.1589841842651367, -1.6327415704727173, 0.24586156010627747, 1.8750571012496948, 2.035327196121216, -0.7459386587142944, 1.4541869163513184, -0.3177071213722229, 0.12373512983322144, 1.1363574266433716, 1.1636842489242554, 3.053466320037842, 1.9978570938110352, -1.2305856943130493, 0.6965146064758301, -0.12347309291362762, -0.46421703696250916, 1.0924410820007324, -1.185649037361145, 1.326731562614441, -0.11013668030500412, -1.1724296808242798, -1.1715610027313232, 1.0094417333602905, 0.4790380299091339, 0.004549013450741768, -0.5121211409568787, 1.2437766790390015, 0.06098988279700279, 1.3625589609146118, 0.5719230771064758, -0.2733113467693329, 0.6014225482940674, -0.4594026803970337, -0.39923545718193054, 1.4660176038742065, 0.30740177631378174, -1.4805506467819214, -2.2686846256256104, -0.3181890547275543, -0.8270817399024963, 0.005873768590390682, -0.6191818714141846, -1.036058783531189, 1.6728764772415161, 0.3563852310180664, -1.2308212518692017, -0.26050031185150146, -0.24574244022369385, -0.5600151419639587, 2.6590921878814697, -1.445346713066101, -0.10799536854028702, -1.0358794927597046, -0.6142047047615051, 1.5581897497177124, -1.1172500848770142, -0.1876526176929474, -1.1146947145462036, -0.6663164496421814, -1.3158100843429565, -0.4929106533527374, 0.054715681821107864, -0.8657762408256531, 0.7514112591743469, 0.10407128930091858, -1.1200065612792969, -0.271659791469574, -0.8140130043029785, 0.8697071671485901, -0.12193670868873596, 0.1922113001346588, 1.9105644226074219, 0.4538270831108093, -0.3472673296928406, 0.6566160917282104, 1.11161470413208, 0.7372474670410156, -0.6635730862617493, 0.08059906959533691, -0.6911522150039673, 0.19560855627059937, -1.1792771816253662, 0.3161313533782959, -2.8302221298217773, 0.5634263157844543, -0.11277120560407639, 0.0019429195672273636, 0.007056976668536663, -1.245269536972046, 1.1125543117523193, 2.573371171951294, -1.1205910444259644, 0.43496108055114746, 0.37076619267463684, 1.160544514656067, -1.542465329170227, 0.33373725414276123, -0.43597596883773804, 2.110483407974243, 0.2422884702682495, 1.181208848953247, -0.6331318616867065, -2.299708127975464, 0.5959386825561523, -1.178479552268982, -1.122767448425293, 0.8903216123580933, -0.8056530952453613, 0.04610767588019371, -1.3848944902420044, -0.23840048909187317, -0.8164299130439758, -1.3255971670150757, 0.6870721578598022, 0.15932349860668182, 0.4060547351837158, -0.5308583974838257, 0.24524250626564026, -2.1491262912750244, -1.2730337381362915, -0.2210257351398468, -1.011309266090393, 0.5436797142028809, -0.31774047017097473, 0.7196649312973022, -0.08058974891901016, 0.09034860879182816, 0.33251187205314636, 1.4086625576019287, 3.406771421432495, 0.1926223784685135, 0.24056732654571533, -0.07187091559171677, -0.9594073295593262, 1.4313287734985352, 0.902900755405426, -0.00946180708706379, -0.6539942026138306, -1.030121922492981, 1.1660075187683105, 2.101231336593628, 1.1107017993927002, 0.02513345330953598, -0.9595026969909668, -0.7514104843139648, 0.02295970916748047, 0.22081170976161957, 0.4605388045310974, 0.881757915019989, 0.06734972447156906, -0.004733475856482983, 1.5124067068099976, 1.2079617977142334, -0.4209238588809967, 0.3320254981517792, -0.8087571859359741, -0.45039063692092896, 0.47510382533073425, 0.24594604969024658, 0.04710251837968826, 0.3982750177383423, -0.9854342341423035, -0.1259450763463974, -0.523898720741272, -0.8992853164672852, -0.7912222743034363, -0.30614036321640015, -0.4117923080921173, 1.6761664152145386, 0.1493215560913086, -0.5090014934539795, 0.06338270008563995, -0.7299862504005432, -0.1963179111480713, -1.0749765634536743, 0.27528080344200134, -0.16619014739990234, -0.07709576189517975, -0.07462995499372482, 1.8036572933197021, -0.8800638914108276, -2.156851053237915, 0.18433278799057007, 0.2770346403121948, -0.39270439743995667, 0.2484763264656067, 1.6221673488616943, 0.557188093662262, 1.4581836462020874, 1.1614352464675903, 1.0900177955627441, -0.7464222311973572, -1.330651044845581, 0.7228886485099792, 0.9850015640258789, -1.5138267278671265, 0.705530047416687, -0.004631003364920616, -0.4064560830593109, 0.743057131767273, 1.2542208433151245, 0.37520086765289307, -2.116903781890869, 0.904731035232544, -0.9320403337478638, 0.7812204957008362, 0.7443427443504333, 0.6517274379730225, 0.17176929116249084, 0.7784521579742432, -1.2908897399902344, -1.004325032234192, -0.7208423614501953, -0.6481475830078125, 2.0011632442474365, -0.3108038306236267, 0.6656145453453064, -0.16152596473693848, -1.33877432346344, 0.029037803411483765, 0.7435240745544434, 0.27154067158699036, -0.49456876516342163, 0.9528230428695679, -0.6923357248306274, -1.0065062046051025, -1.381484031677246, -0.5194914937019348, -1.0274087190628052, -1.0451325178146362, 1.1335785388946533, 0.7675085067749023, 0.46323642134666443, 1.917845368385315, 0.6387420892715454, 0.15108725428581238, -2.7146425247192383, 0.8768932223320007, 0.14346124231815338, 0.0009559579193592072, 0.8307321667671204, 0.2728192210197449, 0.9878174662590027, -0.060066867619752884, 0.573354959487915, -2.432732343673706, 2.3889050483703613, -0.13207504153251648, 0.6401659250259399, 0.03795712813735008, -0.16280128061771393, 1.139420986175537, 0.5609990358352661, 0.6626947522163391, -1.2119628190994263, 0.7772060036659241, -0.6134341359138489, 1.2340844869613647, 0.879249632358551, -0.8967905640602112, -0.0705399364233017, 1.2993144989013672, 0.38943547010421753, -0.555212676525116, -0.9102725386619568, -1.0321818590164185, 0.9045475125312805, 1.7362103462219238, -0.08350078016519547, 0.010989305563271046, 0.8434076905250549, 0.6883822679519653, -1.2134530544281006, 0.08968664705753326, -0.7666466236114502, -0.740935742855072, 1.6527618169784546, 2.1061062812805176, -0.1852806806564331, -0.17541363835334778, -0.7474246621131897, -1.1850920915603638, 0.7940476536750793, 0.013817164115607738, 0.11735285818576813, 0.5420746207237244, -0.7018752098083496, 1.1312522888183594, 0.726189136505127, 0.9144158363342285, 0.18734388053417206, 0.31826871633529663, 0.2913748621940613, -0.2373753935098648, -1.2114331722259521, -0.33630919456481934, -1.061630368232727, -2.574552297592163, 0.3566744923591614, -0.14842243492603302, -1.4258493185043335, -0.022876227274537086, -1.038109302520752, 0.8414133787155151, -0.5193709135055542, -1.1914063692092896, -1.546137809753418, 0.23097090423107147, -0.07439514994621277, 0.9380070567131042, -1.5454736948013306, 0.0026688454672694206, 1.2163207530975342, 0.8230695128440857, -0.5675091743469238, 1.0638431310653687, 0.19994047284126282, 0.8430575728416443, 0.9514221549034119, -0.19320392608642578, 0.49246683716773987, 0.15898725390434265, -1.363526463508606, 0.4972090423107147, 1.105492115020752, 0.21419672667980194, 1.4522210359573364, -0.564828634262085, -0.0111817242577672, 0.37487557530403137, -0.42756056785583496, -0.3965667188167572, -0.4704068899154663, 0.6465308666229248, 0.16505683958530426, -0.9770378470420837, 0.08930283784866333, -0.17625373601913452, -0.11655522137880325, 0.22649040818214417, -1.3919305801391602, -0.13969948887825012, -0.35366255044937134, -0.5637906193733215, -1.1678237915039062, -0.07520420104265213, 1.4071508646011353, -0.701345682144165, -0.1637001931667328, 0.5011472105979919, 0.3900883197784424, 0.5426197052001953, 0.7292424440383911, -0.6217236518859863, -0.37429726123809814, -0.2672674357891083, -0.3737463355064392, 0.3658157289028168, 1.2778922319412231, -0.126449316740036, -1.031423807144165, 0.7445880174636841, -0.4494815468788147, 0.15424127876758575, 1.9541786909103394, 0.13821597397327423, -0.8809165358543396, 0.40097561478614807, -0.8024986386299133, 1.8649847507476807, 1.6973159313201904, 1.2874621152877808, -0.27894943952560425, -1.029905915260315, 0.6249871850013733, -0.2997305393218994, -0.4038071930408478, 0.9351498484611511, 0.3912826478481293, -0.19637629389762878, -1.304753065109253, 0.6775155067443848, 1.2945239543914795, -0.9326243996620178, -0.7645124793052673, 0.2778934836387634, -0.8164407014846802, 1.1338857412338257, 0.6917791366577148, 0.4672262668609619, 0.17871594429016113, 1.7045016288757324, 0.7259676456451416, -0.48117250204086304, 0.5465824007987976, 0.5387235879898071, -0.14233547449111938, -2.0212783813476562, -1.129639744758606, 0.3386014401912689, -0.581125795841217, -1.6415408849716187, 1.4015841484069824, -1.2031009197235107, -1.0111762285232544, 0.5285130143165588, 0.03974907472729683, 1.5386911630630493, 0.3168036639690399, 1.5790194272994995, 2.0938661098480225, 0.9195921421051025, 0.3548090159893036, 1.3348385095596313, -0.09494270384311676, -0.5105481743812561, 1.7499598264694214, -0.48406320810317993, 0.35054880380630493, 1.1021883487701416, -0.46385517716407776, -1.0904345512390137, -0.7377734780311584, -1.1331294775009155, -0.6110339164733887, 1.2008554935455322, 0.11291300505399704, -1.1758711338043213, 0.39462003111839294, 1.59559965133667, 0.036941975355148315, -0.3860810399055481, 0.5827182531356812, 0.47312065958976746, -0.7233088612556458, -0.09739422053098679, -0.9318251013755798, 0.5322380661964417, -0.1967582404613495, -0.3106783330440521, 0.2878074049949646, 0.42511168122291565, 1.1981446743011475, -0.010926822200417519, 0.13103991746902466, 1.0869148969650269, -1.4708001613616943, 1.5386463403701782, -0.5936353206634521, 0.22669096291065216, -2.4064993858337402, 1.4052677154541016, -0.730633556842804, 1.9078047275543213, -2.5580170154571533, 0.3629709780216217, -0.5601584911346436, -0.4743218719959259, 0.3552475571632385, -0.3991678059101105, 0.1584107130765915, -0.2461707592010498, -1.032876968383789, -0.17434531450271606, -0.7333589196205139, 0.6752275824546814, 1.135987401008606, 1.3705470561981201, -1.0700230598449707, -0.25793519616127014, -1.6668922901153564, -0.15218330919742584, -0.7146934270858765, 0.4035044014453888, -2.040376901626587, -0.17168742418289185, -1.92095148563385, -2.3877058029174805, -1.4080924987792969, -0.7635703086853027, 0.9720245003700256, 0.22176355123519897, -0.8135607838630676, 1.1210435628890991, -0.2933982312679291, -1.8416520357131958, 1.1081091165542603, -2.0995848178863525 ]
https://github.com/huggingface/datasets/issues/5451
ImageFolder BadZipFile: Bad offset for central directory
The `BadZipFile` error means the ZIP file is corrupted, so I'm closing this issue as it's not directly related to `datasets`.
### Describe the bug I'm getting the following exception: ``` lib/python3.10/zipfile.py:1353 in _RealGetContents │ │ │ │ 1350 │ │ # self.start_dir: Position of start of central directory │ │ 1351 │ │ self.start_dir = offset_cd + concat │ │ 1352 │ │ if self.start_dir < 0: │ │ ❱ 1353 │ │ │ raise BadZipFile("Bad offset for central directory") │ │ 1354 │ │ fp.seek(self.start_dir, 0) │ │ 1355 │ │ data = fp.read(size_cd) │ │ 1356 │ │ fp = io.BytesIO(data) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ BadZipFile: Bad offset for central directory Extracting data files: 35%|█████████████████▊ | 38572/110812 [00:10<00:20, 3576.26it/s] ``` ### Steps to reproduce the bug ``` load_dataset( args.dataset_name, args.dataset_config_name, cache_dir=args.cache_dir, ), ``` ### Expected behavior loads the dataset ### Environment info datasets==2.8.0 Python 3.10.8 Linux 129-146-3-202 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
331
21
ImageFolder BadZipFile: Bad offset for central directory ### Describe the bug I'm getting the following exception: ``` lib/python3.10/zipfile.py:1353 in _RealGetContents │ │ │ │ 1350 │ │ # self.start_dir: Position of start of central directory │ │ 1351 │ │ self.start_dir = offset_cd + concat │ │ 1352 │ │ if self.start_dir < 0: │ │ ❱ 1353 │ │ │ raise BadZipFile("Bad offset for central directory") │ │ 1354 │ │ fp.seek(self.start_dir, 0) │ │ 1355 │ │ data = fp.read(size_cd) │ │ 1356 │ │ fp = io.BytesIO(data) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ BadZipFile: Bad offset for central directory Extracting data files: 35%|█████████████████▊ | 38572/110812 [00:10<00:20, 3576.26it/s] ``` ### Steps to reproduce the bug ``` load_dataset( args.dataset_name, args.dataset_config_name, cache_dir=args.cache_dir, ), ``` ### Expected behavior loads the dataset ### Environment info datasets==2.8.0 Python 3.10.8 Linux 129-146-3-202 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux The `BadZipFile` error means the ZIP file is corrupted, so I'm closing this issue as it's not directly related to `datasets`.
[ -1.1939665079116821, -0.8490809202194214, -0.6932085752487183, 1.5191311836242676, -0.2111867517232895, -1.2388697862625122, 0.26149576902389526, -1.0506815910339355, 1.5851229429244995, -0.7903262376785278, 0.3210504353046417, -1.6974228620529175, 0.1194610595703125, -0.546713650226593, -0.6924488544464111, -0.9440619349479675, -0.5738685727119446, -0.8348460793495178, 1.1213016510009766, 2.499145269393921, 1.2290396690368652, -1.3902394771575928, 2.677429437637329, 0.6944151520729065, -0.3191951811313629, -1.0610426664352417, 0.37660425901412964, 0.04660829156637192, -1.3815186023712158, -0.4431896507740021, -1.0452003479003906, -0.18251122534275055, -0.5111790299415588, -0.6182284355163574, 0.12554104626178741, 0.4156035780906677, -0.31410497426986694, -0.4431414008140564, -0.4356220066547394, -0.7180493474006653, 0.4601948857307434, -0.42078909277915955, 0.9235637784004211, -0.2621851861476898, 1.8022172451019287, -0.5702298283576965, 0.49494659900665283, 0.7331856489181519, 1.259405255317688, 0.1114538311958313, -0.04733128845691681, 0.3833867907524109, 0.425435870885849, -0.029522789642214775, 0.4362501800060272, 1.1699864864349365, 0.7480307817459106, 0.46062976121902466, 0.703743040561676, -2.1399106979370117, 1.3263481855392456, -1.012519359588623, 0.3173496723175049, 1.482731819152832, -1.0359100103378296, 0.35675832629203796, -1.6459535360336304, -0.03347325325012207, 0.6133639216423035, -2.110978603363037, 0.24751107394695282, -1.28291916847229, -0.4642902612686157, 1.054639220237732, 0.4045766294002533, -1.2199598550796509, 0.2129305750131607, -0.43525004386901855, 1.0796749591827393, 0.28393933176994324, 1.140209674835205, -1.789573073387146, 0.05168924480676651, -0.3550461232662201, -0.0012043132446706295, -1.2648893594741821, -1.5127928256988525, 0.5167621970176697, 0.6046541929244995, 0.5759736895561218, -0.11258743703365326, 1.068251609802246, -1.0210968255996704, 0.7449877262115479, -0.957844614982605, -1.7092907428741455, -1.3964768648147583, -2.4089553356170654, -2.324026584625244, 0.6317386627197266, -0.3679620921611786, -0.5297729969024658, 2.0059468746185303, -0.9440872073173523, -1.6154701709747314, 1.0023576021194458, 0.29717549681663513, -0.07109879702329636, 2.366029739379883, 0.2979377210140228, -0.7646960020065308, 0.3625180125236511, -0.8389571309089661, 0.8658588528633118, -0.38905656337738037, 1.3398724794387817, 0.5002270936965942, -1.027736783027649, 1.415006160736084, -0.29911482334136963, 0.5279918909072876, -0.690713107585907, -0.4074636995792389, -0.8530809283256531, 0.28963765501976013, 1.867539882659912, -0.2597672939300537, 1.553885817527771, -0.33406391739845276, -1.5249122381210327, -1.5958410501480103, 0.7568680644035339, 0.44263163208961487, -0.814232587814331, 0.2343061864376068, -0.4200403094291687, 0.07670065760612488, 0.025098081678152084, 1.1353209018707275, 1.2972216606140137, 0.6467918157577515, -0.4355466961860657, -1.0453585386276245, 0.19778607785701752, -0.03504018858075142, -0.739264190196991, -1.860251545906067, -0.27429428696632385, 0.032668549567461014, 0.5654566884040833, -1.240082859992981, 1.6996299028396606, 0.8585478067398071, 1.951900601387024, 1.0740771293640137, -0.5325397253036499, 1.5184413194656372, -0.01701817661523819, 1.8424030542373657, -0.6079314947128296, 0.6525975465774536, -0.31603163480758667, -1.2436985969543457, 0.8464115262031555, -0.27053895592689514, -2.143954277038574, -0.8126789331436157, -0.7369728088378906, -0.2099285125732422, -0.8112290501594543, 0.9470349550247192, -0.220371276140213, -1.4668307304382324, 0.29171574115753174, -0.6738916039466858, 0.1095539778470993, -1.2193750143051147, 0.3576500713825226, 0.7260885834693909, -0.5484562516212463, 0.11558319628238678, -0.2792849540710449, -1.3716486692428589, -0.40212947130203247, 0.2531009614467621, 1.7090080976486206, -0.6827584505081177, 0.9594893455505371, 1.0314316749572754, -0.5711853504180908, 0.10813356935977936, 0.15531960129737854, -0.23507249355316162, 0.9002141952514648, -1.2352418899536133, -0.3310288190841675, 1.1587309837341309, -0.27992767095565796, -0.6714478135108948, 1.44046950340271, 0.7241942882537842, -1.0252021551132202, -0.15477479994297028, -0.07747739553451538, -0.9928702116012573, 0.20146307349205017, -1.7090370655059814, -0.1688530147075653, 0.46403783559799194, -1.4818941354751587, -0.5395429730415344, -0.2975539267063141, 1.3128262758255005, -0.16879990696907043, 1.3573431968688965, -0.352716863155365, -0.20162533223628998, -0.5195679068565369, -0.36925584077835083, 0.24818851053714752, -0.2816905677318573, -0.5425408482551575, 0.21692854166030884, -0.7495185136795044, 0.36484548449516296, 1.3791065216064453, 0.2233923375606537, 0.08516496419906616, 0.5030732750892639, 1.128424048423767, 0.37006667256355286, -0.08258166909217834, -0.8737576603889465, -1.6373157501220703, 2.053142786026001, -1.3924444913864136, 1.9658948183059692, 0.8339434862136841, 0.10319799184799194, -1.7167401313781738, -1.786086916923523, 1.3489665985107422, 1.1835386753082275, 2.3336117267608643, 0.5697849988937378, 0.3155435621738434, -0.8427693843841553, -0.7763764262199402, 0.30298206210136414, -1.1220779418945312, -0.7183085083961487, 0.2136954814195633, 2.476454496383667, 1.7622381448745728, -0.3530632257461548, -0.14799746870994568, -1.0286827087402344, 1.3217355012893677, -0.09339995682239532, 0.18773676455020905, 1.9953314065933228, -0.15423047542572021, -1.0743775367736816, 1.2240982055664062, -2.3049182891845703, 0.18106964230537415, 2.0542352199554443, 0.27300676703453064, 0.14256495237350464, -1.4601213932037354, -0.7580857276916504, -0.28854691982269287, -0.3895973861217499, -1.283468246459961, 0.5630031228065491, -0.26268354058265686, -0.7236186861991882, -1.5245962142944336, 0.24269096553325653, -1.1378353834152222, -1.618507742881775, 0.19827723503112793, 1.8819470405578613, 2.0322585105895996, -0.7308335304260254, 1.462112307548523, -0.30566316843032837, 0.12408146262168884, 1.138586163520813, 1.1413354873657227, 3.038592576980591, 1.9917389154434204, -1.2196577787399292, 0.6868619918823242, -0.11378863453865051, -0.45895373821258545, 1.0947903394699097, -1.2024933099746704, 1.3417572975158691, -0.08654767274856567, -1.168891429901123, -1.1938291788101196, 0.9748193621635437, 0.48389732837677, -0.0033535552211105824, -0.4936210513114929, 1.2571221590042114, 0.0364532433450222, 1.3671143054962158, 0.5521405339241028, -0.2516263723373413, 0.5947179198265076, -0.44621530175209045, -0.38549673557281494, 1.4688036441802979, 0.3169165253639221, -1.4500312805175781, -2.27059006690979, -0.3033265173435211, -0.8108590841293335, 0.056914497166872025, -0.6065493226051331, -1.0193651914596558, 1.6951543092727661, 0.35902532935142517, -1.2318341732025146, -0.2589181065559387, -0.2472992241382599, -0.5713369846343994, 2.6801843643188477, -1.4391705989837646, -0.134235680103302, -1.0294276475906372, -0.6405319571495056, 1.5591764450073242, -1.124936819076538, -0.1962391585111618, -1.1080619096755981, -0.6436970829963684, -1.3080823421478271, -0.4903475046157837, 0.029507271945476532, -0.8650187253952026, 0.7586067318916321, 0.1295752078294754, -1.1472052335739136, -0.28483185172080994, -0.8211125731468201, 0.8444616198539734, -0.12432895600795746, 0.1965971440076828, 1.9034663438796997, 0.45345136523246765, -0.34050077199935913, 0.6630962491035461, 1.0905699729919434, 0.7421811819076538, -0.6481527090072632, 0.09305045008659363, -0.6706007122993469, 0.18840593099594116, -1.1557650566101074, 0.3265385627746582, -2.835078001022339, 0.5444990396499634, -0.11931575834751129, 0.023156262934207916, 0.009086769074201584, -1.2518776655197144, 1.1192606687545776, 2.577481508255005, -1.1203670501708984, 0.4328826069831848, 0.34152379631996155, 1.1986080408096313, -1.5511234998703003, 0.3358677923679352, -0.416771799325943, 2.1276485919952393, 0.26255637407302856, 1.176858901977539, -0.6040453910827637, -2.343078374862671, 0.5854862928390503, -1.1928212642669678, -1.1414347887039185, 0.9023876786231995, -0.794937789440155, 0.006043910980224609, -1.3748058080673218, -0.2631661891937256, -0.7991117835044861, -1.3273351192474365, 0.6825081706047058, 0.1686801016330719, 0.41508135199546814, -0.5382716059684753, 0.2393425554037094, -2.154623508453369, -1.273323893547058, -0.19399911165237427, -1.0202335119247437, 0.5203061103820801, -0.3248821794986725, 0.7423042058944702, -0.11748786270618439, 0.0837508887052536, 0.3404112756252289, 1.4342401027679443, 3.418973684310913, 0.16859935224056244, 0.2753578722476959, -0.07754158973693848, -0.9241686463356018, 1.4170830249786377, 0.8682703375816345, -0.03494108095765114, -0.6528401970863342, -1.0476659536361694, 1.1594685316085815, 2.107874870300293, 1.0617835521697998, 0.02643219381570816, -0.9579002857208252, -0.7561242580413818, -0.01371653564274311, 0.19437585771083832, 0.4752701222896576, 0.8529394865036011, 0.10076107084751129, -0.035143740475177765, 1.5132027864456177, 1.1732035875320435, -0.43321493268013, 0.32283779978752136, -0.7730383276939392, -0.44317227602005005, 0.5017765760421753, 0.2257176637649536, 0.05875484272837639, 0.358633816242218, -0.9576354026794434, -0.11175976693630219, -0.5257042050361633, -0.8712154626846313, -0.795568585395813, -0.3038354516029358, -0.40900251269340515, 1.6978472471237183, 0.14968664944171906, -0.5342651605606079, 0.03317079320549965, -0.7195758819580078, -0.18422365188598633, -1.0607452392578125, 0.2962942123413086, -0.17036320269107819, -0.09369823336601257, -0.0684124156832695, 1.7965549230575562, -0.8661062717437744, -2.137915849685669, 0.14704956114292145, 0.28410759568214417, -0.3837595283985138, 0.24713169038295746, 1.6170424222946167, 0.5734887719154358, 1.4709670543670654, 1.1744914054870605, 1.0838450193405151, -0.7803235054016113, -1.377946376800537, 0.722923219203949, 0.9508843421936035, -1.5152963399887085, 0.7045984864234924, 0.017139842733740807, -0.4063253700733185, 0.711484968662262, 1.2912640571594238, 0.40809062123298645, -2.1305301189422607, 0.885849118232727, -0.9498156309127808, 0.795271635055542, 0.782746434211731, 0.6444221138954163, 0.18036606907844543, 0.7452278733253479, -1.2761907577514648, -1.0146442651748657, -0.6977343559265137, -0.6614167094230652, 2.000187635421753, -0.32393643260002136, 0.6603922843933105, -0.17004552483558655, -1.3812603950500488, 0.05656729266047478, 0.7104478478431702, 0.2814621329307556, -0.4745529294013977, 0.9392334818840027, -0.7071683406829834, -1.0405158996582031, -1.3975551128387451, -0.5299987196922302, -1.0515912771224976, -1.058319330215454, 1.1432747840881348, 0.7804925441741943, 0.43619585037231445, 1.8950352668762207, 0.6617864370346069, 0.13132412731647491, -2.6762959957122803, 0.894262433052063, 0.14229151606559753, 0.009162914007902145, 0.8341225981712341, 0.295597642660141, 0.9794057011604309, -0.061537038534879684, 0.576007604598999, -2.4569878578186035, 2.409152030944824, -0.1475827544927597, 0.62159264087677, 0.024954136461019516, -0.17396648228168488, 1.1355277299880981, 0.5537720918655396, 0.6666427254676819, -1.2155488729476929, 0.7808457016944885, -0.6187399625778198, 1.2606228590011597, 0.8841715455055237, -0.899989664554596, -0.0800882875919342, 1.301991581916809, 0.37759000062942505, -0.5778693556785583, -0.9016707539558411, -1.0788968801498413, 0.8995274901390076, 1.7416330575942993, -0.08755825459957123, 0.012294705957174301, 0.8331758379936218, 0.6942575573921204, -1.2215700149536133, 0.09693428874015808, -0.7556183338165283, -0.7561487555503845, 1.6469553709030151, 2.1090826988220215, -0.19891825318336487, -0.1924755573272705, -0.7586615085601807, -1.17948317527771, 0.808746337890625, 0.03437280282378197, 0.10549511015415192, 0.5129261016845703, -0.6946041584014893, 1.1201145648956299, 0.7552030682563782, 0.9192079901695251, 0.23769116401672363, 0.31207188963890076, 0.2907045781612396, -0.2349741905927658, -1.1974577903747559, -0.32726234197616577, -1.0726556777954102, -2.5665388107299805, 0.3521328568458557, -0.1619413048028946, -1.435266137123108, -0.013831216841936111, -1.036001443862915, 0.8280602097511292, -0.5012011528015137, -1.1711387634277344, -1.5488265752792358, 0.22466158866882324, -0.0680440217256546, 0.9270025491714478, -1.539514422416687, 0.022906124591827393, 1.2422617673873901, 0.8427899479866028, -0.5835415124893188, 1.0684946775436401, 0.16999222338199615, 0.8551977872848511, 0.9649466872215271, -0.1774609535932541, 0.5002641677856445, 0.14054018259048462, -1.355036735534668, 0.5309323072433472, 1.0815569162368774, 0.1930871158838272, 1.4694007635116577, -0.5609980225563049, -0.03495144471526146, 0.3521236181259155, -0.38911160826683044, -0.38844186067581177, -0.4761233627796173, 0.6441054344177246, 0.1840386837720871, -0.9406247735023499, 0.10889498889446259, -0.15667232871055603, -0.0912013053894043, 0.23401620984077454, -1.3934742212295532, -0.12293529510498047, -0.36206430196762085, -0.5667552351951599, -1.151160478591919, -0.10982926189899445, 1.4178733825683594, -0.656041145324707, -0.15709944069385529, 0.5209036469459534, 0.40858229994773865, 0.5497930645942688, 0.7416324019432068, -0.6184012293815613, -0.36711350083351135, -0.26540765166282654, -0.3704032301902771, 0.3714716136455536, 1.2703336477279663, -0.1418013572692871, -1.0315816402435303, 0.7402423024177551, -0.42742064595222473, 0.14303018152713776, 1.9533480405807495, 0.1465858817100525, -0.8923516869544983, 0.40428289771080017, -0.8143930435180664, 1.8957687616348267, 1.70316743850708, 1.2659761905670166, -0.25772225856781006, -1.0705668926239014, 0.6302076578140259, -0.3165207505226135, -0.41534775495529175, 0.9378688335418701, 0.3823908567428589, -0.19092164933681488, -1.3119641542434692, 0.692084550857544, 1.2830955982208252, -0.8890641927719116, -0.7910782694816589, 0.2645053565502167, -0.8054617047309875, 1.1034269332885742, 0.6993832588195801, 0.48350855708122253, 0.19085092842578888, 1.7086602449417114, 0.7337241172790527, -0.48684751987457275, 0.5542192459106445, 0.5097679495811462, -0.1490146368741989, -2.0128726959228516, -1.1612757444381714, 0.3424903154373169, -0.595192015171051, -1.657671570777893, 1.4063736200332642, -1.2088063955307007, -0.9985252022743225, 0.5257718563079834, 0.04594103991985321, 1.5281182527542114, 0.33453696966171265, 1.5567734241485596, 2.078522205352783, 0.9121374487876892, 0.34250885248184204, 1.3144192695617676, -0.13940727710723877, -0.540230393409729, 1.746732234954834, -0.4767342209815979, 0.3293553292751312, 1.120937466621399, -0.45449328422546387, -1.079241394996643, -0.7400079369544983, -1.1203821897506714, -0.6175278425216675, 1.1763845682144165, 0.10445784032344818, -1.1837626695632935, 0.3941875696182251, 1.568138599395752, 0.029846999794244766, -0.4041338264942169, 0.593068540096283, 0.4812835156917572, -0.7209153175354004, -0.08103372156620026, -0.9213157892227173, 0.5345596671104431, -0.196127787232399, -0.32128530740737915, 0.3274117410182953, 0.39660409092903137, 1.2272647619247437, 0.010586410760879517, 0.15722261369228363, 1.0861402750015259, -1.4673726558685303, 1.5242952108383179, -0.5904410481452942, 0.2161584198474884, -2.3877193927764893, 1.4037610292434692, -0.7170789241790771, 1.9110369682312012, -2.5660128593444824, 0.3634248971939087, -0.5490162968635559, -0.46967223286628723, 0.3748236298561096, -0.3902968764305115, 0.17696841061115265, -0.24882885813713074, -1.0702096223831177, -0.17290161550045013, -0.7201839685440063, 0.6581565141677856, 1.1108384132385254, 1.3888822793960571, -1.0545287132263184, -0.2567824721336365, -1.6523103713989258, -0.1477602869272232, -0.6935849785804749, 0.40991929173469543, -2.043203592300415, -0.18481869995594025, -1.9273470640182495, -2.3988277912139893, -1.3838251829147339, -0.749888002872467, 0.9876922965049744, 0.21938972175121307, -0.8166677355766296, 1.145521879196167, -0.29146504402160645, -1.848380208015442, 1.0924135446548462, -2.0727574825286865 ]
https://github.com/huggingface/datasets/issues/5451
ImageFolder BadZipFile: Bad offset for central directory
For others that find this issue following a `BadZipFile` error, I had the same problem because I had a file in a folder dataset `my-image.target` and the datasets library was incorrectly determining that the (PNG) file was a zip archive. When it tried to extract the file, this error occurred. Updating to `datasets==2.12.0` fixed the problem for me.
### Describe the bug I'm getting the following exception: ``` lib/python3.10/zipfile.py:1353 in _RealGetContents │ │ │ │ 1350 │ │ # self.start_dir: Position of start of central directory │ │ 1351 │ │ self.start_dir = offset_cd + concat │ │ 1352 │ │ if self.start_dir < 0: │ │ ❱ 1353 │ │ │ raise BadZipFile("Bad offset for central directory") │ │ 1354 │ │ fp.seek(self.start_dir, 0) │ │ 1355 │ │ data = fp.read(size_cd) │ │ 1356 │ │ fp = io.BytesIO(data) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ BadZipFile: Bad offset for central directory Extracting data files: 35%|█████████████████▊ | 38572/110812 [00:10<00:20, 3576.26it/s] ``` ### Steps to reproduce the bug ``` load_dataset( args.dataset_name, args.dataset_config_name, cache_dir=args.cache_dir, ), ``` ### Expected behavior loads the dataset ### Environment info datasets==2.8.0 Python 3.10.8 Linux 129-146-3-202 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
331
58
ImageFolder BadZipFile: Bad offset for central directory ### Describe the bug I'm getting the following exception: ``` lib/python3.10/zipfile.py:1353 in _RealGetContents │ │ │ │ 1350 │ │ # self.start_dir: Position of start of central directory │ │ 1351 │ │ self.start_dir = offset_cd + concat │ │ 1352 │ │ if self.start_dir < 0: │ │ ❱ 1353 │ │ │ raise BadZipFile("Bad offset for central directory") │ │ 1354 │ │ fp.seek(self.start_dir, 0) │ │ 1355 │ │ data = fp.read(size_cd) │ │ 1356 │ │ fp = io.BytesIO(data) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ BadZipFile: Bad offset for central directory Extracting data files: 35%|█████████████████▊ | 38572/110812 [00:10<00:20, 3576.26it/s] ``` ### Steps to reproduce the bug ``` load_dataset( args.dataset_name, args.dataset_config_name, cache_dir=args.cache_dir, ), ``` ### Expected behavior loads the dataset ### Environment info datasets==2.8.0 Python 3.10.8 Linux 129-146-3-202 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux For others that find this issue following a `BadZipFile` error, I had the same problem because I had a file in a folder dataset `my-image.target` and the datasets library was incorrectly determining that the (PNG) file was a zip archive. When it tried to extract the file, this error occurred. Updating to `datasets==2.12.0` fixed the problem for me.
[ -1.2359187602996826, -0.8569865822792053, -0.6782492399215698, 1.4818766117095947, -0.21162763237953186, -1.261195182800293, 0.23142798244953156, -1.0930302143096924, 1.6386640071868896, -0.8028919100761414, 0.26819145679473877, -1.6773107051849365, 0.13818736374378204, -0.5428324937820435, -0.7163872718811035, -0.931684136390686, -0.533517062664032, -0.8567888736724854, 1.105686902999878, 2.5072197914123535, 1.2110545635223389, -1.3900405168533325, 2.676969528198242, 0.7189774513244629, -0.3078198730945587, -1.066084861755371, 0.4150400757789612, 0.03220738098025322, -1.4087835550308228, -0.43696630001068115, -1.0379217863082886, -0.17516522109508514, -0.5083310008049011, -0.6452133655548096, 0.09683902561664581, 0.39706459641456604, -0.2977660596370697, -0.4363294839859009, -0.46586787700653076, -0.6910847425460815, 0.43983709812164307, -0.41385021805763245, 0.9274569153785706, -0.27627527713775635, 1.7636038064956665, -0.5547458529472351, 0.5002440214157104, 0.7117424607276917, 1.2806147336959839, 0.1345909684896469, -0.05174447223544121, 0.3485667109489441, 0.4401458203792572, -0.04401295632123947, 0.42364683747291565, 1.1777961254119873, 0.767694354057312, 0.46679845452308655, 0.7182765007019043, -2.16552734375, 1.3157929182052612, -1.005133032798767, 0.33076781034469604, 1.4490253925323486, -1.0073139667510986, 0.3458077311515808, -1.6810897588729858, -0.04656098037958145, 0.6001491546630859, -2.133368492126465, 0.23347730934619904, -1.2824747562408447, -0.4937254786491394, 1.054146409034729, 0.3727158308029175, -1.2114711999893188, 0.21762464940547943, -0.4416923522949219, 1.0702894926071167, 0.3018025755882263, 1.1470935344696045, -1.7751017808914185, 0.024745218455791473, -0.35261979699134827, 0.012003248557448387, -1.243237853050232, -1.5024261474609375, 0.5434530973434448, 0.6140309572219849, 0.5529799461364746, -0.13176950812339783, 1.068280816078186, -1.0244909524917603, 0.7680245041847229, -0.9563784599304199, -1.7290371656417847, -1.3934675455093384, -2.377939462661743, -2.3281900882720947, 0.6362316012382507, -0.38926514983177185, -0.5203558802604675, 2.002760887145996, -0.9749861359596252, -1.6341819763183594, 1.0080807209014893, 0.2739972472190857, -0.06283976882696152, 2.3548853397369385, 0.2752384543418884, -0.7736853957176208, 0.37844178080558777, -0.79708331823349, 0.8431456685066223, -0.39822590351104736, 1.3338251113891602, 0.46669042110443115, -1.0128675699234009, 1.440910816192627, -0.2944929301738739, 0.5563152432441711, -0.6994228363037109, -0.4217333197593689, -0.8501707315444946, 0.3289346992969513, 1.8606858253479004, -0.27585139870643616, 1.5589724779129028, -0.3315528333187103, -1.5365160703659058, -1.5880181789398193, 0.7626886963844299, 0.46879416704177856, -0.8115416169166565, 0.2144823521375656, -0.4202045202255249, 0.0705726146697998, 0.015521595254540443, 1.1301180124282837, 1.304526448249817, 0.7077772617340088, -0.40019866824150085, -1.0000319480895996, 0.20819039642810822, -0.06363299489021301, -0.7369025945663452, -1.847266674041748, -0.3012623190879822, 0.0456484854221344, 0.5846816301345825, -1.2395825386047363, 1.7237294912338257, 0.8716131448745728, 1.9394303560256958, 1.0888614654541016, -0.5166886448860168, 1.514399528503418, 0.004089508205652237, 1.8459917306900024, -0.5721601247787476, 0.6587038040161133, -0.32156893610954285, -1.2169135808944702, 0.839015007019043, -0.24931363761425018, -2.1457581520080566, -0.7568691968917847, -0.7344790101051331, -0.21894364058971405, -0.7925629615783691, 0.931329071521759, -0.24416843056678772, -1.4548933506011963, 0.28163307905197144, -0.65238356590271, 0.10854028165340424, -1.202895998954773, 0.3606918752193451, 0.7126328945159912, -0.547339141368866, 0.11453303694725037, -0.29123857617378235, -1.3767732381820679, -0.41995635628700256, 0.23772002756595612, 1.691994071006775, -0.7139085531234741, 0.962011456489563, 1.0383050441741943, -0.5948262810707092, 0.0898762047290802, 0.22040240466594696, -0.23658372461795807, 0.8951320648193359, -1.1992063522338867, -0.31752297282218933, 1.1524076461791992, -0.270001620054245, -0.6323004364967346, 1.4430180788040161, 0.6920471787452698, -1.01063871383667, -0.13094264268875122, -0.08096644282341003, -1.0083467960357666, 0.17773155868053436, -1.7061166763305664, -0.1544198989868164, 0.473623126745224, -1.5053763389587402, -0.5294535160064697, -0.26483991742134094, 1.28313148021698, -0.13815684616565704, 1.3662244081497192, -0.374233216047287, -0.2154848426580429, -0.4905470609664917, -0.3480716347694397, 0.21939750015735626, -0.2862401604652405, -0.5271663069725037, 0.2314070612192154, -0.7545994520187378, 0.3581708073616028, 1.4073888063430786, 0.2509402930736542, 0.06542621552944183, 0.4937026798725128, 1.1226727962493896, 0.3794889748096466, -0.09724374115467072, -0.8613570332527161, -1.6078240871429443, 2.048555374145508, -1.4145125150680542, 1.954658031463623, 0.8163402676582336, 0.07566466927528381, -1.750874400138855, -1.826127052307129, 1.357526183128357, 1.151872992515564, 2.3862969875335693, 0.5659348964691162, 0.3241342604160309, -0.834026575088501, -0.757042646408081, 0.3363456428050995, -1.0872108936309814, -0.728628396987915, 0.19193118810653687, 2.4604761600494385, 1.7825641632080078, -0.3709738552570343, -0.16047126054763794, -1.0396050214767456, 1.3217875957489014, -0.09624075889587402, 0.21243511140346527, 1.9776288270950317, -0.2076096087694168, -1.0761510133743286, 1.2455211877822876, -2.29045033454895, 0.14915227890014648, 2.0492653846740723, 0.26192978024482727, 0.13966789841651917, -1.440593957901001, -0.709252655506134, -0.2648985981941223, -0.40820547938346863, -1.2841105461120605, 0.5686268210411072, -0.25706514716148376, -0.7295956015586853, -1.498353123664856, 0.2138034999370575, -1.1492217779159546, -1.6329213380813599, 0.1920696496963501, 1.8829721212387085, 2.014399290084839, -0.7254053354263306, 1.4676806926727295, -0.3133941888809204, 0.13228203356266022, 1.1454416513442993, 1.1184272766113281, 3.0829155445098877, 1.9928537607192993, -1.2468303442001343, 0.6950116157531738, -0.1323520839214325, -0.4353744685649872, 1.0651870965957642, -1.2035291194915771, 1.3241443634033203, -0.10507844388484955, -1.1703870296478271, -1.151185154914856, 0.9864468574523926, 0.4719472825527191, 0.03382251411676407, -0.5150852799415588, 1.2262682914733887, 0.045387059450149536, 1.3213540315628052, 0.5286952257156372, -0.2873823940753937, 0.6231080889701843, -0.43646687269210815, -0.4289400577545166, 1.4763438701629639, 0.3269886374473572, -1.4235035181045532, -2.268022298812866, -0.29812994599342346, -0.8111037611961365, 0.05343644693493843, -0.6106675863265991, -0.9918341636657715, 1.707384705543518, 0.36270129680633545, -1.2588337659835815, -0.2561487555503845, -0.25909918546676636, -0.5897718071937561, 2.679509162902832, -1.426680326461792, -0.13412554562091827, -1.0273329019546509, -0.6325888633728027, 1.5527617931365967, -1.1112796068191528, -0.23695598542690277, -1.08678138256073, -0.6278126239776611, -1.300750970840454, -0.5099983215332031, 0.028088923543691635, -0.8461912274360657, 0.7793592214584351, 0.139421746134758, -1.1506186723709106, -0.28482040762901306, -0.7934812307357788, 0.8676732778549194, -0.11982738971710205, 0.18523162603378296, 1.9118883609771729, 0.4501846432685852, -0.32366296648979187, 0.6523715853691101, 1.0991979837417603, 0.7407081127166748, -0.6447286605834961, 0.10369959473609924, -0.7005957961082458, 0.22175022959709167, -1.1605684757232666, 0.2984408140182495, -2.819201946258545, 0.5520673990249634, -0.11014100909233093, 0.023518811911344528, 0.019449960440397263, -1.251711130142212, 1.071893334388733, 2.597287654876709, -1.102670431137085, 0.42581886053085327, 0.3550995886325836, 1.1919286251068115, -1.5322000980377197, 0.34431377053260803, -0.4336996376514435, 2.1155307292938232, 0.27277159690856934, 1.158555269241333, -0.6210842728614807, -2.3451180458068848, 0.5762248039245605, -1.2027405500411987, -1.1491931676864624, 0.9057953357696533, -0.7814524173736572, 0.007174471393227577, -1.3904411792755127, -0.2558044493198395, -0.7863478660583496, -1.2897392511367798, 0.7029521465301514, 0.1870412975549698, 0.42941954731941223, -0.5767401456832886, 0.25299811363220215, -2.155824661254883, -1.2683839797973633, -0.21885819733142853, -1.0061115026474, 0.5068167448043823, -0.3339114785194397, 0.7296327352523804, -0.1125137060880661, 0.06332294642925262, 0.33183494210243225, 1.4280204772949219, 3.4042279720306396, 0.1750182956457138, 0.2654973268508911, -0.1199619323015213, -0.9348719120025635, 1.4243323802947998, 0.8689995408058167, -0.0429006926715374, -0.6678841710090637, -1.0580852031707764, 1.169599175453186, 2.064293146133423, 1.0553643703460693, 0.045831236988306046, -0.9560553431510925, -0.7468177080154419, -0.010875985026359558, 0.18495480716228485, 0.45216917991638184, 0.8740479946136475, 0.11215130984783173, -0.01424672082066536, 1.5154727697372437, 1.1544121503829956, -0.41314956545829773, 0.3358483910560608, -0.7744191288948059, -0.46612921357154846, 0.4955003559589386, 0.26430845260620117, 0.07252413034439087, 0.33598530292510986, -0.9918310642242432, -0.11368007957935333, -0.5233009457588196, -0.8912240862846375, -0.7662364840507507, -0.3064766824245453, -0.3767203986644745, 1.709352970123291, 0.1489088088274002, -0.5444649457931519, 0.009924966841936111, -0.7250086665153503, -0.1601487547159195, -1.042616605758667, 0.3419211506843567, -0.15972104668617249, -0.09651875495910645, -0.07805067300796509, 1.8056977987289429, -0.8753398656845093, -2.113072156906128, 0.19150127470493317, 0.24374347925186157, -0.36616596579551697, 0.2582337558269501, 1.5966514348983765, 0.6066516041755676, 1.4711799621582031, 1.2279901504516602, 1.0632476806640625, -0.7793809175491333, -1.3663731813430786, 0.7279161214828491, 0.9463287591934204, -1.5054317712783813, 0.7143585085868835, 0.010558733716607094, -0.4512775242328644, 0.7092928290367126, 1.2969211339950562, 0.38835105299949646, -2.165618896484375, 0.8781093955039978, -0.9546941518783569, 0.7574877142906189, 0.7771140336990356, 0.6799043416976929, 0.17733526229858398, 0.7441629767417908, -1.2780306339263916, -1.0427796840667725, -0.7036069631576538, -0.6676019430160522, 2.0222256183624268, -0.29115936160087585, 0.6796578764915466, -0.18712550401687622, -1.3765718936920166, 0.04528932273387909, 0.7074650526046753, 0.28271883726119995, -0.4910900592803955, 0.9106277823448181, -0.6879927515983582, -1.0452473163604736, -1.386310338973999, -0.5366919040679932, -1.0691471099853516, -1.0423672199249268, 1.1198028326034546, 0.7947127223014832, 0.44911321997642517, 1.896240472793579, 0.6554505825042725, 0.1604442298412323, -2.6941940784454346, 0.869892418384552, 0.14070720970630646, -0.013266101479530334, 0.8268880248069763, 0.29794570803642273, 0.9595549702644348, -0.047676753252744675, 0.5797746777534485, -2.441455602645874, 2.4042441844940186, -0.1670694798231125, 0.6374284625053406, -0.005111331585794687, -0.17468702793121338, 1.1350167989730835, 0.5714899897575378, 0.6538780927658081, -1.1767685413360596, 0.7871740460395813, -0.6145361661911011, 1.2353590726852417, 0.8756977915763855, -0.8747358322143555, -0.08514668047428131, 1.2770346403121948, 0.3864925503730774, -0.5584024786949158, -0.9136080145835876, -1.0766832828521729, 0.9078401327133179, 1.7720630168914795, -0.07390514016151428, 0.03209041431546211, 0.8166371583938599, 0.6903083324432373, -1.2104002237319946, 0.08772051334381104, -0.752285361289978, -0.7445102334022522, 1.627761721611023, 2.100259780883789, -0.18803375959396362, -0.1653376817703247, -0.7405644059181213, -1.1887153387069702, 0.8190913796424866, 0.0226371381431818, 0.09062425792217255, 0.498811274766922, -0.6870669722557068, 1.131920576095581, 0.818189263343811, 0.9287797808647156, 0.21041199564933777, 0.3188970386981964, 0.2697444558143616, -0.22732435166835785, -1.2167210578918457, -0.2836468815803528, -1.0528122186660767, -2.563217878341675, 0.3714325726032257, -0.13575102388858795, -1.4633915424346924, -0.005522672086954117, -1.0105762481689453, 0.8253540992736816, -0.4952627122402191, -1.185407280921936, -1.5597115755081177, 0.21845176815986633, -0.07836778461933136, 0.9547011256217957, -1.5509388446807861, 0.0068485792726278305, 1.2209889888763428, 0.8602394461631775, -0.5965703129768372, 1.0536576509475708, 0.18527287244796753, 0.8540550470352173, 0.9688928723335266, -0.19403378665447235, 0.467765212059021, 0.1341913491487503, -1.3476037979125977, 0.4854623079299927, 1.0808415412902832, 0.21101979911327362, 1.4582713842391968, -0.5948292016983032, -0.037000320851802826, 0.3545408546924591, -0.37612563371658325, -0.3585260212421417, -0.5190622806549072, 0.6676941514015198, 0.1660350114107132, -0.9141684174537659, 0.07414717972278595, -0.14816755056381226, -0.13163691759109497, 0.235746830701828, -1.3926348686218262, -0.11176247894763947, -0.37220972776412964, -0.5443949699401855, -1.1592541933059692, -0.09021621942520142, 1.4171069860458374, -0.6794520616531372, -0.1685362160205841, 0.5361752510070801, 0.37920209765434265, 0.5644527077674866, 0.7366309762001038, -0.6206026077270508, -0.379442036151886, -0.24259889125823975, -0.39865702390670776, 0.3605615198612213, 1.3013489246368408, -0.12561452388763428, -1.0092616081237793, 0.7506550550460815, -0.41148731112480164, 0.12648385763168335, 1.969642162322998, 0.14954112470149994, -0.8566780090332031, 0.3982275724411011, -0.7984220385551453, 1.875802755355835, 1.7242423295974731, 1.2725671529769897, -0.23724690079689026, -1.0535295009613037, 0.5934638381004333, -0.32144421339035034, -0.4182070791721344, 0.9380879402160645, 0.4075123965740204, -0.17874103784561157, -1.3273892402648926, 0.691185474395752, 1.279260277748108, -0.907437801361084, -0.7790431976318359, 0.2353479117155075, -0.7687692642211914, 1.1334197521209717, 0.7005062103271484, 0.468616783618927, 0.19849330186843872, 1.6988080739974976, 0.7388643026351929, -0.48577880859375, 0.5531471967697144, 0.5291832089424133, -0.14574231207370758, -2.0262441635131836, -1.175613284111023, 0.34190160036087036, -0.5626794695854187, -1.6605465412139893, 1.3933732509613037, -1.2166539430618286, -0.9998078346252441, 0.517332136631012, 0.06043156608939171, 1.5371334552764893, 0.348386287689209, 1.5245459079742432, 2.116544246673584, 0.939875602722168, 0.36143234372138977, 1.323354721069336, -0.14730392396450043, -0.5241690874099731, 1.7711422443389893, -0.4722108542919159, 0.3383200168609619, 1.0970239639282227, -0.4107344448566437, -1.080814242362976, -0.7351075410842896, -1.1509071588516235, -0.6355706453323364, 1.1729741096496582, 0.0799981951713562, -1.1809431314468384, 0.3967190086841583, 1.5765259265899658, 0.010079929605126381, -0.4064357876777649, 0.5778729319572449, 0.47550833225250244, -0.7243354320526123, -0.08897137641906738, -0.8964056968688965, 0.5371916890144348, -0.21447864174842834, -0.35319358110427856, 0.305962473154068, 0.4346255660057068, 1.2350468635559082, 0.008846651762723923, 0.1274556964635849, 1.1020514965057373, -1.4703681468963623, 1.510594367980957, -0.6266716718673706, 0.22036516666412354, -2.389651298522949, 1.4398257732391357, -0.7245733141899109, 1.9200794696807861, -2.581845760345459, 0.3859875202178955, -0.5381904244422913, -0.49130740761756897, 0.36558282375335693, -0.38759350776672363, 0.1760633885860443, -0.24628593027591705, -1.0528531074523926, -0.16792361438274384, -0.7309272289276123, 0.6659045815467834, 1.1071206331253052, 1.3836010694503784, -1.072941541671753, -0.26444491744041443, -1.6615300178527832, -0.16219709813594818, -0.6763874888420105, 0.3772675693035126, -2.0335543155670166, -0.15050698816776276, -1.9330414533615112, -2.403597354888916, -1.3808714151382446, -0.7700157761573792, 0.9973219633102417, 0.20555536448955536, -0.8153034448623657, 1.1537634134292603, -0.3058108687400818, -1.8696082830429077, 1.097419261932373, -2.114410400390625 ]
https://github.com/huggingface/datasets/issues/5450
to_tf_dataset with a TF collator causes bizarrely persistent slowdown
A possible hint: The function it seems to be spending a lot of time in (when iterating over the original dataset) is `_get_mp` in the PIL JPEG decoder: ![image](https://user-images.githubusercontent.com/12866554/214057267-c889f05e-efaf-4036-b805-c5381fa62f4a.png)
### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main`
332
29
to_tf_dataset with a TF collator causes bizarrely persistent slowdown ### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main` A possible hint: The function it seems to be spending a lot of time in (when iterating over the original dataset) is `_get_mp` in the PIL JPEG decoder: ![image](https://user-images.githubusercontent.com/12866554/214057267-c889f05e-efaf-4036-b805-c5381fa62f4a.png)
[ -1.1414843797683716, -0.9540003538131714, -0.714849054813385, 1.382982850074768, -0.2000240981578827, -1.2782437801361084, 0.1743442714214325, -1.1151078939437866, 1.7982470989227295, -0.8330002427101135, 0.24018649756908417, -1.7073076963424683, 0.051127463579177856, -0.6064121723175049, -0.808608889579773, -0.8467989563941956, -0.4387737810611725, -0.8072531819343567, 1.0305730104446411, 2.496476411819458, 1.1956950426101685, -1.397826910018921, 2.6988413333892822, 0.6579501032829285, -0.18130388855934143, -0.9711925387382507, 0.46005991101264954, -0.032727260142564774, -1.3520315885543823, -0.5295132994651794, -0.8733639121055603, -0.0885893702507019, -0.5500777959823608, -0.5862950682640076, -0.030191704630851746, 0.3584335148334503, -0.29054179787635803, -0.3953385055065155, -0.49684038758277893, -0.8007815480232239, 0.40391409397125244, -0.3536907732486725, 0.9814716577529907, -0.31598666310310364, 1.9791351556777954, -0.4934450685977936, 0.41339829564094543, 0.7138380408287048, 1.3618245124816895, 0.18533436954021454, -0.022196324542164803, 0.24228183925151825, 0.3403836190700531, -0.07450927048921585, 0.41786879301071167, 1.1654374599456787, 0.7047138810157776, 0.5108624696731567, 0.7081040143966675, -2.190065383911133, 1.331065058708191, -1.0507937669754028, 0.3678681254386902, 1.3624101877212524, -0.9333558082580566, 0.34652596712112427, -1.7308248281478882, -0.03423000127077103, 0.5745155811309814, -2.2468478679656982, 0.2095610499382019, -1.2284507751464844, -0.503382682800293, 0.9961070418357849, 0.2596624195575714, -1.1924222707748413, 0.26851579546928406, -0.44579723477363586, 1.0541133880615234, 0.4365212619304657, 1.1673983335494995, -1.7688041925430298, -0.11234889924526215, -0.2665889263153076, 0.15254364907741547, -1.3172258138656616, -1.6035302877426147, 0.558342695236206, 0.7072397470474243, 0.4947707951068878, -0.12541714310646057, 1.073371171951294, -0.9786918759346008, 0.7386965155601501, -0.9456761479377747, -1.6138602495193481, -1.3956403732299805, -2.208834171295166, -2.2706141471862793, 0.7524945735931396, -0.48941823840141296, -0.5473502278327942, 2.070866584777832, -1.0252718925476074, -1.7414281368255615, 1.1193220615386963, 0.28958752751350403, -0.027632419019937515, 2.334796905517578, 0.1866106539964676, -0.6188262104988098, 0.37160420417785645, -0.6913682222366333, 0.7502972483634949, -0.48737823963165283, 1.3735569715499878, 0.37294360995292664, -1.1480201482772827, 1.5168663263320923, -0.4368848204612732, 0.5999104380607605, -0.7663990259170532, -0.49766218662261963, -0.7500553131103516, 0.3418987989425659, 1.87661874294281, -0.38480356335639954, 1.6168739795684814, -0.3979812562465668, -1.5725483894348145, -1.6225839853286743, 0.9270027279853821, 0.49756696820259094, -0.7622133493423462, 0.05949120223522186, -0.3795076310634613, 0.04727291688323021, -0.07648170739412308, 1.0667331218719482, 1.1820482015609741, 0.651373565196991, -0.28564023971557617, -0.8122549653053284, 0.26250842213630676, -0.16707587242126465, -0.7358644604682922, -1.7875903844833374, -0.36970043182373047, 0.14782212674617767, 0.5912486910820007, -1.2088533639907837, 1.7140508890151978, 0.8618031144142151, 1.9017077684402466, 1.0267149209976196, -0.31712526082992554, 1.4905507564544678, 0.14989331364631653, 1.8096646070480347, -0.5287646651268005, 0.7527926564216614, -0.3631613850593567, -1.1041566133499146, 0.8541432023048401, -0.3280266523361206, -1.9978832006454468, -0.61053466796875, -0.833196222782135, -0.18588201701641083, -0.7507383823394775, 0.8946277499198914, -0.25154247879981995, -1.3359156847000122, 0.24076129496097565, -0.6345390677452087, 0.13284040987491608, -1.2063452005386353, 0.38648664951324463, 0.8063615560531616, -0.6612371206283569, 0.13029958307743073, -0.21931591629981995, -1.3069722652435303, -0.4053058326244354, 0.28639012575149536, 1.9034579992294312, -0.8475576043128967, 0.8636587858200073, 1.0245720148086548, -0.6606681942939758, 0.0006861407309770584, 0.42968425154685974, -0.32894185185432434, 0.8302487134933472, -1.0817158222198486, -0.38530465960502625, 1.1150535345077515, -0.17398715019226074, -0.5704667568206787, 1.412339448928833, 0.6926271319389343, -0.989303469657898, -0.09635324031114578, -0.1097402274608612, -0.904644787311554, 0.04383815452456474, -1.6080503463745117, -0.10640090703964233, 0.27044814825057983, -1.5362169742584229, -0.557221531867981, -0.2724810540676117, 1.3009978532791138, -0.15771779417991638, 1.4189139604568481, -0.382240891456604, -0.25517570972442627, -0.4016149938106537, -0.35929074883461, 0.13852857053279877, -0.25569042563438416, -0.6395397782325745, 0.23796792328357697, -0.7537753582000732, 0.3256126344203949, 1.442434549331665, 0.3293010890483856, -0.009692255407571793, 0.5362151861190796, 1.0929981470108032, 0.33224138617515564, -0.07587656378746033, -0.8811253309249878, -1.5313704013824463, 1.9902132749557495, -1.4243286848068237, 1.9970623254776, 0.8681121468544006, 0.002109683118760586, -1.7412266731262207, -1.8803901672363281, 1.3848739862442017, 1.1769320964813232, 2.3371500968933105, 0.5561122894287109, 0.39905691146850586, -0.8483073115348816, -0.5770440697669983, 0.40419813990592957, -1.0064947605133057, -0.7380369901657104, 0.11296788603067398, 2.3701796531677246, 1.784499168395996, -0.5073999762535095, -0.18306158483028412, -1.1243531703948975, 1.3571381568908691, -0.20338915288448334, 0.2091924399137497, 2.0013465881347656, -0.3135696053504944, -1.091982126235962, 1.2779510021209717, -2.3037102222442627, 0.10966629534959793, 1.940564513206482, 0.2531770169734955, -0.01530433539301157, -1.3950105905532837, -0.6335435509681702, -0.27744564414024353, -0.33374276757240295, -1.2680487632751465, 0.5253543853759766, -0.2225119024515152, -0.7262498140335083, -1.559118628501892, 0.20018157362937927, -1.1370769739151, -1.580500602722168, 0.2796010673046112, 1.8882840871810913, 1.896188735961914, -0.7118046879768372, 1.5732060670852661, -0.2984246611595154, 0.19623298943042755, 1.2263555526733398, 1.218513011932373, 3.21655011177063, 1.9795492887496948, -1.2789325714111328, 0.5506126880645752, -0.11452532559633255, -0.5043402910232544, 1.1319477558135986, -1.1257195472717285, 1.2755019664764404, -0.15700605511665344, -1.2261160612106323, -1.2882611751556396, 0.981154203414917, 0.5222875475883484, 0.1080147996544838, -0.46948662400245667, 1.1837986707687378, 0.05126159265637398, 1.315779447555542, 0.5227558016777039, -0.3631128668785095, 0.6718513369560242, -0.4411377012729645, -0.5414971709251404, 1.534523844718933, 0.29199525713920593, -1.3657721281051636, -2.3004841804504395, -0.2087201327085495, -0.7926118969917297, 0.10140203684568405, -0.621080756187439, -0.9362733960151672, 1.635401964187622, 0.44638293981552124, -1.2437437772750854, -0.27045315504074097, -0.34764352440834045, -0.6219964623451233, 2.608327627182007, -1.39560067653656, -0.26849082112312317, -1.0112043619155884, -0.6307850480079651, 1.6364073753356934, -1.2463654279708862, -0.30333495140075684, -1.02299964427948, -0.5566196441650391, -1.2068179845809937, -0.5437607169151306, -0.02860085293650627, -0.8356846570968628, 0.8673460483551025, 0.21536199748516083, -1.1901613473892212, -0.3518781363964081, -0.9226877093315125, 0.7995941638946533, -0.1168074980378151, 0.21030260622501373, 1.874215841293335, 0.4621347486972809, -0.4249586760997772, 0.6614769101142883, 1.1582932472229004, 0.6152766346931458, -0.6286106109619141, 0.22386901080608368, -0.7491763830184937, 0.24503986537456512, -1.2901203632354736, 0.31734350323677063, -2.8731536865234375, 0.6300452947616577, -0.020636260509490967, -0.03671887516975403, 0.053497739136219025, -1.285971760749817, 1.0581111907958984, 2.6203436851501465, -1.1436465978622437, 0.4390736520290375, 0.36078572273254395, 1.2900687456130981, -1.6386604309082031, 0.3463274836540222, -0.3596695065498352, 2.0910775661468506, 0.18441206216812134, 1.2103191614151, -0.4881286919116974, -2.300144910812378, 0.5065886974334717, -1.2844321727752686, -1.2554517984390259, 0.7942121624946594, -0.8230598568916321, -0.06347876042127609, -1.4612399339675903, -0.2114485651254654, -0.8255553245544434, -1.2733074426651, 0.7552597522735596, 0.06473125517368317, 0.487956166267395, -0.6371666193008423, 0.31394919753074646, -2.0710177421569824, -1.2654671669006348, -0.2399824857711792, -0.9510775804519653, 0.40076887607574463, -0.3563571870326996, 0.7324936389923096, -0.2699728012084961, 0.037764597684144974, 0.3577027916908264, 1.401950478553772, 3.366082191467285, 0.2369203418493271, 0.42345935106277466, -0.17726397514343262, -0.8821167349815369, 1.3793690204620361, 0.9602169394493103, -0.12951157987117767, -0.5126872062683105, -0.9906007051467896, 1.236114501953125, 1.996864914894104, 1.0511237382888794, 0.007736216299235821, -0.7959097027778625, -0.719703733921051, -0.052248600870370865, 0.1867038905620575, 0.3853561580181122, 0.9288328289985657, 0.08595600724220276, 0.10094532370567322, 1.4277598857879639, 1.238610863685608, -0.5025539994239807, 0.4234115183353424, -0.7768831253051758, -0.4973147213459015, 0.4741634726524353, 0.39079776406288147, -0.01147154625505209, 0.3393697142601013, -1.0156288146972656, -0.2835065722465515, -0.46698513627052307, -0.921468198299408, -0.6869823932647705, -0.5087635517120361, -0.3090473711490631, 1.6769744157791138, 0.09795039892196655, -0.5430472493171692, -0.05880380794405937, -0.760405957698822, -0.039518777281045914, -0.9978447556495667, 0.28443312644958496, -0.09129571914672852, -0.14708171784877777, -0.033686213195323944, 1.7682377099990845, -0.9113421440124512, -2.048783779144287, 0.2352304756641388, 0.2099047154188156, -0.316853404045105, 0.2116837352514267, 1.5907827615737915, 0.49810341000556946, 1.5170475244522095, 1.3866883516311646, 1.02880859375, -0.6796977519989014, -1.4144172668457031, 0.7305260300636292, 1.0093172788619995, -1.4047558307647705, 0.7609447240829468, 0.08518031239509583, -0.535616934299469, 0.7232219576835632, 1.2669109106063843, 0.4653240740299225, -2.009963274002075, 0.7631344795227051, -0.9435504078865051, 0.7111024260520935, 0.706687867641449, 0.7322559356689453, 0.2300466001033783, 0.78254234790802, -1.256734848022461, -1.2002617120742798, -0.7683159112930298, -0.6509130597114563, 1.9876192808151245, -0.2148696333169937, 0.559537947177887, -0.1882985383272171, -1.384704351425171, -0.1214524507522583, 0.7123060822486877, 0.3869371712207794, -0.49282413721084595, 0.7351102828979492, -0.7351314425468445, -1.1329842805862427, -1.3835722208023071, -0.4253042936325073, -1.0545397996902466, -0.9535385966300964, 1.0317147970199585, 0.9497271776199341, 0.2813902497291565, 1.8958898782730103, 0.6810416579246521, 0.22848160564899445, -2.573331832885742, 0.9378201961517334, 0.3815884292125702, -0.12741932272911072, 0.895244300365448, 0.3440403938293457, 0.948062539100647, 0.09505214542150497, 0.5285911560058594, -2.470405340194702, 2.3468165397644043, -0.26658517122268677, 0.7152090668678284, 0.01416310016065836, -0.22063174843788147, 1.228149175643921, 0.4998404085636139, 0.5180671215057373, -1.06766939163208, 0.7258570194244385, -0.5834895372390747, 1.171210765838623, 0.9114843606948853, -0.8654372096061707, -0.05666686221957207, 1.3141299486160278, 0.5052965879440308, -0.551393985748291, -0.8755791187286377, -1.1079918146133423, 0.8858658075332642, 1.8009260892868042, -0.04805273190140724, 0.07330211997032166, 0.8406645059585571, 0.7044395804405212, -1.298337697982788, 0.16303899884223938, -0.8419588804244995, -0.8576973676681519, 1.5673223733901978, 2.03169846534729, -0.1125183179974556, -0.12023951858282089, -0.6877437829971313, -1.1900578737258911, 0.7329927086830139, 0.013898598961532116, 0.14581894874572754, 0.6787700057029724, -0.637999415397644, 1.1517890691757202, 0.989944577217102, 0.9499228596687317, 0.2461717277765274, 0.3064629137516022, 0.3840993046760559, -0.35714098811149597, -1.1097091436386108, -0.2379848212003708, -1.0604631900787354, -2.4892306327819824, 0.4985257089138031, -0.19172430038452148, -1.4255284070968628, 0.017174243927001953, -1.0236685276031494, 0.914477527141571, -0.5327968597412109, -1.0845921039581299, -1.6295305490493774, 0.18154792487621307, -0.08863657712936401, 0.8867802023887634, -1.6081188917160034, -0.034576207399368286, 1.2165199518203735, 0.8814660906791687, -0.62715083360672, 1.009080171585083, 0.20643432438373566, 1.0617625713348389, 0.9534024596214294, -0.374981552362442, 0.4518524706363678, 0.08899489045143127, -1.3505300283432007, 0.4820404648780823, 1.1137233972549438, 0.18474727869033813, 1.4113177061080933, -0.5414077043533325, 0.04086719825863838, 0.40847307443618774, -0.4637521207332611, -0.47142019867897034, -0.5571766495704651, 0.7197021842002869, 0.09812796860933304, -0.8038838505744934, 0.07541351020336151, -0.1358157992362976, -0.22577783465385437, 0.15537028014659882, -1.532354474067688, -0.12375890463590622, -0.36859220266342163, -0.6212438941001892, -1.1707119941711426, -0.06302344799041748, 1.4827824831008911, -0.6915289759635925, -0.31909865140914917, 0.5663942098617554, 0.4848678410053253, 0.515531599521637, 0.6524742245674133, -0.6161097288131714, -0.4169909358024597, -0.20633262395858765, -0.39202162623405457, 0.3028983473777771, 1.4310104846954346, -0.13721756637096405, -0.9309293627738953, 0.7099937796592712, -0.4448416829109192, 0.0008454779163002968, 1.886110782623291, 0.11235256493091583, -0.8389832973480225, 0.2667999863624573, -0.7071993350982666, 1.9380719661712646, 1.783308744430542, 1.3102964162826538, -0.039770279079675674, -1.0281972885131836, 0.5887480974197388, -0.3013668954372406, -0.40512391924858093, 0.9967878460884094, 0.41407638788223267, -0.18322795629501343, -1.390708088874817, 0.5850389003753662, 1.2968316078186035, -0.8333514332771301, -0.8211833834648132, 0.08483347296714783, -0.8511936664581299, 1.0339018106460571, 0.6068613529205322, 0.36189407110214233, 0.204511359333992, 1.6004948616027832, 0.778447151184082, -0.4810810089111328, 0.4911450445652008, 0.49630990624427795, -0.17605531215667725, -2.1123979091644287, -1.1774256229400635, 0.3722185492515564, -0.4736974835395813, -1.6029224395751953, 1.4029359817504883, -1.166648268699646, -0.9693068265914917, 0.4758753478527069, 0.08449309319257736, 1.4268667697906494, 0.3461201786994934, 1.5597100257873535, 2.139003038406372, 0.8962512612342834, 0.34373053908348083, 1.3670059442520142, -0.15223659574985504, -0.4677642583847046, 1.867921233177185, -0.4262911379337311, 0.3869883120059967, 1.1243433952331543, -0.37412017583847046, -1.0587668418884277, -0.7205760478973389, -1.2013484239578247, -0.6299874782562256, 1.1488028764724731, -0.0006629042327404022, -1.135980486869812, 0.2565052807331085, 1.5315461158752441, 0.08009718358516693, -0.3565122187137604, 0.6095222234725952, 0.4485577642917633, -0.7304729223251343, -0.041597217321395874, -0.9465168118476868, 0.5851990580558777, -0.26688462495803833, -0.3535441756248474, 0.40645480155944824, 0.45025405287742615, 1.2754478454589844, -0.003951406572014093, 0.10646701604127884, 1.1611030101776123, -1.4402674436569214, 1.4482024908065796, -0.6690297722816467, 0.1740037351846695, -2.452319622039795, 1.4303101301193237, -0.6400564312934875, 1.937609314918518, -2.614356279373169, 0.4119700491428375, -0.6182700991630554, -0.4275759756565094, 0.46408936381340027, -0.2924465835094452, 0.18174324929714203, -0.14120419323444366, -1.163452386856079, -0.06991860270500183, -0.6740345358848572, 0.5943835973739624, 1.1215760707855225, 1.3508100509643555, -1.080628752708435, -0.2934463322162628, -1.729344367980957, -0.10843110084533691, -0.6245506405830383, 0.2694990038871765, -1.9751393795013428, -0.21862290799617767, -1.930131196975708, -2.3624024391174316, -1.3864545822143555, -0.7668318152427673, 1.0332419872283936, 0.16740548610687256, -0.9588205218315125, 1.1831510066986084, -0.42838695645332336, -1.8624986410140991, 1.0696594715118408, -2.178696870803833 ]
https://github.com/huggingface/datasets/issues/5450
to_tf_dataset with a TF collator causes bizarrely persistent slowdown
If "mp" is multiprocessing, this might suggest some kind of negative interaction between the JPEG decoder and TF's handling of processes/threads. Note that we haven't merged the parallel `to_tf_dataset` PR yet, so it's not caused by that PR!
### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main`
332
38
to_tf_dataset with a TF collator causes bizarrely persistent slowdown ### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main` If "mp" is multiprocessing, this might suggest some kind of negative interaction between the JPEG decoder and TF's handling of processes/threads. Note that we haven't merged the parallel `to_tf_dataset` PR yet, so it's not caused by that PR!
[ -1.1403965950012207, -0.9472631216049194, -0.7174069881439209, 1.387075424194336, -0.2061592936515808, -1.2699196338653564, 0.17962321639060974, -1.1113897562026978, 1.7824658155441284, -0.8306373357772827, 0.23737767338752747, -1.7016518115997314, 0.050736263394355774, -0.6071605086326599, -0.794925332069397, -0.8615971803665161, -0.4212084114551544, -0.8068493604660034, 1.0243946313858032, 2.5087060928344727, 1.187321662902832, -1.391552448272705, 2.6928300857543945, 0.6513766050338745, -0.19246812164783478, -0.97575843334198, 0.4626453220844269, -0.023650921881198883, -1.3350082635879517, -0.5258991718292236, -0.8742751479148865, -0.09663353860378265, -0.5485742092132568, -0.5816144347190857, -0.02664557844400406, 0.35838553309440613, -0.2902800738811493, -0.3961721956729889, -0.4991227686405182, -0.8013468384742737, 0.40126702189445496, -0.35425660014152527, 0.9785904288291931, -0.3184637129306793, 1.9776411056518555, -0.5017974972724915, 0.4058898687362671, 0.7205950617790222, 1.3496572971343994, 0.2020154446363449, -0.02457587420940399, 0.23753933608531952, 0.355876088142395, -0.0758904367685318, 0.41407132148742676, 1.1657915115356445, 0.7132105231285095, 0.5145300030708313, 0.7140809893608093, -2.1944496631622314, 1.3233681917190552, -1.068364143371582, 0.35142257809638977, 1.367676854133606, -0.9337009787559509, 0.3501232862472534, -1.7408134937286377, -0.034783415496349335, 0.5590181350708008, -2.2438912391662598, 0.21443095803260803, -1.2207320928573608, -0.4976500868797302, 0.986616849899292, 0.26632949709892273, -1.1884900331497192, 0.2552501857280731, -0.4415722191333771, 1.046857237815857, 0.4383986294269562, 1.1715935468673706, -1.7704325914382935, -0.12003028392791748, -0.27456825971603394, 0.16068503260612488, -1.314250111579895, -1.6052511930465698, 0.5549673438072205, 0.7043367624282837, 0.4978354275226593, -0.12765687704086304, 1.0699290037155151, -0.9971476197242737, 0.739750325679779, -0.9635716676712036, -1.6156402826309204, -1.403211236000061, -2.21329402923584, -2.2678475379943848, 0.7463171482086182, -0.49048152565956116, -0.5617589354515076, 2.072092294692993, -1.0124812126159668, -1.7310211658477783, 1.119033694267273, 0.28988757729530334, -0.03039739280939102, 2.346660852432251, 0.188021719455719, -0.6316105723381042, 0.3683045506477356, -0.694628119468689, 0.7455352544784546, -0.47927793860435486, 1.372511625289917, 0.3751419484615326, -1.1380324363708496, 1.5198708772659302, -0.4316347539424896, 0.60305255651474, -0.7638372182846069, -0.5024811029434204, -0.7472440004348755, 0.34321650862693787, 1.8632891178131104, -0.38014018535614014, 1.6135482788085938, -0.4076562225818634, -1.5633533000946045, -1.616286039352417, 0.9382332563400269, 0.4991598427295685, -0.7612757086753845, 0.05827376991510391, -0.374451607465744, 0.05144195631146431, -0.08218802511692047, 1.0655796527862549, 1.1915912628173828, 0.6535018086433411, -0.3032027781009674, -0.8064479827880859, 0.2591213881969452, -0.17151635885238647, -0.7466143369674683, -1.7874517440795898, -0.37030279636383057, 0.1445477455854416, 0.6023600101470947, -1.2089602947235107, 1.7161024808883667, 0.8622502684593201, 1.8994073867797852, 1.0222920179367065, -0.32216504216194153, 1.4754674434661865, 0.1517116278409958, 1.8043956756591797, -0.5265216827392578, 0.7620667815208435, -0.3670422434806824, -1.0993716716766357, 0.8572034239768982, -0.32366737723350525, -1.9938546419143677, -0.6257043480873108, -0.8377286195755005, -0.17838060855865479, -0.7493799328804016, 0.8883823156356812, -0.24173440039157867, -1.3465019464492798, 0.23871012032032013, -0.6261636018753052, 0.13200408220291138, -1.2166333198547363, 0.38840702176094055, 0.8034062385559082, -0.6697325706481934, 0.14039631187915802, -0.20740318298339844, -1.3164267539978027, -0.4084957540035248, 0.2811867296695709, 1.9103844165802002, -0.8466342091560364, 0.8737254738807678, 1.0176502466201782, -0.6731199622154236, 0.002429541200399399, 0.4281613230705261, -0.33007484674453735, 0.8212817311286926, -1.0761384963989258, -0.39335325360298157, 1.1104875802993774, -0.18015030026435852, -0.571707546710968, 1.4115592241287231, 0.6987806558609009, -0.9840337038040161, -0.10340920835733414, -0.12058357149362564, -0.9058524966239929, 0.03143572062253952, -1.599764347076416, -0.1194910779595375, 0.271363765001297, -1.5360543727874756, -0.5493272542953491, -0.2760792374610901, 1.3120654821395874, -0.1587141454219818, 1.408473014831543, -0.37873199582099915, -0.26899874210357666, -0.3971233665943146, -0.36143115162849426, 0.13066036999225616, -0.2584537863731384, -0.6468958854675293, 0.24130259454250336, -0.7508088946342468, 0.327377587556839, 1.4406611919403076, 0.32508838176727295, -0.017402317374944687, 0.5352104306221008, 1.093794345855713, 0.3344859182834625, -0.06932766735553741, -0.8937554359436035, -1.5156550407409668, 1.9750794172286987, -1.4252943992614746, 1.995710015296936, 0.8693939447402954, -0.007292656227946281, -1.734908103942871, -1.8878103494644165, 1.3999109268188477, 1.1918919086456299, 2.344749689102173, 0.5557125210762024, 0.4094246029853821, -0.839461088180542, -0.5807916522026062, 0.3901534080505371, -1.0190160274505615, -0.7326507568359375, 0.1255766898393631, 2.3760194778442383, 1.7691341638565063, -0.5092554092407227, -0.17052516341209412, -1.1294909715652466, 1.3519432544708252, -0.20219635963439941, 0.21068522334098816, 2.0153603553771973, -0.32085925340652466, -1.0968135595321655, 1.2820775508880615, -2.3076300621032715, 0.11658672243356705, 1.9475115537643433, 0.2506014108657837, -0.01428312063217163, -1.3954647779464722, -0.636641263961792, -0.2772497832775116, -0.349184513092041, -1.2633215188980103, 0.5265840291976929, -0.21551145613193512, -0.722529947757721, -1.5650136470794678, 0.19328919053077698, -1.1416022777557373, -1.5761839151382446, 0.2965450584888458, 1.8942698240280151, 1.9041950702667236, -0.7179655432701111, 1.5695151090621948, -0.28907743096351624, 0.18391428887844086, 1.2205479145050049, 1.2212659120559692, 3.206953763961792, 1.978225827217102, -1.2809734344482422, 0.5519245862960815, -0.11064567416906357, -0.5058844089508057, 1.1194623708724976, -1.1226354837417603, 1.2697060108184814, -0.15367256104946136, -1.2203178405761719, -1.2983561754226685, 0.9728118777275085, 0.5079201459884644, 0.09552713483572006, -0.46781155467033386, 1.1903221607208252, 0.05497153103351593, 1.3209013938903809, 0.5252178311347961, -0.351873517036438, 0.681474506855011, -0.4481567144393921, -0.5266896486282349, 1.5486313104629517, 0.28781595826148987, -1.376206398010254, -2.3072264194488525, -0.21445289254188538, -0.7933955788612366, 0.09689778089523315, -0.6161134243011475, -0.9353046417236328, 1.6529334783554077, 0.44169881939888, -1.2346798181533813, -0.2744303047657013, -0.34671053290367126, -0.6302922368049622, 2.610715627670288, -1.3926430940628052, -0.26739510893821716, -1.0133819580078125, -0.6465816497802734, 1.6387321949005127, -1.2448652982711792, -0.29131677746772766, -1.012800693511963, -0.5611315965652466, -1.221386194229126, -0.5419838428497314, -0.02087036892771721, -0.8440106511116028, 0.8774428367614746, 0.22825679183006287, -1.185219645500183, -0.36422279477119446, -0.9236387610435486, 0.7953729629516602, -0.12417346984148026, 0.20150983333587646, 1.8706663846969604, 0.4577527940273285, -0.422306627035141, 0.6582431793212891, 1.1628354787826538, 0.6153368949890137, -0.6293931007385254, 0.21688324213027954, -0.7371435761451721, 0.23810353875160217, -1.2880231142044067, 0.3195115625858307, -2.8673794269561768, 0.6269476413726807, -0.02518109232187271, -0.035544492304325104, 0.057748451828956604, -1.2868963479995728, 1.0698226690292358, 2.610074996948242, -1.1312775611877441, 0.44235357642173767, 0.36122578382492065, 1.289241909980774, -1.6296733617782593, 0.3527892231941223, -0.36915040016174316, 2.0967514514923096, 0.1872979998588562, 1.2114869356155396, -0.49545377492904663, -2.2942817211151123, 0.4988323152065277, -1.2776206731796265, -1.2451622486114502, 0.7915758490562439, -0.8232502341270447, -0.04399906471371651, -1.4645860195159912, -0.21303905546665192, -0.8283796310424805, -1.2659542560577393, 0.7585214972496033, 0.0712583139538765, 0.48065558075904846, -0.626870334148407, 0.3091815114021301, -2.0753273963928223, -1.266332745552063, -0.2405468374490738, -0.9612632989883423, 0.39534908533096313, -0.35976970195770264, 0.7453234195709229, -0.2779143452644348, 0.03637617081403732, 0.35173243284225464, 1.4153873920440674, 3.365499258041382, 0.2410503476858139, 0.42365965247154236, -0.1798209249973297, -0.8978279232978821, 1.3972290754318237, 0.9635494947433472, -0.1150767058134079, -0.5041593313217163, -0.9986726641654968, 1.2248198986053467, 2.000612258911133, 1.0513010025024414, -0.008485968224704266, -0.8026455640792847, -0.7006064057350159, -0.050361886620521545, 0.1913718432188034, 0.3927255868911743, 0.9267755150794983, 0.07717561721801758, 0.09615659713745117, 1.4360237121582031, 1.238264560699463, -0.5099332332611084, 0.4164615273475647, -0.7850238680839539, -0.49376189708709717, 0.4654015004634857, 0.38609257340431213, -0.01050310768187046, 0.33900731801986694, -1.0185039043426514, -0.2902209460735321, -0.44993889331817627, -0.9266507029533386, -0.6913620233535767, -0.5071359872817993, -0.3124810755252838, 1.674865484237671, 0.09872649610042572, -0.5332930088043213, -0.05837196484208107, -0.7581217288970947, -0.04444919526576996, -0.9939637780189514, 0.28481531143188477, -0.0911770686507225, -0.14977480471134186, -0.03890005871653557, 1.7748260498046875, -0.9049211740493774, -2.0468790531158447, 0.23772427439689636, 0.22399382293224335, -0.3056499660015106, 0.2097584456205368, 1.5907385349273682, 0.5019881725311279, 1.51935613155365, 1.388630986213684, 1.027325987815857, -0.6885024905204773, -1.4225683212280273, 0.7144761681556702, 1.0126147270202637, -1.3942461013793945, 0.7573125958442688, 0.07284516841173172, -0.5341175198554993, 0.7166717052459717, 1.2743704319000244, 0.46837863326072693, -1.9984208345413208, 0.7618134617805481, -0.9467594027519226, 0.7021486759185791, 0.7089733481407166, 0.7360773086547852, 0.23093274235725403, 0.7756555080413818, -1.2545679807662964, -1.1976734399795532, -0.7639369964599609, -0.6415658593177795, 1.9922741651535034, -0.22088086605072021, 0.5643488764762878, -0.19096839427947998, -1.3808157444000244, -0.12087969481945038, 0.7130075693130493, 0.3908980190753937, -0.49024346470832825, 0.7236814498901367, -0.7089450359344482, -1.1253799200057983, -1.3849838972091675, -0.4137665629386902, -1.0531877279281616, -0.9405597448348999, 1.0396106243133545, 0.9492894411087036, 0.28110256791114807, 1.896933674812317, 0.6823610067367554, 0.2400311529636383, -2.5846188068389893, 0.9412331581115723, 0.39548513293266296, -0.13249002397060394, 0.892812967300415, 0.3539457321166992, 0.9562719464302063, 0.09994132071733475, 0.5402107238769531, -2.479687213897705, 2.355426788330078, -0.270188570022583, 0.7171566486358643, 0.026738308370113373, -0.20713093876838684, 1.2268041372299194, 0.49866870045661926, 0.5156567096710205, -1.0638865232467651, 0.7062849998474121, -0.5857300162315369, 1.1706421375274658, 0.9191442728042603, -0.8518304228782654, -0.04829663038253784, 1.3237881660461426, 0.5156534910202026, -0.5514112114906311, -0.8751710057258606, -1.1098500490188599, 0.8855007290840149, 1.7917561531066895, -0.048642221838235855, 0.06632494926452637, 0.8551831245422363, 0.6927571296691895, -1.2889559268951416, 0.1591782420873642, -0.8339572548866272, -0.8523159623146057, 1.5701797008514404, 2.0391745567321777, -0.12166860699653625, -0.129433736205101, -0.6807639598846436, -1.187505841255188, 0.7402795553207397, 0.011655648238956928, 0.1549060195684433, 0.6888474822044373, -0.63233482837677, 1.1582316160202026, 0.9777140617370605, 0.9495872259140015, 0.2679370045661926, 0.3106716573238373, 0.37973225116729736, -0.35590970516204834, -1.106529712677002, -0.22748789191246033, -1.0673915147781372, -2.4815125465393066, 0.49117258191108704, -0.19258680939674377, -1.4126917123794556, 0.023818787187337875, -1.0218546390533447, 0.910905122756958, -0.540047824382782, -1.0873947143554688, -1.639485478401184, 0.17301113903522491, -0.08886684477329254, 0.8826397061347961, -1.6193490028381348, -0.050174254924058914, 1.2079038619995117, 0.8810338377952576, -0.6209564805030823, 1.0121780633926392, 0.21068695187568665, 1.0596991777420044, 0.9450575709342957, -0.37536540627479553, 0.45311444997787476, 0.07422565668821335, -1.336800456047058, 0.4821089506149292, 1.1147922277450562, 0.19006726145744324, 1.4226897954940796, -0.5369369983673096, 0.04267141968011856, 0.41794246435165405, -0.45414119958877563, -0.4857781231403351, -0.557334303855896, 0.707951545715332, 0.09821565449237823, -0.8069927096366882, 0.07986187934875488, -0.13617949187755585, -0.21902026236057281, 0.16497090458869934, -1.5303324460983276, -0.13248610496520996, -0.3772922158241272, -0.6219712495803833, -1.1655619144439697, -0.06770836561918259, 1.476442813873291, -0.6885697245597839, -0.32325130701065063, 0.5697010159492493, 0.47414496541023254, 0.5027514100074768, 0.6384798288345337, -0.6144214868545532, -0.4201018810272217, -0.210782989859581, -0.3992319405078888, 0.31424233317375183, 1.4276275634765625, -0.14981231093406677, -0.9470694661140442, 0.7133200168609619, -0.4391719698905945, 0.0029341038316488266, 1.8852849006652832, 0.10691995173692703, -0.8445236086845398, 0.2682957053184509, -0.701718807220459, 1.9417331218719482, 1.7678663730621338, 1.3130066394805908, -0.038396116346120834, -1.0245699882507324, 0.589597761631012, -0.30340540409088135, -0.40936022996902466, 0.9898378252983093, 0.4155050218105316, -0.18476726114749908, -1.3916105031967163, 0.5953482985496521, 1.3050508499145508, -0.829799234867096, -0.8187304139137268, 0.0925060287117958, -0.8546649813652039, 1.0296014547348022, 0.5952475666999817, 0.35513678193092346, 0.1995704621076584, 1.6051881313323975, 0.7861745357513428, -0.48150864243507385, 0.4896780848503113, 0.49665364623069763, -0.17752495408058167, -2.1020431518554688, -1.1811809539794922, 0.3690478801727295, -0.4757612645626068, -1.6006518602371216, 1.423393964767456, -1.1614724397659302, -0.9768431782722473, 0.48207196593284607, 0.08045594394207001, 1.4249372482299805, 0.3565846383571625, 1.567197322845459, 2.1242945194244385, 0.8941659927368164, 0.3532011806964874, 1.3577375411987305, -0.1711740791797638, -0.47341153025627136, 1.8682467937469482, -0.4216459393501282, 0.37353312969207764, 1.1304192543029785, -0.36998286843299866, -1.049051284790039, -0.7315079569816589, -1.2123445272445679, -0.6288521885871887, 1.1487942934036255, -0.0013591768220067024, -1.1440770626068115, 0.2406689077615738, 1.5302331447601318, 0.07263050973415375, -0.3735664188861847, 0.6107206344604492, 0.4534798264503479, -0.7313702702522278, -0.0481414794921875, -0.9375791549682617, 0.5976245403289795, -0.27002641558647156, -0.3518076241016388, 0.3954733908176422, 0.4485042095184326, 1.274162769317627, -0.002701094839721918, 0.11856923252344131, 1.1506379842758179, -1.436851143836975, 1.460828423500061, -0.6662668585777283, 0.1720515489578247, -2.453542709350586, 1.4289286136627197, -0.6387689113616943, 1.9415233135223389, -2.6144564151763916, 0.40501704812049866, -0.6210957169532776, -0.4176834523677826, 0.45287594199180603, -0.2950647473335266, 0.17295505106449127, -0.14715425670146942, -1.167407512664795, -0.06640996038913727, -0.6738468408584595, 0.5856323838233948, 1.1206319332122803, 1.357899785041809, -1.0828336477279663, -0.28802788257598877, -1.7265818119049072, -0.10064228624105453, -0.6219365000724792, 0.2679232656955719, -1.9769951105117798, -0.2163233906030655, -1.9245350360870361, -2.3584046363830566, -1.3893733024597168, -0.7805637717247009, 1.0340863466262817, 0.1627502590417862, -0.9715143442153931, 1.1945596933364868, -0.42962050437927246, -1.854844093322754, 1.0841050148010254, -2.1672675609588623 ]
https://github.com/huggingface/datasets/issues/5450
to_tf_dataset with a TF collator causes bizarrely persistent slowdown
Update: MP isn't multiprocessing at all, it's an internal PIL method for loading metadata from JPEG files. No idea why that would be a bottleneck, but I'll see if a Python profiler can't figure out where the time is actually being spent.
### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main`
332
42
to_tf_dataset with a TF collator causes bizarrely persistent slowdown ### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main` Update: MP isn't multiprocessing at all, it's an internal PIL method for loading metadata from JPEG files. No idea why that would be a bottleneck, but I'll see if a Python profiler can't figure out where the time is actually being spent.
[ -1.141693353652954, -0.9571100473403931, -0.7233511209487915, 1.385690450668335, -0.20012611150741577, -1.2680176496505737, 0.1750892698764801, -1.1131263971328735, 1.7796988487243652, -0.8293800950050354, 0.22731220722198486, -1.697354793548584, 0.05005267634987831, -0.6047587394714355, -0.7989049553871155, -0.8510997295379639, -0.42671969532966614, -0.8087770342826843, 1.0322173833847046, 2.4928171634674072, 1.184167504310608, -1.3972156047821045, 2.695005416870117, 0.6604600548744202, -0.1976076066493988, -0.9798188805580139, 0.46010300517082214, -0.027989234775304794, -1.3400481939315796, -0.525133490562439, -0.8741869926452637, -0.09098199009895325, -0.5552586913108826, -0.5792720913887024, -0.02011844888329506, 0.3583349585533142, -0.28371062874794006, -0.39175769686698914, -0.49374455213546753, -0.7962294220924377, 0.404249370098114, -0.3590647876262665, 0.9809216856956482, -0.3071401119232178, 1.9723399877548218, -0.4911445677280426, 0.4069403111934662, 0.7203741669654846, 1.3545160293579102, 0.19645094871520996, -0.027233736589550972, 0.24460461735725403, 0.34961313009262085, -0.07060426473617554, 0.4110982418060303, 1.1644532680511475, 0.7071053385734558, 0.5101612210273743, 0.7095971703529358, -2.198748826980591, 1.3254530429840088, -1.0601437091827393, 0.3591894209384918, 1.363234043121338, -0.9336349368095398, 0.3542710542678833, -1.742385983467102, -0.02858685702085495, 0.564918041229248, -2.243687868118286, 0.2104138433933258, -1.2136967182159424, -0.4986364543437958, 0.9909446835517883, 0.2695094048976898, -1.190516710281372, 0.25927966833114624, -0.44024714827537537, 1.0488364696502686, 0.4338642954826355, 1.1679136753082275, -1.771899938583374, -0.11651026457548141, -0.2632487118244171, 0.16097792983055115, -1.3168299198150635, -1.6068052053451538, 0.5545423626899719, 0.7080559134483337, 0.5057370662689209, -0.13127990067005157, 1.0709835290908813, -0.9933953881263733, 0.7415868043899536, -0.9636661410331726, -1.6132457256317139, -1.393815279006958, -2.209911584854126, -2.272623300552368, 0.7479053139686584, -0.4890270531177521, -0.55275958776474, 2.070113182067871, -1.0030014514923096, -1.7449896335601807, 1.1138055324554443, 0.29379764199256897, -0.025426363572478294, 2.3341026306152344, 0.1878792643547058, -0.6250737905502319, 0.376791387796402, -0.6977721452713013, 0.7558013796806335, -0.48389607667922974, 1.3789654970169067, 0.37541475892066956, -1.1334574222564697, 1.5127637386322021, -0.43019014596939087, 0.5982247591018677, -0.7705056071281433, -0.5088856220245361, -0.7571198344230652, 0.34269922971725464, 1.8785145282745361, -0.3775586783885956, 1.6170047521591187, -0.4013470411300659, -1.5656942129135132, -1.6086816787719727, 0.9284437894821167, 0.5087597370147705, -0.7705167531967163, 0.05774722993373871, -0.38169965147972107, 0.054683759808540344, -0.09162139892578125, 1.063455581665039, 1.1859486103057861, 0.6572261452674866, -0.2938883304595947, -0.8128249645233154, 0.26590216159820557, -0.17737114429473877, -0.738453209400177, -1.797096610069275, -0.36933889985084534, 0.14286062121391296, 0.6019556522369385, -1.2264832258224487, 1.7045068740844727, 0.8594539761543274, 1.9101017713546753, 1.0255954265594482, -0.326344758272171, 1.4717679023742676, 0.15965870022773743, 1.8094719648361206, -0.5305213332176208, 0.7595435976982117, -0.3676774501800537, -1.0920894145965576, 0.8629027605056763, -0.3252883851528168, -1.9884742498397827, -0.6219355463981628, -0.8437574505805969, -0.18943122029304504, -0.7473929524421692, 0.8812717199325562, -0.24702411890029907, -1.3531726598739624, 0.23399901390075684, -0.6264767646789551, 0.14405664801597595, -1.2057281732559204, 0.3846268951892853, 0.809287428855896, -0.6713370084762573, 0.14040586352348328, -0.21296349167823792, -1.3124769926071167, -0.40887925028800964, 0.29163217544555664, 1.9165760278701782, -0.8472235798835754, 0.8799368739128113, 1.0153363943099976, -0.6657181978225708, 0.006632274016737938, 0.42177316546440125, -0.3248973488807678, 0.8164007663726807, -1.0910537242889404, -0.4010836184024811, 1.1054586172103882, -0.17818081378936768, -0.5713993906974792, 1.4113236665725708, 0.6992130279541016, -0.9924240112304688, -0.11032729595899582, -0.12047629058361053, -0.898574709892273, 0.029141854494810104, -1.6072174310684204, -0.11860092729330063, 0.27289074659347534, -1.54984712600708, -0.5583072304725647, -0.281679630279541, 1.3015055656433105, -0.16391900181770325, 1.4085222482681274, -0.38235437870025635, -0.2636144459247589, -0.3961619436740875, -0.3692208230495453, 0.1360325813293457, -0.26013821363449097, -0.6440815925598145, 0.23720231652259827, -0.7534103989601135, 0.33556637167930603, 1.4418524503707886, 0.3260226249694824, -0.0218358114361763, 0.5343517661094666, 1.0961120128631592, 0.34071823954582214, -0.06399326026439667, -0.8919090032577515, -1.5217474699020386, 1.9797039031982422, -1.427756905555725, 1.9884659051895142, 0.862705409526825, -0.0018753567710518837, -1.728617787361145, -1.8755654096603394, 1.3896442651748657, 1.188543438911438, 2.3352792263031006, 0.5700232982635498, 0.4119813144207001, -0.8411505222320557, -0.5810061693191528, 0.39770933985710144, -1.0150575637817383, -0.7355371713638306, 0.12579607963562012, 2.3741934299468994, 1.771170735359192, -0.5073431730270386, -0.18017837405204773, -1.1132631301879883, 1.3546544313430786, -0.20148921012878418, 0.22292715311050415, 2.015636920928955, -0.3061120808124542, -1.0974928140640259, 1.2835452556610107, -2.309141159057617, 0.1270700991153717, 1.9508026838302612, 0.2568274438381195, -0.010056872852146626, -1.3979418277740479, -0.6444639563560486, -0.2714763283729553, -0.3483884036540985, -1.2706815004348755, 0.5259968638420105, -0.2139374315738678, -0.7243499159812927, -1.5645015239715576, 0.20052692294120789, -1.1392509937286377, -1.5810452699661255, 0.2884613275527954, 1.9009532928466797, 1.9090690612792969, -0.7149221301078796, 1.5614569187164307, -0.2971125543117523, 0.1935083270072937, 1.2293230295181274, 1.2197691202163696, 3.205549716949463, 1.9836251735687256, -1.2768728733062744, 0.5564088225364685, -0.11097955703735352, -0.5033716559410095, 1.129950761795044, -1.122369647026062, 1.2608158588409424, -0.15450379252433777, -1.2240368127822876, -1.2973196506500244, 0.9710432291030884, 0.507648766040802, 0.09278592467308044, -0.46755868196487427, 1.1990691423416138, 0.04274499788880348, 1.3164968490600586, 0.5188704133033752, -0.3596678376197815, 0.6713152527809143, -0.4460924565792084, -0.5388160347938538, 1.5492289066314697, 0.27979639172554016, -1.3691766262054443, -2.3000738620758057, -0.21656590700149536, -0.792182981967926, 0.09351922571659088, -0.6192539930343628, -0.9414701461791992, 1.6404825448989868, 0.44391754269599915, -1.2311124801635742, -0.2688490152359009, -0.3369288444519043, -0.6183969378471375, 2.6067581176757812, -1.3950624465942383, -0.27303260564804077, -1.0007840394973755, -0.6391978859901428, 1.6467061042785645, -1.246489405632019, -0.3044039309024811, -1.014160394668579, -0.5612330436706543, -1.2164688110351562, -0.5479289293289185, -0.02760029025375843, -0.835210919380188, 0.8704962134361267, 0.23112431168556213, -1.1769994497299194, -0.35286641120910645, -0.9269999861717224, 0.8053441643714905, -0.11403243243694305, 0.20127224922180176, 1.8758165836334229, 0.45471280813217163, -0.4231354296207428, 0.6631130576133728, 1.1567144393920898, 0.6253055334091187, -0.6325048804283142, 0.20443454384803772, -0.7307243943214417, 0.24343007802963257, -1.2856510877609253, 0.31558406352996826, -2.8779594898223877, 0.6309743523597717, -0.021042397245764732, -0.03776334226131439, 0.051287148147821426, -1.2884162664413452, 1.0647262334823608, 2.6181271076202393, -1.1376465559005737, 0.445769339799881, 0.3703884780406952, 1.2902525663375854, -1.63099205493927, 0.3471728563308716, -0.36381128430366516, 2.0984530448913574, 0.18542036414146423, 1.2242109775543213, -0.4867796301841736, -2.312101125717163, 0.5074809193611145, -1.2767411470413208, -1.246731162071228, 0.7959734201431274, -0.8258239030838013, -0.04318874329328537, -1.4680927991867065, -0.21834146976470947, -0.8316430449485779, -1.2730096578598022, 0.7564908266067505, 0.06690250337123871, 0.477806031703949, -0.6339102983474731, 0.3186502158641815, -2.073803186416626, -1.264480710029602, -0.23540180921554565, -0.9610137343406677, 0.3989543616771698, -0.36858123540878296, 0.7377724051475525, -0.27191922068595886, 0.03824261948466301, 0.3496507406234741, 1.4047223329544067, 3.3606674671173096, 0.24027341604232788, 0.4249017834663391, -0.17942708730697632, -0.8882818818092346, 1.3838510513305664, 0.9782626628875732, -0.12243613600730896, -0.5017126202583313, -0.9968661069869995, 1.2279245853424072, 2.009765625, 1.0523219108581543, -0.003825979772955179, -0.793379008769989, -0.7031024098396301, -0.04488871619105339, 0.18284523487091064, 0.39131084084510803, 0.924788773059845, 0.08627326786518097, 0.10015209764242172, 1.4379795789718628, 1.230525255203247, -0.5028645396232605, 0.41411688923835754, -0.7843019366264343, -0.4967670738697052, 0.46060800552368164, 0.3902648985385895, -0.020010538399219513, 0.33639320731163025, -1.0076549053192139, -0.2825402319431305, -0.45294228196144104, -0.9231892228126526, -0.6892087459564209, -0.4978250563144684, -0.31733250617980957, 1.674180269241333, 0.10392903536558151, -0.5364052653312683, -0.05700021609663963, -0.7541695833206177, -0.0403776541352272, -1.0008528232574463, 0.2809904217720032, -0.09921164810657501, -0.14587652683258057, -0.03863140568137169, 1.766573429107666, -0.9036873579025269, -2.037367820739746, 0.22066718339920044, 0.22338679432868958, -0.317195862531662, 0.2077954113483429, 1.6029350757598877, 0.4978921711444855, 1.5155264139175415, 1.3921372890472412, 1.033064365386963, -0.6891720294952393, -1.4158613681793213, 0.7144191861152649, 1.0115758180618286, -1.395645260810852, 0.7536355257034302, 0.07856696844100952, -0.5321757197380066, 0.7187216281890869, 1.288713812828064, 0.47055870294570923, -2.0092759132385254, 0.7622263431549072, -0.9533292055130005, 0.7046594619750977, 0.7189583778381348, 0.7340648770332336, 0.22890621423721313, 0.7796106934547424, -1.2529500722885132, -1.1889317035675049, -0.7650836110115051, -0.6424093842506409, 1.9876726865768433, -0.2243090271949768, 0.5523121953010559, -0.18632087111473083, -1.3850048780441284, -0.13494375348091125, 0.7065841555595398, 0.38651594519615173, -0.489253431558609, 0.7257047891616821, -0.7126085162162781, -1.1339843273162842, -1.378019094467163, -0.4247409701347351, -1.051336646080017, -0.9520496129989624, 1.0322835445404053, 0.9523530006408691, 0.2878211438655853, 1.8998701572418213, 0.6902454495429993, 0.23070144653320312, -2.5822901725769043, 0.9387785792350769, 0.3937933146953583, -0.13074737787246704, 0.8905423283576965, 0.3482353389263153, 0.9643239378929138, 0.09434749186038971, 0.539490282535553, -2.4683120250701904, 2.350633144378662, -0.2784207761287689, 0.7170695066452026, 0.027504630386829376, -0.20803609490394592, 1.2311742305755615, 0.4984879195690155, 0.5195714235305786, -1.071399211883545, 0.7079470157623291, -0.5985512733459473, 1.1713064908981323, 0.9265151023864746, -0.8574234843254089, -0.05122392252087593, 1.322337031364441, 0.5009557604789734, -0.5594859719276428, -0.8808174133300781, -1.114032506942749, 0.8898043036460876, 1.7850481271743774, -0.05536480247974396, 0.06481661647558212, 0.8579073548316956, 0.6943552494049072, -1.2918802499771118, 0.15883877873420715, -0.8419303894042969, -0.8513917326927185, 1.5693222284317017, 2.029994249343872, -0.1266457736492157, -0.12351049482822418, -0.6840789914131165, -1.1897889375686646, 0.733660101890564, 0.0172333512455225, 0.1422457993030548, 0.6836599111557007, -0.6301133632659912, 1.1627990007400513, 0.975399911403656, 0.9479333758354187, 0.25190863013267517, 0.3138663172721863, 0.3734264373779297, -0.3584093153476715, -1.1104201078414917, -0.2349805235862732, -1.0629680156707764, -2.47570538520813, 0.48141416907310486, -0.19195184111595154, -1.4147295951843262, 0.02406904473900795, -1.026588797569275, 0.9188618063926697, -0.5408193469047546, -1.0885978937149048, -1.6390016078948975, 0.18216606974601746, -0.0982266440987587, 0.8841694593429565, -1.6122075319290161, -0.03836818039417267, 1.210484266281128, 0.8778693079948425, -0.6199070811271667, 1.0253843069076538, 0.21823716163635254, 1.0577692985534668, 0.939035177230835, -0.3794323801994324, 0.4585607945919037, 0.08630485087633133, -1.3330986499786377, 0.49785593152046204, 1.1096371412277222, 0.18204858899116516, 1.418491244316101, -0.5417025685310364, 0.03930984064936638, 0.4163432717323303, -0.4636515974998474, -0.4716927707195282, -0.5606194138526917, 0.7161465287208557, 0.09478151798248291, -0.8008862733840942, 0.08122167736291885, -0.13665807247161865, -0.22076454758644104, 0.16157585382461548, -1.539078712463379, -0.13341546058654785, -0.3617286682128906, -0.6167715787887573, -1.1684074401855469, -0.06496427953243256, 1.4718754291534424, -0.6792280673980713, -0.3324097692966461, 0.5738472938537598, 0.4766698479652405, 0.5053646564483643, 0.6468777060508728, -0.6198575496673584, -0.417659729719162, -0.212348073720932, -0.39189213514328003, 0.3086053729057312, 1.4253393411636353, -0.1421976089477539, -0.9504705667495728, 0.714184582233429, -0.43726661801338196, 0.00356136541813612, 1.8703862428665161, 0.10503796488046646, -0.8427227139472961, 0.261573851108551, -0.7043431401252747, 1.9376085996627808, 1.7795724868774414, 1.3099125623703003, -0.0371200330555439, -1.0279748439788818, 0.5886414051055908, -0.30478185415267944, -0.4100147485733032, 0.9917219281196594, 0.4205409288406372, -0.1863512098789215, -1.3875820636749268, 0.5918589234352112, 1.2938389778137207, -0.8304556608200073, -0.829117476940155, 0.09226849675178528, -0.8484126925468445, 1.0411198139190674, 0.5954872369766235, 0.3592650592327118, 0.1975131332874298, 1.609647274017334, 0.7844132781028748, -0.48628368973731995, 0.4956490695476532, 0.4998343288898468, -0.17870888113975525, -2.1012187004089355, -1.1849138736724854, 0.37447407841682434, -0.4681258201599121, -1.610168218612671, 1.4254494905471802, -1.1535714864730835, -0.9630764126777649, 0.48389697074890137, 0.08112040162086487, 1.419717788696289, 0.34692123532295227, 1.5686709880828857, 2.127310037612915, 0.8835018277168274, 0.3523571491241455, 1.3594768047332764, -0.17564037442207336, -0.4814675748348236, 1.8686096668243408, -0.4271944761276245, 0.3867892920970917, 1.1293315887451172, -0.3744521141052246, -1.0443661212921143, -0.7309439182281494, -1.210156798362732, -0.6262603402137756, 1.1371359825134277, 0.0053291358053684235, -1.1482831239700317, 0.23955148458480835, 1.5252634286880493, 0.07876566797494888, -0.36300021409988403, 0.621353805065155, 0.4442307651042938, -0.7355877757072449, -0.052481841295957565, -0.9344819188117981, 0.5893547534942627, -0.2655286490917206, -0.34215909242630005, 0.3967994749546051, 0.445512980222702, 1.269379734992981, -0.0009383540600538254, 0.11260322481393814, 1.149475336074829, -1.4397656917572021, 1.4643410444259644, -0.6635748744010925, 0.1804097294807434, -2.4534027576446533, 1.4240509271621704, -0.63966304063797, 1.945075273513794, -2.6133651733398438, 0.4043731391429901, -0.6231077313423157, -0.4210869371891022, 0.4648016095161438, -0.2992246150970459, 0.18098679184913635, -0.13678473234176636, -1.1672248840332031, -0.057983528822660446, -0.6791374087333679, 0.5839359760284424, 1.1194263696670532, 1.352268934249878, -1.0876647233963013, -0.28518518805503845, -1.7328976392745972, -0.10177682340145111, -0.6175351738929749, 0.28680065274238586, -1.9728929996490479, -0.21563580632209778, -1.9226824045181274, -2.358490228652954, -1.394277572631836, -0.7752224802970886, 1.0255506038665771, 0.1545344591140747, -0.9703830480575562, 1.2014647722244263, -0.42320650815963745, -1.853338360786438, 1.078458309173584, -2.1700990200042725 ]
https://github.com/huggingface/datasets/issues/5450
to_tf_dataset with a TF collator causes bizarrely persistent slowdown
After further profiling, the slowdown is in the C methods for JPEG decoding that are included as part of PIL. Because Python profilers can't inspect inside that, I don't have any further information on which lines exactly are responsible for the slowdown or why. In the meantime, I'm going to suggest switching from `return_tensors="tf"` to `return_tensors="np"` in most of our `transformers` code - this generally works better for pre-processing. Two relevant PRs are [here](https://github.com/huggingface/transformers/pull/21266) and [here](https://github.com/huggingface/notebooks/pull/308).
### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main`
332
76
to_tf_dataset with a TF collator causes bizarrely persistent slowdown ### Describe the bug This will make more sense if you take a look at [a Colab notebook that reproduces this issue.](https://colab.research.google.com/drive/1rxyeciQFWJTI0WrZ5aojp4Ls1ut18fNH?usp=sharing) Briefly, there are several datasets that, when you iterate over them with `to_tf_dataset` **and** a data collator that returns `tf` tensors, become very slow. We haven't been able to figure this one out - it can be intermittent, and we have no idea what could possibly cause it. The weirdest thing is that **the slowdown affects other attempts to access the underlying dataset**. If you try to iterate over the `tf.data.Dataset`, then interrupt execution, and then try to iterate over the original dataset, the original dataset is now also very slow! This is true even if the dataset format is not set to `tf` - the iteration is slow even though it's not calling TF at all! There is a simple workaround for this - we can simply get our data collators to return `np` tensors. When we do this, the bug is never triggered and everything is fine. In general, `np` is preferred for this kind of preprocessing work anyway, when the preprocessing is not going to be compiled into a pure `tf.data` pipeline! However, the issue is fascinating, and the TF team were wondering if anyone in datasets (cc @lhoestq @mariosasko) might have an idea of what could cause this. ### Steps to reproduce the bug Run the attached Colab. ### Expected behavior The slowdown should go away, or at least not persist after we stop iterating over the `tf.data.Dataset` ### Environment info The issue occurs on multiple versions of Python and TF, both on local machines and on Colab. All testing was done using the latest versions of `transformers` and `datasets` from `main` After further profiling, the slowdown is in the C methods for JPEG decoding that are included as part of PIL. Because Python profilers can't inspect inside that, I don't have any further information on which lines exactly are responsible for the slowdown or why. In the meantime, I'm going to suggest switching from `return_tensors="tf"` to `return_tensors="np"` in most of our `transformers` code - this generally works better for pre-processing. Two relevant PRs are [here](https://github.com/huggingface/transformers/pull/21266) and [here](https://github.com/huggingface/notebooks/pull/308).
[ -1.1419216394424438, -0.9476639628410339, -0.7116085886955261, 1.3707692623138428, -0.20300760865211487, -1.2872434854507446, 0.18772634863853455, -1.1250361204147339, 1.7960673570632935, -0.837628960609436, 0.22950974106788635, -1.699198603630066, 0.06453695893287659, -0.5998414754867554, -0.8092319965362549, -0.8526846170425415, -0.4299822747707367, -0.8133133053779602, 1.019459843635559, 2.4848649501800537, 1.2010942697525024, -1.385142207145691, 2.701117515563965, 0.6531246900558472, -0.19526566565036774, -0.9738409519195557, 0.46127820014953613, -0.033501289784908295, -1.347708821296692, -0.5239364504814148, -0.8837928175926208, -0.0859961211681366, -0.5538391470909119, -0.587960958480835, -0.021725311875343323, 0.3495978116989136, -0.289906769990921, -0.39112910628318787, -0.48669686913490295, -0.8002210259437561, 0.39738231897354126, -0.3394789695739746, 0.9922017455101013, -0.31659406423568726, 1.9739618301391602, -0.4995706379413605, 0.4047175645828247, 0.7152762413024902, 1.3517730236053467, 0.19016927480697632, -0.025973256677389145, 0.23095379769802094, 0.34930646419525146, -0.060414690524339676, 0.41397249698638916, 1.1609914302825928, 0.7192790508270264, 0.5088962912559509, 0.7123616933822632, -2.1862003803253174, 1.328881025314331, -1.059516191482544, 0.3526358902454376, 1.375542163848877, -0.9289038777351379, 0.3492629826068878, -1.737877368927002, -0.027211401611566544, 0.5644595623016357, -2.246675968170166, 0.204101100564003, -1.2281806468963623, -0.5025288462638855, 0.9971869587898254, 0.2580748498439789, -1.1942098140716553, 0.2588666081428528, -0.4478777050971985, 1.0507806539535522, 0.45144450664520264, 1.1668145656585693, -1.768448829650879, -0.1135917529463768, -0.26207393407821655, 0.1593639850616455, -1.3195559978485107, -1.6070715188980103, 0.5622883439064026, 0.7102525234222412, 0.49099260568618774, -0.1287171095609665, 1.082211971282959, -0.9940760135650635, 0.747765064239502, -0.94203120470047, -1.6155872344970703, -1.387860894203186, -2.209949016571045, -2.2717907428741455, 0.7487756013870239, -0.49424847960472107, -0.5498350858688354, 2.077117919921875, -1.025285005569458, -1.748047947883606, 1.1097664833068848, 0.2747589349746704, -0.021706145256757736, 2.3299009799957275, 0.1879919022321701, -0.621613085269928, 0.36095982789993286, -0.6869402527809143, 0.7397554516792297, -0.475246399641037, 1.373914361000061, 0.3776473104953766, -1.14881432056427, 1.525178074836731, -0.4352048933506012, 0.5995012521743774, -0.7615494728088379, -0.4989957809448242, -0.7431800961494446, 0.33381977677345276, 1.884437084197998, -0.3923659920692444, 1.6158485412597656, -0.40479281544685364, -1.560989499092102, -1.6081751585006714, 0.929021418094635, 0.5030984282493591, -0.7726069688796997, 0.05686125159263611, -0.3688187599182129, 0.042095720767974854, -0.09151197224855423, 1.0668296813964844, 1.1898630857467651, 0.6742872595787048, -0.30157947540283203, -0.8063910007476807, 0.2572537958621979, -0.1731926053762436, -0.7490838170051575, -1.7878509759902954, -0.37616685032844543, 0.14083155989646912, 0.6120126843452454, -1.2171356678009033, 1.7079306840896606, 0.8543046116828918, 1.8959802389144897, 1.0241283178329468, -0.338525652885437, 1.4692360162734985, 0.14978237450122833, 1.801541805267334, -0.524677574634552, 0.7571038007736206, -0.37549883127212524, -1.1059753894805908, 0.8685250878334045, -0.31663551926612854, -1.9952983856201172, -0.6158406734466553, -0.8420949578285217, -0.18023167550563812, -0.7499569058418274, 0.8886170387268066, -0.24590148031711578, -1.3424843549728394, 0.24806766211986542, -0.6182125806808472, 0.13622936606407166, -1.2163634300231934, 0.38964852690696716, 0.8077950477600098, -0.674458384513855, 0.12624676525592804, -0.2212018519639969, -1.3137964010238647, -0.4132407605648041, 0.28002452850341797, 1.9049804210662842, -0.8508769869804382, 0.8792003393173218, 1.010149598121643, -0.6648111343383789, -0.0008119037374854088, 0.42484188079833984, -0.32563164830207825, 0.8300886154174805, -1.080289363861084, -0.38903605937957764, 1.0980089902877808, -0.17420229315757751, -0.565009593963623, 1.404137134552002, 0.6951793432235718, -0.9871349334716797, -0.10664649307727814, -0.11916778236627579, -0.9057267904281616, 0.03384453058242798, -1.6024601459503174, -0.11835751682519913, 0.2695586681365967, -1.5411494970321655, -0.5524488687515259, -0.2711336314678192, 1.3053754568099976, -0.15945562720298767, 1.4141132831573486, -0.36980921030044556, -0.26630231738090515, -0.4053521156311035, -0.3547402322292328, 0.13911846280097961, -0.25152891874313354, -0.6381291747093201, 0.2376188486814499, -0.7507801055908203, 0.330606609582901, 1.4355583190917969, 0.329955130815506, -0.02108856663107872, 0.5346663594245911, 1.0918530225753784, 0.33136656880378723, -0.07397092133760452, -0.8994989991188049, -1.5194836854934692, 1.986746907234192, -1.431631088256836, 1.988497018814087, 0.8548582792282104, -0.004674866329878569, -1.7447869777679443, -1.880938172340393, 1.3949228525161743, 1.188231348991394, 2.3270139694213867, 0.5636805295944214, 0.41580843925476074, -0.8318309783935547, -0.5794160962104797, 0.3971386253833771, -1.011383295059204, -0.7451935410499573, 0.11049062013626099, 2.3698720932006836, 1.7708379030227661, -0.5026116967201233, -0.18173469603061676, -1.1243600845336914, 1.3467085361480713, -0.19817674160003662, 0.21518807113170624, 2.0055603981018066, -0.33226311206817627, -1.0960702896118164, 1.2765198945999146, -2.3086676597595215, 0.1155335083603859, 1.9511895179748535, 0.2566274106502533, -0.009919807314872742, -1.3944993019104004, -0.6316264271736145, -0.2728576362133026, -0.34490591287612915, -1.2593175172805786, 0.5255077481269836, -0.2232416272163391, -0.7179800868034363, -1.569711685180664, 0.19454073905944824, -1.1450127363204956, -1.5856643915176392, 0.28485462069511414, 1.8973015546798706, 1.9013187885284424, -0.6995336413383484, 1.5669816732406616, -0.2933964729309082, 0.19756576418876648, 1.2307933568954468, 1.219365119934082, 3.206615924835205, 1.97683846950531, -1.283179521560669, 0.5515522956848145, -0.10835883021354675, -0.49873462319374084, 1.128664255142212, -1.1157805919647217, 1.2628591060638428, -0.15440577268600464, -1.2313016653060913, -1.2918108701705933, 0.9828501343727112, 0.5177032947540283, 0.09458892047405243, -0.46539416909217834, 1.1973299980163574, 0.04565396532416344, 1.3258426189422607, 0.5222006440162659, -0.36317574977874756, 0.6737582683563232, -0.4471387267112732, -0.5335439443588257, 1.5405116081237793, 0.2851985991001129, -1.3558346033096313, -2.3062593936920166, -0.21104371547698975, -0.7903435230255127, 0.09625883400440216, -0.6117503643035889, -0.9362843036651611, 1.648585319519043, 0.45919981598854065, -1.2407104969024658, -0.2773289382457733, -0.34582874178886414, -0.6256969571113586, 2.6012558937072754, -1.394370198249817, -0.26207470893859863, -1.0088003873825073, -0.6415821313858032, 1.6351590156555176, -1.2668126821517944, -0.2995326817035675, -1.0079494714736938, -0.5703855156898499, -1.2247202396392822, -0.5446165204048157, -0.026363007724285126, -0.8347681164741516, 0.8772409558296204, 0.2342004030942917, -1.1834205389022827, -0.3622584342956543, -0.9174728393554688, 0.797273576259613, -0.11973731219768524, 0.20725952088832855, 1.8730063438415527, 0.4706401824951172, -0.4200280010700226, 0.6560855507850647, 1.1543314456939697, 0.618187427520752, -0.6246772408485413, 0.20823563635349274, -0.7412651777267456, 0.250686913728714, -1.29676353931427, 0.3147047758102417, -2.8781704902648926, 0.6339637041091919, -0.0340779609978199, -0.034878913313150406, 0.05043238401412964, -1.2942497730255127, 1.052429437637329, 2.6173248291015625, -1.136676549911499, 0.43859171867370605, 0.3625780940055847, 1.2910161018371582, -1.6245393753051758, 0.3456146717071533, -0.3728908598423004, 2.097771644592285, 0.1842862069606781, 1.2176992893218994, -0.47831130027770996, -2.2898411750793457, 0.5020902156829834, -1.2712899446487427, -1.2569941282272339, 0.7947039604187012, -0.7993415594100952, -0.054062314331531525, -1.4613440036773682, -0.21351271867752075, -0.826285719871521, -1.2747119665145874, 0.7681627869606018, 0.05780940502882004, 0.48524412512779236, -0.6441271901130676, 0.31250935792922974, -2.058799982070923, -1.2575876712799072, -0.22518055140972137, -0.9486360549926758, 0.39207160472869873, -0.36428600549697876, 0.7391950488090515, -0.2684978246688843, 0.04342880845069885, 0.354028582572937, 1.4062918424606323, 3.372831106185913, 0.2301076054573059, 0.42448189854621887, -0.18856647610664368, -0.8964537382125854, 1.383638858795166, 0.9687565565109253, -0.12346649169921875, -0.5072625875473022, -1.0017083883285522, 1.219455599784851, 1.9951658248901367, 1.0341910123825073, 0.0169219970703125, -0.7958574295043945, -0.7110193967819214, -0.04528699070215225, 0.18765629827976227, 0.3921816349029541, 0.9318467974662781, 0.0822487398982048, 0.10237148404121399, 1.4345436096191406, 1.2323464155197144, -0.49651268124580383, 0.42477789521217346, -0.7785787582397461, -0.5092613697052002, 0.47003811597824097, 0.403520405292511, -0.01569613255560398, 0.3370785117149353, -1.0065431594848633, -0.28258687257766724, -0.46024492383003235, -0.9281530380249023, -0.6855709552764893, -0.5025238990783691, -0.3132842779159546, 1.6677441596984863, 0.10122735053300858, -0.5405260920524597, -0.06430467963218689, -0.757714033126831, -0.028193552047014236, -0.9937348365783691, 0.2926875948905945, -0.10205351561307907, -0.1510086953639984, -0.03243986517190933, 1.7684047222137451, -0.9021713733673096, -2.032166004180908, 0.23790401220321655, 0.2123437225818634, -0.3175669312477112, 0.21162907779216766, 1.5857950448989868, 0.5024949908256531, 1.5258833169937134, 1.390909194946289, 1.0282608270645142, -0.6802455186843872, -1.418334722518921, 0.7207441329956055, 1.006482720375061, -1.4176146984100342, 0.7480424046516418, 0.08528365194797516, -0.5417060852050781, 0.7231038212776184, 1.2725187540054321, 0.4613552391529083, -2.0109379291534424, 0.771307110786438, -0.9422541260719299, 0.6928945183753967, 0.7203246355056763, 0.7322721481323242, 0.23242312669754028, 0.7923401594161987, -1.252490520477295, -1.1944763660430908, -0.7607994675636292, -0.6447442770004272, 1.9882006645202637, -0.21874713897705078, 0.5503114461898804, -0.19187074899673462, -1.3828980922698975, -0.12468041479587555, 0.7060033082962036, 0.3938886821269989, -0.485579252243042, 0.7230539321899414, -0.7222169637680054, -1.1283180713653564, -1.3885654211044312, -0.4275655746459961, -1.0556470155715942, -0.9439781308174133, 1.0370973348617554, 0.9577018022537231, 0.2850446403026581, 1.8963837623596191, 0.6711593866348267, 0.226151704788208, -2.585129976272583, 0.9361868500709534, 0.39434024691581726, -0.12513907253742218, 0.9043729305267334, 0.3451721668243408, 0.9693338871002197, 0.0867631807923317, 0.5306949019432068, -2.47404408454895, 2.3608570098876953, -0.2682842016220093, 0.7141636610031128, 0.018313545733690262, -0.21447569131851196, 1.2457220554351807, 0.5069459676742554, 0.516956627368927, -1.07082998752594, 0.7161219716072083, -0.6051502227783203, 1.1712688207626343, 0.9275529384613037, -0.8646828532218933, -0.058387886732816696, 1.323003888130188, 0.5158534646034241, -0.5570551753044128, -0.8689541220664978, -1.1176414489746094, 0.873141348361969, 1.7966903448104858, -0.04741126671433449, 0.07223790884017944, 0.8444759249687195, 0.7130184173583984, -1.2997381687164307, 0.17010490596294403, -0.8537024259567261, -0.8563330173492432, 1.5580899715423584, 2.024291515350342, -0.1127215176820755, -0.11924556642770767, -0.6958523392677307, -1.1931649446487427, 0.7344534397125244, 0.01610647141933441, 0.14150789380073547, 0.6918746829032898, -0.6503891944885254, 1.1605250835418701, 0.9857529997825623, 0.9607735872268677, 0.25633788108825684, 0.32362544536590576, 0.37337610125541687, -0.35149598121643066, -1.103615403175354, -0.21755293011665344, -1.0586512088775635, -2.486050844192505, 0.49224334955215454, -0.1961180418729782, -1.4134128093719482, 0.0276823528110981, -1.011501431465149, 0.9073500037193298, -0.5350478291511536, -1.0941495895385742, -1.6363558769226074, 0.17321297526359558, -0.08800365030765533, 0.8915543556213379, -1.6098201274871826, -0.026681214570999146, 1.222296953201294, 0.8875136971473694, -0.612845778465271, 1.0212372541427612, 0.21964608132839203, 1.0534335374832153, 0.9414467215538025, -0.3668508231639862, 0.44684216380119324, 0.07563304156064987, -1.3353838920593262, 0.4893459975719452, 1.106859803199768, 0.19137178361415863, 1.4186846017837524, -0.5328130125999451, 0.04539446532726288, 0.41748639941215515, -0.44532832503318787, -0.4762877821922302, -0.5477519035339355, 0.7102522850036621, 0.1042739599943161, -0.7953748106956482, 0.08300359547138214, -0.1399347484111786, -0.22517669200897217, 0.1538696587085724, -1.5357588529586792, -0.1303519606590271, -0.38120037317276, -0.618242084980011, -1.1675567626953125, -0.06746289879083633, 1.4739820957183838, -0.6890382170677185, -0.33163681626319885, 0.5712398886680603, 0.4794226884841919, 0.5111136436462402, 0.6543611288070679, -0.6174347996711731, -0.42641735076904297, -0.21621249616146088, -0.40435677766799927, 0.2967640161514282, 1.4302034378051758, -0.14702971279621124, -0.9418167471885681, 0.7035630941390991, -0.4368314743041992, -0.014513179659843445, 1.8876662254333496, 0.10824576020240784, -0.8407805562019348, 0.2678872048854828, -0.7043288946151733, 1.937952995300293, 1.7783024311065674, 1.3026986122131348, -0.035789214074611664, -1.0257759094238281, 0.5775440335273743, -0.30335530638694763, -0.4025619626045227, 1.0134851932525635, 0.4147759675979614, -0.1785869151353836, -1.3906190395355225, 0.5849799513816833, 1.3015919923782349, -0.8349039554595947, -0.8122154474258423, 0.09338440746068954, -0.847007155418396, 1.0281684398651123, 0.6005436778068542, 0.3682614266872406, 0.20970682799816132, 1.5928338766098022, 0.7860134243965149, -0.4872376322746277, 0.4928605556488037, 0.4895232915878296, -0.1737956702709198, -2.09970760345459, -1.1755510568618774, 0.36691534519195557, -0.4740848243236542, -1.6039535999298096, 1.4234603643417358, -1.160115122795105, -0.9648751020431519, 0.4721541702747345, 0.09019368886947632, 1.4189420938491821, 0.34958115220069885, 1.5719343423843384, 2.126248836517334, 0.8993514776229858, 0.34246715903282166, 1.3589205741882324, -0.15751884877681732, -0.46465957164764404, 1.8589420318603516, -0.4298844039440155, 0.3770023584365845, 1.1336338520050049, -0.37929245829582214, -1.0484505891799927, -0.727736234664917, -1.2031577825546265, -0.6270611882209778, 1.1408321857452393, -0.003953399136662483, -1.1415905952453613, 0.24239353835582733, 1.523066520690918, 0.08110034465789795, -0.3519304692745209, 0.6112973690032959, 0.44857484102249146, -0.7259451746940613, -0.0494503527879715, -0.9312292337417603, 0.5906456708908081, -0.26600632071495056, -0.35175883769989014, 0.4069393575191498, 0.4396026134490967, 1.282044768333435, -0.002487362362444401, 0.11772144585847855, 1.1647902727127075, -1.4461967945098877, 1.4583834409713745, -0.6640228629112244, 0.17406919598579407, -2.4564950466156006, 1.4286274909973145, -0.6389941573143005, 1.9448777437210083, -2.6201868057250977, 0.4028708040714264, -0.6269015073776245, -0.4180797338485718, 0.45734864473342896, -0.29322296380996704, 0.1798945665359497, -0.1458428055047989, -1.1734668016433716, -0.07393652200698853, -0.6847586631774902, 0.5917733311653137, 1.1208913326263428, 1.3597453832626343, -1.0830249786376953, -0.2843046486377716, -1.7277295589447021, -0.10190625488758087, -0.6194086670875549, 0.27949661016464233, -1.9773415327072144, -0.21527107059955597, -1.9320101737976074, -2.3731298446655273, -1.3920283317565918, -0.7717316746711731, 1.0277471542358398, 0.15564094483852386, -0.9627207517623901, 1.187571406364441, -0.4209604263305664, -1.8609387874603271, 1.0745660066604614, -2.1816554069519043 ]
https://github.com/huggingface/datasets/issues/5444
info messages logged as warnings
Looks like a duplicate of https://github.com/huggingface/datasets/issues/1948. I also think these should be logged as INFO messages, but let's see what @lhoestq thinks.
### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
333
22
info messages logged as warnings ### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2 Looks like a duplicate of https://github.com/huggingface/datasets/issues/1948. I also think these should be logged as INFO messages, but let's see what @lhoestq thinks.
[ -1.2012889385223389, -0.9273018836975098, -0.7546572685241699, 1.4767590761184692, -0.167137011885643, -1.2878497838974, 0.1407080888748169, -1.0096759796142578, 1.6865419149398804, -0.8163502812385559, 0.3636291027069092, -1.626015067100525, -0.005010148044675589, -0.5913500189781189, -0.7359694242477417, -0.8393594622612, -0.4763229787349701, -0.7549105882644653, 1.082352876663208, 2.5757837295532227, 1.1699758768081665, -1.453309178352356, 2.6956167221069336, 0.6782533526420593, -0.11447015404701233, -1.046642780303955, 0.5519725680351257, 0.05265628919005394, -1.4341152906417847, -0.399532288312912, -0.897825300693512, -0.09901335835456848, -0.4769907593727112, -0.5648861527442932, 0.10665146261453629, 0.31473448872566223, -0.17777740955352783, -0.5322303771972656, -0.4582003057003021, -0.7384739518165588, 0.4498528242111206, -0.39075276255607605, 0.9171236753463745, -0.41471776366233826, 1.802977204322815, -0.5669176578521729, 0.4881451725959778, 0.7463510632514954, 1.3524320125579834, 0.25632402300834656, -0.04107554256916046, 0.3731524646282196, 0.5014839768409729, 0.03636859729886055, 0.5303213000297546, 1.099887728691101, 0.6239978671073914, 0.4182203710079193, 0.7129197716712952, -2.21389102935791, 1.3021116256713867, -0.9019672870635986, 0.3004688024520874, 1.3595467805862427, -1.0686115026474, 0.3339408338069916, -1.7594127655029297, -0.03853120654821396, 0.5089482069015503, -2.3217034339904785, 0.22890685498714447, -1.227563738822937, -0.56965172290802, 1.0146427154541016, 0.3629305362701416, -1.2639285326004028, 0.05351274833083153, -0.4705711901187897, 0.8529438972473145, 0.4773012697696686, 1.214468002319336, -1.6416081190109253, -0.09436984360218048, -0.30439865589141846, 0.11063329875469208, -1.2837797403335571, -1.4620763063430786, 0.4905904531478882, 0.7249702215194702, 0.5342051982879639, -0.13943684101104736, 0.886776864528656, -1.02811861038208, 0.8655554056167603, -0.9295514225959778, -1.7912815809249878, -1.4507091045379639, -2.3090500831604004, -2.371351957321167, 0.7942783832550049, -0.39214205741882324, -0.48143985867500305, 2.080139398574829, -1.0635634660720825, -1.8331189155578613, 1.135697364807129, 0.265048623085022, -0.020812978968024254, 2.3574254512786865, 0.28472891449928284, -0.7244299054145813, 0.4808754026889801, -0.7505325675010681, 0.6909897923469543, -0.5168622732162476, 1.2712092399597168, 0.42457979917526245, -1.0449225902557373, 1.5888619422912598, -0.3921055793762207, 0.5273767709732056, -0.6379114985466003, -0.41083675622940063, -0.7768540978431702, 0.2152882218360901, 1.953056812286377, -0.29933011531829834, 1.5274338722229004, -0.3220078647136688, -1.573319435119629, -1.6432490348815918, 0.7870090007781982, 0.4883069694042206, -0.7043154239654541, 0.1504308134317398, -0.2887902557849884, 0.11311694979667664, -0.047285985201597214, 1.0050597190856934, 1.3075294494628906, 0.7911999821662903, -0.3271254003047943, -0.947058379650116, 0.2879943251609802, -0.05794046074151993, -0.7358757257461548, -1.7611829042434692, -0.3327530324459076, 0.06957482546567917, 0.6605482697486877, -1.23096764087677, 1.7619074583053589, 0.900681734085083, 1.8948004245758057, 0.981126070022583, -0.3149358928203583, 1.5610809326171875, 0.07157284766435623, 1.9109992980957031, -0.460825115442276, 0.6882296800613403, -0.38211217522621155, -1.1811269521713257, 0.7759016752243042, -0.3748612701892853, -2.0894699096679688, -0.7215129733085632, -0.910693347454071, -0.18457210063934326, -0.7047535181045532, 1.0325655937194824, -0.18479318916797638, -1.3576364517211914, 0.2936069071292877, -0.780286967754364, 0.18903297185897827, -1.28472101688385, 0.36373209953308105, 0.7800340056419373, -0.6142706871032715, 0.12820833921432495, -0.29326626658439636, -1.2836363315582275, -0.42203181982040405, 0.24445928633213043, 1.8240147829055786, -0.8912920951843262, 0.9970665574073792, 0.9926237463951111, -0.729141354560852, 0.012187645770609379, 0.4155086576938629, -0.3558672070503235, 0.8938713669776917, -1.086540937423706, -0.37023448944091797, 1.1344574689865112, -0.2257286012172699, -0.5899361968040466, 1.468456506729126, 0.7787380218505859, -0.9454094767570496, -0.18219152092933655, -0.12827393412590027, -0.7768867015838623, 0.006188493221998215, -1.6263484954833984, -0.09849018603563309, 0.29887086153030396, -1.5678468942642212, -0.49914124608039856, -0.1960754543542862, 1.3556395769119263, -0.041710615158081055, 1.4906984567642212, -0.2891221046447754, -0.21941977739334106, -0.40994614362716675, -0.3449081778526306, 0.2200372815132141, -0.24154379963874817, -0.6084209084510803, 0.32935693860054016, -0.7204276919364929, 0.3245963454246521, 1.354132056236267, 0.3695661723613739, 0.0714392140507698, 0.6126204133033752, 1.020419716835022, 0.3805060386657715, -0.09366566687822342, -0.8882587552070618, -1.5775868892669678, 2.1689836978912354, -1.4219306707382202, 1.9916846752166748, 0.7409879565238953, -0.03488100692629814, -1.819287896156311, -1.9561091661453247, 1.349228858947754, 1.1268895864486694, 2.3024823665618896, 0.5609755516052246, 0.447968453168869, -0.8662554025650024, -0.6222925186157227, 0.2854902148246765, -0.9746083617210388, -0.7807506322860718, 0.08469647914171219, 2.41237473487854, 1.6770693063735962, -0.4507700204849243, -0.10260051488876343, -1.1054484844207764, 1.4428699016571045, -0.1035272404551506, 0.1726817935705185, 1.9749009609222412, -0.22235284745693207, -1.0547071695327759, 1.2802246809005737, -2.3094029426574707, 0.2519451677799225, 1.9872055053710938, 0.245918408036232, -0.024188805371522903, -1.4095287322998047, -0.6867632865905762, -0.27753880620002747, -0.3809787631034851, -1.169438362121582, 0.5865115523338318, -0.20643121004104614, -0.8366984128952026, -1.4017212390899658, 0.15389390289783478, -1.1358805894851685, -1.7242242097854614, 0.2772100269794464, 1.763599157333374, 1.9763743877410889, -0.7626089453697205, 1.5093718767166138, -0.2691892385482788, 0.16891327500343323, 1.301283836364746, 1.1713051795959473, 3.1833794116973877, 1.993055820465088, -1.2620675563812256, 0.7722625732421875, -0.12470116466283798, -0.32653534412384033, 1.1072170734405518, -1.2004752159118652, 1.2962193489074707, -0.15429991483688354, -1.2544420957565308, -1.1562217473983765, 0.9578036069869995, 0.5484203100204468, 0.03790736570954323, -0.44345366954803467, 1.279430627822876, 0.06225838512182236, 1.4041942358016968, 0.53687584400177, -0.28290095925331116, 0.6815222501754761, -0.39400923252105713, -0.4726369380950928, 1.6045998334884644, 0.22046037018299103, -1.4309823513031006, -2.27402400970459, -0.2528121769428253, -0.8672795295715332, -0.040343765169382095, -0.6004314422607422, -0.9423614144325256, 1.6120610237121582, 0.3936364948749542, -1.195017695426941, -0.3149131238460541, -0.2779037654399872, -0.6247680187225342, 2.697356700897217, -1.5507923364639282, -0.28476807475090027, -0.9705245494842529, -0.5494909882545471, 1.619646668434143, -1.256852388381958, -0.20988237857818604, -1.04302179813385, -0.5503882765769958, -1.2613877058029175, -0.622715950012207, -0.15331773459911346, -0.9429448843002319, 0.8089975714683533, 0.10397078096866608, -1.203984022140503, -0.32716673612594604, -0.8938765525817871, 0.8052428960800171, -0.025781966745853424, 0.2972995340824127, 1.8095159530639648, 0.4104936718940735, -0.3988819420337677, 0.6732751131057739, 1.1706182956695557, 0.6647205948829651, -0.648902177810669, 0.26181942224502563, -0.6595759391784668, 0.3564280569553375, -1.2432321310043335, 0.23607660830020905, -2.7995171546936035, 0.6014786958694458, -0.10002036392688751, -0.07686897367238998, -0.11936334520578384, -1.2481549978256226, 1.2022923231124878, 2.515843152999878, -1.192556619644165, 0.46662789583206177, 0.2612307667732239, 1.1148380041122437, -1.51643705368042, 0.27772071957588196, -0.3820880353450775, 2.142329454421997, 0.2149142324924469, 1.148537278175354, -0.47718027234077454, -2.2369933128356934, 0.6114199161529541, -1.2518521547317505, -1.0847444534301758, 0.7579174637794495, -0.7762203216552734, 0.020444851368665695, -1.3336385488510132, -0.14208295941352844, -0.7513594627380371, -1.2189686298370361, 0.6608257293701172, 0.10699824243783951, 0.5527766346931458, -0.6455872654914856, 0.390184611082077, -2.158576726913452, -1.345876693725586, -0.2584100663661957, -0.9547753930091858, 0.4529916048049927, -0.26996585726737976, 0.7437602877616882, -0.1789875030517578, -0.01033488754183054, 0.3749200999736786, 1.3711473941802979, 3.3900699615478516, 0.1273632049560547, 0.42501145601272583, -0.13542114198207855, -0.9375776648521423, 1.4623717069625854, 0.9237480163574219, -0.16616511344909668, -0.5688813328742981, -1.0685590505599976, 1.3377819061279297, 1.9907524585723877, 1.0539525747299194, 0.03467199578881264, -0.8123077750205994, -0.7837945818901062, 0.01635615900158882, 0.11982759833335876, 0.49410510063171387, 0.99058997631073, 0.05530376732349396, 0.06207774579524994, 1.4957383871078491, 1.281562328338623, -0.3883116543292999, 0.39435312151908875, -0.8169264793395996, -0.519360363483429, 0.5143143534660339, 0.4230334460735321, 0.023484162986278534, 0.3641911745071411, -1.1229768991470337, -0.17311491072177887, -0.3039252460002899, -0.9431453347206116, -0.783677875995636, -0.47430846095085144, -0.40751054883003235, 1.7382382154464722, 0.06850198656320572, -0.41828206181526184, -0.009135699830949306, -0.7379413843154907, 0.028506077826023102, -0.9625409841537476, 0.30873504281044006, -0.1162225604057312, -0.08849722892045975, -0.08819424360990524, 1.789829134941101, -0.9441903829574585, -2.120866298675537, 0.31548556685447693, 0.1441156268119812, -0.3478500545024872, 0.1266254037618637, 1.6001425981521606, 0.561631977558136, 1.424892783164978, 1.372474193572998, 0.9555568099021912, -0.7105410099029541, -1.3265482187271118, 0.663393497467041, 1.0252702236175537, -1.4569919109344482, 0.7907304167747498, -0.027485348284244537, -0.5219148397445679, 0.6242184638977051, 1.2851351499557495, 0.4032120108604431, -2.0266098976135254, 0.8067696690559387, -0.8847021460533142, 0.7204020619392395, 0.7108660340309143, 0.7695779800415039, 0.11626049876213074, 0.7530952095985413, -1.2966992855072021, -1.1036858558654785, -0.7575153112411499, -0.6588395833969116, 1.8684145212173462, -0.28142958879470825, 0.49627286195755005, -0.14968760311603546, -1.3590556383132935, -0.1804046630859375, 0.6459519863128662, 0.24251119792461395, -0.3711358308792114, 0.7552979588508606, -0.7135235667228699, -1.2112882137298584, -1.4101366996765137, -0.4924829304218292, -0.9928701519966125, -0.9012717008590698, 1.0874048471450806, 0.7947807908058167, 0.3601014316082001, 1.8740955591201782, 0.6038596034049988, 0.17657561600208282, -2.6871349811553955, 0.8944825530052185, 0.2529957890510559, -0.0011547058820724487, 0.9245794415473938, 0.1799151748418808, 1.0681389570236206, -0.037980496883392334, 0.5635793209075928, -2.429219961166382, 2.2917404174804688, -0.2545650899410248, 0.6812492609024048, 0.02582694962620735, -0.04909924045205116, 1.0126500129699707, 0.5844424962997437, 0.6292192935943604, -1.095729947090149, 0.6865055561065674, -0.6403110027313232, 1.293336272239685, 0.8760140538215637, -0.7887488007545471, -0.026403315365314484, 1.2436405420303345, 0.43074697256088257, -0.4917961061000824, -0.9588160514831543, -1.0066982507705688, 0.9104349613189697, 1.8753342628479004, -0.04473507031798363, 0.03949907794594765, 0.8629087209701538, 0.6531972289085388, -1.3683195114135742, -0.01959589496254921, -0.7761811017990112, -0.7314715385437012, 1.628856897354126, 2.0930986404418945, -0.08381583541631699, -0.2081023007631302, -0.7652133107185364, -1.3166015148162842, 0.7461938858032227, 0.0956323966383934, 0.10431047528982162, 0.7517607808113098, -0.6295524835586548, 1.1237775087356567, 0.8139772415161133, 0.9601796865463257, 0.20313802361488342, 0.22048567235469818, 0.20717836916446686, -0.24685975909233093, -1.2150561809539795, -0.281476229429245, -1.0523061752319336, -2.581888198852539, 0.476553350687027, -0.31169241666793823, -1.4960377216339111, 0.028242751955986023, -1.0821397304534912, 0.7814002633094788, -0.5444889068603516, -1.0684549808502197, -1.4787133932113647, 0.16720350086688995, -0.15595665574073792, 0.8782155513763428, -1.573834776878357, -0.08671510219573975, 1.3601912260055542, 0.9546777606010437, -0.615751326084137, 1.0047632455825806, 0.2954917848110199, 0.990469217300415, 0.873602569103241, -0.31045061349868774, 0.5003293752670288, 0.17385123670101166, -1.325906753540039, 0.4776589572429657, 1.1972908973693848, 0.16910164058208466, 1.5080283880233765, -0.6865622401237488, 0.033346619457006454, 0.43418100476264954, -0.4611865282058716, -0.45017242431640625, -0.6710667014122009, 0.7332655191421509, -0.01892658695578575, -0.9498820900917053, 0.09110040962696075, -0.11427538841962814, -0.1460573375225067, 0.2092278003692627, -1.4310410022735596, -0.09193886071443558, -0.2560481131076813, -0.6472854018211365, -1.194572925567627, -0.026613447815179825, 1.2855687141418457, -0.8090038299560547, -0.16664014756679535, 0.4997482895851135, 0.33564627170562744, 0.5643717646598816, 0.7151218056678772, -0.6333882808685303, -0.397007018327713, -0.23532730340957642, -0.2821834087371826, 0.34899190068244934, 1.3162949085235596, -0.12761345505714417, -1.0358785390853882, 0.7283491492271423, -0.3858354389667511, 0.08085979521274567, 1.9785919189453125, 0.0659525990486145, -0.8342921733856201, 0.31850913166999817, -0.6768745183944702, 1.9445624351501465, 1.6295253038406372, 1.3105889558792114, -0.0372358039021492, -1.0200064182281494, 0.6378620862960815, -0.2797568738460541, -0.37298235297203064, 0.8378356695175171, 0.4766094982624054, -0.23565779626369476, -1.347933053970337, 0.542357861995697, 1.209365725517273, -0.895397961139679, -0.8691605925559998, 0.11807891726493835, -0.8294352293014526, 1.124649167060852, 0.8121069669723511, 0.41724684834480286, 0.16737909615039825, 1.5955371856689453, 0.7627511024475098, -0.49871695041656494, 0.49971503019332886, 0.5403112173080444, -0.1830943375825882, -1.9923871755599976, -1.024727463722229, 0.3758939802646637, -0.4970403015613556, -1.583754539489746, 1.313483715057373, -1.2500064373016357, -0.9191497564315796, 0.4543033540248871, 0.09084707498550415, 1.4294123649597168, 0.35069161653518677, 1.6220684051513672, 1.9894849061965942, 1.0209733247756958, 0.31617048382759094, 1.306957483291626, -0.21407480537891388, -0.4521893560886383, 1.777961015701294, -0.4504645764827728, 0.49462205171585083, 1.1851786375045776, -0.38435035943984985, -0.9456664323806763, -0.7462574243545532, -1.1181086301803589, -0.6901165843009949, 1.1185113191604614, 0.13797904551029205, -1.1354211568832397, 0.23756194114685059, 1.4375720024108887, 0.11438202112913132, -0.31296369433403015, 0.6021227836608887, 0.3903471827507019, -0.7567470073699951, -0.11909442394971848, -0.9597089886665344, 0.4527117908000946, -0.19221943616867065, -0.41856977343559265, 0.354175329208374, 0.41831034421920776, 1.2306751012802124, 0.00340324267745018, 0.09564506262540817, 1.2870348691940308, -1.4171900749206543, 1.4825915098190308, -0.693654477596283, 0.15464457869529724, -2.2771801948547363, 1.4003524780273438, -0.8962498903274536, 1.87384033203125, -2.64725661277771, 0.4303238093852997, -0.5538641810417175, -0.39977461099624634, 0.3358856737613678, -0.3661818504333496, 0.13999289274215698, -0.18844443559646606, -1.1433396339416504, -0.19219046831130981, -0.8032554388046265, 0.5287780165672302, 1.011954665184021, 1.3002092838287354, -1.1045472621917725, -0.2811793386936188, -1.6703979969024658, -0.19523367285728455, -0.7179707288742065, 0.4275641441345215, -1.886093258857727, -0.13307447731494904, -1.9642311334609985, -2.342424154281616, -1.368263602256775, -0.8227677941322327, 1.0843294858932495, 0.12072224915027618, -0.7704069018363953, 1.0243451595306396, -0.33390116691589355, -1.8412704467773438, 1.0570043325424194, -2.200687885284424 ]
https://github.com/huggingface/datasets/issues/5444
info messages logged as warnings
It can be considered unexpected to see a `map` function return instantaneously. The warning is here to explain this case by mentioning that the cache was used. I don't expect first time users (only seeing warnings) to guess that the cache works this way
### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
333
44
info messages logged as warnings ### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2 It can be considered unexpected to see a `map` function return instantaneously. The warning is here to explain this case by mentioning that the cache was used. I don't expect first time users (only seeing warnings) to guess that the cache works this way
[ -1.236562967300415, -0.916245698928833, -0.7499101161956787, 1.4740647077560425, -0.1550338864326477, -1.2958605289459229, 0.12919111549854279, -1.0116636753082275, 1.7336289882659912, -0.8567910194396973, 0.3752639889717102, -1.6075327396392822, 0.01064293272793293, -0.584657609462738, -0.718798041343689, -0.8157019019126892, -0.4703024625778198, -0.7953407764434814, 1.0406768321990967, 2.5680456161499023, 1.155543327331543, -1.4413397312164307, 2.6675941944122314, 0.6771273016929626, -0.08546854555606842, -1.0422756671905518, 0.5198571085929871, 0.036252688616514206, -1.4517537355422974, -0.4086746871471405, -0.8992747068405151, -0.11990642547607422, -0.46536433696746826, -0.5707506537437439, 0.0767742395401001, 0.30085471272468567, -0.18825241923332214, -0.5433235764503479, -0.45703986287117004, -0.753960907459259, 0.4476616680622101, -0.4106159210205078, 0.936874270439148, -0.41992777585983276, 1.850042700767517, -0.5412985682487488, 0.4957009255886078, 0.7257017493247986, 1.3862158060073853, 0.24668315052986145, -0.08591748774051666, 0.3691408634185791, 0.4668394923210144, 0.016295652836561203, 0.5595662593841553, 1.084475040435791, 0.6381752490997314, 0.45471978187561035, 0.6976580023765564, -2.257667303085327, 1.2886766195297241, -0.954071044921875, 0.3104512393474579, 1.3534653186798096, -1.0776976346969604, 0.32784503698349, -1.7637704610824585, -0.028219232335686684, 0.5020604729652405, -2.3055312633514404, 0.23510020971298218, -1.2187604904174805, -0.5152730345726013, 1.05610191822052, 0.3657988905906677, -1.2845696210861206, 0.03134247288107872, -0.4064452350139618, 0.8438078761100769, 0.45653125643730164, 1.2135268449783325, -1.618226408958435, -0.06089133769273758, -0.3211290240287781, 0.15115518867969513, -1.2513408660888672, -1.4501447677612305, 0.504891574382782, 0.6984368562698364, 0.49513599276542664, -0.11620758473873138, 0.9142132997512817, -1.0404152870178223, 0.8404597640037537, -0.9222151637077332, -1.806417465209961, -1.4713553190231323, -2.285827398300171, -2.3473076820373535, 0.7835449576377869, -0.3864174783229828, -0.4912366271018982, 2.097507953643799, -1.093226432800293, -1.8276900053024292, 1.169527292251587, 0.22817134857177734, -0.021839087828993797, 2.338367462158203, 0.2825118601322174, -0.6987804770469666, 0.47339433431625366, -0.731020450592041, 0.6951550245285034, -0.5502234697341919, 1.2843507528305054, 0.36921748518943787, -1.0853174924850464, 1.5810368061065674, -0.3908514678478241, 0.5390724539756775, -0.6625904440879822, -0.40971899032592773, -0.77799391746521, 0.2499750256538391, 1.9415924549102783, -0.27621111273765564, 1.5434837341308594, -0.32831501960754395, -1.566452145576477, -1.658246397972107, 0.7891626358032227, 0.509314239025116, -0.683432936668396, 0.15220503509044647, -0.2910026013851166, 0.11187593638896942, -0.052113909274339676, 1.0350887775421143, 1.32545006275177, 0.7771093249320984, -0.3317984342575073, -0.9496443867683411, 0.28599077463150024, -0.05718677490949631, -0.7412076592445374, -1.7273664474487305, -0.3286219835281372, 0.05424385145306587, 0.6485462188720703, -1.2275415658950806, 1.7651991844177246, 0.923610508441925, 1.8590548038482666, 1.0244975090026855, -0.27843743562698364, 1.5562572479248047, 0.10302022099494934, 1.89103102684021, -0.4244295060634613, 0.6714276075363159, -0.35691264271736145, -1.1446019411087036, 0.7528071999549866, -0.3749556541442871, -2.107172966003418, -0.7203823328018188, -0.9140521287918091, -0.16066890954971313, -0.7029463648796082, 1.0592114925384521, -0.17881476879119873, -1.3308556079864502, 0.29080730676651, -0.7717132568359375, 0.17025130987167358, -1.2472057342529297, 0.42047539353370667, 0.7509762644767761, -0.6047647595405579, 0.12710541486740112, -0.33449074625968933, -1.287258505821228, -0.3684003949165344, 0.24015049636363983, 1.822335124015808, -0.9324942827224731, 0.9813324809074402, 1.014079213142395, -0.7024927735328674, -0.02490077167749405, 0.40478017926216125, -0.3589886426925659, 0.9311224818229675, -1.0656496286392212, -0.38486722111701965, 1.141297459602356, -0.21803593635559082, -0.5612833499908447, 1.4891084432601929, 0.7185696959495544, -0.9375767111778259, -0.16907677054405212, -0.11450561881065369, -0.7848359942436218, -0.015927361324429512, -1.665706992149353, -0.10101981461048126, 0.2924225628376007, -1.5529416799545288, -0.4862877428531647, -0.18339139223098755, 1.339843511581421, -0.03284720703959465, 1.490896463394165, -0.31192484498023987, -0.23573122918605804, -0.40844351053237915, -0.3381401002407074, 0.19017937779426575, -0.21110326051712036, -0.6361497640609741, 0.35415077209472656, -0.7100847363471985, 0.31628984212875366, 1.3341869115829468, 0.3592430055141449, 0.06208961829543114, 0.627774178981781, 1.020434856414795, 0.380635142326355, -0.06033403053879738, -0.8690817952156067, -1.599131464958191, 2.1432387828826904, -1.4442205429077148, 1.9970768690109253, 0.7747584581375122, 0.0028724009171128273, -1.8079713582992554, -1.9561418294906616, 1.3631614446640015, 1.1083263158798218, 2.290634870529175, 0.558867335319519, 0.4520449936389923, -0.8835579752922058, -0.6014358997344971, 0.34378448128700256, -0.9865753054618835, -0.7777343988418579, 0.03649511933326721, 2.392883539199829, 1.665645718574524, -0.4161502718925476, -0.08752205967903137, -1.080742359161377, 1.4328511953353882, -0.11774198710918427, 0.15513013303279877, 1.9639514684677124, -0.2085326910018921, -1.0619792938232422, 1.2908506393432617, -2.3207342624664307, 0.24996519088745117, 1.9781831502914429, 0.24331825971603394, -0.07071930170059204, -1.430418848991394, -0.6555216312408447, -0.23651012778282166, -0.33166250586509705, -1.1722322702407837, 0.5952985286712646, -0.18701577186584473, -0.8160533905029297, -1.4221899509429932, 0.15844124555587769, -1.1252602338790894, -1.6683956384658813, 0.2796764075756073, 1.7646909952163696, 1.949400544166565, -0.7126864194869995, 1.5019248723983765, -0.27360591292381287, 0.17532581090927124, 1.287451982498169, 1.158138632774353, 3.2048792839050293, 1.9828076362609863, -1.2974909543991089, 0.7068174481391907, -0.09313425421714783, -0.3669137954711914, 1.086747646331787, -1.1974639892578125, 1.3147449493408203, -0.1298333704471588, -1.2269083261489868, -1.1597636938095093, 0.924505889415741, 0.5190619826316833, 0.050849221646785736, -0.4498571753501892, 1.2665467262268066, 0.07176271080970764, 1.3769091367721558, 0.5152804851531982, -0.2854990065097809, 0.6988071799278259, -0.4138680398464203, -0.47452762722969055, 1.5854911804199219, 0.21151597797870636, -1.3868606090545654, -2.2593536376953125, -0.18969640135765076, -0.8592768311500549, 0.0018499912694096565, -0.5763299465179443, -0.9199098944664001, 1.6285778284072876, 0.38047125935554504, -1.2138161659240723, -0.33228740096092224, -0.2815017104148865, -0.6520352959632874, 2.716327428817749, -1.5382719039916992, -0.3125890791416168, -1.0013333559036255, -0.5795100331306458, 1.6191459894180298, -1.272097110748291, -0.23463217914104462, -1.0287268161773682, -0.5304376482963562, -1.2409087419509888, -0.6504461765289307, -0.1395019292831421, -0.9374256134033203, 0.846104085445404, 0.13416224718093872, -1.2225005626678467, -0.34397515654563904, -0.903537392616272, 0.7656477689743042, -0.016551746055483818, 0.2912517786026001, 1.7878570556640625, 0.4329800605773926, -0.4221442937850952, 0.6999534368515015, 1.1714346408843994, 0.6521778106689453, -0.6266167759895325, 0.3310476243495941, -0.6299914717674255, 0.3696553409099579, -1.2365103960037231, 0.2751038074493408, -2.822979211807251, 0.5931318402290344, -0.09840506315231323, -0.05451255291700363, -0.09951359033584595, -1.2445839643478394, 1.1484888792037964, 2.525644063949585, -1.1725760698318481, 0.46646401286125183, 0.25716492533683777, 1.1535989046096802, -1.5352498292922974, 0.3185438811779022, -0.38702815771102905, 2.1496407985687256, 0.2189926952123642, 1.1460713148117065, -0.49092501401901245, -2.2834911346435547, 0.6192518472671509, -1.2815994024276733, -1.112432837486267, 0.7687562108039856, -0.7960702776908875, -0.011136903427541256, -1.2970218658447266, -0.15179209411144257, -0.7265408039093018, -1.2205424308776855, 0.622519850730896, 0.10583193600177765, 0.5245078206062317, -0.6484726667404175, 0.33670666813850403, -2.1647732257843018, -1.3415029048919678, -0.2518368661403656, -0.9647113084793091, 0.4365204870700836, -0.2934337854385376, 0.7690058350563049, -0.20515497028827667, -0.0038962922990322113, 0.3390558362007141, 1.364799976348877, 3.3681209087371826, 0.15615126490592957, 0.4588232636451721, -0.18069639801979065, -0.9175689816474915, 1.4448812007904053, 0.8936390280723572, -0.18591678142547607, -0.5893237590789795, -1.0928763151168823, 1.310045599937439, 1.9387308359146118, 1.023555874824524, 0.04468326270580292, -0.8015888333320618, -0.7703641057014465, -0.019962694495916367, 0.1026272177696228, 0.5030823349952698, 0.9878960847854614, 0.0905933529138565, 0.10059615969657898, 1.4977294206619263, 1.2679790258407593, -0.40633827447891235, 0.35634124279022217, -0.7874129414558411, -0.5299839973449707, 0.5056036710739136, 0.4525190591812134, 0.00519512128084898, 0.34770467877388, -1.0927748680114746, -0.15984153747558594, -0.29735851287841797, -0.9314351081848145, -0.7484940886497498, -0.46802932024002075, -0.3575621545314789, 1.7398936748504639, 0.10924999415874481, -0.4246426820755005, -0.045272186398506165, -0.7242503762245178, 0.055832166224718094, -0.9725401997566223, 0.3087810277938843, -0.08885480463504791, -0.13094809651374817, -0.043441228568553925, 1.8285481929779053, -0.9499455094337463, -2.1014251708984375, 0.31267306208610535, 0.09671777486801147, -0.3305279612541199, 0.1250838041305542, 1.567149043083191, 0.5681794881820679, 1.4377671480178833, 1.4026798009872437, 0.9451790452003479, -0.7411611080169678, -1.3595192432403564, 0.6754336953163147, 1.0222593545913696, -1.4866743087768555, 0.7847179770469666, 0.014807358384132385, -0.4936767518520355, 0.6143509149551392, 1.3105589151382446, 0.44949740171432495, -2.0285191535949707, 0.8001455664634705, -0.8617859482765198, 0.7430155277252197, 0.7440574765205383, 0.7369658350944519, 0.1137126088142395, 0.7449894547462463, -1.2927535772323608, -1.147460699081421, -0.7413738369941711, -0.6822242140769958, 1.9112704992294312, -0.31232553720474243, 0.5223886966705322, -0.14932852983474731, -1.45027494430542, -0.16899678111076355, 0.6039092540740967, 0.24468284845352173, -0.37179917097091675, 0.7388512492179871, -0.7222669720649719, -1.2209500074386597, -1.4487756490707397, -0.4925392270088196, -1.0073820352554321, -0.8851324915885925, 1.1259418725967407, 0.8409920334815979, 0.29897770285606384, 1.8790216445922852, 0.6052615642547607, 0.1752348244190216, -2.6905081272125244, 0.9064357876777649, 0.27026987075805664, -0.003299262374639511, 0.9048700928688049, 0.200461283326149, 1.0436402559280396, -0.009434428997337818, 0.5746093392372131, -2.4663901329040527, 2.3202836513519287, -0.2588389813899994, 0.7186863422393799, 0.026308447122573853, -0.04992815852165222, 1.019191026687622, 0.5697764754295349, 0.6961314678192139, -1.0801290273666382, 0.6757038831710815, -0.6332184076309204, 1.324134349822998, 0.9128048419952393, -0.7784324288368225, -0.06134476512670517, 1.2405428886413574, 0.42723727226257324, -0.5473781228065491, -0.9349018335342407, -1.056874394416809, 0.905769407749176, 1.896257758140564, -0.0004044361412525177, 0.0402548722922802, 0.8487246632575989, 0.6842705011367798, -1.3854135274887085, -0.0015573445707559586, -0.7990190982818604, -0.7887758612632751, 1.5983526706695557, 2.12985897064209, -0.08537240326404572, -0.21192091703414917, -0.7583113312721252, -1.3243273496627808, 0.7377158403396606, 0.07549947500228882, 0.1059117317199707, 0.717684268951416, -0.5862170457839966, 1.1510512828826904, 0.8693499565124512, 0.9539461731910706, 0.19238081574440002, 0.22450576722621918, 0.24866178631782532, -0.24619755148887634, -1.2137318849563599, -0.25699251890182495, -1.068230390548706, -2.577683925628662, 0.5129405856132507, -0.325759619474411, -1.4577076435089111, 0.02007581852376461, -1.055458426475525, 0.7710012197494507, -0.5243991017341614, -1.1121573448181152, -1.476404070854187, 0.13845300674438477, -0.13705414533615112, 0.8607984185218811, -1.5734679698944092, -0.08993864059448242, 1.3559660911560059, 0.9768674969673157, -0.6189013123512268, 1.0013599395751953, 0.27065515518188477, 0.9676662683486938, 0.8651202321052551, -0.33898138999938965, 0.45392367243766785, 0.14897845685482025, -1.3201957941055298, 0.4583994150161743, 1.1859380006790161, 0.159537211060524, 1.5151408910751343, -0.6718558073043823, 0.026871003210544586, 0.45302891731262207, -0.4498460590839386, -0.44095540046691895, -0.6910658478736877, 0.7502290606498718, -0.009232978336513042, -0.8724187612533569, 0.07710199058055878, -0.06672392785549164, -0.16961082816123962, 0.17854516208171844, -1.4453052282333374, -0.08171926438808441, -0.2735656797885895, -0.7007908821105957, -1.195530891418457, -0.06564892828464508, 1.2774968147277832, -0.7961964011192322, -0.15081138908863068, 0.48418059945106506, 0.32394522428512573, 0.5782718658447266, 0.7104354500770569, -0.6556946635246277, -0.40889331698417664, -0.19257472455501556, -0.28986698389053345, 0.3586970567703247, 1.326493501663208, -0.12680362164974213, -1.0263540744781494, 0.697679877281189, -0.35732629895210266, 0.07238347828388214, 1.990317463874817, 0.08057446777820587, -0.8350258469581604, 0.32966843247413635, -0.7159035205841064, 1.8919525146484375, 1.642985224723816, 1.2957345247268677, -0.0184379480779171, -1.0302937030792236, 0.6634955406188965, -0.3140951693058014, -0.3685772716999054, 0.8675353527069092, 0.45711207389831543, -0.18241862952709198, -1.3301310539245605, 0.5424256920814514, 1.1771997213363647, -0.9045140743255615, -0.8586626648902893, 0.11773756146430969, -0.8354893326759338, 1.1152716875076294, 0.7698624134063721, 0.41478148102760315, 0.17549178004264832, 1.6030863523483276, 0.7376245856285095, -0.5156623721122742, 0.5013706088066101, 0.5510398149490356, -0.20204885303974152, -1.9922816753387451, -1.0436829328536987, 0.3798404037952423, -0.5128778219223022, -1.615437626838684, 1.336370587348938, -1.2471332550048828, -0.9113516807556152, 0.4284451901912689, 0.07720635831356049, 1.4429067373275757, 0.35325518250465393, 1.608302116394043, 2.0102837085723877, 1.0353449583053589, 0.32249119877815247, 1.3006771802902222, -0.22133970260620117, -0.495386004447937, 1.8035670518875122, -0.44309884309768677, 0.44041433930397034, 1.179824709892273, -0.3860185146331787, -0.9877238869667053, -0.7536534070968628, -1.1198375225067139, -0.7102149128913879, 1.1171660423278809, 0.16564476490020752, -1.1558493375778198, 0.24186182022094727, 1.4549567699432373, 0.12019501626491547, -0.32168006896972656, 0.5627928972244263, 0.4282892346382141, -0.7656002640724182, -0.10588541626930237, -0.9309602379798889, 0.45196425914764404, -0.22922611236572266, -0.4097830057144165, 0.3359971046447754, 0.44457778334617615, 1.239975094795227, 0.004845499061048031, 0.06434084475040436, 1.2962217330932617, -1.4552781581878662, 1.455275535583496, -0.6701201796531677, 0.1800967901945114, -2.2722742557525635, 1.4043110609054565, -0.8696622848510742, 1.8826709985733032, -2.6061174869537354, 0.4373565912246704, -0.5833890438079834, -0.394881010055542, 0.3601371645927429, -0.3598136901855469, 0.14154966175556183, -0.19691820442676544, -1.154070496559143, -0.18336589634418488, -0.7804722189903259, 0.5260933041572571, 1.0337680578231812, 1.2422822713851929, -1.0992586612701416, -0.29622969031333923, -1.6533969640731812, -0.19072575867176056, -0.6925349831581116, 0.38993483781814575, -1.9041184186935425, -0.15853530168533325, -1.9820318222045898, -2.3101484775543213, -1.321895718574524, -0.8081797957420349, 1.1036649942398071, 0.12433169782161713, -0.7838181853294373, 1.0293668508529663, -0.3066650927066803, -1.858638882637024, 1.0631980895996094, -2.1653895378112793 ]
https://github.com/huggingface/datasets/issues/5444
info messages logged as warnings
Oh, so it's intentional? Do all Hugging Face packages use `warning` when using cache? I guess feel free to close this issue then.
### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
333
23
info messages logged as warnings ### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2 Oh, so it's intentional? Do all Hugging Face packages use `warning` when using cache? I guess feel free to close this issue then.
[ -1.2241021394729614, -0.9066925644874573, -0.7336789965629578, 1.4768046140670776, -0.1610291451215744, -1.2774314880371094, 0.1545158475637436, -1.0086294412612915, 1.7311090230941772, -0.8399935364723206, 0.3464798033237457, -1.6371490955352783, 0.03219063580036163, -0.602618932723999, -0.7576615810394287, -0.8296850919723511, -0.4639109671115875, -0.7766655087471008, 1.0698273181915283, 2.5724828243255615, 1.17824387550354, -1.4398242235183716, 2.658172369003296, 0.6657869815826416, -0.07376617193222046, -1.0588970184326172, 0.5173348188400269, 0.06584833562374115, -1.4580506086349487, -0.3777908980846405, -0.918211042881012, -0.14613918960094452, -0.4891068637371063, -0.5683908462524414, 0.07666641473770142, 0.31119856238365173, -0.19247430562973022, -0.5429661273956299, -0.4410465359687805, -0.7807300090789795, 0.4721793830394745, -0.39359885454177856, 0.9336400628089905, -0.45713716745376587, 1.826040506362915, -0.5923563241958618, 0.5273491144180298, 0.7386588454246521, 1.3854390382766724, 0.2514910101890564, -0.08438016474246979, 0.37126225233078003, 0.49448007345199585, 0.036384113132953644, 0.5398068428039551, 1.0693354606628418, 0.6063899397850037, 0.44825032353401184, 0.6829864382743835, -2.2347590923309326, 1.2971464395523071, -0.9626457095146179, 0.28145575523376465, 1.330815076828003, -1.062273383140564, 0.32628804445266724, -1.777518391609192, -0.04486967250704765, 0.5137319564819336, -2.2898824214935303, 0.2639194428920746, -1.2380740642547607, -0.5409635901451111, 1.0170222520828247, 0.38172590732574463, -1.2676764726638794, 0.03914891183376312, -0.42601412534713745, 0.8562456369400024, 0.4538341164588928, 1.199549674987793, -1.6440821886062622, -0.1004193127155304, -0.3318344056606293, 0.11475019156932831, -1.2721436023712158, -1.4768098592758179, 0.5158094167709351, 0.6875929832458496, 0.4960050582885742, -0.12483690679073334, 0.9195415377616882, -1.0472502708435059, 0.8559144735336304, -0.9647195339202881, -1.8311452865600586, -1.4544169902801514, -2.290099620819092, -2.3734211921691895, 0.7706751227378845, -0.40366923809051514, -0.475187748670578, 2.079751491546631, -1.080769658088684, -1.8243519067764282, 1.1482192277908325, 0.21567171812057495, -0.049073487520217896, 2.32004714012146, 0.28226912021636963, -0.696451723575592, 0.5016615390777588, -0.7457581758499146, 0.656117856502533, -0.5758744478225708, 1.2989823818206787, 0.39637139439582825, -1.0451120138168335, 1.571229100227356, -0.37645599246025085, 0.5386396050453186, -0.6507256627082825, -0.4122803807258606, -0.772171139717102, 0.22378599643707275, 1.9439287185668945, -0.2886982560157776, 1.5249232053756714, -0.31795647740364075, -1.5612152814865112, -1.6116132736206055, 0.8305585384368896, 0.5086378455162048, -0.6892713904380798, 0.1818733811378479, -0.28969675302505493, 0.13064920902252197, -0.05993764102458954, 1.0325291156768799, 1.2957230806350708, 0.8064318299293518, -0.30414557456970215, -0.9465872645378113, 0.2984590530395508, -0.045893505215644836, -0.732099711894989, -1.748325228691101, -0.3162761330604553, 0.044379375874996185, 0.65043044090271, -1.2065364122390747, 1.7629979848861694, 0.8968332409858704, 1.8963799476623535, 1.025761604309082, -0.27875617146492004, 1.527762532234192, 0.10382245481014252, 1.9037737846374512, -0.45481351017951965, 0.6772313117980957, -0.3779532015323639, -1.1597964763641357, 0.7723941802978516, -0.3809821903705597, -2.1005473136901855, -0.6884735226631165, -0.9228877425193787, -0.17061607539653778, -0.7145264744758606, 1.0857398509979248, -0.17383632063865662, -1.3441448211669922, 0.286539763212204, -0.7765015363693237, 0.17608173191547394, -1.2682799100875854, 0.4122028052806854, 0.7595255970954895, -0.5788488388061523, 0.1435568779706955, -0.32560014724731445, -1.3113727569580078, -0.4114645719528198, 0.23604272305965424, 1.831966519355774, -0.9140017032623291, 1.0191580057144165, 1.0109221935272217, -0.723771870136261, -0.024194667115807533, 0.4512104094028473, -0.3619523346424103, 0.903967022895813, -1.069687843322754, -0.3803021311759949, 1.1588361263275146, -0.2420588582754135, -0.5698177218437195, 1.4455795288085938, 0.7532141804695129, -0.9435746669769287, -0.14807623624801636, -0.12988480925559998, -0.8039564490318298, 0.012819889932870865, -1.668268084526062, -0.0804794579744339, 0.3049699068069458, -1.5727616548538208, -0.4989233613014221, -0.16596056520938873, 1.3230266571044922, -0.036510780453681946, 1.4741930961608887, -0.2628368139266968, -0.23925209045410156, -0.4112854599952698, -0.34090107679367065, 0.1990152895450592, -0.2437293380498886, -0.6110111474990845, 0.34698790311813354, -0.6937645077705383, 0.3131510317325592, 1.308239459991455, 0.3150215148925781, 0.02131267823278904, 0.6184237003326416, 0.988236665725708, 0.35852494835853577, -0.09355148673057556, -0.8913185596466064, -1.603510856628418, 2.130498170852661, -1.4068405628204346, 2.0179083347320557, 0.7323384881019592, -0.0282987542450428, -1.8157646656036377, -1.9810746908187866, 1.3673638105392456, 1.1182844638824463, 2.2893197536468506, 0.5768540501594543, 0.4553811550140381, -0.8638936877250671, -0.6108251214027405, 0.30712780356407166, -1.0037565231323242, -0.785149872303009, 0.04526491090655327, 2.3852345943450928, 1.6501384973526, -0.45269331336021423, -0.11100997030735016, -1.0679569244384766, 1.422542691230774, -0.0926370769739151, 0.16497543454170227, 1.956529974937439, -0.22923503816127777, -1.0405133962631226, 1.2617101669311523, -2.3181662559509277, 0.2492908239364624, 2.0143697261810303, 0.2624392509460449, -0.037053514271974564, -1.4211947917938232, -0.6590122580528259, -0.27245527505874634, -0.3535139262676239, -1.1792057752609253, 0.615114688873291, -0.19558140635490417, -0.8203521966934204, -1.4095351696014404, 0.19063305854797363, -1.1244217157363892, -1.672747015953064, 0.29406997561454773, 1.7761495113372803, 1.9697535037994385, -0.7245955467224121, 1.5069698095321655, -0.2604546844959259, 0.19250011444091797, 1.3103007078170776, 1.1607913970947266, 3.206186294555664, 2.003150224685669, -1.2682733535766602, 0.7559177875518799, -0.09179142117500305, -0.36760279536247253, 1.12907075881958, -1.2109620571136475, 1.2876100540161133, -0.11978866159915924, -1.228332757949829, -1.15528404712677, 0.9182780385017395, 0.5195107460021973, 0.04507238045334816, -0.44141408801078796, 1.2465784549713135, 0.07124066352844238, 1.370387315750122, 0.5101242065429688, -0.28065094351768494, 0.6930054426193237, -0.3767337203025818, -0.4596024453639984, 1.5980929136276245, 0.23098041117191315, -1.4073795080184937, -2.287061929702759, -0.22703145444393158, -0.8776478171348572, -0.004948233254253864, -0.6005043387413025, -0.9392876029014587, 1.637741208076477, 0.3910071849822998, -1.2027738094329834, -0.3000716269016266, -0.2801097333431244, -0.6595098376274109, 2.690859079360962, -1.5400569438934326, -0.3019334077835083, -1.0161951780319214, -0.5822712182998657, 1.6352561712265015, -1.2701609134674072, -0.22468729317188263, -1.0096157789230347, -0.5366265177726746, -1.261438250541687, -0.6246071457862854, -0.13012459874153137, -0.9116628170013428, 0.8408330678939819, 0.1290547251701355, -1.2254939079284668, -0.3546901345252991, -0.9144436717033386, 0.768349826335907, -0.01142644602805376, 0.30703142285346985, 1.8090729713439941, 0.4197058379650116, -0.4033663272857666, 0.6789663434028625, 1.1501898765563965, 0.6438755393028259, -0.6345505118370056, 0.2952266335487366, -0.6374190449714661, 0.34341928362846375, -1.2205020189285278, 0.2907981276512146, -2.7971887588500977, 0.603416383266449, -0.08135424554347992, -0.08030346035957336, -0.11095432937145233, -1.274332880973816, 1.1766307353973389, 2.5363664627075195, -1.1717281341552734, 0.4643896222114563, 0.26741915941238403, 1.1314336061477661, -1.5381686687469482, 0.31272709369659424, -0.37897589802742004, 2.145216703414917, 0.2144511342048645, 1.122701644897461, -0.49320125579833984, -2.2864954471588135, 0.6254255175590515, -1.292681336402893, -1.1283611059188843, 0.7567738890647888, -0.7698642015457153, -0.008817859925329685, -1.2910456657409668, -0.14655952155590057, -0.7800430059432983, -1.2171275615692139, 0.6470060348510742, 0.10458087921142578, 0.5398801565170288, -0.6498975157737732, 0.3522583246231079, -2.152517318725586, -1.3088022470474243, -0.2615748643875122, -0.9603173732757568, 0.4057638645172119, -0.26644283533096313, 0.7637752294540405, -0.20378907024860382, 0.0037150466814637184, 0.36621901392936707, 1.3546205759048462, 3.378274440765381, 0.10891968011856079, 0.41309547424316406, -0.15227240324020386, -0.9169650673866272, 1.4305559396743774, 0.9150525331497192, -0.13262440264225006, -0.580204963684082, -1.0441232919692993, 1.3126484155654907, 1.9810658693313599, 1.0450286865234375, 0.03717506304383278, -0.8317758440971375, -0.773831307888031, 0.016776926815509796, 0.12222868204116821, 0.5037890672683716, 0.9928174018859863, 0.0679028332233429, 0.05389811471104622, 1.4664310216903687, 1.2443146705627441, -0.3945154845714569, 0.3524899482727051, -0.8141000866889954, -0.5111832022666931, 0.49969279766082764, 0.44531962275505066, 0.0002688346430659294, 0.3299144506454468, -1.0581333637237549, -0.16838853061199188, -0.2932981252670288, -0.9185685515403748, -0.7740073204040527, -0.49614542722702026, -0.3812139928340912, 1.7453309297561646, 0.10982224345207214, -0.41241520643234253, -0.04258432984352112, -0.7336406111717224, 0.06446470320224762, -0.9720045924186707, 0.2912062406539917, -0.12557752430438995, -0.10080017149448395, -0.036706648766994476, 1.8294622898101807, -0.948276698589325, -2.081331729888916, 0.2951022982597351, 0.10993988811969757, -0.3514346480369568, 0.11396786570549011, 1.587515115737915, 0.5534608960151672, 1.4306584596633911, 1.3800530433654785, 0.9643996953964233, -0.7329764366149902, -1.3578075170516968, 0.6745176911354065, 1.015161395072937, -1.5034074783325195, 0.7940306067466736, 0.026778165251016617, -0.48562487959861755, 0.6016966700553894, 1.2780481576919556, 0.4414893388748169, -1.9982526302337646, 0.7828859090805054, -0.8938775658607483, 0.7286526560783386, 0.7260806560516357, 0.7619403004646301, 0.13352639973163605, 0.7691713571548462, -1.274774193763733, -1.096064805984497, -0.7711358070373535, -0.661350429058075, 1.8620930910110474, -0.30251815915107727, 0.5095739364624023, -0.14980800449848175, -1.3994789123535156, -0.19830313324928284, 0.6282908320426941, 0.26901546120643616, -0.337190181016922, 0.7251971364021301, -0.7064772248268127, -1.2445541620254517, -1.4186813831329346, -0.4881686270236969, -0.9694007039070129, -0.8955218195915222, 1.1328608989715576, 0.8343276381492615, 0.36198705434799194, 1.866180181503296, 0.6384478211402893, 0.188456729054451, -2.6918859481811523, 0.8639163374900818, 0.24857544898986816, -0.025506680831313133, 0.8993834257125854, 0.21589583158493042, 1.038806438446045, -0.03499356284737587, 0.578667402267456, -2.4498038291931152, 2.3463711738586426, -0.26833251118659973, 0.7009527683258057, 0.025507912039756775, -0.008116096258163452, 1.0378446578979492, 0.5516008734703064, 0.6317524313926697, -1.0882278680801392, 0.659868597984314, -0.6350436806678772, 1.3295096158981323, 0.8973462581634521, -0.7793014049530029, -0.040934666991233826, 1.2172908782958984, 0.42979303002357483, -0.5218165516853333, -0.9604055285453796, -1.0341253280639648, 0.9282187223434448, 1.859049916267395, -0.02075234055519104, 0.02715284749865532, 0.8871206641197205, 0.6588484644889832, -1.3778413534164429, 0.01362292654812336, -0.7788748145103455, -0.7598424553871155, 1.6333142518997192, 2.130857229232788, -0.04856133460998535, -0.18763913214206696, -0.7819474935531616, -1.3110579252243042, 0.7697082161903381, 0.09775148332118988, 0.04968757554888725, 0.7022687196731567, -0.5575395822525024, 1.1272653341293335, 0.858961284160614, 0.972557008266449, 0.2294183075428009, 0.22402948141098022, 0.22536984086036682, -0.24504780769348145, -1.2001535892486572, -0.25626179575920105, -1.0631791353225708, -2.564793348312378, 0.5146158933639526, -0.32391810417175293, -1.4832539558410645, 0.037795912474393845, -1.061501145362854, 0.7754542231559753, -0.5173146724700928, -1.0766147375106812, -1.4796091318130493, 0.12612678110599518, -0.15203218162059784, 0.8802353143692017, -1.5978525876998901, -0.08599953353404999, 1.3588006496429443, 0.9591016173362732, -0.6161547303199768, 0.9870215058326721, 0.26282361149787903, 0.9716094732284546, 0.8711786270141602, -0.34139731526374817, 0.4799960255622864, 0.19769667088985443, -1.3186689615249634, 0.5106882452964783, 1.2196990251541138, 0.16764390468597412, 1.5041214227676392, -0.6526292562484741, 0.0040120407938957214, 0.4257175028324127, -0.4492780268192291, -0.44294142723083496, -0.696631908416748, 0.747981607913971, -0.007705618627369404, -0.869652271270752, 0.09884233772754669, -0.10259965062141418, -0.13050943613052368, 0.18814697861671448, -1.4470001459121704, -0.0811442881822586, -0.24939104914665222, -0.6953368782997131, -1.1882823705673218, -0.049684420228004456, 1.3085676431655884, -0.8008145689964294, -0.15120528638362885, 0.48398953676223755, 0.32287293672561646, 0.5695992708206177, 0.6968549489974976, -0.644545316696167, -0.3949267864227295, -0.21291282773017883, -0.312549352645874, 0.349448025226593, 1.3403422832489014, -0.10855816304683685, -1.0277334451675415, 0.6864885687828064, -0.366355836391449, 0.04481181129813194, 1.9599659442901611, 0.08019743859767914, -0.8446049094200134, 0.30415838956832886, -0.6798757910728455, 1.9950700998306274, 1.6323213577270508, 1.2973952293395996, -0.0431441068649292, -1.022191047668457, 0.633037269115448, -0.28122279047966003, -0.38025107979774475, 0.8359583616256714, 0.46668073534965515, -0.2162829339504242, -1.326292872428894, 0.5585483908653259, 1.2101844549179077, -0.9187845587730408, -0.8991461992263794, 0.12718042731285095, -0.8377988934516907, 1.097196340560913, 0.7885007262229919, 0.4195205569267273, 0.19708092510700226, 1.6179102659225464, 0.778694212436676, -0.5287814140319824, 0.5133973956108093, 0.5441775321960449, -0.16984260082244873, -2.0128607749938965, -1.0670725107192993, 0.40984636545181274, -0.5001091957092285, -1.5942062139511108, 1.3722426891326904, -1.2233190536499023, -0.9152296185493469, 0.45237958431243896, 0.10062916576862335, 1.4334956407546997, 0.33288440108299255, 1.6018190383911133, 1.9677602052688599, 1.0312340259552002, 0.3597836494445801, 1.3303565979003906, -0.21751351654529572, -0.49798569083213806, 1.7627530097961426, -0.43086209893226624, 0.48528432846069336, 1.1797667741775513, -0.39260581135749817, -1.000864028930664, -0.7632202506065369, -1.123265266418457, -0.6974409222602844, 1.1256191730499268, 0.12534552812576294, -1.128354549407959, 0.25500592589378357, 1.47015380859375, 0.10765103995800018, -0.2960810363292694, 0.5713793635368347, 0.35659611225128174, -0.7658666372299194, -0.09906080365180969, -0.9690358638763428, 0.466559499502182, -0.22367186844348907, -0.4209590256214142, 0.33592820167541504, 0.4163918197154999, 1.2335867881774902, -0.01565520651638508, 0.1018698662519455, 1.283879280090332, -1.4508955478668213, 1.4485019445419312, -0.6813783645629883, 0.15924835205078125, -2.292095899581909, 1.407796859741211, -0.8602787256240845, 1.8790342807769775, -2.643061637878418, 0.38949450850486755, -0.6008082628250122, -0.38917917013168335, 0.33414071798324585, -0.36375898122787476, 0.12520082294940948, -0.20177258551120758, -1.157218337059021, -0.16923600435256958, -0.8184711933135986, 0.5494914650917053, 1.0056778192520142, 1.2917205095291138, -1.0651788711547852, -0.2863309681415558, -1.6696765422821045, -0.18538181483745575, -0.6872722506523132, 0.37445950508117676, -1.8894394636154175, -0.12657032907009125, -1.9898977279663086, -2.298647165298462, -1.342115044593811, -0.7958828806877136, 1.0931724309921265, 0.11993707716464996, -0.7876887917518616, 1.037187099456787, -0.3108792304992676, -1.8526597023010254, 1.0729721784591675, -2.176086902618408 ]
https://github.com/huggingface/datasets/issues/5444
info messages logged as warnings
Yes it's intentional for `map`. For `load_dataset` it's also intentional but for a different reason: it shows where in the cache the dataset is located, in case the user wants to clear the cache.
### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
333
34
info messages logged as warnings ### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2 Yes it's intentional for `map`. For `load_dataset` it's also intentional but for a different reason: it shows where in the cache the dataset is located, in case the user wants to clear the cache.
[ -1.2135945558547974, -0.9044673442840576, -0.756445050239563, 1.4845976829528809, -0.15900501608848572, -1.2960442304611206, 0.15157468616962433, -1.0147960186004639, 1.7531806230545044, -0.8709537982940674, 0.3316876292228699, -1.6485707759857178, 0.00995037704706192, -0.5834614038467407, -0.7350054979324341, -0.8238164782524109, -0.4943509101867676, -0.7685990333557129, 1.0498887300491333, 2.5591557025909424, 1.163705587387085, -1.440433382987976, 2.65964412689209, 0.672529935836792, -0.09972731024026871, -1.0483652353286743, 0.520027756690979, 0.013967758044600487, -1.4298220872879028, -0.3756304681301117, -0.9079025387763977, -0.13611847162246704, -0.5007889866828918, -0.5699291825294495, 0.07707743346691132, 0.29136279225349426, -0.22100690007209778, -0.5313796401023865, -0.45777127146720886, -0.8004962205886841, 0.4100460708141327, -0.4215584695339203, 0.9473458528518677, -0.4415878355503082, 1.8161201477050781, -0.5253086686134338, 0.4975924789905548, 0.7397879362106323, 1.3457785844802856, 0.2147294580936432, -0.07195661962032318, 0.3690720498561859, 0.4804474711418152, 0.03300895541906357, 0.5448054671287537, 1.0855188369750977, 0.598412275314331, 0.4439898431301117, 0.699524462223053, -2.262876510620117, 1.3002090454101562, -0.952333927154541, 0.27571654319763184, 1.357534646987915, -1.0553367137908936, 0.3326672613620758, -1.7660136222839355, -0.02858048491179943, 0.4971896708011627, -2.3096673488616943, 0.2626817226409912, -1.225792646408081, -0.5286794900894165, 1.0540101528167725, 0.36743250489234924, -1.2413554191589355, 0.058033086359500885, -0.4080580472946167, 0.8569517135620117, 0.46124833822250366, 1.224992036819458, -1.6793750524520874, -0.08392558991909027, -0.3325892686843872, 0.12670855224132538, -1.2692070007324219, -1.4665168523788452, 0.502604603767395, 0.7107923626899719, 0.5182712078094482, -0.11880479007959366, 0.9192058444023132, -1.041763186454773, 0.8105940222740173, -0.9551275372505188, -1.824042797088623, -1.4367669820785522, -2.2987523078918457, -2.3792734146118164, 0.7526854872703552, -0.38465753197669983, -0.48012733459472656, 2.089158535003662, -1.0546387434005737, -1.8212692737579346, 1.1787562370300293, 0.23178373277187347, -0.02580462396144867, 2.343114137649536, 0.26024794578552246, -0.6996647715568542, 0.4934069812297821, -0.7317657470703125, 0.6917386054992676, -0.5267012715339661, 1.2748961448669434, 0.4025212526321411, -1.0729635953903198, 1.5895357131958008, -0.4061634838581085, 0.5541691184043884, -0.6376622319221497, -0.42150214314460754, -0.7776553630828857, 0.24764201045036316, 1.9313290119171143, -0.2745864987373352, 1.521751880645752, -0.28793764114379883, -1.5224108695983887, -1.6292517185211182, 0.8257138133049011, 0.5041431188583374, -0.6782798767089844, 0.14155185222625732, -0.23069071769714355, 0.13693822920322418, -0.09331338852643967, 1.0029597282409668, 1.2651337385177612, 0.806111216545105, -0.3264863193035126, -0.9758609533309937, 0.29369497299194336, -0.023091699928045273, -0.7740411758422852, -1.738576889038086, -0.331353098154068, 0.038863904774188995, 0.6395503878593445, -1.2042536735534668, 1.7834906578063965, 0.9150974154472351, 1.8774759769439697, 1.0076833963394165, -0.2772495746612549, 1.5391578674316406, 0.11963651329278946, 1.9079068899154663, -0.41323843598365784, 0.6738387942314148, -0.3609556555747986, -1.1800897121429443, 0.7707723379135132, -0.38516438007354736, -2.0962395668029785, -0.7165880799293518, -0.9190042018890381, -0.16450567543506622, -0.6967154741287231, 1.051731824874878, -0.16695991158485413, -1.3681621551513672, 0.29806822538375854, -0.7521068453788757, 0.1857629120349884, -1.2663242816925049, 0.3946961760520935, 0.7600979208946228, -0.6116169691085815, 0.12763147056102753, -0.3382022976875305, -1.30573308467865, -0.4114823043346405, 0.2182006686925888, 1.8163204193115234, -0.895233690738678, 0.9916722178459167, 1.0182831287384033, -0.7171024084091187, -0.04109792411327362, 0.4048002064228058, -0.33965224027633667, 0.8965095281600952, -1.086551308631897, -0.40173402428627014, 1.1775981187820435, -0.22472058236598969, -0.5899404883384705, 1.4726736545562744, 0.7173988223075867, -0.9430886507034302, -0.16155757009983063, -0.12456489354372025, -0.7866100668907166, -0.011998079717159271, -1.6511483192443848, -0.07299626618623734, 0.3018273711204529, -1.5583611726760864, -0.47807079553604126, -0.18796637654304504, 1.3326900005340576, -0.03758982568979263, 1.4833502769470215, -0.2862754166126251, -0.2360384166240692, -0.44271278381347656, -0.3364882171154022, 0.18414489924907684, -0.22480417788028717, -0.6194552779197693, 0.29864147305488586, -0.6765749454498291, 0.3508394956588745, 1.3590357303619385, 0.3371937572956085, 0.053982555866241455, 0.6170119643211365, 1.0247339010238647, 0.374687135219574, -0.06413058936595917, -0.9015319347381592, -1.5644254684448242, 2.1264445781707764, -1.407913088798523, 2.001638412475586, 0.73569256067276, -0.013875864446163177, -1.8431824445724487, -1.970357060432434, 1.3603415489196777, 1.1203467845916748, 2.28751277923584, 0.5856889486312866, 0.4632267951965332, -0.8691095113754272, -0.616743803024292, 0.29007112979888916, -0.9628844261169434, -0.7747002840042114, 0.073698028922081, 2.3991947174072266, 1.6655986309051514, -0.40613827109336853, -0.10485021770000458, -1.0587158203125, 1.4532077312469482, -0.11330414563417435, 0.16742382943630219, 1.953179955482483, -0.218391552567482, -1.099316954612732, 1.2626731395721436, -2.2989559173583984, 0.24364110827445984, 1.9928232431411743, 0.2572818398475647, -0.030764784663915634, -1.431971788406372, -0.6690494418144226, -0.24881389737129211, -0.3547164499759674, -1.1887884140014648, 0.5906063914299011, -0.23461654782295227, -0.781268835067749, -1.4175750017166138, 0.2095358520746231, -1.1162294149398804, -1.6764038801193237, 0.23947036266326904, 1.7705917358398438, 1.9651178121566772, -0.7409606575965881, 1.4910199642181396, -0.25417229533195496, 0.19509950280189514, 1.3180618286132812, 1.1612318754196167, 3.1803884506225586, 1.9865760803222656, -1.3157163858413696, 0.7397441864013672, -0.10016968101263046, -0.3349539637565613, 1.138629674911499, -1.202617883682251, 1.3071707487106323, -0.14067789912223816, -1.2372905015945435, -1.1734570264816284, 0.9290642738342285, 0.5364142060279846, 0.06720318645238876, -0.4663493037223816, 1.2578129768371582, 0.02856050617992878, 1.3926692008972168, 0.513019323348999, -0.2891039252281189, 0.7085909247398376, -0.43601617217063904, -0.4734590947628021, 1.596932291984558, 0.2214430868625641, -1.3752071857452393, -2.282039165496826, -0.2396630048751831, -0.8722106218338013, 0.008379561826586723, -0.5914668440818787, -0.9204105138778687, 1.649742603302002, 0.37721627950668335, -1.2171927690505981, -0.30852267146110535, -0.27836740016937256, -0.6509403586387634, 2.706521987915039, -1.5481412410736084, -0.292807936668396, -1.018791913986206, -0.5707653760910034, 1.6214042901992798, -1.2634782791137695, -0.1868411898612976, -1.0120710134506226, -0.5247270464897156, -1.2664766311645508, -0.6299024820327759, -0.1427643597126007, -0.914274275302887, 0.8623238801956177, 0.17897824943065643, -1.2392160892486572, -0.35968026518821716, -0.8941765427589417, 0.7907598614692688, -0.02494935318827629, 0.28823018074035645, 1.8133885860443115, 0.442229688167572, -0.41593408584594727, 0.6808041334152222, 1.1438555717468262, 0.6817516684532166, -0.6373474597930908, 0.29943549633026123, -0.6588683128356934, 0.36301761865615845, -1.2668343782424927, 0.24853047728538513, -2.800819158554077, 0.5943763852119446, -0.09434200823307037, -0.062036894261837006, -0.10725031793117523, -1.2680599689483643, 1.1158922910690308, 2.548322916030884, -1.198302984237671, 0.47179749608039856, 0.2554302513599396, 1.140251874923706, -1.5355570316314697, 0.27633631229400635, -0.39873209595680237, 2.1571133136749268, 0.18683816492557526, 1.119254231452942, -0.47867459058761597, -2.310661792755127, 0.612708330154419, -1.2776318788528442, -1.1078341007232666, 0.7706635594367981, -0.7731727957725525, -0.014034118503332138, -1.2761112451553345, -0.1579958200454712, -0.7303579449653625, -1.211287021636963, 0.6766960024833679, 0.09115222841501236, 0.5516715049743652, -0.6708410382270813, 0.36252591013908386, -2.145045042037964, -1.326941967010498, -0.2664531469345093, -0.9481396675109863, 0.440381795167923, -0.27476903796195984, 0.7858083844184875, -0.2016262412071228, -0.011736126616597176, 0.3540339171886444, 1.3553214073181152, 3.41998028755188, 0.13512207567691803, 0.40780800580978394, -0.1651395708322525, -0.9353148341178894, 1.4270451068878174, 0.9160986542701721, -0.1582735776901245, -0.5780837535858154, -1.0890839099884033, 1.303101897239685, 1.967649221420288, 0.9825776219367981, 0.0292049627751112, -0.8179172873497009, -0.7673078775405884, -0.010840173810720444, 0.111602284014225, 0.5199622511863708, 0.9681605100631714, 0.08786528557538986, 0.07246382534503937, 1.4875239133834839, 1.2614768743515015, -0.36912214756011963, 0.3622615337371826, -0.7752814888954163, -0.5312293767929077, 0.5278872847557068, 0.4554673135280609, 0.02672809176146984, 0.3512466251850128, -1.0848212242126465, -0.17064842581748962, -0.33214959502220154, -0.9511774182319641, -0.7792211174964905, -0.48166605830192566, -0.37800151109695435, 1.7597637176513672, 0.09488102793693542, -0.42290395498275757, -0.015379413962364197, -0.7300468683242798, 0.0398339182138443, -0.9985681772232056, 0.3281548023223877, -0.1463196873664856, -0.11441928893327713, -0.03982403501868248, 1.816442847251892, -0.9704650640487671, -2.0671370029449463, 0.2885745167732239, 0.1121017262339592, -0.3544212877750397, 0.1344180405139923, 1.5965136289596558, 0.5547077655792236, 1.437957525253296, 1.3878587484359741, 0.9604666233062744, -0.7376688718795776, -1.3665105104446411, 0.6543763875961304, 1.0105715990066528, -1.5038141012191772, 0.7822675704956055, 0.04172433912754059, -0.5150750875473022, 0.6376023292541504, 1.3137942552566528, 0.43320977687835693, -2.0160651206970215, 0.7828429937362671, -0.8868265748023987, 0.7381632328033447, 0.7536492943763733, 0.7478218078613281, 0.09228967130184174, 0.7511126399040222, -1.2826801538467407, -1.1329132318496704, -0.7271102666854858, -0.6850788593292236, 1.8833376169204712, -0.3156643509864807, 0.5333912372589111, -0.14533276855945587, -1.4071435928344727, -0.1762954294681549, 0.6544390320777893, 0.2562205195426941, -0.33178892731666565, 0.7230132818222046, -0.7325628399848938, -1.2062872648239136, -1.4402507543563843, -0.5016714334487915, -0.9927662014961243, -0.8944337964057922, 1.1534955501556396, 0.8454789519309998, 0.3256658911705017, 1.8686896562576294, 0.6336186528205872, 0.17299769818782806, -2.662890911102295, 0.8560464978218079, 0.265461802482605, -0.004488007631152868, 0.9050002694129944, 0.21488578617572784, 1.0071247816085815, -0.01080339401960373, 0.5799593925476074, -2.4191558361053467, 2.32954740524292, -0.2664877474308014, 0.6859628558158875, 0.003054548054933548, -0.06251484155654907, 1.001196026802063, 0.554599940776825, 0.653093159198761, -1.075144648551941, 0.6836962699890137, -0.6404355764389038, 1.3244307041168213, 0.8925334215164185, -0.7860743403434753, -0.04064260423183441, 1.232445478439331, 0.4538526237010956, -0.5452398061752319, -0.9204667210578918, -1.0385814905166626, 0.9143850207328796, 1.878383994102478, -0.0389523059129715, 0.040660709142684937, 0.8872088193893433, 0.6704545021057129, -1.3769512176513672, 0.018130594864487648, -0.7758515477180481, -0.7556478381156921, 1.6054106950759888, 2.092043161392212, -0.0638008862733841, -0.2113322913646698, -0.7862468361854553, -1.3168569803237915, 0.748332679271698, 0.13089130818843842, 0.03931661695241928, 0.7123053073883057, -0.5894998908042908, 1.116389274597168, 0.861375629901886, 0.9578307867050171, 0.21519318222999573, 0.2342611700296402, 0.23715217411518097, -0.28801730275154114, -1.212512731552124, -0.19786642491817474, -1.0478096008300781, -2.573421001434326, 0.5187282562255859, -0.27857157588005066, -1.4921199083328247, 0.0026712575927376747, -1.03702712059021, 0.7760815620422363, -0.5115755796432495, -1.1253793239593506, -1.4764127731323242, 0.1637178659439087, -0.1295642852783203, 0.8685814738273621, -1.5607784986495972, -0.07741282135248184, 1.349332571029663, 1.002468228340149, -0.6497747302055359, 1.0034347772598267, 0.268646776676178, 0.9968535304069519, 0.8838812112808228, -0.328530490398407, 0.4779638350009918, 0.1392093151807785, -1.3192368745803833, 0.47676771879196167, 1.1671395301818848, 0.17444466054439545, 1.4948564767837524, -0.6796203851699829, 0.02002709172666073, 0.4261990785598755, -0.4147915244102478, -0.4380805194377899, -0.6986491084098816, 0.7675908207893372, -0.03453441336750984, -0.868949830532074, 0.1033734530210495, -0.06730769574642181, -0.1549048274755478, 0.1904001384973526, -1.4079049825668335, -0.06979715079069138, -0.2736962139606476, -0.6612108945846558, -1.1882619857788086, -0.05770023167133331, 1.2873327732086182, -0.7670422196388245, -0.1695651262998581, 0.4865976870059967, 0.333698034286499, 0.5523009896278381, 0.6777623891830444, -0.6297290325164795, -0.3967221975326538, -0.21664851903915405, -0.2937876284122467, 0.3849017322063446, 1.3367085456848145, -0.13470874726772308, -1.0422070026397705, 0.7314550280570984, -0.3507132828235626, 0.0677209347486496, 1.9477012157440186, 0.09008949249982834, -0.8263074159622192, 0.30175793170928955, -0.710823118686676, 1.9497960805892944, 1.662646770477295, 1.3210376501083374, -0.02915963903069496, -1.035091757774353, 0.6501792073249817, -0.31742537021636963, -0.3895477056503296, 0.8643893003463745, 0.4637482166290283, -0.18847279250621796, -1.3586524724960327, 0.5648448467254639, 1.1787877082824707, -0.8829058408737183, -0.8547248840332031, 0.1292235106229782, -0.816984236240387, 1.0781244039535522, 0.8064097166061401, 0.4246612787246704, 0.19562093913555145, 1.6064516305923462, 0.7710484266281128, -0.4793837368488312, 0.5261365175247192, 0.5368784070014954, -0.1825956255197525, -2.000767946243286, -1.071340560913086, 0.38987794518470764, -0.5006507039070129, -1.6084401607513428, 1.3580559492111206, -1.2502602338790894, -0.9130444526672363, 0.4235285520553589, 0.08367091417312622, 1.4343324899673462, 0.3369537889957428, 1.6077466011047363, 1.9888838529586792, 1.0380464792251587, 0.324322909116745, 1.3349462747573853, -0.22018574178218842, -0.477981299161911, 1.7916817665100098, -0.4558919072151184, 0.4421902000904083, 1.1747456789016724, -0.36646050214767456, -0.9880061149597168, -0.7510247230529785, -1.1289583444595337, -0.696964681148529, 1.0883829593658447, 0.13083143532276154, -1.1218191385269165, 0.24078519642353058, 1.4407851696014404, 0.10997422784566879, -0.28941234946250916, 0.5897009372711182, 0.3731328845024109, -0.7835168242454529, -0.11648762971162796, -0.94512540102005, 0.4630071520805359, -0.20511651039123535, -0.39318743348121643, 0.36337941884994507, 0.42681649327278137, 1.2461892366409302, 0.021806616336107254, 0.1003669798374176, 1.2814327478408813, -1.4124664068222046, 1.4421792030334473, -0.691843569278717, 0.1682339608669281, -2.291461229324341, 1.3674051761627197, -0.8787552118301392, 1.873040795326233, -2.6129300594329834, 0.4279104769229889, -0.5865960121154785, -0.38936713337898254, 0.368818998336792, -0.371107280254364, 0.13362379372119904, -0.18912306427955627, -1.1698991060256958, -0.1860976219177246, -0.8068133592605591, 0.5321623682975769, 1.0098224878311157, 1.3121472597122192, -1.1111544370651245, -0.2980043590068817, -1.677897572517395, -0.17220745980739594, -0.7195217609405518, 0.40863335132598877, -1.8766722679138184, -0.15003465116024017, -1.9734632968902588, -2.342984437942505, -1.3561656475067139, -0.7825797200202942, 1.0722955465316772, 0.10572996735572815, -0.7870289087295532, 1.032801628112793, -0.31105756759643555, -1.8378592729568481, 1.0606637001037598, -2.171531915664673 ]
https://github.com/huggingface/datasets/issues/5444
info messages logged as warnings
OK I see. It's surprising to me that these are considered "something unexpected happened", the concept of cache is pretty common. Has a user every actually complained that they ran their code once, and it took a minute while the data downloaded, then ran their code again and it ran really fast (and completed successfully) but they were so baffled by the fact that it ran quickly, _and_ didn't set the log level to INFO, _and_ hadn't read the docs (or thought about it) to know that datasets are cached, that they logged an issue asking that this information be output as a warning every time they run their code? That seems like a very niche scenario to cater for, given that the side effect is to flood the console with irrelevant warnings for every other user every other time they run a bit of `datasets` code. And the real world impact is that people TURN OFF warnings, which is a pretty bad habit to get into. Anyhoo, if there's no chance I'm going to change your mind, please close the issue :)
### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
333
183
info messages logged as warnings ### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2 OK I see. It's surprising to me that these are considered "something unexpected happened", the concept of cache is pretty common. Has a user every actually complained that they ran their code once, and it took a minute while the data downloaded, then ran their code again and it ran really fast (and completed successfully) but they were so baffled by the fact that it ran quickly, _and_ didn't set the log level to INFO, _and_ hadn't read the docs (or thought about it) to know that datasets are cached, that they logged an issue asking that this information be output as a warning every time they run their code? That seems like a very niche scenario to cater for, given that the side effect is to flood the console with irrelevant warnings for every other user every other time they run a bit of `datasets` code. And the real world impact is that people TURN OFF warnings, which is a pretty bad habit to get into. Anyhoo, if there's no chance I'm going to change your mind, please close the issue :)
[ -1.255374789237976, -0.9473716616630554, -0.7523675560951233, 1.4561004638671875, -0.1649414300918579, -1.2520487308502197, 0.0686570405960083, -1.0906296968460083, 1.6898003816604614, -0.8039632439613342, 0.305169939994812, -1.6514534950256348, 0.04116402938961983, -0.6184441447257996, -0.7174323797225952, -0.8040235638618469, -0.4532104432582855, -0.8970276713371277, 1.066510558128357, 2.5060694217681885, 1.1686118841171265, -1.483128547668457, 2.690765142440796, 0.7313908934593201, -0.13010509312152863, -1.02344810962677, 0.5372434258460999, -0.011514306999742985, -1.4154480695724487, -0.44644591212272644, -0.9352078437805176, -0.11065687239170074, -0.5368427634239197, -0.5017128586769104, 0.042699456214904785, 0.3159809112548828, -0.18135760724544525, -0.49550414085388184, -0.5352804064750671, -0.7187122702598572, 0.44136711955070496, -0.37075182795524597, 0.9694859981536865, -0.37522074580192566, 1.8625723123550415, -0.525457501411438, 0.43512073159217834, 0.7134432792663574, 1.3890478610992432, 0.2326950877904892, 0.0012007122859358788, 0.2712518274784088, 0.4554920196533203, -0.06824647635221481, 0.5284485816955566, 1.123960256576538, 0.6895919442176819, 0.5193926692008972, 0.7100231051445007, -2.226837396621704, 1.3525066375732422, -0.9466245770454407, 0.2986997365951538, 1.3835225105285645, -0.9941200613975525, 0.3633541464805603, -1.7716095447540283, -0.012477790005505085, 0.5401322841644287, -2.2378594875335693, 0.2424514889717102, -1.2047529220581055, -0.5260149836540222, 1.0039434432983398, 0.3432314991950989, -1.2122057676315308, 0.15697550773620605, -0.431618869304657, 0.9079383015632629, 0.42852482199668884, 1.1805121898651123, -1.6650689840316772, -0.10339387506246567, -0.3088624179363251, 0.11027181148529053, -1.2942169904708862, -1.5078678131103516, 0.5237835645675659, 0.7117739319801331, 0.4944004714488983, -0.14818185567855835, 1.0076817274093628, -1.0610084533691406, 0.8053141236305237, -0.9489961266517639, -1.7414569854736328, -1.4451886415481567, -2.2596843242645264, -2.339540481567383, 0.793219804763794, -0.45701420307159424, -0.4980883002281189, 2.0885307788848877, -1.07569420337677, -1.7508430480957031, 1.1338815689086914, 0.23138491809368134, -0.011075257323682308, 2.42049241065979, 0.25045686960220337, -0.6557037234306335, 0.4763089120388031, -0.7119747996330261, 0.763005256652832, -0.5015992522239685, 1.3238861560821533, 0.34279197454452515, -1.041968822479248, 1.5552817583084106, -0.36302775144577026, 0.5680139064788818, -0.630159318447113, -0.4657484292984009, -0.8004383444786072, 0.2704034447669983, 1.8962517976760864, -0.2899836003780365, 1.5302890539169312, -0.3453505337238312, -1.5760995149612427, -1.687191128730774, 0.8768144845962524, 0.4392937123775482, -0.7845163941383362, 0.17029820382595062, -0.3403846323490143, 0.13259215652942657, -0.05714631825685501, 1.0845881700515747, 1.3711833953857422, 0.7373262643814087, -0.3320906460285187, -0.9120847582817078, 0.20416933298110962, -0.1319158524274826, -0.7703801393508911, -1.703393578529358, -0.3726472854614258, 0.04846985638141632, 0.6180575489997864, -1.2078001499176025, 1.7976889610290527, 0.9604862928390503, 1.8571395874023438, 1.0474140644073486, -0.34834378957748413, 1.5532594919204712, 0.11674395203590393, 1.842146396636963, -0.49613460898399353, 0.63628089427948, -0.43806666135787964, -1.1836433410644531, 0.8011764287948608, -0.3603256344795227, -2.0793657302856445, -0.7179848551750183, -0.8599092960357666, -0.18477728962898254, -0.6768419742584229, 0.9832529425621033, -0.22320285439491272, -1.3462605476379395, 0.2886679172515869, -0.6816326975822449, 0.17206543684005737, -1.1783020496368408, 0.41364818811416626, 0.7261771559715271, -0.6313525438308716, 0.09413325786590576, -0.2729825973510742, -1.2517621517181396, -0.3980322480201721, 0.250871866941452, 1.8175832033157349, -0.8545156717300415, 0.931481659412384, 1.0667493343353271, -0.6682524681091309, -0.011029333807528019, 0.38324493169784546, -0.31949836015701294, 0.8822234869003296, -1.0895798206329346, -0.41377386450767517, 1.118557333946228, -0.21122866868972778, -0.5813604593276978, 1.418398380279541, 0.7016820907592773, -0.9800832867622375, -0.1972598284482956, -0.09237967431545258, -0.8338422775268555, 0.008805681951344013, -1.6164602041244507, -0.0591767355799675, 0.3249082565307617, -1.5959547758102417, -0.46599218249320984, -0.18802955746650696, 1.2891018390655518, -0.0415499173104763, 1.4192473888397217, -0.3531714975833893, -0.1995420604944229, -0.3696048855781555, -0.36362898349761963, 0.19198663532733917, -0.2236853390932083, -0.560051441192627, 0.3043676018714905, -0.7736715078353882, 0.343716561794281, 1.4026565551757812, 0.35317370295524597, 0.03879160434007645, 0.5311565399169922, 1.034773588180542, 0.4338487684726715, -0.03837032616138458, -0.863193929195404, -1.5477150678634644, 2.114811658859253, -1.4919143915176392, 2.0271663665771484, 0.8080328106880188, 0.012285546399652958, -1.800818681716919, -1.949066162109375, 1.3631266355514526, 1.1560192108154297, 2.301661491394043, 0.5638312697410583, 0.4381308853626251, -0.894665002822876, -0.6038005352020264, 0.37116339802742004, -0.9765461683273315, -0.7418222427368164, 0.054010894149541855, 2.3923513889312744, 1.7341053485870361, -0.4824236035346985, -0.1572415828704834, -1.0312358140945435, 1.4033342599868774, -0.15340639650821686, 0.19313335418701172, 1.9899519681930542, -0.24933907389640808, -1.0914279222488403, 1.3449522256851196, -2.3799612522125244, 0.1794547140598297, 1.9855304956436157, 0.2598983645439148, -0.004186239093542099, -1.3753645420074463, -0.6503108739852905, -0.23539957404136658, -0.4072575271129608, -1.1789329051971436, 0.5627611875534058, -0.2432197779417038, -0.7550435066223145, -1.473653793334961, 0.14783327281475067, -1.2026618719100952, -1.6439521312713623, 0.2819063663482666, 1.8000805377960205, 2.0039827823638916, -0.7364547252655029, 1.487477421760559, -0.2696446180343628, 0.13989852368831635, 1.24972403049469, 1.1688740253448486, 3.18853497505188, 1.9388840198516846, -1.3010526895523071, 0.652650773525238, -0.1587143987417221, -0.40328285098075867, 1.034904956817627, -1.1857143640518188, 1.3278831243515015, -0.12079313397407532, -1.21490478515625, -1.174773097038269, 0.9420713186264038, 0.481850802898407, 0.09739966690540314, -0.44015616178512573, 1.2024527788162231, 0.10886310786008835, 1.3092678785324097, 0.5305009484291077, -0.31587672233581543, 0.6357679963111877, -0.4120751917362213, -0.5485116243362427, 1.573259949684143, 0.226137176156044, -1.3979748487472534, -2.215266704559326, -0.25328320264816284, -0.8139110207557678, 0.06871583312749863, -0.631838858127594, -0.9354655146598816, 1.6155836582183838, 0.3422470688819885, -1.2311534881591797, -0.3132466673851013, -0.31879401206970215, -0.6399208307266235, 2.6551523208618164, -1.494361162185669, -0.28722724318504333, -0.9497008323669434, -0.5916349291801453, 1.554105520248413, -1.2477248907089233, -0.23938336968421936, -1.0099031925201416, -0.5493058562278748, -1.169525146484375, -0.5262627005577087, -0.06182394176721573, -0.8645017147064209, 0.840934157371521, 0.21627618372440338, -1.1769732236862183, -0.3241473436355591, -0.9033402800559998, 0.8105596899986267, -0.08187670260667801, 0.2721591591835022, 1.8206623792648315, 0.3981547951698303, -0.4333726167678833, 0.7166553735733032, 1.2098956108093262, 0.6252598166465759, -0.6474236845970154, 0.19992421567440033, -0.6290715336799622, 0.37401261925697327, -1.2424463033676147, 0.28909429907798767, -2.8181707859039307, 0.6268613934516907, -0.0533340722322464, -0.10743977874517441, 0.009494326077401638, -1.3152610063552856, 1.085770606994629, 2.5089917182922363, -1.1754416227340698, 0.4639872610569, 0.2390308976173401, 1.1821119785308838, -1.5527487993240356, 0.356707364320755, -0.4104759991168976, 2.1120924949645996, 0.20430372655391693, 1.1106534004211426, -0.5201119780540466, -2.345202684402466, 0.5433290600776672, -1.2773106098175049, -1.1297017335891724, 0.7320602536201477, -0.8401929140090942, 0.023588046431541443, -1.3840723037719727, -0.1956392526626587, -0.779090940952301, -1.1849817037582397, 0.6324503421783447, 0.10425790399312973, 0.47719743847846985, -0.6451094150543213, 0.3300875425338745, -2.1549339294433594, -1.3614236116409302, -0.17988525331020355, -0.9197068214416504, 0.48726850748062134, -0.3852739632129669, 0.7296830415725708, -0.19270332157611847, 0.022537320852279663, 0.35716941952705383, 1.3921984434127808, 3.36675763130188, 0.13395501673221588, 0.4480475187301636, -0.2046598196029663, -0.8996330499649048, 1.4190027713775635, 0.8868443965911865, -0.13290110230445862, -0.6070062518119812, -1.1110585927963257, 1.3564504384994507, 1.955049991607666, 0.9895545840263367, -0.010075123980641365, -0.765446126461029, -0.7260770201683044, -0.059222642332315445, 0.18106338381767273, 0.5091752409934998, 0.9918938875198364, 0.053606241941452026, 0.09327101707458496, 1.4492515325546265, 1.246812105178833, -0.39033395051956177, 0.33716052770614624, -0.7763595581054688, -0.5143110752105713, 0.4701150953769684, 0.41584888100624084, -0.009491460397839546, 0.3568050265312195, -1.0669156312942505, -0.18811431527137756, -0.392971009016037, -0.929684579372406, -0.7378911972045898, -0.4740108549594879, -0.34884071350097656, 1.7327462434768677, 0.13499458134174347, -0.5205032825469971, -0.038004834204912186, -0.7162153720855713, -0.022208839654922485, -1.048370361328125, 0.2734375596046448, -0.11492758244276047, -0.13522128760814667, -0.062077704817056656, 1.8117046356201172, -0.9329262971878052, -2.0747945308685303, 0.2514464557170868, 0.1521560102701187, -0.24007892608642578, 0.16352921724319458, 1.605063796043396, 0.5386725068092346, 1.4808591604232788, 1.4020957946777344, 0.966375470161438, -0.7419602870941162, -1.3464628458023071, 0.7182910442352295, 1.0068793296813965, -1.4559922218322754, 0.8041583299636841, -0.03210100904107094, -0.5345987677574158, 0.6100403070449829, 1.2660202980041504, 0.4426596462726593, -2.0659823417663574, 0.8538941144943237, -0.9693048000335693, 0.7883924841880798, 0.7147065997123718, 0.7370687127113342, 0.18941888213157654, 0.7799589037895203, -1.2756741046905518, -1.1712640523910522, -0.7351230382919312, -0.7133943438529968, 1.9382803440093994, -0.30567508935928345, 0.5945013761520386, -0.17711909115314484, -1.3979921340942383, -0.17941689491271973, 0.6544058918952942, 0.28150391578674316, -0.40638309717178345, 0.7331608533859253, -0.7191678285598755, -1.2032816410064697, -1.4576267004013062, -0.48424533009529114, -1.0709375143051147, -0.8705909848213196, 1.1469666957855225, 0.7964509129524231, 0.2992995083332062, 1.8895703554153442, 0.6184277534484863, 0.22858546674251556, -2.6545870304107666, 0.8753880858421326, 0.2822992205619812, -0.07805601507425308, 0.9282447099685669, 0.3137873113155365, 0.9809520840644836, 0.04520983621478081, 0.5686582922935486, -2.4403460025787354, 2.3630282878875732, -0.25682711601257324, 0.7286367416381836, -0.012548690661787987, -0.11320370435714722, 1.0963116884231567, 0.6101908087730408, 0.6670544147491455, -1.072814702987671, 0.6485422849655151, -0.5488178133964539, 1.2259074449539185, 0.876090943813324, -0.7728923559188843, -0.03683588281273842, 1.2424532175064087, 0.43622443079948425, -0.5639060735702515, -0.9340348839759827, -1.0055551528930664, 0.916132390499115, 1.8962724208831787, -0.03131938353180885, 0.07672614604234695, 0.8203203082084656, 0.6712174415588379, -1.36135733127594, 0.05127850919961929, -0.7183167338371277, -0.8119558095932007, 1.583267092704773, 2.1260032653808594, -0.14877717196941376, -0.12494289875030518, -0.6845072507858276, -1.3693300485610962, 0.775044858455658, 0.030744969844818115, 0.104363813996315, 0.6345520615577698, -0.6025292277336121, 1.104987621307373, 0.8549778461456299, 0.9701391458511353, 0.16198259592056274, 0.19520454108715057, 0.38579151034355164, -0.30949676036834717, -1.149209976196289, -0.2243114858865738, -1.0216519832611084, -2.5503575801849365, 0.48655399680137634, -0.23952381312847137, -1.494179368019104, -0.00878220982849598, -0.9655809998512268, 0.838627278804779, -0.5012351870536804, -1.0851073265075684, -1.5211803913116455, 0.2056124210357666, -0.1042785719037056, 0.9111785292625427, -1.6259602308273315, -0.140610933303833, 1.2346471548080444, 0.9769469499588013, -0.6569340825080872, 1.0161019563674927, 0.2426525354385376, 0.9495287537574768, 0.8603286743164062, -0.3566860258579254, 0.43754175305366516, 0.1676596850156784, -1.3472870588302612, 0.42854905128479004, 1.1808695793151855, 0.13660751283168793, 1.4542773962020874, -0.6193841099739075, 0.03337080404162407, 0.4125102162361145, -0.4508554935455322, -0.40392062067985535, -0.5703393220901489, 0.6793215870857239, 0.017967589199543, -0.8156688213348389, 0.05221306160092354, -0.09615898877382278, -0.2138521522283554, 0.14427682757377625, -1.4277230501174927, -0.13377702236175537, -0.39618438482284546, -0.6049460768699646, -1.2317123413085938, -0.03004056215286255, 1.3394168615341187, -0.7123828530311584, -0.1935960203409195, 0.5060032606124878, 0.3942711353302002, 0.547074556350708, 0.6793239712715149, -0.6524943113327026, -0.3443934917449951, -0.15800051391124725, -0.3585570752620697, 0.3401620090007782, 1.3601922988891602, -0.1369403451681137, -0.9647954702377319, 0.6912426948547363, -0.32040783762931824, 0.0667499527335167, 1.9751341342926025, 0.10818681865930557, -0.7894845604896545, 0.31762176752090454, -0.7324888706207275, 1.9101749658584595, 1.7174092531204224, 1.2956362962722778, -0.11678724735975266, -0.9586942195892334, 0.6793816089630127, -0.282643586397171, -0.3235468566417694, 0.897250771522522, 0.4180963337421417, -0.2267690747976303, -1.4359608888626099, 0.5739926099777222, 1.2120791673660278, -0.8575342297554016, -0.7898458242416382, 0.08313613384962082, -0.7883897423744202, 1.1492187976837158, 0.6850728392601013, 0.4404408037662506, 0.219233900308609, 1.6346863508224487, 0.7604267001152039, -0.5256581902503967, 0.5880751609802246, 0.5404859185218811, -0.17687101662158966, -2.0571117401123047, -1.1407541036605835, 0.32797154784202576, -0.5095695853233337, -1.6148452758789062, 1.3350064754486084, -1.209260106086731, -0.9792041182518005, 0.486737459897995, 0.007645866833627224, 1.4187922477722168, 0.384770929813385, 1.5563232898712158, 2.119598150253296, 0.9764012694358826, 0.414730429649353, 1.3197247982025146, -0.19899028539657593, -0.4483332335948944, 1.841501235961914, -0.4292200803756714, 0.39711788296699524, 1.1534349918365479, -0.37083524465560913, -0.9753011465072632, -0.7100663185119629, -1.1429014205932617, -0.694513201713562, 1.1201627254486084, 0.0753505676984787, -1.0874133110046387, 0.30058032274246216, 1.5236892700195312, 0.06468557566404343, -0.37231358885765076, 0.590021550655365, 0.45464155077934265, -0.7742672562599182, -0.10490277409553528, -0.9162725210189819, 0.5023760795593262, -0.27139851450920105, -0.43678268790245056, 0.4408740699291229, 0.4036715626716614, 1.3043752908706665, -0.005741464905440807, 0.04796060919761658, 1.212234377861023, -1.4717895984649658, 1.5156892538070679, -0.6569907665252686, 0.14345265924930573, -2.2962753772735596, 1.4483426809310913, -0.7272241711616516, 1.9986612796783447, -2.5864994525909424, 0.4154592752456665, -0.6439469456672668, -0.4836854636669159, 0.4021349251270294, -0.31444358825683594, 0.12700329720973969, -0.22739946842193604, -1.1036254167556763, -0.09652438014745712, -0.6877928376197815, 0.5564371347427368, 1.037973165512085, 1.295343279838562, -1.0441160202026367, -0.2902272641658783, -1.6794240474700928, -0.18305876851081848, -0.6663501858711243, 0.2804756760597229, -1.9736201763153076, -0.2132689505815506, -1.9967321157455444, -2.3481228351593018, -1.3592461347579956, -0.8508350253105164, 1.140677809715271, 0.12109825015068054, -0.854057788848877, 1.1576454639434814, -0.33896663784980774, -1.908545732498169, 1.032843828201294, -2.1300647258758545 ]
https://github.com/huggingface/datasets/issues/5444
info messages logged as warnings
I see your point and I'm not closed to switching to INFO, but I think those logs are important to make the library less opaque. I also just checked `transformers` scripts and they default to INFO which is nice. However for colab users the default is still WARNING iirc, and it counts as one of the main env where `datasets` is used. We also use progress bars a lot in `datasets`, that are shown if the logger is at the WARNING level. But we offer a function to disable the progress bars if necessary.
### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
333
94
info messages logged as warnings ### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2 I see your point and I'm not closed to switching to INFO, but I think those logs are important to make the library less opaque. I also just checked `transformers` scripts and they default to INFO which is nice. However for colab users the default is still WARNING iirc, and it counts as one of the main env where `datasets` is used. We also use progress bars a lot in `datasets`, that are shown if the logger is at the WARNING level. But we offer a function to disable the progress bars if necessary.
[ -1.202043056488037, -0.9279480576515198, -0.7376196980476379, 1.464721441268921, -0.15710747241973877, -1.2811208963394165, 0.1379225254058838, -1.106611967086792, 1.726864218711853, -0.8411441445350647, 0.34654518961906433, -1.6311951875686646, 0.00867342110723257, -0.5844743251800537, -0.728191077709198, -0.8450101613998413, -0.4978707730770111, -0.7669200897216797, 1.0981252193450928, 2.563436269760132, 1.163794755935669, -1.4528355598449707, 2.641455888748169, 0.6598119139671326, -0.09927333146333694, -1.049748182296753, 0.5502929091453552, 0.04078304022550583, -1.4277831315994263, -0.38100317120552063, -0.874656617641449, -0.11268419027328491, -0.5023491382598877, -0.5488214492797852, 0.04809248447418213, 0.3071397542953491, -0.21906986832618713, -0.5571762323379517, -0.43666818737983704, -0.7611591219902039, 0.4686412215232849, -0.3919544816017151, 0.9553331732749939, -0.3757101893424988, 1.8281522989273071, -0.5281270742416382, 0.4986705780029297, 0.7677059769630432, 1.396850824356079, 0.23162977397441864, -0.06877370923757553, 0.35058721899986267, 0.43192601203918457, -0.0444885678589344, 0.5100146532058716, 1.0701457262039185, 0.6074755191802979, 0.45560431480407715, 0.7154115438461304, -2.217876672744751, 1.3524781465530396, -0.9692510366439819, 0.30315372347831726, 1.3827003240585327, -1.020897626876831, 0.37238091230392456, -1.7515504360198975, -0.018156444653868675, 0.49614375829696655, -2.265169382095337, 0.2356245070695877, -1.2345576286315918, -0.506191074848175, 1.042475700378418, 0.3748052418231964, -1.2476561069488525, 0.08319970965385437, -0.4086436331272125, 0.8763933181762695, 0.48689156770706177, 1.2353171110153198, -1.6830247640609741, -0.11699637770652771, -0.32744300365448, 0.14206218719482422, -1.2831517457962036, -1.5064769983291626, 0.4725218713283539, 0.7003495097160339, 0.48277774453163147, -0.12266497313976288, 0.9536346197128296, -0.9936206340789795, 0.8125371336936951, -0.9363999366760254, -1.8135913610458374, -1.4219621419906616, -2.251251697540283, -2.3654191493988037, 0.7553496360778809, -0.4207790195941925, -0.48263511061668396, 2.0985684394836426, -1.0665147304534912, -1.8144774436950684, 1.1692321300506592, 0.23412847518920898, -0.029338326305150986, 2.3716461658477783, 0.24657481908798218, -0.6743813157081604, 0.4523885250091553, -0.7435540556907654, 0.689620316028595, -0.49872735142707825, 1.2712047100067139, 0.3885476887226105, -1.059346318244934, 1.5353996753692627, -0.36468788981437683, 0.573581874370575, -0.6363807916641235, -0.3950456380844116, -0.7956389784812927, 0.2603989541530609, 1.919271469116211, -0.30328938364982605, 1.5269393920898438, -0.3598453998565674, -1.5912004709243774, -1.6725152730941772, 0.869492769241333, 0.49955612421035767, -0.7033718824386597, 0.13958358764648438, -0.2559281289577484, 0.08570773899555206, 0.010205724276602268, 1.0349626541137695, 1.3201510906219482, 0.7701713442802429, -0.29032471776008606, -0.9557700157165527, 0.2683573067188263, -0.08402666449546814, -0.7408207654953003, -1.7403051853179932, -0.35299521684646606, 0.07632620632648468, 0.6466503739356995, -1.19231379032135, 1.7520815134048462, 0.9109236001968384, 1.9004294872283936, 0.9868025183677673, -0.33055242896080017, 1.5427292585372925, 0.09816070646047592, 1.8580741882324219, -0.4478934705257416, 0.6903092861175537, -0.4075191020965576, -1.1705864667892456, 0.8008193373680115, -0.35686126351356506, -2.0705084800720215, -0.7468465566635132, -0.9068586230278015, -0.16245362162590027, -0.6533189415931702, 1.0250296592712402, -0.18209747970104218, -1.3469983339309692, 0.27627676725387573, -0.7750195860862732, 0.15246035158634186, -1.2404266595840454, 0.40993911027908325, 0.7735783457756042, -0.6309245228767395, 0.10704749077558517, -0.29642245173454285, -1.2912027835845947, -0.42315390706062317, 0.2669927179813385, 1.803291916847229, -0.8640293478965759, 0.9681772589683533, 1.038012146949768, -0.7513210773468018, -0.02889752760529518, 0.37915968894958496, -0.3565700948238373, 0.8815379738807678, -1.0572824478149414, -0.37911808490753174, 1.129016399383545, -0.21181127429008484, -0.6146653890609741, 1.4906785488128662, 0.718980073928833, -0.9602759480476379, -0.15597394108772278, -0.1392487734556198, -0.8116922378540039, 0.029414985328912735, -1.6359703540802002, -0.09088269621133804, 0.2974523603916168, -1.5740540027618408, -0.5242176651954651, -0.21867094933986664, 1.3351622819900513, -0.031454380601644516, 1.4766768217086792, -0.28570854663848877, -0.1922827661037445, -0.45321834087371826, -0.33397212624549866, 0.1879410445690155, -0.22406405210494995, -0.6153450012207031, 0.32188770174980164, -0.7055591940879822, 0.3350211977958679, 1.3506851196289062, 0.3404659628868103, 0.042256712913513184, 0.5538769960403442, 1.032139778137207, 0.36697810888290405, -0.08835242688655853, -0.9114858508110046, -1.5659093856811523, 2.1133320331573486, -1.4398884773254395, 1.9847468137741089, 0.7566953301429749, 0.007352958433330059, -1.812667965888977, -1.9647138118743896, 1.3607901334762573, 1.1348822116851807, 2.290553569793701, 0.5640339255332947, 0.4422398805618286, -0.8323534727096558, -0.6022300720214844, 0.3200244605541229, -0.9810839891433716, -0.7524109482765198, 0.08764636516571045, 2.374279022216797, 1.678680419921875, -0.45832523703575134, -0.12228978425264359, -1.0528907775878906, 1.4762614965438843, -0.09765411168336868, 0.12619435787200928, 1.9661628007888794, -0.19819657504558563, -1.0772886276245117, 1.2965089082717896, -2.287212610244751, 0.17503246665000916, 1.9473267793655396, 0.2384849637746811, 0.006217142567038536, -1.4059158563613892, -0.6537722945213318, -0.23598460853099823, -0.3941953182220459, -1.1961930990219116, 0.5516461133956909, -0.19500717520713806, -0.7789314985275269, -1.4720972776412964, 0.2025115191936493, -1.1749143600463867, -1.6685359477996826, 0.24690139293670654, 1.7918020486831665, 1.9861297607421875, -0.7759178280830383, 1.5481152534484863, -0.2783295810222626, 0.14627929031848907, 1.2405623197555542, 1.1501100063323975, 3.179719924926758, 1.9912266731262207, -1.2934049367904663, 0.6648751497268677, -0.10447026044130325, -0.4021889567375183, 1.1105384826660156, -1.203750491142273, 1.3480583429336548, -0.14838498830795288, -1.2090429067611694, -1.165162205696106, 0.9642925262451172, 0.5375531315803528, 0.0915173664689064, -0.4301496744155884, 1.2233960628509521, 0.08959394693374634, 1.3766624927520752, 0.5041008591651917, -0.28829431533813477, 0.73484867811203, -0.44130179286003113, -0.4815394878387451, 1.5997090339660645, 0.24411121010780334, -1.3502135276794434, -2.2635722160339355, -0.2692311406135559, -0.8535733819007874, 0.05963471904397011, -0.6027248501777649, -0.9089181423187256, 1.6010137796401978, 0.3917728364467621, -1.2263000011444092, -0.33949053287506104, -0.33173632621765137, -0.6560834050178528, 2.6652634143829346, -1.5228368043899536, -0.2559211552143097, -0.9602909684181213, -0.5954023003578186, 1.5592228174209595, -1.268667459487915, -0.19938817620277405, -1.0470441579818726, -0.5381055474281311, -1.2373912334442139, -0.6422732472419739, -0.10480586439371109, -0.9401921033859253, 0.8186025619506836, 0.1330023556947708, -1.215179204940796, -0.30974262952804565, -0.9263936281204224, 0.7963263988494873, -0.04883284121751785, 0.2703942656517029, 1.763940453529358, 0.3985269367694855, -0.409454345703125, 0.7148107290267944, 1.144960880279541, 0.6279059648513794, -0.6427649855613708, 0.2925472557544708, -0.6848653554916382, 0.31851938366889954, -1.2374858856201172, 0.287197470664978, -2.829481840133667, 0.5993794798851013, -0.06575944274663925, -0.037020597606897354, -0.058131638914346695, -1.2604950666427612, 1.1888855695724487, 2.5792624950408936, -1.197083830833435, 0.45979660749435425, 0.25394827127456665, 1.152186632156372, -1.556748390197754, 0.29844334721565247, -0.3535720109939575, 2.1280417442321777, 0.18305912613868713, 1.1479177474975586, -0.4897761642932892, -2.3251988887786865, 0.5859183669090271, -1.263942837715149, -1.1580166816711426, 0.777269184589386, -0.7932191491127014, -0.031254418194293976, -1.3047727346420288, -0.182861328125, -0.726445198059082, -1.1981217861175537, 0.6453277468681335, 0.09247656166553497, 0.5560522079467773, -0.6749854683876038, 0.35888397693634033, -2.1628470420837402, -1.3714995384216309, -0.26361554861068726, -0.9229875206947327, 0.42897218465805054, -0.28127750754356384, 0.7369014620780945, -0.19620801508426666, 0.02357989177107811, 0.3488118052482605, 1.316508173942566, 3.3774962425231934, 0.15222938358783722, 0.43673163652420044, -0.16070781648159027, -0.9241443872451782, 1.416287899017334, 0.9330095648765564, -0.16036513447761536, -0.5682677626609802, -1.0642977952957153, 1.3090863227844238, 1.9788600206375122, 1.02462899684906, 0.03480330482125282, -0.8164426684379578, -0.766051173210144, -0.03161124140024185, 0.15816345810890198, 0.5127284526824951, 0.9932042956352234, 0.12776251137256622, 0.10812633484601974, 1.4819600582122803, 1.268237829208374, -0.4350530803203583, 0.3911619484424591, -0.7866607308387756, -0.5379309058189392, 0.5055381059646606, 0.41483911871910095, -0.004119661636650562, 0.34236371517181396, -1.0583765506744385, -0.17913472652435303, -0.3606652617454529, -0.9270983338356018, -0.7543213963508606, -0.46311014890670776, -0.34371528029441833, 1.756260871887207, 0.09514525532722473, -0.4163595736026764, -0.026863615959882736, -0.7050201892852783, 0.045692067593336105, -1.0068031549453735, 0.25689616799354553, -0.13533087074756622, -0.12171627581119537, -0.0777420625090599, 1.832811713218689, -0.9531816840171814, -2.048264503479004, 0.2936547100543976, 0.08910438418388367, -0.3459600806236267, 0.1540052592754364, 1.6144341230392456, 0.5426341891288757, 1.4746031761169434, 1.388262152671814, 0.992569625377655, -0.7508155107498169, -1.3606665134429932, 0.6674941778182983, 1.0050275325775146, -1.4373654127120972, 0.7719982266426086, 0.025460653007030487, -0.5093653798103333, 0.6088869571685791, 1.2845711708068848, 0.4459264874458313, -2.039506196975708, 0.8198307156562805, -0.8939712047576904, 0.7598080635070801, 0.7393845319747925, 0.7457544207572937, 0.10575824230909348, 0.6920078992843628, -1.2501020431518555, -1.142129898071289, -0.7426207065582275, -0.6865485906600952, 1.9135985374450684, -0.31557658314704895, 0.5323693156242371, -0.18300795555114746, -1.3927602767944336, -0.1819635033607483, 0.6394259333610535, 0.34377652406692505, -0.38594916462898254, 0.7547741532325745, -0.7021093368530273, -1.216343879699707, -1.4429755210876465, -0.47114360332489014, -1.0214875936508179, -0.8571962118148804, 1.132391333580017, 0.8045135736465454, 0.2974967062473297, 1.8376262187957764, 0.6433852910995483, 0.21791601181030273, -2.673015832901001, 0.8903841376304626, 0.28701359033584595, -0.07565989345312119, 0.9003060460090637, 0.248155415058136, 0.986127495765686, -0.027628492563962936, 0.5737862586975098, -2.4176928997039795, 2.368710517883301, -0.22308462858200073, 0.7305281162261963, 0.023480039089918137, -0.11533250659704208, 1.017582654953003, 0.5756358504295349, 0.6541525721549988, -1.1098257303237915, 0.6747171878814697, -0.6138148307800293, 1.2874623537063599, 0.8635026812553406, -0.7846153974533081, -0.07359358668327332, 1.2571066617965698, 0.4466909170150757, -0.5456423163414001, -0.9542831182479858, -1.0459078550338745, 0.9295743107795715, 1.8646392822265625, -0.05195708945393562, 0.044946350157260895, 0.8535506725311279, 0.6601960062980652, -1.3788543939590454, 0.017437685281038284, -0.7610560655593872, -0.798527717590332, 1.572568416595459, 2.1127443313598633, -0.10923483222723007, -0.23483487963676453, -0.7964040637016296, -1.2993688583374023, 0.7681732177734375, 0.1156533807516098, 0.11493849754333496, 0.670236349105835, -0.5813288688659668, 1.184552788734436, 0.8937268257141113, 0.9075955748558044, 0.23724320530891418, 0.20919182896614075, 0.26273319125175476, -0.27912652492523193, -1.1526492834091187, -0.191855788230896, -1.0112762451171875, -2.546290159225464, 0.49930018186569214, -0.27639856934547424, -1.5011602640151978, -0.032956432551145554, -1.0325021743774414, 0.7953697443008423, -0.4934763014316559, -1.0641355514526367, -1.509328007698059, 0.15646715462207794, -0.1258566677570343, 0.9125653505325317, -1.5978834629058838, -0.0812140479683876, 1.3158917427062988, 0.9666932225227356, -0.638401448726654, 0.9945304989814758, 0.2543698847293854, 0.9496798515319824, 0.8942238092422485, -0.3583083748817444, 0.44499126076698303, 0.16995905339717865, -1.3079164028167725, 0.4150167405605316, 1.1666266918182373, 0.16653946042060852, 1.437195897102356, -0.6739620566368103, 0.007871798239648342, 0.41086581349372864, -0.4023617208003998, -0.44829845428466797, -0.6550372242927551, 0.7106156349182129, -0.015749869868159294, -0.8802377581596375, 0.11952297389507294, -0.08544248342514038, -0.1754133403301239, 0.214039146900177, -1.4819618463516235, -0.12593358755111694, -0.28714171051979065, -0.6211571097373962, -1.1538513898849487, -0.03654607757925987, 1.337538242340088, -0.7819262146949768, -0.1792386770248413, 0.46672800183296204, 0.3771865963935852, 0.5347367525100708, 0.7115552425384521, -0.6409075856208801, -0.37397438287734985, -0.2067403793334961, -0.2883133292198181, 0.3446739912033081, 1.3669542074203491, -0.16965161263942719, -0.9925061464309692, 0.7072842121124268, -0.33999645709991455, 0.05061902478337288, 1.985792875289917, 0.10699577629566193, -0.8636565208435059, 0.29911917448043823, -0.7028711438179016, 1.941341757774353, 1.7206474542617798, 1.3681598901748657, -0.06725921481847763, -1.0306577682495117, 0.662884533405304, -0.3004192113876343, -0.3517971336841583, 0.9288442730903625, 0.46021732687950134, -0.23278433084487915, -1.3304624557495117, 0.5429851412773132, 1.2357476949691772, -0.8619613647460938, -0.8840758204460144, 0.08952297270298004, -0.8478901982307434, 1.1249580383300781, 0.7723245620727539, 0.4303359091281891, 0.14800192415714264, 1.6042288541793823, 0.7632004618644714, -0.4932840168476105, 0.5328018069267273, 0.5303937196731567, -0.18872873485088348, -2.007141590118408, -1.132301688194275, 0.34065812826156616, -0.5460174679756165, -1.612883448600769, 1.3756834268569946, -1.2299671173095703, -0.9526650905609131, 0.458808571100235, 0.007513583637773991, 1.469653844833374, 0.33595380187034607, 1.6123884916305542, 2.0301496982574463, 1.045939564704895, 0.3470536172389984, 1.3198113441467285, -0.22485285997390747, -0.4507147967815399, 1.809847354888916, -0.4534270167350769, 0.4065016806125641, 1.2011349201202393, -0.3495979309082031, -0.9580566883087158, -0.756581723690033, -1.1184133291244507, -0.7541220188140869, 1.1434978246688843, 0.11954443156719208, -1.1304935216903687, 0.29135146737098694, 1.4911658763885498, 0.09262853860855103, -0.3193252384662628, 0.5826857089996338, 0.4307234585285187, -0.7812778949737549, -0.08627408742904663, -0.9628264904022217, 0.44488200545310974, -0.20513536036014557, -0.4094340205192566, 0.429246187210083, 0.39580684900283813, 1.2303844690322876, -0.0017305784858763218, 0.13748636841773987, 1.2643086910247803, -1.452780842781067, 1.4881457090377808, -0.6904797554016113, 0.18875417113304138, -2.316718101501465, 1.416325569152832, -0.8304995894432068, 1.8943663835525513, -2.64308762550354, 0.39488619565963745, -0.6261047720909119, -0.4315241277217865, 0.3589530289173126, -0.3571936786174774, 0.11392603814601898, -0.20258904993534088, -1.1814243793487549, -0.2177649438381195, -0.7800219058990479, 0.5158731341362, 0.9909905195236206, 1.321854591369629, -1.0481395721435547, -0.2947046756744385, -1.669740080833435, -0.17177072167396545, -0.6738026142120361, 0.4170054793357849, -1.8989390134811401, -0.19958917796611786, -1.9362953901290894, -2.337433338165283, -1.310497760772705, -0.8038792014122009, 1.0965616703033447, 0.13886278867721558, -0.7856807708740234, 1.0628352165222168, -0.31634998321533203, -1.8567156791687012, 1.107342004776001, -2.1370625495910645 ]
https://github.com/huggingface/datasets/issues/5444
info messages logged as warnings
These kinds of messages are logged as INFO in Transformers, so we should probably be consistent with them
### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
333
18
info messages logged as warnings ### Describe the bug Code in `datasets` is using `logger.warning` when it should be using `logger.info`. Some of these are probably a matter of opinion, but I think anything starting with `logger.warning(f"Loading chached` clearly falls into the info category. Definitions from the Python docs for reference: * INFO: Confirmation that things are working as expected. * WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected. In theory, a user should be able to resolve things such that there are no warnings. ### Steps to reproduce the bug Load any dataset that's already cached. ### Expected behavior No output when log level is at the default WARNING level. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.8 - PyArrow version: 9.0.0 - Pandas version: 1.5.2 These kinds of messages are logged as INFO in Transformers, so we should probably be consistent with them
[ -1.2303543090820312, -0.8941532373428345, -0.7463688254356384, 1.490765929222107, -0.19838981330394745, -1.3130637407302856, 0.13688313961029053, -1.0077579021453857, 1.7194478511810303, -0.8827599287033081, 0.3706198036670685, -1.6408991813659668, 0.030980480834841728, -0.6354483962059021, -0.7382850050926208, -0.8336368203163147, -0.46810460090637207, -0.7617580890655518, 1.0665538311004639, 2.5744776725769043, 1.18533456325531, -1.428613305091858, 2.689190626144409, 0.6720699667930603, -0.12554588913917542, -1.0511142015457153, 0.5366421937942505, 0.05709773302078247, -1.4544486999511719, -0.4206315577030182, -0.9166745543479919, -0.11751962453126907, -0.45523104071617126, -0.5559821724891663, 0.08814332634210587, 0.2866118550300598, -0.1832975298166275, -0.5387011766433716, -0.4189207851886749, -0.7672460079193115, 0.458919495344162, -0.37886369228363037, 0.9409851431846619, -0.48338887095451355, 1.8357559442520142, -0.5678035616874695, 0.5111687779426575, 0.7425739765167236, 1.3749375343322754, 0.23606836795806885, -0.10260119289159775, 0.3758923411369324, 0.4694783389568329, 0.04957646131515503, 0.5594112873077393, 1.0743311643600464, 0.6235259771347046, 0.42943719029426575, 0.6770893931388855, -2.187861680984497, 1.3236656188964844, -0.927350640296936, 0.2856288254261017, 1.3534952402114868, -1.0736232995986938, 0.32546117901802063, -1.7312192916870117, -0.06267017126083374, 0.5050356388092041, -2.2987968921661377, 0.2596032917499542, -1.2426973581314087, -0.5642319321632385, 1.0344303846359253, 0.3760133981704712, -1.2458430528640747, 0.050628356635570526, -0.4379047751426697, 0.8648895025253296, 0.4594024419784546, 1.200143814086914, -1.6091547012329102, -0.09669361263513565, -0.31732091307640076, 0.07976477593183517, -1.27305006980896, -1.457818627357483, 0.5008782744407654, 0.7156445384025574, 0.5064401030540466, -0.12745973467826843, 0.9082903861999512, -1.0335023403167725, 0.8667261600494385, -0.9258629679679871, -1.8134815692901611, -1.4355850219726562, -2.3098676204681396, -2.3712663650512695, 0.8033928871154785, -0.377876877784729, -0.5031810998916626, 2.124614953994751, -1.106145977973938, -1.8265560865402222, 1.1607997417449951, 0.22340749204158783, -0.038925446569919586, 2.347233295440674, 0.29720258712768555, -0.69293212890625, 0.475076824426651, -0.7386640310287476, 0.6886149048805237, -0.5773370862007141, 1.2652060985565186, 0.3860529661178589, -1.0764033794403076, 1.5585416555404663, -0.40866705775260925, 0.5358274579048157, -0.6110354065895081, -0.4110807776451111, -0.7679687142372131, 0.2267390340566635, 1.946204423904419, -0.283260703086853, 1.5071555376052856, -0.30464357137680054, -1.567435622215271, -1.6337729692459106, 0.8091886043548584, 0.4991232752799988, -0.6807675957679749, 0.16548483073711395, -0.27979132533073425, 0.10371433943510056, -0.020980827510356903, 1.0185099840164185, 1.325103759765625, 0.8103004097938538, -0.2943427562713623, -0.9260649085044861, 0.3067026138305664, -0.04821954667568207, -0.7407700419425964, -1.731818675994873, -0.31720250844955444, 0.022293219342827797, 0.6785492300987244, -1.2115787267684937, 1.762378215789795, 0.9130957126617432, 1.8781582117080688, 1.0092893838882446, -0.25869977474212646, 1.5527960062026978, 0.08287723362445831, 1.8911614418029785, -0.4455730617046356, 0.693047046661377, -0.3979682922363281, -1.204189658164978, 0.768973708152771, -0.3888683319091797, -2.1090126037597656, -0.6941387057304382, -0.923629641532898, -0.18036623299121857, -0.7151535749435425, 1.1053533554077148, -0.19421891868114471, -1.316272497177124, 0.29872697591781616, -0.8059203624725342, 0.20938445627689362, -1.2714829444885254, 0.3873555362224579, 0.7625754475593567, -0.5762628316879272, 0.13209237158298492, -0.32212963700294495, -1.2794932126998901, -0.39793410897254944, 0.23117175698280334, 1.8115978240966797, -0.9303494095802307, 1.015207052230835, 1.0062977075576782, -0.7186703085899353, -0.02609558030962944, 0.429500550031662, -0.3802289366722107, 0.8961978554725647, -1.0772720575332642, -0.39217332005500793, 1.1440764665603638, -0.22413644194602966, -0.5769298672676086, 1.4718619585037231, 0.7591915726661682, -0.9357834458351135, -0.16181956231594086, -0.12681584060192108, -0.8029350638389587, 0.008122008293867111, -1.662993311882019, -0.11530709266662598, 0.3281184136867523, -1.5547912120819092, -0.4893054664134979, -0.16600778698921204, 1.3594790697097778, -0.016935843974351883, 1.5001529455184937, -0.28067222237586975, -0.2473069578409195, -0.38565391302108765, -0.3346676528453827, 0.23112793266773224, -0.2028777003288269, -0.582822322845459, 0.34435832500457764, -0.6954445838928223, 0.29359936714172363, 1.3150641918182373, 0.31924667954444885, 0.043370604515075684, 0.6282185912132263, 0.9983762502670288, 0.372829407453537, -0.11760005354881287, -0.8986521363258362, -1.5890864133834839, 2.1412317752838135, -1.4214417934417725, 1.9970186948776245, 0.7443847060203552, 0.012060660868883133, -1.8296644687652588, -1.996488094329834, 1.3517545461654663, 1.1325658559799194, 2.2625510692596436, 0.561760663986206, 0.4425256848335266, -0.8543224334716797, -0.6090846061706543, 0.2934877872467041, -1.0173226594924927, -0.7693169713020325, 0.05425899475812912, 2.405479669570923, 1.6745846271514893, -0.45765241980552673, -0.10413611680269241, -1.0872150659561157, 1.4247184991836548, -0.10799453407526016, 0.14932046830654144, 1.9750357866287231, -0.21669408679008484, -1.0617884397506714, 1.2878491878509521, -2.314640522003174, 0.2292129248380661, 2.003188133239746, 0.2374974638223648, -0.06794679909944534, -1.427666425704956, -0.6633988618850708, -0.2670610547065735, -0.3645908832550049, -1.1717400550842285, 0.6117789149284363, -0.1901267021894455, -0.8236407041549683, -1.3980389833450317, 0.1803487092256546, -1.1277047395706177, -1.7088185548782349, 0.2912592589855194, 1.7589716911315918, 1.9828909635543823, -0.7198219895362854, 1.521540641784668, -0.28587400913238525, 0.18228235840797424, 1.3066697120666504, 1.1762102842330933, 3.216372013092041, 2.000126361846924, -1.291806936264038, 0.7438419461250305, -0.0959325060248375, -0.3425924479961395, 1.1114031076431274, -1.2205828428268433, 1.3193293809890747, -0.1264888197183609, -1.2479504346847534, -1.1414369344711304, 0.9225257635116577, 0.5231711864471436, 0.05270463973283768, -0.4190986752510071, 1.282400131225586, 0.039935581386089325, 1.4012160301208496, 0.5240811109542847, -0.26697808504104614, 0.6813046336174011, -0.4032627046108246, -0.44660139083862305, 1.5690348148345947, 0.22512049973011017, -1.415223240852356, -2.260052442550659, -0.2307053804397583, -0.8427802324295044, -0.009952287189662457, -0.5946980118751526, -0.9407743215560913, 1.628126859664917, 0.3716580271720886, -1.186509609222412, -0.33210238814353943, -0.2820557951927185, -0.6177912950515747, 2.678846836090088, -1.568099021911621, -0.2689957916736603, -1.0028114318847656, -0.5611360669136047, 1.6154632568359375, -1.2998794317245483, -0.2197115272283554, -1.001119613647461, -0.523455798625946, -1.2702515125274658, -0.6346913576126099, -0.15533936023712158, -0.9546882510185242, 0.829583466053009, 0.08916319906711578, -1.231988549232483, -0.34483879804611206, -0.9001005291938782, 0.7580887079238892, -0.033076200634241104, 0.31354254484176636, 1.7869064807891846, 0.40032511949539185, -0.40841448307037354, 0.688401997089386, 1.1835533380508423, 0.6669154763221741, -0.6433391571044922, 0.2899938225746155, -0.6555430889129639, 0.35554561018943787, -1.2077094316482544, 0.27624231576919556, -2.797358989715576, 0.5857548117637634, -0.10303337872028351, -0.08161453157663345, -0.11636872589588165, -1.2527564764022827, 1.1911393404006958, 2.5292766094207764, -1.2003185749053955, 0.44324201345443726, 0.24234509468078613, 1.1222667694091797, -1.5082032680511475, 0.30634474754333496, -0.38370856642723083, 2.1273717880249023, 0.19398121535778046, 1.138747215270996, -0.4779251217842102, -2.2684919834136963, 0.6474710702896118, -1.2711132764816284, -1.096049427986145, 0.7657787203788757, -0.7411236763000488, -0.04121514409780502, -1.294995903968811, -0.15695200860500336, -0.7560194134712219, -1.2048712968826294, 0.6389859318733215, 0.1282884180545807, 0.5355359315872192, -0.6569839119911194, 0.33780327439308167, -2.1674559116363525, -1.3146641254425049, -0.23299457132816315, -0.9486163854598999, 0.4258219599723816, -0.274215966463089, 0.7223035097122192, -0.2043144255876541, -0.013228308409452438, 0.39615577459335327, 1.349340558052063, 3.3763341903686523, 0.10350030660629272, 0.4325990378856659, -0.15396109223365784, -0.9105085730552673, 1.4126380681991577, 0.9031512141227722, -0.14060136675834656, -0.5725988149642944, -1.053584098815918, 1.3084161281585693, 1.9621691703796387, 1.02419912815094, 0.023788096383213997, -0.8409008383750916, -0.7956255674362183, -0.004461999516934156, 0.11780329048633575, 0.5326253771781921, 1.0068714618682861, 0.0702793076634407, 0.04698310047388077, 1.4595328569412231, 1.2433087825775146, -0.39229002594947815, 0.3489704430103302, -0.7901508808135986, -0.5159426927566528, 0.5003933906555176, 0.44481465220451355, 0.015190111473202705, 0.3292635381221771, -1.055739402770996, -0.1719963550567627, -0.29469987750053406, -0.9069344401359558, -0.7939985394477844, -0.4793381989002228, -0.4045729637145996, 1.7311785221099854, 0.09712212532758713, -0.4097870886325836, -0.028524212539196014, -0.7275937795639038, 0.042106568813323975, -0.9502981901168823, 0.2858709692955017, -0.13270068168640137, -0.11940690129995346, -0.0750332847237587, 1.8262988328933716, -0.9640125036239624, -2.0976078510284424, 0.3100327253341675, 0.09192162752151489, -0.32738417387008667, 0.09439662843942642, 1.5924184322357178, 0.5753109455108643, 1.4451560974121094, 1.3751260042190552, 0.9601600170135498, -0.7271351218223572, -1.3644856214523315, 0.7047367095947266, 1.0178838968276978, -1.511152982711792, 0.7705799341201782, 0.011024637147784233, -0.5166247487068176, 0.6236357688903809, 1.266672134399414, 0.44767090678215027, -2.022998332977295, 0.8026164770126343, -0.9174948334693909, 0.7143406271934509, 0.7438627481460571, 0.7587828636169434, 0.1469917744398117, 0.7580985426902771, -1.289480209350586, -1.1154587268829346, -0.7496370673179626, -0.6638968586921692, 1.8653836250305176, -0.3131779134273529, 0.5193547010421753, -0.1570919156074524, -1.3954256772994995, -0.19260749220848083, 0.6103904247283936, 0.2224605530500412, -0.34922927618026733, 0.7177959084510803, -0.734127938747406, -1.235713005065918, -1.4507200717926025, -0.5144742727279663, -0.9704715609550476, -0.8850137591362, 1.1068962812423706, 0.8433302044868469, 0.34528809785842896, 1.8664108514785767, 0.6267513632774353, 0.17618879675865173, -2.6536731719970703, 0.8663815855979919, 0.24638816714286804, -0.032411329448223114, 0.908066987991333, 0.2000129520893097, 1.0526137351989746, -0.025342052802443504, 0.5429328083992004, -2.4654946327209473, 2.327415943145752, -0.2537132203578949, 0.6832701563835144, 0.04595787823200226, -0.01176337618380785, 1.0324466228485107, 0.5695692300796509, 0.6309157609939575, -1.073241114616394, 0.6786460876464844, -0.6304448843002319, 1.3343993425369263, 0.9036497473716736, -0.7767598628997803, -0.03248226270079613, 1.2519360780715942, 0.4117247760295868, -0.5217710733413696, -0.9218693375587463, -1.0394515991210938, 0.8918153047561646, 1.8696540594100952, -0.016448598355054855, 0.048165470361709595, 0.8527471423149109, 0.6622921228408813, -1.3616091012954712, -0.013765102252364159, -0.7644966244697571, -0.767166018486023, 1.6082773208618164, 2.0973598957061768, -0.06725603342056274, -0.17939715087413788, -0.7928159832954407, -1.2976247072219849, 0.7620323300361633, 0.08158326894044876, 0.07041971385478973, 0.7095135450363159, -0.5814291834831238, 1.1433132886886597, 0.8772314190864563, 0.9564498066902161, 0.21625114977359772, 0.22688981890678406, 0.22534087300300598, -0.24652785062789917, -1.2005306482315063, -0.259753555059433, -1.0401395559310913, -2.6042709350585938, 0.5046245455741882, -0.36437568068504333, -1.50931715965271, 0.003474835306406021, -1.072357177734375, 0.7717249989509583, -0.5281631946563721, -1.074399709701538, -1.485102653503418, 0.1530512422323227, -0.12877170741558075, 0.8984155058860779, -1.5757920742034912, -0.08866523206233978, 1.3794689178466797, 0.9554165601730347, -0.6212223768234253, 1.0088117122650146, 0.28514429926872253, 1.0016666650772095, 0.8695366382598877, -0.3371983468532562, 0.4599684774875641, 0.1845494955778122, -1.3224856853485107, 0.504101037979126, 1.192683219909668, 0.143331378698349, 1.4960325956344604, -0.6681836247444153, 0.010140463709831238, 0.4409082233905792, -0.451423317193985, -0.4453248679637909, -0.6803913712501526, 0.7717103958129883, 0.00009831972420215607, -0.894867479801178, 0.10935132205486298, -0.12924371659755707, -0.1675756871700287, 0.18386468291282654, -1.4473530054092407, -0.1187855526804924, -0.24155348539352417, -0.6989513635635376, -1.1808065176010132, -0.05377271771430969, 1.3083504438400269, -0.7813783288002014, -0.13980577886104584, 0.49228739738464355, 0.30652299523353577, 0.5833811163902283, 0.7224132418632507, -0.6543043255805969, -0.4041232168674469, -0.21334940195083618, -0.27988696098327637, 0.3577998876571655, 1.3476603031158447, -0.08961229771375656, -1.005790114402771, 0.6973664164543152, -0.3719627857208252, 0.05124634504318237, 1.9905123710632324, 0.08257793635129929, -0.8614031076431274, 0.35396888852119446, -0.6944980025291443, 1.9812651872634888, 1.6200778484344482, 1.2780462503433228, -0.02024203911423683, -1.0347040891647339, 0.6315532326698303, -0.25361743569374084, -0.3635471761226654, 0.8149099946022034, 0.47690582275390625, -0.23349305987358093, -1.3197450637817383, 0.5575482249259949, 1.1791231632232666, -0.9142188429832458, -0.9063928127288818, 0.1494172364473343, -0.8220337629318237, 1.1012743711471558, 0.779491126537323, 0.41251140832901, 0.17963038384914398, 1.6153340339660645, 0.7650442719459534, -0.5355026125907898, 0.4981127977371216, 0.5453285574913025, -0.15803606808185577, -2.010822057723999, -1.0196037292480469, 0.41431939601898193, -0.49526432156562805, -1.5956381559371948, 1.3396875858306885, -1.2371042966842651, -0.9223155975341797, 0.46002596616744995, 0.10364604741334915, 1.4342533349990845, 0.3419586420059204, 1.603008508682251, 1.9713821411132812, 1.0424138307571411, 0.3407437801361084, 1.3521186113357544, -0.23490391671657562, -0.465548574924469, 1.7780303955078125, -0.4364025890827179, 0.4746844470500946, 1.1980727910995483, -0.40099605917930603, -0.9575217962265015, -0.7422466278076172, -1.1027522087097168, -0.7100797295570374, 1.1152629852294922, 0.16347773373126984, -1.1217777729034424, 0.246354341506958, 1.4528334140777588, 0.11839686334133148, -0.32579585909843445, 0.5481054782867432, 0.38903501629829407, -0.7639939785003662, -0.12653228640556335, -0.991965651512146, 0.4572717249393463, -0.21142148971557617, -0.42399686574935913, 0.3787592649459839, 0.43543940782546997, 1.221119999885559, -0.01992582529783249, 0.11500256508588791, 1.2494462728500366, -1.4536982774734497, 1.4518566131591797, -0.6668196320533752, 0.13033798336982727, -2.262892246246338, 1.412380576133728, -0.868241012096405, 1.895294427871704, -2.648808240890503, 0.3999673128128052, -0.5876621603965759, -0.37489053606987, 0.340411901473999, -0.3410780131816864, 0.13091906905174255, -0.21420204639434814, -1.1347332000732422, -0.18264201283454895, -0.8179785013198853, 0.5658972263336182, 1.0307096242904663, 1.3012583255767822, -1.096551775932312, -0.278615266084671, -1.6497893333435059, -0.17594946920871735, -0.6954532861709595, 0.38525861501693726, -1.897550106048584, -0.13731200993061066, -1.9652321338653564, -2.3273422718048096, -1.3640614748001099, -0.8088551163673401, 1.128090262413025, 0.13135714828968048, -0.7725103497505188, 1.0065231323242188, -0.30135977268218994, -1.849013090133667, 1.062554121017456, -2.158900022506714 ]
https://github.com/huggingface/datasets/issues/5442
OneDrive Integrations with HF Datasets
Hi! We use [`fsspec`](https://github.com/fsspec/filesystem_spec) to integrate with storage providers. You can find more info (and the usage examples) in [our docs](https://huggingface.co/docs/datasets/v2.8.0/filesystems#download-and-prepare-a-dataset-into-a-cloud-storage). [`gdrivefs`](https://github.com/fsspec/gdrivefs) makes it possible to use Google Drive as a storage service in Datasets, but this is not the case for OneDrive, since its[ Python SDK](https://github.com/OneDrive/onedrive-sdk-python) is not integrated with `fsspec`. Can you please request the integration with `fsspec` in their repo to address this limitation?
### Feature request First of all , I would like to thank all community who are developed DataSet storage and make it free available How to integrate our Onedrive account or any other possible storage clouds (like google drive,...) with the **HF** datasets section. For example, if I have **50GB** on my **Onedrive** account and I want to move between drive and Hugging face repo or vis versa ### Motivation make the dataset section more flexible with other possible storage like the integration between Google Collab and Google drive the storage ### Your contribution Can be done using Hugging face CLI
334
67
OneDrive Integrations with HF Datasets ### Feature request First of all , I would like to thank all community who are developed DataSet storage and make it free available How to integrate our Onedrive account or any other possible storage clouds (like google drive,...) with the **HF** datasets section. For example, if I have **50GB** on my **Onedrive** account and I want to move between drive and Hugging face repo or vis versa ### Motivation make the dataset section more flexible with other possible storage like the integration between Google Collab and Google drive the storage ### Your contribution Can be done using Hugging face CLI Hi! We use [`fsspec`](https://github.com/fsspec/filesystem_spec) to integrate with storage providers. You can find more info (and the usage examples) in [our docs](https://huggingface.co/docs/datasets/v2.8.0/filesystems#download-and-prepare-a-dataset-into-a-cloud-storage). [`gdrivefs`](https://github.com/fsspec/gdrivefs) makes it possible to use Google Drive as a storage service in Datasets, but this is not the case for OneDrive, since its[ Python SDK](https://github.com/OneDrive/onedrive-sdk-python) is not integrated with `fsspec`. Can you please request the integration with `fsspec` in their repo to address this limitation?
[ -1.24271821975708, -0.959071159362793, -0.7232421040534973, 1.3471896648406982, -0.11604730039834976, -1.284589171409607, 0.12122423946857452, -1.082366943359375, 1.6358044147491455, -0.7559685111045837, 0.28111669421195984, -1.7193418741226196, -0.004981605801731348, -0.5995687246322632, -0.7580930590629578, -0.806546688079834, -0.48442938923835754, -0.7597934603691101, 1.053892731666565, 2.570091485977173, 1.2444425821304321, -1.3851803541183472, 2.727764368057251, 0.6723617315292358, -0.24393706023693085, -0.973010778427124, 0.4614414870738983, 0.08478810638189316, -1.2999829053878784, -0.41981038451194763, -0.8462701439857483, -0.03367338702082634, -0.46199101209640503, -0.49913498759269714, 0.10090815275907516, 0.4075865149497986, -0.15175026655197144, -0.4014543890953064, -0.5607056021690369, -0.8383672833442688, 0.44630536437034607, -0.3538271188735962, 0.9086669087409973, -0.3562494218349457, 1.8557475805282593, -0.6117957830429077, 0.4099101424217224, 0.6673943400382996, 1.406172513961792, 0.18436487019062042, -0.024635087698698044, 0.39950287342071533, 0.40423721075057983, -0.002771422266960144, 0.4675091803073883, 1.189451813697815, 0.6790482401847839, 0.44087302684783936, 0.6573578715324402, -2.1496284008026123, 1.328889012336731, -0.9817104935646057, 0.32793617248535156, 1.4077050685882568, -1.0055724382400513, 0.41230878233909607, -1.8303887844085693, -0.13296139240264893, 0.5041171312332153, -2.334014654159546, 0.08090020716190338, -1.2053531408309937, -0.5101151466369629, 0.9748972654342651, 0.2712559103965759, -1.2631891965866089, 0.2753100097179413, -0.4902791678905487, 1.0331095457077026, 0.4691554605960846, 1.1790374517440796, -1.7319408655166626, -0.07576730847358704, -0.18989330530166626, 0.05449163168668747, -1.409621238708496, -1.5462442636489868, 0.5319411158561707, 0.6318977475166321, 0.5756567716598511, -0.0669778361916542, 0.8971383571624756, -1.0108065605163574, 0.9392442107200623, -0.9347916841506958, -1.6579409837722778, -1.4347790479660034, -2.345926284790039, -2.3043465614318848, 0.8927262425422668, -0.5066441893577576, -0.536870002746582, 1.9324002265930176, -1.0045597553253174, -1.7812834978103638, 1.0996558666229248, 0.24912163615226746, -0.03909080848097801, 2.3986852169036865, 0.2239154875278473, -0.7397115230560303, 0.4713292121887207, -0.6939958333969116, 0.8678851127624512, -0.49783292412757874, 1.4331610202789307, 0.4681418240070343, -1.1001932621002197, 1.5401417016983032, -0.40414687991142273, 0.47234103083610535, -0.7372069358825684, -0.5345324277877808, -0.817922830581665, 0.45377522706985474, 1.940086007118225, -0.35887452960014343, 1.5648173093795776, -0.35080114006996155, -1.5024772882461548, -1.555698275566101, 0.8161405920982361, 0.5857550501823425, -0.761313259601593, 0.12152497470378876, -0.3468594253063202, 0.07442885637283325, 0.07353392243385315, 1.059709072113037, 1.2108790874481201, 0.6251732110977173, -0.34893202781677246, -0.8707956671714783, 0.31677567958831787, -0.08063583821058273, -0.6635391712188721, -1.7693047523498535, -0.31304827332496643, 0.18252810835838318, 0.6009949445724487, -1.2726819515228271, 1.7089059352874756, 0.8289805054664612, 1.985451340675354, 1.0708366632461548, -0.39294660091400146, 1.4774402379989624, 0.02421467751264572, 1.8354918956756592, -0.5546790361404419, 0.7190591096878052, -0.26435860991477966, -1.1724581718444824, 0.8139135837554932, -0.4363923668861389, -2.1386096477508545, -0.7262690663337708, -0.8936234712600708, -0.19296099245548248, -0.7753973603248596, 0.921276330947876, -0.20067691802978516, -1.4129983186721802, 0.16245077550411224, -0.6497753262519836, 0.14422857761383057, -1.3443751335144043, 0.26749280095100403, 0.8045341968536377, -0.6254766583442688, 0.033668290823698044, -0.22137737274169922, -1.350805401802063, -0.5921984910964966, 0.31429970264434814, 1.9189873933792114, -0.6881541013717651, 0.9876142740249634, 1.0559295415878296, -0.7788894176483154, 0.05707692354917526, 0.33403995633125305, -0.33891257643699646, 0.8944379091262817, -1.071645736694336, -0.4333229064941406, 1.0714921951293945, -0.2567419409751892, -0.5485879778862, 1.4287288188934326, 0.7772225141525269, -1.0357364416122437, -0.3025640845298767, -0.17782334983348846, -0.886863648891449, 0.062314391136169434, -1.5524049997329712, -0.14503410458564758, 0.25035110116004944, -1.5629454851150513, -0.5072622895240784, -0.2627262473106384, 1.2828810214996338, -0.12737412750720978, 1.4388679265975952, -0.3234417140483856, -0.20117300748825073, -0.4098168611526489, -0.48443570733070374, 0.181221142411232, -0.312794953584671, -0.6361322402954102, 0.31581735610961914, -0.6884381771087646, 0.3632885813713074, 1.3880743980407715, 0.44116637110710144, 0.049969837069511414, 0.5722629427909851, 1.0320955514907837, 0.28630873560905457, -0.23760247230529785, -0.7815841436386108, -1.6467348337173462, 2.070225715637207, -1.3398349285125732, 1.9845759868621826, 0.8322077393531799, -0.0028233909979462624, -1.7244648933410645, -1.8891626596450806, 1.3693040609359741, 1.2195786237716675, 2.305936098098755, 0.6156426072120667, 0.4498801529407501, -0.7512630224227905, -0.7304190397262573, 0.2551891505718231, -1.0288454294204712, -0.7726999521255493, 0.07872909307479858, 2.3570172786712646, 1.6846981048583984, -0.563816487789154, -0.14628355205059052, -1.0961376428604126, 1.3542250394821167, -0.1676221489906311, 0.21645858883857727, 1.9413284063339233, -0.303132027387619, -1.0288760662078857, 1.2601799964904785, -2.403247117996216, 0.21197859942913055, 1.9639992713928223, 0.3132590651512146, 0.04899858310818672, -1.3239473104476929, -0.5701926946640015, -0.40782320499420166, -0.37654876708984375, -1.1950218677520752, 0.49258139729499817, -0.2624993324279785, -0.7793706059455872, -1.5032445192337036, 0.0696043074131012, -1.1756736040115356, -1.655150055885315, 0.4029390811920166, 1.852381944656372, 2.023425579071045, -0.7766104936599731, 1.481532335281372, -0.25483590364456177, 0.1391620635986328, 1.2273383140563965, 1.2604941129684448, 3.1273887157440186, 1.90957772731781, -1.2502384185791016, 0.6946974396705627, -0.12439888715744019, -0.45518240332603455, 1.1612883806228638, -1.071677327156067, 1.2283116579055786, -0.10009962320327759, -1.2444748878479004, -1.239732027053833, 0.9601439237594604, 0.5347961783409119, 0.046103622764348984, -0.4699236750602722, 1.150996208190918, 0.12486080825328827, 1.3116997480392456, 0.5318282842636108, -0.35190731287002563, 0.5707828998565674, -0.35425621271133423, -0.44077056646347046, 1.6252806186676025, 0.16638436913490295, -1.5213360786437988, -2.351654052734375, -0.1589847207069397, -0.8105511665344238, 0.005359507165849209, -0.7690973281860352, -0.9738127589225769, 1.6634870767593384, 0.5154107809066772, -1.222712755203247, -0.28496938943862915, -0.40690383315086365, -0.6230562329292297, 2.637416362762451, -1.5114563703536987, -0.19817763566970825, -0.9443342685699463, -0.5537490248680115, 1.5887798070907593, -1.225643277168274, -0.1920047253370285, -0.9552093744277954, -0.6431394815444946, -1.2131218910217285, -0.5574581623077393, -0.04519473761320114, -0.9164242148399353, 0.686579167842865, 0.0699835941195488, -1.0489916801452637, -0.2701494097709656, -0.9163013100624084, 0.890954315662384, -0.12126582115888596, 0.25378674268722534, 1.8308525085449219, 0.4165712296962738, -0.3739835023880005, 0.7216437458992004, 1.266945481300354, 0.6429533362388611, -0.6072753667831421, 0.11837898194789886, -0.7103919982910156, 0.33949482440948486, -1.2784576416015625, 0.291856050491333, -2.8468167781829834, 0.5904579758644104, -0.09469971060752869, -0.06654004007577896, -0.002031195443123579, -1.3303637504577637, 1.189877986907959, 2.635965347290039, -1.2057669162750244, 0.4717521667480469, 0.38269925117492676, 1.1988229751586914, -1.5197484493255615, 0.3011559545993805, -0.3964712619781494, 2.0446791648864746, 0.19073045253753662, 1.1192964315414429, -0.5918076038360596, -2.2111711502075195, 0.604576826095581, -1.168426275253296, -1.1334041357040405, 0.6720958948135376, -0.8522863388061523, 0.10050956159830093, -1.4186367988586426, -0.11597689241170883, -0.8620519042015076, -1.1966301202774048, 0.7102570533752441, 0.03346455097198486, 0.4082406163215637, -0.6134597063064575, 0.3267431855201721, -2.1643118858337402, -1.3174043893814087, -0.21018187701702118, -0.9158740639686584, 0.4830703139305115, -0.3515150547027588, 0.7017008662223816, -0.09663908928632736, 0.010404885746538639, 0.2288406491279602, 1.403800368309021, 3.3587870597839355, 0.15867914259433746, 0.3759256601333618, -0.05521542206406593, -0.9171763062477112, 1.5044840574264526, 0.9618142247200012, -0.15578852593898773, -0.5300642848014832, -0.9946097135543823, 1.355973482131958, 1.9311037063598633, 1.1525548696517944, 0.12451012432575226, -0.8211542367935181, -0.8491074442863464, 0.029579009860754013, 0.23253662884235382, 0.3786512315273285, 0.9697803258895874, 0.0072071971371769905, 0.1202923059463501, 1.4514636993408203, 1.3372751474380493, -0.5759578347206116, 0.4874143898487091, -0.8420321345329285, -0.41358503699302673, 0.42051994800567627, 0.26357319951057434, -0.008497582748532295, 0.37110161781311035, -0.9711824655532837, -0.30035340785980225, -0.2504456639289856, -0.9699191451072693, -0.6859909296035767, -0.38907548785209656, -0.45739492774009705, 1.7446508407592773, 0.08559030294418335, -0.4731997847557068, -0.01664513349533081, -0.790358304977417, -0.10012458264827728, -1.013603687286377, 0.27178192138671875, -0.10769502073526382, -0.02358722873032093, -0.1164289191365242, 1.7433149814605713, -0.8928858041763306, -2.147806406021118, 0.2543240487575531, 0.29564207792282104, -0.4831308126449585, 0.10066663473844528, 1.6765061616897583, 0.5457963347434998, 1.4393103122711182, 1.4080548286437988, 0.9430367350578308, -0.6644599437713623, -1.3007590770721436, 0.7090514302253723, 1.0079132318496704, -1.434699296951294, 0.7738387584686279, 0.043583665043115616, -0.544499933719635, 0.6710827350616455, 1.345193862915039, 0.39913734793663025, -1.942091703414917, 0.9226664304733276, -0.9423786401748657, 0.7972502708435059, 0.6744950413703918, 0.6867833733558655, 0.25062429904937744, 0.8453798890113831, -1.3471999168395996, -1.1337279081344604, -0.8581290245056152, -0.5608534812927246, 1.9277937412261963, -0.1655711978673935, 0.5795542597770691, -0.22088786959648132, -1.3104617595672607, -0.11690390855073929, 0.7505900263786316, 0.35353925824165344, -0.379101425409317, 0.8922855854034424, -0.6822509169578552, -1.088926076889038, -1.4457744359970093, -0.42173925042152405, -0.9825283288955688, -0.839485764503479, 1.0171552896499634, 0.7952992916107178, 0.3744131028652191, 1.8664008378982544, 0.581985592842102, 0.23267503082752228, -2.6982295513153076, 0.8552899360656738, 0.31127995252609253, -0.04147766903042793, 0.947054386138916, 0.3068787157535553, 1.060344934463501, -0.011031275615096092, 0.4804316759109497, -2.3467020988464355, 2.2310538291931152, -0.2568506598472595, 0.7593386173248291, 0.10558846592903137, -0.04521738365292549, 1.1905627250671387, 0.5937805771827698, 0.5681001543998718, -1.2142741680145264, 0.7726344466209412, -0.6317829489707947, 1.198854923248291, 0.8468772172927856, -0.8684535622596741, -0.02248961292207241, 1.2783132791519165, 0.5114133954048157, -0.4421950578689575, -0.978044867515564, -0.8875047564506531, 0.9627900123596191, 1.7456316947937012, -0.045277874916791916, 0.032267577946186066, 0.863492488861084, 0.7128328084945679, -1.3573724031448364, 0.04546681046485901, -0.7063063979148865, -0.6658222079277039, 1.691412329673767, 2.0482351779937744, 0.004049100913107395, -0.2213284969329834, -0.6064079999923706, -1.229262351989746, 0.7594807744026184, -0.036156367510557175, 0.1515807956457138, 0.6744290590286255, -0.7278328537940979, 1.1589452028274536, 0.9054799675941467, 0.8077982068061829, 0.14756719768047333, 0.14835774898529053, 0.39327120780944824, -0.2418326437473297, -1.078932285308838, -0.3018205761909485, -1.123156189918518, -2.574208974838257, 0.4259624779224396, -0.2756795883178711, -1.5012315511703491, 0.013772747479379177, -1.0171009302139282, 0.9337965250015259, -0.5723479390144348, -1.086279273033142, -1.545600175857544, 0.2544281780719757, -0.14807134866714478, 0.8451834917068481, -1.6178877353668213, -0.17023195326328278, 1.1941940784454346, 0.7681397199630737, -0.5251196622848511, 1.0313210487365723, 0.29346656799316406, 1.0020391941070557, 0.8389300107955933, -0.32096701860427856, 0.4777296781539917, 0.10061917454004288, -1.3764864206314087, 0.48763957619667053, 1.215064525604248, 0.13929642736911774, 1.3672144412994385, -0.5607139468193054, 0.1370442509651184, 0.3908095061779022, -0.4770742952823639, -0.5283179879188538, -0.569936990737915, 0.7213691473007202, -0.004994359333068132, -0.9974702000617981, -0.02348261885344982, -0.09060732275247574, -0.21734444797039032, 0.21025659143924713, -1.548932671546936, -0.19831059873104095, -0.3848087191581726, -0.49957630038261414, -1.274036169052124, -0.0021910197101533413, 1.3840374946594238, -0.8934530019760132, -0.20646940171718597, 0.5181379318237305, 0.38652652502059937, 0.532161295413971, 0.7153794765472412, -0.6755139827728271, -0.29081693291664124, -0.32233530282974243, -0.323586642742157, 0.2451343834400177, 1.2091740369796753, -0.1558365523815155, -0.909077525138855, 0.7052819132804871, -0.32871732115745544, 0.08784236758947372, 1.9236305952072144, 0.11854392290115356, -0.8370824456214905, 0.23676514625549316, -0.7057610154151917, 1.9156159162521362, 1.6724376678466797, 1.3977481126785278, -0.09394882619380951, -1.0016002655029297, 0.5437049269676208, -0.19609008729457855, -0.3170439898967743, 0.9821709990501404, 0.44313737750053406, -0.2198466807603836, -1.4504847526550293, 0.5417706966400146, 1.2860033512115479, -0.8614711165428162, -0.7546692490577698, 0.05756790190935135, -0.8377932906150818, 1.1621474027633667, 0.6787372827529907, 0.2697717547416687, 0.26237916946411133, 1.647790551185608, 0.6552510857582092, -0.45035260915756226, 0.5268108248710632, 0.5856797695159912, -0.23093877732753754, -2.048607349395752, -1.1052359342575073, 0.27287355065345764, -0.3931785821914673, -1.487226963043213, 1.3420603275299072, -1.0843807458877563, -0.9009377956390381, 0.5507392883300781, 0.09003584831953049, 1.5002738237380981, 0.2787981629371643, 1.6951009035110474, 2.0845730304718018, 0.8683938980102539, 0.28545576333999634, 1.3021901845932007, -0.044357024133205414, -0.43414461612701416, 1.7973490953445435, -0.3746730387210846, 0.42875170707702637, 1.1259925365447998, -0.4538828730583191, -1.0201436281204224, -0.7319746613502502, -1.1185269355773926, -0.6950181722640991, 1.1234334707260132, 0.1392500400543213, -1.0794745683670044, 0.1767837256193161, 1.528805136680603, 0.14107365906238556, -0.33351048827171326, 0.4879187047481537, 0.5152237415313721, -0.6958176493644714, -0.1031835675239563, -0.9912658929824829, 0.4576447308063507, -0.12670353055000305, -0.3956476151943207, 0.2927359938621521, 0.4694717228412628, 1.146264672279358, -0.021403983235359192, 0.1781911551952362, 1.2112435102462769, -1.4224026203155518, 1.433822751045227, -0.6661731600761414, 0.32721444964408875, -2.3766212463378906, 1.5266036987304688, -0.7512723803520203, 1.9273381233215332, -2.612208604812622, 0.37667316198349, -0.6456594467163086, -0.4195663630962372, 0.31336209177970886, -0.4336918890476227, 0.18026533722877502, -0.1063273549079895, -1.1139529943466187, -0.15553142130374908, -0.7776662111282349, 0.6171709895133972, 1.1467516422271729, 1.2652064561843872, -1.0621787309646606, -0.24510140717029572, -1.6900471448898315, -0.11415944248437881, -0.6293355822563171, 0.3827745318412781, -1.887946367263794, -0.15836350619792938, -1.8889176845550537, -2.340202569961548, -1.4165130853652954, -0.8132018446922302, 1.0150554180145264, 0.07067742943763733, -0.8842729330062866, 1.165053367614746, -0.47579434514045715, -1.8462896347045898, 1.1689155101776123, -2.3003273010253906 ]