html_url
stringlengths
51
51
title
stringlengths
6
280
comments
stringlengths
63
141k
body
stringlengths
18
58.6k
comment_length
int64
16
10.8k
text
stringlengths
6
280
embeddings
listlengths
768
768
https://github.com/huggingface/datasets/issues/5430
Support Apache Beam >= 2.44.0
Some of the shard files now have 0 number of rows. We have opened an issue in the Apache Beam repo: - https://github.com/apache/beam/issues/25041
Once we find out the root cause of: - #5426 we should revert the temporary pin on apache-beam introduced by: - #5429
23
Support Apache Beam >= 2.44.0
[ -0.33163198828697205, -0.19468018412590027, -0.2538297772407532, -0.18167351186275482, 0.08133967965841293, -0.14635992050170898, -0.05522572621703148, 0.48587194085121155, -0.11430386453866959, 0.13749493658542633, 0.11392970383167267, 0.018100185319781303, -0.3649848401546478, 0.15086089074611664, -0.14473597705364227, -0.26746222376823425, 0.18078574538230896, 0.015807291492819786, -0.24190235137939453, -0.012461784295737743, -0.03617044910788536, 0.2676854431629181, -0.23407498002052307, -0.0942520946264267, 0.12334498018026352, 0.12019836157560349, 0.22402092814445496, 0.055669646710157394, -0.36422014236450195, -0.0666096955537796, -0.05600430443882942, -0.010724073275923729, 0.25559183955192566, 0.018087564036250114, -0.00010409302922198549, 0.17011401057243347, 0.44838592410087585, -0.09103263914585114, -0.0725686177611351, 0.25959137082099915, -0.22060051560401917, -0.14707686007022858, -0.1557883769273758, 0.1164657324552536, -0.29036831855773926, -0.5176599025726318, 0.0692407488822937, -0.1826099157333374, 0.47059741616249084, 0.07746058702468872, 0.30541524291038513, 0.42275702953338623, 0.18398883938789368, -0.08961459994316101, 0.49926936626434326, -0.0980447307229042, -0.14492832124233246, -0.1624554991722107, 0.17978982627391815, -0.05001618340611458, -0.5054320693016052, 0.2753634452819824, 0.08110276609659195, -0.16996312141418457, 0.05405769497156143, -0.5291945934295654, 0.13866855204105377, -0.21482478082180023, 0.06839753687381744, -0.0881117433309555, 0.3153679370880127, 0.02339843288064003, -0.11360365152359009, 0.2655511796474457, -0.048987120389938354, 0.1915910840034485, 0.2930615246295929, -0.1256420612335205, 0.037057433277368546, 0.23020926117897034, 0.08936123549938202, -0.22068250179290771, -0.4544356167316437, 0.005928186699748039, 0.14755277335643768, 0.4651930332183838, 0.03253912925720215, 0.09497176110744476, 0.10917805135250092, -0.103162482380867, 0.21276472508907318, 0.21663060784339905, -0.3029969334602356, 0.16907885670661926, -0.08975426852703094, -0.0676017627120018, -0.09394688159227371, 0.17146027088165283, 0.11941760033369064, 0.31287631392478943, -0.15554742515087128, 0.40823742747306824, 0.08478456735610962, -0.06261047720909119, -0.2851749658584595, 0.1703866869211197, 0.2634938359260559, -0.3332340717315674, 0.26589056849479675, 0.012899775058031082, 0.313581645488739, 0.08549685776233673, -0.05798013135790825, -0.5047074556350708, -0.6001992225646973, 0.1974962055683136, -0.23585310578346252, 0.09856487065553665, 0.2507464289665222, 0.01293108332902193, -0.33907079696655273, 0.0332845002412796, 0.0223406795412302, 0.21793879568576813, 0.41154739260673523, 0.5633814334869385, 0.11989524215459824, 0.08622413873672485, -0.1465519517660141, -0.6754918098449707, -0.03452605754137039, 0.13805003464221954, -0.3025331199169159, -0.051317248493433, 0.21037840843200684, 0.36395543813705444, 0.026898350566625595, -0.08103158324956894, 0.46250930428504944, 0.12905006110668182, 0.06533604115247726, 0.4398930072784424, 0.04195822775363922, 0.2407432645559311, 0.042652104049921036, 0.14531689882278442, -0.2352825552225113, 0.38194045424461365, 0.10539163649082184, -0.05160265788435936, -0.07798576354980469, -0.23435582220554352, 0.013689334504306316, 0.21279266476631165, 0.07900388538837433, 0.35932809114456177, 0.09674113243818283, -0.09215766936540604, -0.310016006231308, -0.0055082920007407665, 0.0677732527256012, 0.05067990720272064, 0.2700706720352173, -0.08414396643638611, 0.002590556861832738, 0.1011972725391388, 0.17908047139644623, 0.029493864625692368, 0.19500818848609924, -0.29596638679504395, -0.20948074758052826, -0.1080894023180008, 0.10094337910413742, -0.41041067242622375, -0.13976450264453888, -0.25697752833366394, 0.6113802790641785, -0.5492427349090576, -0.08104345202445984, 0.30023494362831116, 0.06506349891424179, -0.31679853796958923, 0.3391968607902527, 0.08320295065641403, 0.058981407433748245, -0.012690181843936443, -0.5580596923828125, 0.19551728665828705, 0.14158175885677338, 0.14231599867343903, -0.19258145987987518, -0.09728986769914627, -0.517462968826294, 0.1776781976222992, 0.30492353439331055, 0.028877347707748413, 0.2894851863384247, 0.23260118067264557, 0.13049845397472382, -0.08838990330696106, 0.3229178190231323, 0.12281706184148788, -0.03252654895186424, -0.1698429435491562, 0.18262113630771637, 0.23002758622169495, 0.015483388677239418, -0.037312526255846024, -0.48277005553245544, 0.1579776108264923, 0.4957022964954376, 0.1924978345632553, -0.10720033198595047, 0.059264279901981354, 0.0019494551233947277, -0.19109848141670227, 0.21715989708900452, 0.029847726225852966, -0.046288926154375076, -0.048096682876348495, -0.23470133543014526, 0.22270913422107697, 0.0008312246645800769, -0.007089926395565271, 0.011586667969822884, 0.12690864503383636, -0.08769117295742035, -0.03645636886358261, 0.24007345736026764, 0.029980100691318512, 0.13895533978939056, -0.30892741680145264, -0.06182979419827461, 0.34953486919403076, -0.3415210247039795, 0.35749274492263794, -0.00675874762237072, 0.47248294949531555, 0.2115306556224823, -0.49477341771125793, 0.3484075665473938, -0.2180432677268982, -0.1716996431350708, -0.028894659131765366, 0.3848092257976532, 0.09675192832946777, 0.28485986590385437, -0.020246513187885284, 0.12428964674472809, 0.19841328263282776, 0.0954601988196373, 0.09136103838682175, -0.24007131159305573, -0.05991898477077484, 0.2073781043291092, -0.018602820113301277, -0.07601763308048248, -0.19731660187244415, 0.28063926100730896, -0.28618016839027405, 0.14068634808063507, -0.062198735773563385, 0.04119626805186272, -0.14618034660816193, -0.23302404582500458, 0.07524175196886063, 0.45518696308135986, -0.21612952649593353, -0.14003953337669373, 0.31485047936439514, -0.19092369079589844, 0.04070814326405525, 0.19544246792793274, -0.27049046754837036, 0.17181259393692017, -0.13643969595432281, 0.19541820883750916, 0.1503969132900238, 0.20464743673801422, -0.19140858948230743, 0.02938142791390419, -0.10040666162967682, -0.14500048756599426, -0.13994483649730682, -0.20080280303955078, -0.06845799833536148, -0.18457528948783875, -0.1639721542596817, -0.252178817987442, 0.28646793961524963, -0.3253401219844818, -0.3195045292377472, 0.31039658188819885, 0.22442632913589478, -0.08433268219232559, 0.3754761219024658, 0.3887667655944824, 0.08604869991540909, 0.3328970968723297, -0.01728370413184166, -0.28310897946357727, -0.024139417335391045, -0.18033111095428467, 0.2320704311132431, 0.02426782064139843, -0.07690031826496124, 0.09554128348827362, -0.00584601704031229, 0.003509306814521551, -0.45196548104286194, -0.17558443546295166, 0.2532351613044739, 0.08629994094371796, -0.18672296404838562, 0.19717594981193542, 0.07710252702236176, 0.04598257318139076, 0.3659266531467438, 0.11135800182819366, -0.35557982325553894, -0.0709933191537857, 0.03854973614215851, -0.12118159234523773, 0.20420606434345245, -0.037816356867551804, -0.09291937202215195, 0.3073236346244812, -0.4591861069202423, -0.12269148975610733, 0.2209513634443283, -0.07629801332950592, -0.02613305300474167, 0.04574022442102432, -0.21050740778446198, 0.2271510511636734, -0.19335529208183289, 0.1800549477338791, -0.01663435436785221, 0.17850515246391296, -0.30063486099243164, -0.23276305198669434, 0.1369301825761795, 0.10884615778923035, 0.08987519890069962, 0.3222624361515045, -0.052694130688905716, -0.2088286429643631, 0.19922924041748047, -0.027983970940113068, -0.15356257557868958, -0.10655245929956436, 0.35710409283638, 0.06169333681464195, -0.15579178929328918, -0.26101839542388916, 0.20623934268951416, 0.020622212439775467, -0.18465933203697205, 0.21102342009544373, 0.3055804967880249, -0.17300309240818024, 0.05364205688238144, 0.8341581225395203, -0.07302983105182648, -0.051374927163124084, 0.28459182381629944, 0.10348537564277649, 0.1515985131263733, 0.026462072506546974, 0.16072434186935425, 0.2421441525220871, 0.36879345774650574, 0.2691703140735626, 0.04338693618774414, 0.1896488070487976, 0.17480960488319397, -0.36914610862731934, -0.2050124555826187, -0.051007796078920364, 0.053706202656030655, 0.09352786093950272, -0.16588670015335083, 0.2674780786037445, -0.07519213855266571, 0.12192828953266144, 0.18067295849323273, -0.16725069284439087, 0.5287700891494751, 0.15966659784317017, -0.04300244525074959, 0.04460464045405388, 0.2930268943309784, 0.21535922586917877, -0.3777129352092743, 0.3992818593978882, -0.07794485986232758, 0.106968954205513, -0.08204519748687744, -0.3837517499923706, 0.11945363879203796, -0.236375093460083, 0.5144768357276917, -0.4901544153690338, 0.1707945317029953, 0.07283134013414383, 0.416113018989563, -0.35117658972740173, -0.07256492227315903, -0.017197607085108757, -0.0034600840881466866, 0.0064931814558804035, -0.2207905650138855, 0.18891270458698273, -0.04946095496416092, 0.13002902269363403, -0.3041497766971588, -0.07755663990974426, -0.18643750250339508, -0.2068472057580948, 0.23724772036075592, -0.08459228277206421, -0.2313639223575592, -0.17087377607822418, -0.11836335062980652, -0.1554342657327652, -0.11004049330949783, 0.031102754175662994, -0.6316107511520386, -0.17733536660671234, 0.06852906942367554, -0.0626525729894638, -0.3157806992530823, -0.4174819886684418, -0.020320827141404152, 0.38364267349243164, 0.0055405558086931705, -0.33316805958747864, 0.17412711679935455, 0.16941146552562714, 0.2222096472978592, 0.0998908281326294, -0.034198254346847534, 0.17292754352092743, -0.09431753307580948, -0.1706337183713913, -0.09228621423244476, -0.032770104706287384, -0.1075526773929596, -0.036615945398807526, 0.06376942247152328, -0.21783949434757233, -0.15757811069488525, 0.18764787912368774, 0.19937129318714142, -0.19910575449466705, -0.19949130713939667, 0.0863109603524208, 0.19919942319393158, -0.22761686146259308, 0.2582709491252899, 0.09086024016141891, 0.8255579471588135, -0.13202504813671112, -0.1085088923573494, 0.13382308185100555, 0.017092570662498474, 0.34174713492393494, -1.018960952758789, 0.2465243935585022, -0.30447274446487427, 0.09391098469495773, -0.06720204651355743, 0.0004403883358463645, 0.365788072347641, -0.051240961998701096, -0.12970316410064697, 0.31659379601478577, 0.3784840404987335, 0.503405749797821, -0.04799618199467659, 0.26035794615745544, -0.34639909863471985, -0.09095663577318192, -0.2544470429420471, 0.18273673951625824, 0.06737177073955536, 0.1307019591331482, -0.33582454919815063, 0.010889749974012375, 0.05738934129476547, -0.36197569966316223, -0.2313205897808075, 0.030455444008111954, -0.029498033225536346, 0.02968001179397106, -0.14173482358455658, -0.06729516386985779, -0.06223444268107414, -0.16733942925930023, 0.20873044431209564, -0.014835596084594727, -0.1692216843366623, 0.29325607419013977, 0.2660076916217804, -0.17703890800476074, -0.0738353282213211, 0.16071419417858124, 0.05656367912888527, -0.21573586761951447, -0.05757145583629608, 0.2599540948867798, -0.04743682220578194, -0.32854777574539185, -0.12182573229074478, -0.11239932477474213, 0.5219278931617737, 0.19302602112293243, 0.4947345554828644, 0.005806997884064913, -0.302437961101532, 0.06746909767389297, 0.2423696368932724, -0.4555344879627228, -0.12976668775081635, -0.17050600051879883, 0.20126096904277802, -0.04819488152861595, -0.0821872279047966, 0.31014207005500793, -0.18725453317165375, -0.22853754460811615, -0.22801929712295532, 0.22752395272254944, -0.08282413333654404, -0.3449576199054718, 0.1616552174091339, 0.13932330906391144, -0.2991896867752075, -0.13013392686843872, 0.051427725702524185, -0.4642859995365143, 0.14816129207611084, 0.1716863363981247, 0.0670597031712532, 0.3825206458568573, -0.07004820555448532, -0.06409738957881927, -0.00989670492708683, 0.08048651367425919, -0.39576855301856995, -0.08024396002292633, -0.06317795813083649, 0.042051807045936584, 0.3549911379814148, -0.25713297724723816, -0.3578502833843231, -0.2912408113479614, 0.289498507976532, -0.07250087708234787, 0.3154638707637787, 0.12820422649383545, 0.17993678152561188, 0.21980638802051544, 0.21041147410869598, 0.07021431624889374, -0.45950400829315186, -0.19684039056301117, 0.23155292868614197, 0.09719064086675644, -0.14345286786556244, -0.05431779474020004, -0.040992941707372665, -0.1103370189666748, -0.21793057024478912, 0.005145709030330181, 0.06777317821979523, -0.12473230063915253, -0.19561505317687988, -0.009404873475432396, 0.13466192781925201, 0.21769268810749054, -0.03086008131504059, 0.14935484528541565, -0.09899938851594925, 0.42307040095329285, -0.1298217475414276, -0.11919693648815155, 0.3244655132293701, -0.21356704831123352, -0.020233169198036194, 0.15270404517650604, 0.016117746010422707, 0.1153896152973175, 0.1416669338941574, 0.11443992704153061, -0.27036067843437195, 0.09964653104543686, 0.3804596960544586, -0.19436277449131012, -0.04789721220731735, -0.24573129415512085, 0.08450326323509216, 0.26510879397392273, 0.007509872782975435, 0.064508818089962, 0.1559692919254303, 0.20365819334983826, -0.010516361333429813, 0.18739259243011475, 0.36723196506500244, -0.41852983832359314, 0.2626913785934448, 0.23942439258098602, -0.13758258521556854, -0.016883116215467453, 0.019448837265372276, 0.04148845374584198, 0.1940629929304123, 0.1198771521449089, -0.2671278715133667, -0.4203987717628479, 0.27111971378326416, 0.2890254855155945, -0.330474853515625, 0.5450810790061951, 0.2857191562652588, 0.12817226350307465, 0.0425637811422348, -0.056485600769519806, -0.1379702240228653, 0.280313640832901, 0.17944210767745972, 0.267895370721817, 0.18501339852809906, 0.3497191369533539, 0.5261208415031433, -0.18735665082931519, -0.37977632880210876, 0.12612679600715637, 0.03468159958720207, 0.12003061920404434, -0.11396871507167816, -0.14065872132778168, -0.2755987346172333, 0.041649527847766876, 0.02585332840681076, 0.15400877594947815, 0.22865663468837738, 0.28843170404434204, 0.17634356021881104, -0.10582659393548965, 0.16656644642353058, -0.20486551523208618, 0.0849509984254837, -0.025664260610938072, 0.2595047652721405, 0.1402466744184494, -0.04981357231736183, 0.44873523712158203, -0.14188647270202637, 0.03175775334239006, 0.0779808834195137, -0.12696769833564758, -0.19130948185920715, 0.014737759716808796, -0.01478907372802496, -0.14249393343925476, 0.03936927393078804, 0.06367030739784241, 0.08933652192354202, 0.030505580827593803, 0.21399715542793274, -0.1852361410856247, -0.29413357377052307, -0.028903964906930923, 0.017843138426542282, -0.2557530403137207, -0.09139121323823929, 0.12988018989562988, 0.11828223615884781, -0.23332183063030243, 0.19497153162956238, -0.3601806163787842, -0.053111959248781204, -0.27065372467041016, -0.1016768291592598, -0.047235652804374695, -0.12030091136693954, 0.10401574522256851, -0.13182733952999115, 0.4967596232891083, -0.03390134498476982, 0.03019433282315731, 0.1725684255361557, -0.5566698908805847, -0.10419165343046188, 0.131647527217865, 0.07564299553632736, 0.24118509888648987, -0.4793643057346344, 0.0015896909171715379, 0.11057036370038986, 0.07579435408115387, 0.26589059829711914, -0.21931785345077515, 0.2348901629447937, -0.08551622927188873, -0.189484104514122, 0.10868587344884872, 0.1603788286447525, 0.0935119166970253, -0.09001073986291885, -0.1286972165107727, 0.23033761978149414, 0.12172894179821014, 0.17473317682743073, -0.06178082525730133, -0.3571937680244446, 0.26709941029548645, -0.23321522772312164, 0.4560467600822449, 0.11425968259572983, -0.03944345563650131, -0.18775500357151031, -0.2687270939350128, -0.26427847146987915, 0.03521411120891571, -0.006718870718032122, -0.09757009893655777, -0.12513798475265503, 0.23202216625213623, -0.24004700779914856, 0.0710977166891098, -0.3031572699546814, 0.20972970128059387, -0.13409283757209778, 0.4377794563770294, -0.4609697163105011, -0.008483219891786575, -0.26420697569847107, 0.1695151925086975, -0.2898379862308502, -0.234447181224823, 0.10967230796813965, -0.29178404808044434, -0.26136040687561035, -0.14698709547519684, 0.030032316222786903, -0.6167478561401367, -0.10691425949335098, 0.14819416403770447, 0.02276589721441269, -0.05859375, 0.11399625241756439, -0.2513325810432434, 0.1574094146490097, 0.10525603592395782, 0.37961792945861816, 0.26064416766166687, 0.0043786088936030865, -0.17508411407470703, -0.1451762467622757, -0.2000213861465454, -0.59076988697052, 0.15962044894695282, -0.08884715288877487, -0.09776978939771652, -0.24871717393398285 ]
https://github.com/huggingface/datasets/issues/5428
Load/Save FAISS index using fsspec
Hi! Sure, feel free to submit a PR. Maybe if we want to be consistent with the existing API, it would be cleaner to directly add support for `fsspec` paths in `Dataset.load_faiss_index`/`Dataset.save_faiss_index` in the same manner as it was done in `Dataset.load_from_disk`/`Dataset.save_to_disk`.
### Feature request From what I understand `faiss` already support this [link](https://github.com/facebookresearch/faiss/wiki/Index-IO,-cloning-and-hyper-parameter-tuning#generic-io-support) I would like to use a stream as input to `Dataset.load_faiss_index` and `Dataset.save_faiss_index`. ### Motivation In my case, I'm saving faiss index in cloud storage and use `fsspec` to load them. It would be ideal if I could send the stream directly instead of copying the file locally (or mounting the bucket) and then load the index. ### Your contribution I can submit the PR
42
Load/Save FAISS index using fsspec
[ -0.4125467538833618, -0.10050997883081436, -0.1457543522119522, 0.24869272112846375, 0.16829943656921387, 0.10180100053548813, 0.12143128365278244, 0.04269787296652794, 0.6353223323822021, 0.4917266070842743, -0.328125923871994, -0.18137507140636444, 0.27530619502067566, 0.387371689081192, -0.2596972584724426, 0.4451923072338104, 0.09276141971349716, 0.2732202410697937, 0.07167971879243851, -0.01405042503029108, -0.22151881456375122, 0.09567815065383911, 0.02876899391412735, 0.006463668309152126, -0.11913784593343735, 0.1881265640258789, -0.2237548828125, 0.4578928053379059, -0.09613530337810516, -0.22418718039989471, 0.1611860990524292, 0.09405355155467987, 0.20253342390060425, -0.14363421499729156, -0.00011357487528584898, 0.06261597573757172, 0.21048033237457275, -0.13458755612373352, -0.08268477022647858, 0.4062061607837677, -0.2765233516693115, 0.41762715578079224, -0.16739261150360107, -0.36859947443008423, -0.28214821219444275, -0.14825770258903503, 0.051289815455675125, -0.11457903683185577, 0.1782049834728241, 0.330748587846756, 0.1852474808692932, -0.24933631718158722, -0.0794694572687149, -0.0732790008187294, 0.29805079102516174, -0.4439971148967743, 0.15715208649635315, -0.32958006858825684, -0.35522907972335815, 0.1671033650636673, 0.21970979869365692, -0.2503509819507599, -0.0620688796043396, -0.45093604922294617, -0.14164747297763824, -0.018928684294223785, 0.7166465520858765, 0.01026060339063406, 0.19332872331142426, -0.008832293562591076, 0.2990364730358124, -0.13772618770599365, -0.16474716365337372, 0.3567412495613098, 0.030661769211292267, -0.039986565709114075, -0.1506335586309433, -0.255885511636734, 0.20043645799160004, 0.29767829179763794, 0.6618044376373291, -0.23728910088539124, -0.21642696857452393, 0.06439685821533203, 0.07248754054307938, -0.1889209896326065, -0.043970122933387756, -0.06115437299013138, 0.07014665007591248, -0.23995637893676758, -0.4423810541629791, -0.07242043316364288, -0.13137350976467133, 0.11224338412284851, 0.009116566739976406, -0.09809272736310959, 0.41784608364105225, -0.35464829206466675, -0.14361825585365295, -0.031889017671346664, -0.3425063192844391, 0.439985454082489, 0.059758104383945465, 0.24583955109119415, -0.1923569142818451, 0.12155605852603912, 0.2878186106681824, -0.4031928479671478, 0.05147667974233627, -0.10519668459892273, -0.12454404681921005, -0.020628688856959343, -0.04487361013889313, 0.1506355255842209, -0.585381031036377, 0.055162496864795685, -0.12246376276016235, -0.39397889375686646, -0.31102603673934937, 0.26946964859962463, 0.42066633701324463, -0.0478699691593647, 0.0206338819116354, 0.7791003584861755, 0.25744277238845825, 0.13574178516864777, 0.08414056897163391, 0.05414880812168121, -0.30262482166290283, 0.06801064312458038, -0.3109810948371887, -0.12156473845243454, 0.052961889654397964, 0.2869679629802704, 0.08728037774562836, -0.20529213547706604, -0.02782401256263256, -0.25947093963623047, -0.11877100169658661, 0.014720098115503788, -0.2665911316871643, -0.04810918867588043, 0.11104770004749298, 0.27464911341667175, 0.036337267607450485, -0.15861861407756805, 0.02432946115732193, -0.030515003949403763, -0.08265190571546555, 0.20597903430461884, 0.10895794630050659, -0.2534906566143036, 0.05221571773290634, 0.14851835370063782, 0.23970133066177368, 0.025445660576224327, 0.052995629608631134, 0.1031111404299736, -0.08923087269067764, 0.03472127765417099, -0.09007317572832108, 0.21253089606761932, -0.26437389850616455, -0.19951854646205902, 0.07820095866918564, 0.23606254160404205, 0.1874314248561859, -0.331240713596344, 0.2605569660663605, -0.4291720688343048, -0.13956713676452637, 0.12001589685678482, 0.23618440330028534, 0.18757101893424988, -0.1869693398475647, 0.4018789827823639, 0.6189256310462952, -0.517253041267395, -0.1771218180656433, 0.13691256940364838, 0.21741414070129395, -0.5839591026306152, 0.18740949034690857, 0.023326829075813293, 0.138944610953331, -0.09138308465480804, -0.06063024327158928, 0.23890839517116547, 0.12745019793510437, 0.06806804239749908, -0.20082242786884308, -0.2644282579421997, -0.07421258091926575, 0.06604813784360886, -0.05712464824318886, 0.1273328959941864, 0.24536903202533722, -0.6687988638877869, 0.3584287762641907, -0.12455428391695023, -0.0331350713968277, 0.1283610314130783, 0.3222378194332123, 0.3465747535228729, 0.24425680935382843, -0.07404999434947968, 0.024555647745728493, -0.02664540708065033, -0.3065439760684967, -0.28971123695373535, 0.4283939003944397, -0.000007713383638474625, 0.062469176948070526, 0.09239452332258224, 0.09098607301712036, 0.0773124024271965, 0.02154708467423916, -0.10565070807933807, -0.031771790236234665, -0.17443732917308807, -0.3748488426208496, -0.15640737116336823, -0.14639970660209656, -0.08881940692663193, -0.1333690583705902, 0.17310014367103577, -0.08645574748516083, -0.19689017534255981, 0.1233728677034378, 0.21880610287189484, 0.24049712717533112, -0.08521948009729385, 0.02275967039167881, 0.24698282778263092, 0.4193708598613739, -0.11792922765016556, 0.2660634517669678, 0.1986689269542694, -0.20862920582294464, -0.16450795531272888, -0.027830012142658234, 0.07722389698028564, 0.05720005929470062, 0.04397290199995041, -0.15539197623729706, 0.39605453610420227, 0.08613956719636917, 0.26494258642196655, 0.18018336594104767, -0.30663445591926575, 0.20670399069786072, -0.18082384765148163, 0.18308666348457336, -0.15408580005168915, -0.14260686933994293, 0.2948238253593445, -0.009240050800144672, 0.00951499491930008, 0.1255636215209961, 0.3339282274246216, -0.005948218517005444, -0.1673155128955841, -0.11008858680725098, 0.12894003093242645, 0.0737900510430336, -0.09938175231218338, 0.00789994839578867, -0.730843186378479, 0.18524888157844543, 0.34714192152023315, -0.22164727747440338, -0.19590944051742554, 0.144826278090477, -0.0748705044388771, 0.4730056822299957, -0.30129119753837585, -0.047810256481170654, 0.09719240665435791, 0.09615511447191238, -0.2837067246437073, -0.33328697085380554, -0.008831092156469822, -0.29430171847343445, -0.13917967677116394, -0.2710034251213074, -0.009341560304164886, 0.19508685171604156, -0.2678532004356384, 0.154879629611969, 0.11223003268241882, 0.11722283810377121, -0.16037513315677643, 0.10880620032548904, 0.300019234418869, -0.13911829888820648, -0.003283493220806122, -0.24578872323036194, 0.410025417804718, 0.09912624210119247, 0.058332398533821106, -0.2295517921447754, -0.0531005822122097, -0.25990593433380127, 0.023176545277237892, -0.10024255514144897, 0.35619887709617615, 0.04707247018814087, 0.13944800198078156, 0.015388064086437225, -0.3341889977455139, 0.24746198952198029, 0.26294073462486267, 0.3164224624633789, 0.03736206144094467, -0.1916874498128891, 0.027393337339162827, 0.1821141242980957, 0.05061718448996544, 0.03555216267704964, -0.15083838999271393, -0.2490655928850174, 0.025374526157975197, -0.06453455984592438, -0.07272285223007202, 0.015433339402079582, -0.09466327726840973, 0.10433176904916763, -0.17839090526103973, 0.3020502030849457, -0.16678425669670105, 0.23166941106319427, 0.03676125034689903, -0.04181152582168579, -0.013283204287290573, -0.03352690115571022, -0.05534021928906441, -0.4010359048843384, -0.22856342792510986, 0.05799458175897598, -0.19946283102035522, -0.43580278754234314, 0.003294488415122032, -0.042532797902822495, -0.29966962337493896, -0.04688933864235878, -0.04351629316806793, 0.06164289265871048, -0.009754082188010216, 0.07900772243738174, -0.16992834210395813, 0.3370014429092407, 0.4499833285808563, -0.06975550949573517, -0.2307875007390976, -0.2008523792028427, -0.07255539298057556, 0.4420599937438965, 0.20212294161319733, 0.13040092587471008, -0.4703136384487152, 0.003358058398589492, -0.36375972628593445, 0.4128454029560089, 0.1397564560174942, -0.01495357509702444, 0.497871994972229, -0.2287157028913498, 0.20841890573501587, -0.02498529478907585, -0.09251324087381363, 0.27515318989753723, 0.36276450753211975, -0.1680036187171936, 0.29605603218078613, -0.06268734484910965, -0.14359800517559052, 0.04702121391892433, 0.1430482715368271, -0.0865747258067131, -0.14162646234035492, -0.12255721539258957, 0.3931603729724884, 0.3019804358482361, 0.08856794238090515, 0.26202765107154846, -0.05481637641787529, 0.17614687979221344, 0.3423078656196594, 0.5714543461799622, 0.1191977933049202, -0.1387578845024109, 0.31076398491859436, -0.183850958943367, -0.18817731738090515, 0.32043737173080444, 0.045815519988536835, 0.07974785566329956, -0.13415589928627014, -0.17535710334777832, 0.19668465852737427, -0.17920619249343872, 0.6384797692298889, 0.002430492313578725, 0.10872798413038254, 0.4049743711948395, 0.3216087222099304, -0.38509905338287354, 0.03076883777976036, 0.19632840156555176, -0.019209053367376328, -0.07260681688785553, 0.15168698132038116, -0.293618381023407, -0.2788684666156769, -0.2139257788658142, -0.26306429505348206, -0.4795570969581604, -0.3710206151008606, -0.420378178358078, -0.052710507065057755, -0.2127172201871872, 0.05017447844147682, -0.30182945728302, -0.04079175367951393, 0.20060724020004272, 0.22817285358905792, -0.36624807119369507, -0.15728759765625, -0.06562558561563492, -0.029780035838484764, 0.1686025857925415, 0.22878840565681458, -0.0013355854898691177, 0.2403423935174942, 0.05964644253253937, 0.08104182034730911, 0.14759992063045502, 0.04941640794277191, 0.4115789830684662, 0.12695571780204773, 0.23784689605236053, 0.21584190428256989, 0.27041664719581604, -0.04600357264280319, -0.12310594320297241, -0.23443995416164398, -0.06986856460571289, -0.3049139380455017, 0.16817332804203033, -0.019398488104343414, 0.01238967478275299, -0.14698559045791626, -0.22676722705364227, 0.49395158886909485, -0.36808881163597107, -0.1536029577255249, -0.06795964390039444, 0.37029001116752625, -0.15540994703769684, 0.7915053963661194, 0.06719601899385452, 0.9396705627441406, -0.1737934648990631, 0.1945040076971054, 0.22487607598304749, -0.009335136972367764, -0.25106731057167053, -0.4550761878490448, -0.02291782759130001, -0.47972726821899414, 0.1388753056526184, 0.078526072204113, 0.04009784013032913, -0.04466799274086952, 0.04855847358703613, -0.05860447883605957, 0.2517770528793335, 0.2561227083206177, -0.48303157091140747, 0.04696652665734291, 0.26766106486320496, 0.17408934235572815, -0.19379308819770813, -0.1402965635061264, 0.18998853862285614, 0.17642636597156525, 0.026066845282912254, 0.02166917361319065, 0.012103819288313389, -0.00137138064019382, 0.05315712094306946, -0.04791862517595291, 0.28036120533943176, -0.20839732885360718, 0.41578739881515503, -0.19013799726963043, 0.2885048985481262, -0.38502225279808044, -0.37506189942359924, -0.06565576046705246, -0.3238424062728882, -0.03492780029773712, 0.11670579016208649, 0.20859302580356598, -0.11266002804040909, -0.31836578249931335, -0.14028292894363403, 0.15302464365959167, -0.03392584249377251, -0.0999777764081955, -0.02677830681204796, 0.06774991005659103, -0.26316091418266296, -0.02941863238811493, 0.02040363848209381, -0.07159893214702606, -0.3738173246383667, -0.10449881106615067, 0.26559215784072876, 0.1107361912727356, -0.00755313690751791, 0.09521344304084778, 0.2538849711418152, -0.06952673941850662, 0.3069050908088684, 0.05605199187994003, -0.060911208391189575, -0.04497669264674187, 0.3700411915779114, -0.07328858226537704, 0.13656440377235413, 0.07653910666704178, -0.2675866186618805, -0.13392068445682526, -0.2873739004135132, -0.4245656132698059, 0.008448852226138115, 0.3376365005970001, -0.03783590719103813, 0.06963343918323517, -0.5506467819213867, 0.11319002509117126, 0.3824877440929413, -0.133511021733284, -0.10879279673099518, -0.07106251269578934, -0.09875117242336273, -0.41265255212783813, -0.0074312430806458, 0.11810456216335297, 0.44945427775382996, -0.0294430423527956, 0.16157568991184235, -0.4565465450286865, -0.15629515051841736, -0.30423974990844727, 0.07803354412317276, -0.028599495068192482, 0.20166151225566864, 0.12874707579612732, -0.13449454307556152, 0.11434929072856903, -0.359328031539917, 0.19904044270515442, -0.07453946769237518, -0.1174423098564148, -0.29352059960365295, -0.23168827593326569, 0.1292935460805893, 0.24431553483009338, 0.16537711024284363, -0.4439827799797058, -0.08616378158330917, -0.011056125164031982, -0.12540914118289948, -0.10406816750764847, 0.2320907711982727, -0.21252302825450897, 0.0000414117457694374, 0.12130016088485718, -0.06527623534202576, 0.0571625791490078, 0.3056492507457733, 0.21453125774860382, 0.3334115445613861, -0.09729527682065964, 0.09145765751600266, -0.7348135709762573, -0.09324578940868378, 0.28553351759910583, 0.2732173800468445, 0.6493441462516785, 0.04953060671687126, -0.04622294381260872, 0.0385558120906353, -0.4300343096256256, 0.0378502756357193, -0.015338150784373283, 0.17732107639312744, -0.14222154021263123, 0.02808355912566185, 0.11027160286903381, 0.19861523807048798, -0.002457616850733757, 0.1613319367170334, 0.2189236581325531, -0.5277883410453796, 0.0008257377776317298, 0.1538294404745102, 0.17301465570926666, -0.05860138311982155, -0.02466689422726631, 0.2054993212223053, -0.5121846795082092, 0.6878025531768799, -0.37692803144454956, -0.6378735899925232, 0.13679607212543488, 0.15464912354946136, 0.08589711040258408, 0.162579745054245, 0.3428245186805725, 0.5758480429649353, 0.21934528648853302, 0.2271089106798172, -0.05767861753702164, 0.20310451090335846, -0.3456033170223236, -0.4967891573905945, 0.367331862449646, -0.1919316202402115, 0.021731028333306313, 0.08670239895582199, 0.29249754548072815, 0.4129970073699951, 0.2028260976076126, -0.2976517379283905, -0.1027660146355629, 0.4481179416179657, -0.025517670437693596, -0.41914448142051697, 0.5494886636734009, 0.006026494782418013, 0.21316587924957275, 0.05852450057864189, 0.02786066010594368, -0.0023480395320802927, -0.12347470223903656, 0.11690597236156464, 0.00012256023182999343, 0.09194459021091461, -0.3013637959957123, 0.3486170768737793, 0.35144418478012085, 0.025682944804430008, 0.1515040099620819, -0.25658783316612244, 0.004122944548726082, 0.10965627431869507, -0.04051733762025833, 0.10303524136543274, -0.1187351644039154, -0.260588675737381, 0.21294446289539337, 0.1549535095691681, -0.11676189303398132, -0.17428629100322723, -0.14570161700248718, -0.0972178652882576, 0.018140891566872597, 0.2523932158946991, 0.12179139256477356, -0.18758584558963776, -0.4994734227657318, -0.04374263808131218, 0.2972831428050995, 0.019797177985310555, -0.09201782941818237, 0.2879612147808075, 0.260174959897995, -0.3944226801395416, 0.06005598604679108, -0.38802921772003174, 0.01781018264591694, 0.027031274512410164, -0.30157163739204407, 0.30060210824012756, 0.2772766351699829, 0.08214299380779266, 0.004200658295303583, 0.31729164719581604, -0.004683692939579487, 0.2596944272518158, -0.1694335788488388, -0.09661421924829483, -0.13594210147857666, 0.004025369882583618, 0.25092554092407227, 0.328571617603302, -0.005053292028605938, 0.370881050825119, 0.06221829727292061, -0.10144202411174774, 0.29641738533973694, 0.2354956418275833, 0.7255522608757019, 0.4640224874019623, -0.1190437600016594, 0.24295824766159058, -0.21115684509277344, 0.10901755094528198, 0.09747583419084549, -0.2625778019428253, 0.1554887890815735, 0.2625451385974884, 0.18506905436515808, 0.09466615319252014, -0.15474587678909302, -0.21981872618198395, -0.287624329328537, 0.6263184547424316, -0.21281999349594116, 0.09534717351198196, -0.4532564580440521, -0.050077661871910095, 0.2427341789007187, -0.1345357745885849, 0.1381402611732483, -0.330047607421875, -0.1617695540189743, -0.24592655897140503, -0.1919931322336197, 0.12229998409748077, -0.14776037633419037, 0.12660008668899536, 0.11055881530046463, -0.22259987890720367, -0.3397717773914337, 0.23582220077514648, -0.4159999191761017, 0.1929883062839508, -0.3253123462200165, 0.31307080388069153, -0.01794205978512764, 0.29515644907951355, -0.03909087926149368, -0.03625946864485741, 0.5131917595863342, -0.3048460781574249, -0.07356160879135132, -0.07431360334157944, 0.5074620246887207, 0.27618709206581116, 0.17587190866470337, -0.2579193115234375, 0.13255675137043, 0.01192585751414299, -0.1675267219543457, -0.30012884736061096, 0.12818710505962372, -0.19765357673168182, -0.027515439316630363, -0.14490391314029694, 0.15020014345645905, 0.3254340887069702, 0.1393464207649231, -0.04366582632064819, -0.16099968552589417 ]
https://github.com/huggingface/datasets/issues/5427
Unable to download dataset id_clickbait
Thanks for reporting, @ilos-vigil. We have transferred this issue to the corresponding dataset on the Hugging Face Hub: https://huggingface.co/datasets/id_clickbait/discussions/1
### Describe the bug I tried to download dataset `id_clickbait`, but receive this error message. ``` FileNotFoundError: Couldn't find file at https://md-datasets-cache-zipfiles-prod.s3.eu-west-1.amazonaws.com/k42j7x2kpn-1.zip ``` When i open the link using browser, i got this XML data. ```xml <?xml version="1.0" encoding="UTF-8"?> <Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>md-datasets-cache-zipfiles-prod</BucketName><RequestId>NVRM6VEEQD69SD00</RequestId><HostId>W/SPDxLGvlCGi0OD6d7mSDvfOAUqLAfvs9nTX50BkJrjMny+X9Jnqp/Li2lG9eTUuT4MUkAA2jjTfCrCiUmu7A==</HostId></Error> ``` ### Steps to reproduce the bug Code snippet: ``` from datasets import load_dataset load_dataset('id_clickbait', 'annotated') load_dataset('id_clickbait', 'raw') ``` Link to Kaggle notebook: https://www.kaggle.com/code/ilosvigil/bug-check-on-id-clickbait-dataset ### Expected behavior Successfully download and load `id_newspaper` dataset. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
19
Unable to download dataset id_clickbait
[ -0.5453636646270752, 0.09606289118528366, -0.23784510791301727, 0.1996021568775177, 0.11198793351650238, 0.1456495225429535, 0.19641375541687012, 0.2758217453956604, 0.0012205714592710137, -0.09599366784095764, -0.23140376806259155, -0.13388460874557495, 0.10902632772922516, 0.3906491994857788, 0.13515406847000122, -0.028160013258457184, -0.04057709500193596, 0.0714615061879158, -0.31426024436950684, -0.08253856748342514, -0.17028287053108215, 0.138547882437706, -0.002688881941139698, 0.17973683774471283, 0.02353864163160324, -0.18718592822551727, -0.0901143029332161, 0.10297013819217682, -0.39452460408210754, -0.2436715066432953, 0.3535192310810089, 0.4246715009212494, 0.08565104752779007, 0.39073118567466736, -0.00010536023182794452, 0.06625296175479889, 0.21235807240009308, 0.025501707568764687, -0.3054673671722412, 0.008928090333938599, -0.27616965770721436, -0.22040875256061554, -0.06848163902759552, -0.123652383685112, 0.05166918411850929, -0.08093748241662979, 0.08234380185604095, 0.22042104601860046, 0.07509537041187286, 0.3031376898288727, 0.3260790705680847, 0.11765573918819427, 0.25184276700019836, -0.1660214513540268, 0.3736491799354553, 0.12433724105358124, -0.0527847521007061, 0.06202344223856926, 0.12464763224124908, 0.26868271827697754, 0.17996960878372192, 0.15890884399414062, 0.06998796761035919, 0.1877332627773285, -0.32898491621017456, -0.06676564365625381, 0.4319368302822113, -0.14705614745616913, 0.4967150092124939, 0.1475525051355362, 0.21038344502449036, -0.022680167108774185, -0.19562499225139618, 0.17940889298915863, 0.11602994054555893, -0.07740429788827896, 0.015014869160950184, 0.22465986013412476, -0.13420674204826355, 0.25996389985084534, -0.19017671048641205, -0.17099161446094513, -0.08371327817440033, -0.06531435251235962, -0.06947579979896545, -0.14415737986564636, -0.10196973383426666, 0.0922059714794159, 0.19036203622817993, -0.2188889980316162, 0.3128194808959961, 0.12320713698863983, -0.11619578301906586, -0.008337624371051788, 0.05226096138358116, 0.03650542348623276, 0.12119804322719574, 0.3380803167819977, 0.2688720226287842, 0.1489187479019165, -0.14963439106941223, -0.004740463104099035, -0.03685939684510231, -0.18467698991298676, 0.20100636780261993, -0.2795558273792267, -0.26274049282073975, 0.32304641604423523, 0.31578344106674194, 0.13746745884418488, -0.04443179816007614, 0.1739044189453125, -0.09004721790552139, 0.08311538398265839, 0.11244116723537445, 0.06690821051597595, 0.16524851322174072, -0.17012155055999756, -0.46024924516677856, 0.11290906369686127, -0.11045536398887634, -0.03143602982163429, -0.14863301813602448, 0.13998927175998688, -0.0026407816912978888, -0.031125856563448906, 0.03631193935871124, 0.01411698292940855, 0.050542332231998444, -0.3489342927932739, -0.4452804625034332, 0.18369552493095398, 0.023063065484166145, -0.29884499311447144, 0.29850518703460693, -0.2520751953125, 0.17799212038516998, -0.11683400720357895, -0.48336634039878845, 0.13438281416893005, -0.00536776427179575, -0.039816103875637054, -0.24429170787334442, 0.3127279281616211, 0.1062326654791832, 0.20586174726486206, -0.07112778723239899, 0.11999396979808807, -0.04213152080774307, 0.18859510123729706, -0.31393617391586304, -0.17284411191940308, 0.04982483386993408, 0.2766574025154114, -0.3883562386035919, -0.24266275763511658, 0.18528157472610474, 0.007809780538082123, -0.005517484620213509, 0.09357679635286331, -0.20212551951408386, -0.07800304889678955, 0.07745642960071564, -0.12006140500307083, 0.081015944480896, 0.48881635069847107, -0.3317883014678955, 0.02500450238585472, -0.1638493686914444, -0.3465643525123596, 0.19541840255260468, 0.030794918537139893, -0.1545812487602234, 0.27859413623809814, -0.26062220335006714, 0.030419956892728806, 0.33480849862098694, -0.5478255748748779, -0.5123716592788696, 0.08975016325712204, -0.3458379805088043, -0.17238938808441162, 0.13188354671001434, 0.07276694476604462, 0.14585670828819275, -0.06898900866508484, -0.07441925257444382, 0.32839086651802063, 0.11701153218746185, -0.07477857172489166, -0.09594066441059113, -0.38566097617149353, 0.2580719590187073, 0.1057613343000412, 0.03479122370481491, 0.20078934729099274, 0.22147101163864136, 0.17517954111099243, 0.12879829108715057, 0.28605711460113525, 0.012532951310276985, 0.0930170938372612, 0.18478450179100037, -0.29274874925613403, 0.03165492042899132, -0.19797629117965698, -0.19140902161598206, -0.23555424809455872, 0.25474628806114197, 0.17225630581378937, -0.4308509826660156, -0.12999458611011505, -0.763511061668396, 0.14167940616607666, -0.0647941455245018, -0.08436707407236099, 0.2657555937767029, 0.2758003771305084, 0.15656334161758423, 0.029971258714795113, 0.023229267448186874, 0.15238572657108307, 0.011888266541063786, -0.0012626710813492537, 0.24062801897525787, -0.07699427753686905, -0.21516740322113037, -0.03773936256766319, 0.34976404905319214, -0.06518183648586273, 0.06471151858568192, -0.1870645135641098, 0.1506233662366867, 0.3618529140949249, -0.01126120239496231, 0.01948651671409607, 0.7259959578514099, 0.09229184687137604, 0.14150993525981903, -0.42580920457839966, 0.016380008310079575, 0.2308044135570526, 0.11018070578575134, 0.053908199071884155, 0.16814379394054413, -0.00020961349946446717, -0.03203878924250603, -0.11932201683521271, 0.08405538648366928, -0.036593809723854065, 0.3961808979511261, 0.08796395361423492, 0.2410755753517151, -0.15464994311332703, 0.19412559270858765, 0.09188881516456604, 0.5275402665138245, -0.02690172754228115, -0.37417155504226685, 0.47184455394744873, 0.4913914203643799, -0.15752194821834564, 0.07457975298166275, -0.002128715394064784, 0.0240333154797554, -0.025754233822226524, -0.016591981053352356, 0.3003564774990082, 0.2096373438835144, 0.12172090262174606, 0.2585781216621399, -0.09171934425830841, -0.04269961640238762, -0.33157074451446533, 0.2550865411758423, -0.15498535335063934, -0.261223167181015, 0.03554050996899605, 0.08072065562009811, -0.1461026668548584, -0.18067437410354614, 0.05605441331863403, 0.29355114698410034, 0.4410252273082733, -0.18491385877132416, -0.10886149108409882, -0.2655845582485199, -0.2652698755264282, 0.2772620618343353, -0.07814604043960571, -0.003298150608316064, -0.30103135108947754, 0.03314436227083206, 0.20123028755187988, 0.023758724331855774, 0.05604510009288788, -0.4030706286430359, 0.17683662474155426, 0.3278581202030182, 0.12832649052143097, -0.11207343637943268, 0.01594279333949089, -0.2586882710456848, 0.23279814422130585, 0.03430522605776787, 0.16882671415805817, 0.25369879603385925, -0.3569953739643097, 0.32766732573509216, -0.4855497479438782, -0.015564033761620522, 0.23763443529605865, 0.011708198115229607, 0.2500465214252472, 0.3533618152141571, 0.6106446385383606, -0.30348026752471924, 0.005737621337175369, 0.18606868386268616, -0.18999475240707397, -0.1623317301273346, -0.015943754464387894, -0.14804528653621674, -0.03598663955926895, -0.12607435882091522, -0.26067498326301575, -0.5021979808807373, -0.1742255985736847, 0.09519273042678833, 0.16507001221179962, 0.14035162329673767, 0.2789703607559204, -0.13046559691429138, 0.12107573449611664, 0.43525394797325134, -0.04047827422618866, -0.3301735818386078, -0.3987348675727844, 0.531683087348938, -0.22473078966140747, -0.39755621552467346, 0.21543127298355103, 0.1573423147201538, 0.026856953278183937, 0.09346660226583481, -0.43251505494117737, 0.18612349033355713, -0.04972746595740318, 0.196264386177063, 0.15832877159118652, 0.22821931540966034, 0.048514433205127716, -0.06873668730258942, -0.19871646165847778, -0.1681731790304184, 0.17379648983478546, 0.34743157029151917, -0.17518675327301025, 0.22002746164798737, 0.04716162383556366, -0.2004978507757187, 0.06334195286035538, 0.5512661337852478, -0.08322807401418686, -0.13379229605197906, 0.2714889347553253, -0.1150575578212738, 0.24083112180233002, 0.11751297861337662, -0.4086723327636719, -0.40373584628105164, 0.13199466466903687, 0.08787824958562851, 0.02177140861749649, -0.06285516917705536, 0.0863746777176857, -0.30470114946365356, 0.005152675788849592, -0.3119886815547943, -0.30826815962791443, -0.2800459563732147, 0.37516337633132935, -0.006099925842136145, 0.2406928986310959, 0.12603478133678436, 0.042025770992040634, -0.27717623114585876, 0.3432539999485016, 0.17038774490356445, -0.018782123923301697, 0.2356911599636078, -0.1841125190258026, -0.2955157160758972, -0.28518614172935486, 0.19978049397468567, -0.19225767254829407, 0.33025693893432617, -0.09776829928159714, -0.0358281247317791, 0.22493897378444672, -0.1661427617073059, 0.5715070366859436, -0.5127497315406799, 0.5029948949813843, -0.04680291935801506, 0.2661377787590027, 0.09372183680534363, 0.03919632360339165, -0.47023606300354004, 0.141105055809021, 0.1372188776731491, -0.36141127347946167, -0.5619930624961853, 0.08196566253900528, 0.46874916553497314, -0.13947007060050964, 0.05192899331450462, 0.002848739270120859, -0.08733633905649185, -0.41484972834587097, -0.325792521238327, -0.09938403218984604, 0.10430695861577988, 0.17201711237430573, -0.15748140215873718, -0.026763729751110077, -0.075176902115345, -0.011839715763926506, 0.10232582688331604, -0.031332824379205704, 0.11994706839323044, 0.32586178183555603, 0.21114307641983032, 0.04796965420246124, -0.16215629875659943, 0.2060670703649521, 0.5267418622970581, -0.20265069603919983, -0.30936992168426514, 0.3204613924026489, -0.24504318833351135, -0.11165811121463776, 0.3284132778644562, -0.06403350085020065, -0.044831182807683945, 0.15889552235603333, -0.08226954936981201, 0.07743784040212631, 0.30142173171043396, 0.26835867762565613, -0.1951211392879486, -0.3131527900695801, -0.42773744463920593, 0.089364193379879, 0.02558867447078228, -0.07430867105722427, 0.06508283317089081, 0.2876119017601013, -0.03653638809919357, -0.2197490930557251, -0.14625363051891327, 1.0295251607894897, -0.021715015172958374, 0.022205227985978127, 0.11352116614580154, 0.03627829626202583, 0.3501512110233307, 0.07847955077886581, -0.16542360186576843, -0.21715757250785828, -0.004244429524987936, -0.08381815999746323, 0.005780017003417015, -0.06035607308149338, 0.0750696063041687, -0.09780580550432205, 0.0535413958132267, -0.22688326239585876, 0.40311580896377563, 0.08449976146221161, 0.37946969270706177, -0.16925880312919617, 0.10978011786937714, 0.14758825302124023, 0.2412194460630417, -0.3165239989757538, 0.25896328687667847, -0.08675999194383621, -0.18888221681118011, -0.0921592190861702, -0.07823200523853302, -0.2540287375450134, -0.039104171097278595, -0.18610592186450958, 0.2765597999095917, -0.5555304884910583, -0.2184135466814041, -0.435953289270401, -0.34622886776924133, 0.1711648404598236, 0.3115788698196411, -0.2248319536447525, 0.25758635997772217, -0.09775857627391815, -0.2912987172603607, 0.05778926610946655, 0.1764727532863617, 0.22906915843486786, -0.025162965059280396, -0.4243769347667694, 0.18895307183265686, 0.11631973832845688, -0.06586339324712753, 0.23243166506290436, -0.11374139040708542, -0.12138225138187408, -0.24293075501918793, -0.12768664956092834, -0.10318060219287872, -0.06470365822315216, -0.017662880942225456, 0.23431146144866943, 0.02209857851266861, 0.07107408344745636, -0.23717918992042542, 0.08154472708702087, -0.26427745819091797, -0.21549730002880096, 0.3955743908882141, 0.10687769204378128, -0.30745553970336914, 0.21354429423809052, 0.16516004502773285, -0.35466161370277405, -0.29598844051361084, 0.14009539783000946, -0.0380294993519783, -0.3209374248981476, -0.04297365993261337, -0.21683719754219055, 0.0005750873242504895, -0.016428321599960327, 0.4401474893093109, 0.17429038882255554, 0.0991227850317955, 0.10240723192691803, -0.4280393719673157, -0.12783153355121613, 0.05651509761810303, -0.03718912601470947, -0.044449444860219955, -0.050036389380693436, -0.19384555518627167, 0.13073503971099854, -0.08184735476970673, -0.42493003606796265, -0.030607448890805244, -0.12508459389209747, -0.18339791893959045, 0.2542988955974579, 0.06175466254353523, 0.21123887598514557, -0.03329068794846535, 0.2289840131998062, 0.19520671665668488, -0.3070278465747833, -0.3228720426559448, -0.021026654168963432, 0.06776967644691467, -0.03660249337553978, -0.14977075159549713, -0.06633629649877548, -0.39788955450057983, -0.24615304172039032, 0.34528663754463196, -0.0440201573073864, -0.05995391309261322, 0.1136716976761818, -0.0861370861530304, -0.03743698075413704, 0.15818271040916443, -0.00001257829717360437, 0.11411723494529724, 0.14357943832874298, 0.36885350942611694, -0.18189139664173126, 0.2054825872182846, 0.08271058648824692, -0.10222269594669342, 0.0749506875872612, 0.04524235427379608, 0.27400293946266174, 0.24675752222537994, 0.19228453934192657, -0.2531100809574127, -0.010470973327755928, 0.24849571287631989, 0.16058671474456787, 0.43436864018440247, -0.2231704592704773, -0.16602888703346252, 0.034240540117025375, 0.26056402921676636, -0.2252575308084488, 0.025042394176125526, 0.18654151260852814, -0.12260644137859344, -0.10661045461893082, 0.09323269873857498, 0.14339230954647064, -0.0941346138715744, 0.09466468542814255, 0.13622891902923584, 0.7244060635566711, -0.11416720598936081, 0.11905421316623688, 0.6782312989234924, -0.21509331464767456, 0.05337680131196976, 0.09065195918083191, 0.40595102310180664, -0.16357573866844177, 0.6504443883895874, -0.21155965328216553, -0.13327886164188385, 0.3493845462799072, -0.011820167303085327, 0.0029546646401286125, -0.053644128143787384, 0.2932186722755432, 0.32250672578811646, -0.16928617656230927, 0.11953100562095642, 0.19113945960998535, 0.5167836546897888, -0.22567084431648254, 0.0015283081447705626, -0.45596083998680115, 0.21720537543296814, 0.005365048069506884, 0.18611332774162292, -0.17678911983966827, -0.25981825590133667, -0.3429735600948334, 0.08830965310335159, -0.05936485901474953, -0.3270520567893982, 0.19363072514533997, 0.025477439165115356, 0.03457864001393318, -0.41156673431396484, -0.13157641887664795, -0.07676057517528534, 0.04696674272418022, -0.26621878147125244, 0.12077872455120087, 0.20774909853935242, -0.042064208537340164, 0.25924447178840637, 0.2509510815143585, 0.11361542344093323, -0.03186408802866936, -0.032811496406793594, -0.00599789759144187, 0.027498943731188774, -0.26970812678337097, -0.028926676139235497, 0.24051980674266815, 0.18618687987327576, -0.14994680881500244, 0.22085590660572052, 0.23133468627929688, -0.23094947636127472, -0.20141346752643585, 0.3816114366054535, 0.12731382250785828, 0.05665820464491844, -0.10384301841259003, -0.3448646366596222, 0.0225216131657362, 0.05082349479198456, -0.1976134479045868, -0.3705225884914398, -0.17119266092777252, 0.12245162576436996, -0.1955033242702484, 0.10034531354904175, -0.37941208481788635, 0.15270788967609406, -0.2523152232170105, 0.41433316469192505, 0.35587361454963684, 0.10151492804288864, -0.008752917870879173, -0.12640996277332306, -0.5083559155464172, 0.19542989134788513, -0.0029779765754938126, -0.2744296193122864, -0.08584403246641159, 0.060437608510255814, -0.022791145369410515, 0.24876008927822113, 0.22332638502120972, 0.22213657200336456, 0.1796931028366089, 0.18736524879932404, -0.17890819907188416, -0.058152586221694946, -0.14023981988430023, 0.04083409160375595, -0.154439315199852, -0.1378481090068817, 0.2792675197124481, -0.25585848093032837, 0.13253863155841827, -0.12171897292137146, -0.3544274568557739, 0.0806635171175003, 0.036780934780836105, 0.3915831744670868, -0.0061246431432664394, 0.5529208779335022, -0.1389843076467514, -0.05756624788045883, -0.20335528254508972, -0.292830228805542, 0.013845513574779034, 0.41869866847991943, 0.07554422318935394, -0.25127875804901123, 0.03408098593354225, -0.10266754031181335, 0.05122597515583038, 0.059414345771074295, -0.004933342803269625, 0.2941940426826477, -0.27774474024772644, -0.09377375990152359, -0.20939989387989044, -0.0532231479883194, -0.029956618323922157, -0.2515599727630615, 0.007042201701551676, -0.05718068405985832, -0.1572534292936325, -0.4465586543083191, 0.29418468475341797, 0.030286578461527824, -0.34126952290534973, -0.1494300365447998, 0.23367434740066528, 0.1242179125547409, 0.06622960418462753, -0.5032973885536194, 0.08191479742527008, 0.10794515162706375, -0.12218737602233887, -0.17661195993423462, 0.3478917181491852, -0.07212037593126297, 0.04841352254152298, 0.07983651012182236, 0.5120576620101929, 0.14788243174552917, -0.3240532875061035, 0.045270416885614395, 0.03892480209469795 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
Hi! `Dataset.sort` calls `df.sort_values` internally, and `df.sort_values` brings all the "sort" columns in memory, so sorting on multiple keys could be very expensive. This makes me think that maybe we can replace `df.sort_values` with `pyarrow.compute.sort_indices` - the latter can also sort on multiple keys and currently loads the data into memory; however, there is a plan to eventually implement "memory-map" friendly kernels for the Arrow compute ops (using the Acero execution engine). So to address this issue, you should replace `df.sort_values` with `pyarrow.compute.sort_indices` in `Dataset.sort` and adjust the signature of this function (deprecate the `kind` parameter, etc.). PS: Feel free to ping us if you need some additional help/pointers
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
109
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
@mariosasko If I understand the code right, using `pyarrow.compute.sort_indices` would also require changes to the `select` method if it is meant to sort multiple keys. That's because `select` only accepts 1D input for `indices`, not an iterable or similar which would be required for multiple keys unless you want some looping over selects. Doesn't seem that straight-forward but I might be missing something here...
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
64
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
@MichlF No, it doesn't require modifying select because sorting on multiple keys also returns a 1D array. It's easier to understand with an example: ```python >>> import pyarrow as pa >>> import pyarrow.compute as pc >>> table = pa.table({ ... "name": ["John", "Eve", "Peter", "John"], ... "surname": ["Johnson", "Smith", "Smith", "Doe"], ... "age": [20, 40, 30, 50], ... }) >>> indices = pc.sort_indices(table, sort_keys=[("name", "ascending"), ("surname", "ascending")]) >>> print(indices) [ 1, 3, 0, 2 ] ```
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
76
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
Thanks for clarifying. I can prepare a PR to address this issue. This would be my first PR here so I have a few maybe silly questions but: - What is the preferred input type of `sort_keys` for the sort method? A sequence with name, order tuples like pyarrow's `sort_indices` requires? - What about backwards compatability: is it supposed to also accept the old way of calling sort() or should both `column` and `kind` be deprecated? - If `sort_keys` is provided in the same format as for pyarrow's `sort_indices` - i.e. along with order for each column -, `reverse` doesn't make much sense either and should be deprecated as well I assume.
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
112
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
I think we can have the following signature: ```python def sort( self, column_names: Union[str, Sequence[str]], reverse: Union[bool, Sequence[bool]] = False, kind="deprecated", null_placement: str = "last", keep_in_memory: bool = False, load_from_cache_file: bool = True, indices_cache_file_name: Optional[str] = None, writer_batch_size: Optional[int] = 1000, new_fingerprint: Optional[str] = None, ) -> "Dataset": ``` So we should: * rename`column` to `column_names`. `column` is a positional argument, so it's OK to rename it (not marked as positional-only with "/", but still should be fine) * deprecate `kind` * keep `reverse` instead of introducing `sort_keys`, but we should allow passing a list of booleans that defines the sort order of each column from `column_names` to it (`reverse = False` would be equal to `[False] * len(column_names)` and `reverse = True` to `[True] * len(column_names)`)
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
127
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
I am pretty much done with the PR. Just one clarification: `Sequence` in `arrow_dataset.py` is a custom dataclass from `features.py` instead of the `type.hinting` class `Sequence` from Python. Do you suggest using that custom `Sequence` class somehow ? Otherwise signature currently reads instead: ```Python def sort( self, column_names: Union[str, List[str]], reverse: Union[bool, List[bool]] = False, kind = "deprecated", null_placement: str = "last", keep_in_memory: bool = False, load_from_cache_file: bool = True, indices_cache_file_name: Optional[str] = None, writer_batch_size: Optional[int] = 1000, new_fingerprint: Optional[str] = None, ) ``` Also, to maintain backwards compatibility, I added conditionals for `null_placement`, because pyarrow's `null_placement` only accepts `at_start` and `at_end`, and not `last` and `first`. If that is all good, I think I can open the PR.
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
119
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
I meant `typing.Sequence` (`datasets.Sequence` is a feature type). Regarding `null_placement`, I think we can support both `at_start` and `at_end`, and `last` and `first` (for backward compatibility; convert internally to `at_end` and `at_start` respectively).
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
33
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
> I meant typing.Sequence (datasets.Sequence is a feature type). Sorry, I actually meant `typing.Sequence` and not `type.hinting`. However, the issue is still that `dataset.Sequence` is imported in `arrow_dataset.py` so I cannot import and use `typing.Sequence` for the `sort`'s signature without overwriting the `dataset.Sequence` import. The latter is used in the `align_labels_with_mapping` method so it's a necessary import for `arrow_dataset.py`. To import `typing.Sequence` as something else than `Sequence` to avoid overwriting may only be confusing and doesn't seem good practice!? The other solution is to keep `List` type hinting as in the signature I posted in my previous post but this excludes other Sequence types and may cause problems further down the line. Please advise, Thanks for all the clarifications!
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
119
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5425
Sort on multiple keys with datasets.Dataset.sort()
You can avoid the name collision by renaming `typing.Sequence` to `Sequence_` when importing: ```python from typing import Sequence as Sequence_ ```
### Feature request From discussion on forum: https://discuss.huggingface.co/t/datasets-dataset-sort-does-not-preserve-ordering/29065/1 `sort()` does not preserve ordering, and it does not support sorting on multiple columns, nor a key function. The suggested solution: > ... having something similar to pandas and be able to specify multiple columns for sorting. We’re already using pandas under the hood to do the sorting in datasets. The suggested workaround: > convert your dataset to pandas and use `df.sort_values()` ### Motivation Preserved ordering when sorting is very handy when one needs to sort on multiple columns, A and B, so that e.g. whenever A is equal for two or more rows, B is kept sorted. Having a parameter to do this in 🤗datasets would be cleaner than going through pandas and back, and it wouldn't add much complexity to the library. Alternatives: - the possibility to specify multiple keys to sort by with decreasing priority (suggested solution), - the ability to provide a key function for sorting, so that one can manually specify the sorting criteria. ### Your contribution I'll be happy to contribute by submitting a PR. Will get documented on `CONTRIBUTING.MD`. Would love to get thoughts on this, if anyone has anything to add.
21
Sort on multiple keys with datasets.Dataset.sort()
[ 0.028741464018821716, -0.09899337589740753, -0.2973214089870453, 0.11221349984407425, 0.1764691323041916, 0.08357195556163788, 0.06119823083281517, 0.2558813989162445, -0.13195225596427917, 0.04995827376842499, -0.10002277791500092, 0.22852276265621185, 0.005976022221148014, 0.11916109919548035, 0.1299404352903366, -0.1751485913991928, -0.052675873041152954, 0.07647618651390076, 0.10694260150194168, -0.037278253585100174, -0.10407478362321854, -0.018843917176127434, -0.36189672350883484, 0.022627171128988266, 0.16309456527233124, -0.211319699883461, -0.13150985538959503, 0.06319349259138107, -0.20336928963661194, -0.39403992891311646, -0.023737367242574692, 0.3600752353668213, -0.2311311960220337, 0.2830202877521515, -0.00009829093323787674, -0.027034558355808258, -0.15511251986026764, -0.06828892976045609, -0.14293275773525238, -0.05293061584234238, -0.13685062527656555, 0.1365538090467453, -0.31148025393486023, -0.16597580909729004, -0.26916879415512085, -0.517481803894043, 0.07312311977148056, -0.3936796188354492, 0.21545954048633575, 0.11239194869995117, 0.30136850476264954, 0.21242313086986542, 0.08837921172380447, -0.020500464364886284, 0.15879520773887634, -0.038167804479599, 0.03924916312098503, -0.27118930220603943, 0.14484061300754547, 0.15542326867580414, -0.042367320507764816, 0.17660818994045258, -0.06745560467243195, -0.20266829431056976, 0.27615466713905334, -0.04900844767689705, -0.1744646579027176, 0.07352420687675476, 0.276804655790329, -0.048764731734991074, 0.42820027470588684, -0.3786011040210724, -0.3875385820865631, -0.18187670409679413, 0.1576341986656189, 0.041407711803913116, 0.01363010611385107, -0.11205583065748215, 0.1906524896621704, -0.18286876380443573, 0.0253467820584774, -0.04230644553899765, -0.10334239900112152, 0.33909863233566284, -0.21739134192466736, 0.25068655610084534, -0.14904356002807617, -0.05559879541397095, 0.2212914377450943, -0.31704574823379517, 0.11758691817522049, -0.48928478360176086, 0.07492232322692871, 0.12360358983278275, -0.3871307075023651, -0.23457695543766022, 0.41621190309524536, 0.3631003499031067, 0.20420928299427032, -0.23175935447216034, -0.09831859171390533, 0.03442925214767456, 0.11145657300949097, -0.07862799614667892, 0.4601077437400818, 0.23155617713928223, 0.4143107533454895, 0.2871588170528412, 0.10558782517910004, -0.15301452577114105, -0.08470325917005539, 0.008258804678916931, 0.23843777179718018, -0.4598367214202881, -0.11582072824239731, 0.2984207272529602, -0.0024685747921466827, -0.01222578901797533, -0.07282502204179764, -0.13710127770900726, 0.2499946653842926, -0.11843417584896088, 0.32767945528030396, 0.4415939152240753, 0.15942507982254028, 0.015413908287882805, -0.30153194069862366, 0.05728483200073242, 0.04334966465830803, 0.2917996346950531, -0.3173701763153076, -0.016046281903982162, 0.11875352263450623, -0.18779811263084412, 0.06037387251853943, -0.09712766855955124, -0.16569070518016815, 0.122409388422966, 0.1567566990852356, -0.10008503496646881, 0.08057725429534912, 0.06857022643089294, 0.2257465422153473, 0.29695039987564087, 0.11611581593751907, 0.1641055941581726, -0.025623725727200508, -0.12034722417593002, -0.25645431876182556, 0.205649733543396, -0.3393760025501251, -0.20160476863384247, 0.2391362488269806, 0.2643216848373413, 0.12448668479919434, 0.09156861156225204, -0.2836962938308716, 0.10045425593852997, 0.2931644320487976, -0.2490716278553009, -0.1282299906015396, 0.10369186848402023, -0.1263352930545807, -0.1338959038257599, -0.07697287946939468, -0.01695343852043152, -0.23882731795310974, 0.013437679037451744, -0.2867739200592041, 0.0458216592669487, -0.14717240631580353, -0.022884326055645943, -0.1372058242559433, 0.1682179868221283, 0.08400566130876541, 0.4115127623081207, 0.5246119499206543, -0.25035303831100464, -0.5486193299293518, 0.24931985139846802, -0.12953656911849976, -0.316114604473114, 0.16261045634746552, 0.36588165163993835, 0.21764063835144043, -0.1080687940120697, 0.17386585474014282, 0.09656177461147308, 0.06566561013460159, 0.1413278877735138, 0.05509106442332268, 0.026691755279898643, 0.04763496667146683, 0.09746909886598587, 0.18258927762508392, -0.18801520764827728, 0.18442866206169128, -0.12867653369903564, 0.07147156447172165, -0.17986805737018585, -0.2552776038646698, 0.2932296693325043, -0.07146204262971878, -0.04671154171228409, 0.11469095200300217, -0.1888485997915268, -0.2776067554950714, 0.09598945081233978, 0.21691830456256866, -0.19637557864189148, -0.3188058137893677, -0.1703096330165863, -0.15814805030822754, 0.003167852759361267, -0.2981880307197571, 0.43992531299591064, 0.30934813618659973, 0.04590253904461861, -0.14083395898342133, -0.09301429986953735, -0.10139147192239761, 0.07767325639724731, 0.14301806688308716, -0.13094200193881989, -0.18788938224315643, 0.30042821168899536, -0.25594988465309143, 0.31301772594451904, 0.10518334805965424, -0.07078729569911957, 0.2558874189853668, 0.10056102275848389, 0.12523286044597626, 0.3052782714366913, 0.046064846217632294, -0.17728833854198456, 0.13048811256885529, 0.07967263460159302, -0.02715574949979782, 0.14838431775569916, 0.08697950839996338, 0.1438976377248764, -0.011832283809781075, 0.06474629044532776, -0.5371254086494446, 0.6956678628921509, -0.2035532146692276, 0.19834968447685242, 0.15104900300502777, -0.05159931257367134, -0.04776904359459877, 0.26706406474113464, 0.022406242787837982, -0.23311270773410797, 0.18953894078731537, 0.21901406347751617, -0.024510568007826805, 0.10708460211753845, -0.11982258409261703, 0.41455453634262085, 0.6199867129325867, 0.03352299705147743, 0.27068352699279785, -0.12812234461307526, 0.12096802890300751, 0.12044632434844971, 0.09573175758123398, 0.32039573788642883, -0.00476019037887454, 0.36533504724502563, 0.12256555259227753, -0.2140568345785141, -0.004775006789714098, -0.010725472122430801, -0.040854353457689285, 0.03006882406771183, -0.28911444544792175, 0.3847918212413788, 0.22437109053134918, 0.023196067661046982, -0.4351916015148163, 0.019098928198218346, 0.2587398886680603, -0.002195655135437846, -0.25597551465034485, -0.06115487217903137, -0.23312318325042725, -0.23552662134170532, 0.2014453411102295, -0.028508152812719345, -0.2556595206260681, -0.20508043467998505, 0.2772729992866516, -0.18023738265037537, -0.020554974675178528, 0.058181796222925186, 0.06811882555484772, 0.11395329982042313, 0.29818376898765564, -0.04306061565876007, 0.06895627826452255, -0.1549319475889206, 0.0038211180362850428, 0.1969866007566452, 0.19441509246826172, 0.18841761350631714, 0.4552612602710724, -0.023151539266109467, -0.10380826890468597, -0.0008603439200669527, -0.3883145749568939, -0.16494590044021606, -0.16007906198501587, -0.04555778577923775, 0.10475696623325348, 0.07942239940166473, -0.170744851231575, -0.014722604304552078, 0.07637723535299301, 0.239674910902977, -0.2990134060382843, 0.18565014004707336, 0.07611586898565292, -0.24249188601970673, -0.22554217278957367, -0.31050577759742737, 0.1628037840127945, 0.04459526762366295, 0.02515130117535591, -0.009111699648201466, 0.32996299862861633, -0.2689761519432068, -0.06573230773210526, -0.08190502971410751, -0.09226939082145691, -0.015839165076613426, -0.11080092936754227, 0.0911756157875061, 0.26182058453559875, -0.017259590327739716, -0.11627946048974991, -0.17516663670539856, 0.018687555566430092, -0.37253737449645996, 0.096438929438591, -0.08320402354001999, -0.2570739686489105, -0.11962383985519409, 0.2844480574131012, -0.023050813004374504, 0.31526288390159607, 0.3632940351963043, 0.17984257638454437, -0.15952637791633606, -0.2913755476474762, -0.212080717086792, -0.12867677211761475, 0.03576914593577385, 0.06076393648982048, -0.222672238945961, 0.37091925740242004, 0.4100162088871002, 0.314433217048645, -0.31595489382743835, 0.05251911282539368, 0.09986817091703415, 0.0971875935792923, 0.1581433266401291, -0.026691561564803123, -0.3397607207298279, 0.07663605362176895, 0.26961347460746765, 0.2836642265319824, 0.21160617470741272, 0.1588263064622879, -0.004899116232991219, 0.05002809688448906, 0.023800497874617577, -0.16895371675491333, -0.03600868210196495, -0.10271711647510529, -0.09049990773200989, 0.0025359669234603643, 0.17975661158561707, 0.1987525075674057, -0.4322522282600403, -0.01353919692337513, -0.1523052304983139, -0.09588416665792465, -0.2775111496448517, -0.1532660275697708, -0.4073219299316406, -0.0225144661962986, -0.32482507824897766, 0.05860809236764908, 0.24598075449466705, -0.06660757958889008, 0.12772241234779358, 0.20894786715507507, -0.07537244260311127, -0.4535475969314575, 0.7264634966850281, -0.03479468449950218, 0.2244250476360321, 0.1056964322924614, -0.04653359577059746, -0.2877999544143677, 0.386326402425766, -0.0923352986574173, 0.3816564679145813, -0.3733280599117279, 0.4020630717277527, -0.3640495836734772, -0.11360924690961838, -0.2745121121406555, 0.06633970886468887, -0.0886177271604538, -0.3054408133029938, -0.23281055688858032, -0.1869032084941864, -0.056929413229227066, 0.1902729868888855, 0.04687241092324257, 0.0898398756980896, -0.20126931369304657, -0.1646491438150406, -0.11180843412876129, -0.14261658489704132, -0.042835865169763565, -0.043210916221141815, 0.32821163535118103, 0.306610643863678, -0.0194955226033926, 0.17154859006404877, 0.09807342290878296, 0.05853812396526337, 0.06522303074598312, 0.11859067529439926, -0.12706686556339264, -0.23855140805244446, -0.057969171553850174, -0.1155557632446289, 0.12367766350507736, -0.23189283907413483, 0.055988021194934845, 0.08753781020641327, 0.06897284090518951, 0.28997406363487244, 0.07451390475034714, 0.4161418676376343, 0.04203232750296593, -0.31354185938835144, -0.34835514426231384, 0.5198854207992554, -0.03438209369778633, -0.271411657333374, 0.30008918046951294, 0.5188669562339783, -0.34985294938087463, -0.10039042681455612, 0.12252308428287506, 0.45780670642852783, -0.25626036524772644, 0.15132583677768707, 0.08422946184873581, -0.16238678991794586, 0.0760197639465332, -0.15231524407863617, 0.3884741961956024, -0.3539924621582031, -0.38853025436401367, 0.0028728952165693045, 0.0030920403078198433, -0.07987355440855026, 0.37980255484580994, -0.20288437604904175, 0.19962027668952942, 0.030966708436608315, 0.1436246931552887, -0.21247147023677826, 0.1080198884010315, 0.02416945993900299, 0.06602545082569122, -0.413293719291687, 0.258748859167099, -0.014453104697167873, -0.22002233564853668, -0.1026776134967804, 0.15408167243003845, 0.3859541416168213, -0.34680116176605225, 0.020468860864639282, -0.1017046645283699, -0.21351243555545807, 0.2738752067089081, -0.28672537207603455, -0.05902617797255516, 0.0654316172003746, 0.3275730609893799, 0.25089380145072937, 0.2156902253627777, 0.18395817279815674, 0.17460931837558746, 0.09350919723510742, 0.4132477939128876, -0.03079063817858696, -0.12332703173160553, 0.0029667324852198362, -0.09036454558372498, -0.05656089633703232, -0.30132967233657837, 0.3779541850090027, -0.4599745571613312, -0.10072620958089828, 0.23339299857616425, -0.1467258632183075, 0.005664231721311808, 0.033732131123542786, 0.24836429953575134, 0.10704982280731201, -0.2621464729309082, 0.27916207909584045, 0.017606908455491066, 0.021781371906399727, 0.3856351673603058, -0.2298927903175354, 0.1456385850906372, 0.08664967119693756, 0.42799511551856995, 0.19120997190475464, 0.08677171170711517, 0.22853656113147736, 0.13159969449043274, -0.46108412742614746, -0.3208995759487152, -0.10690692067146301, 0.10199175029993057, 0.1377643495798111, 0.2878592908382416, -0.17465543746948242, -0.026994826272130013, 0.12229665368795395, 0.1870105117559433, -0.14917251467704773, -0.029341941699385643, 0.02487516589462757, -0.13401098549365997, 0.06822408735752106, 0.047108255326747894, 0.30334365367889404, 0.22584572434425354, 0.015977801755070686, 0.044641077518463135, -0.0853179469704628, -0.01034301333129406, -0.41374990344047546, 0.011657039634883404, 0.024023350328207016, 0.21102935075759888, 0.11200687289237976, 0.07604470103979111, -0.13820010423660278, -0.033245693892240524, 0.29385697841644287, -0.2629936933517456, -0.1742492914199829, -0.4430278539657593, 0.059456586837768555, -0.005820879712700844, -0.08289095759391785, 0.230892613530159, 0.021758709102869034, -0.34936586022377014, -0.21420831978321075, -0.1783481240272522, 0.2030445635318756, 0.2989426851272583, -0.0071336147375404835, 0.35147884488105774, 0.2581545114517212, -0.0035942327231168747, 0.23585103452205658, 0.19561876356601715, 0.06273454427719116, -0.45853444933891296, 0.15426231920719147, 0.44000306725502014, -0.0585353821516037, 0.07727967947721481, -0.07029365748167038, 0.0784812718629837, 0.2070714235305786, 0.06912847608327866, 0.06716207414865494, -0.38276374340057373, -0.2325223684310913, 0.35732418298721313, 0.5423648953437805, 0.40724581480026245, 0.009469843469560146, -0.11992395669221878, -0.18630734086036682, 0.2812197804450989, -0.423431932926178, -0.3921651542186737, 0.22317716479301453, 0.2112451046705246, 0.04564488306641579, -0.11524758487939835, -0.26262569427490234, 0.11134424805641174, 0.03918910026550293, 0.10051245242357254, -0.06835640221834183, -0.15422244369983673, 0.3816716969013214, 0.34196603298187256, 0.11520474404096603, -0.248460054397583, 0.09961001574993134, -0.0036607254296541214, -0.19121837615966797, 0.5780709981918335, 0.013111012056469917, 0.31486907601356506, 0.0862170159816742, -0.22058995068073273, -0.013476642780005932, -0.2652890086174011, 0.29852157831192017, 0.11329348385334015, 0.049394916743040085, -0.09555695205926895, 0.4409901201725006, -0.03224068507552147, 0.003891852218657732, -0.23988521099090576, -0.3835207223892212, 0.03165460377931595, -0.10211504995822906, -0.19804491102695465, -0.06268967688083649, -0.17793291807174683, 0.08181717991828918, -0.004636696074157953, -0.10522919148206711, -0.04847212880849838, 0.14905807375907898, -0.06979266554117203, 0.2193257361650467, -0.7102015614509583, 0.35685229301452637, -0.015394576825201511, 0.21962790191173553, -0.006895689759403467, 0.027445456013083458, 0.19851267337799072, 0.13520324230194092, 0.07749417424201965, -0.1274237483739853, 0.06324156373739243, -0.08694829046726227, 0.017552901059389114, -0.01817288063466549, -0.04402824118733406, -0.1820732206106186, -0.06733627617359161, -0.2454107105731964, -0.29899415373802185, 0.19106021523475647, 0.4642946422100067, 0.257941335439682, -0.21172159910202026, 0.21024756133556366, 0.1895163655281067, -0.0018318326910957694, -0.04670119285583496, 0.007600108161568642, -0.3009836971759796, -0.3384607136249542, 0.06299804151058197, 0.11697909981012344, -0.027359738945961, -0.39263486862182617, 0.037846047431230545, 0.008233655244112015, -0.0022859221789985895, -0.46609991788864136, 0.190652534365654, 0.036641042679548264, 0.3921414613723755, 0.13660885393619537, 0.08760827034711838, -0.19138385355472565, -0.12887336313724518, -0.6261276006698608, -0.07745063304901123, 0.1408565193414688, -0.027239365503191948, -0.06064930185675621, 0.23845764994621277, 0.05874178186058998, -0.2467811405658722, 0.28996142745018005, -0.4334382116794586, 0.026411909610033035, 0.02390831522643566, -0.3930666744709015, -0.05343015119433403, -0.013798928819596767, -0.03626582399010658, -0.08431702852249146, -0.3480244576931, -0.14173582196235657, -0.10429704934358597, 0.27614304423332214, -0.3093971610069275, 0.3391559422016144, -0.1596834361553192, -0.21434177458286285, -0.12942498922348022, 0.02752583660185337, 0.48605242371559143, 0.04348034784197807, 0.09970365464687347, 0.1253850907087326, 0.02560342475771904, -0.3106209337711334, 0.10070642083883286, 0.15451855957508087, 0.2941522002220154, -0.11882753670215607, -0.010397731326520443, 0.1382458209991455, -0.06621773540973663, 0.1894260197877884, 0.14562833309173584, -0.09207150340080261, 0.15960288047790527, -0.03433007001876831, -0.05577749386429787, -0.18556027114391327, -0.007284427527338266, 0.006871192716062069, 0.1802998036146164, 0.20399022102355957, -0.2509247660636902, 0.0992012694478035, -0.23715899884700775, -0.24451328814029694, -0.12316786497831345, 0.08535350114107132, 0.24743087589740753, -0.19652345776557922, 0.16342605650424957, -0.006512903142720461, 0.3367505967617035, 0.14198456704616547, -0.07453657686710358, 0.3665940761566162, -0.2272612750530243, -0.041563794016838074, -0.10113099962472916, -0.04538671299815178, 0.08844989538192749, -0.4045807421207428, -0.05784080550074577, -0.21537308394908905 ]
https://github.com/huggingface/datasets/issues/5424
When applying `ReadInstruction` to custom load it's not DatasetDict but list of Dataset?
Hi! You can get a `DatasetDict` if you pass a dictionary with read instructions as follows: ```python instructions = [ ReadInstruction(split_name="train", from_=0, to=10, unit='%', rounding='closest'), ReadInstruction(split_name="dev", from_=0, to=10, unit='%', rounding='closest'), ReadInstruction(split_name="test", from_=0, to=5, unit='%', rounding='closest') ] dataset = load_dataset('csv', data_dir="data/", data_files={"train":"train.tsv", "dev":"dev.tsv", "test":"test.tsv"}, delimiter="\t", split={inst.split_name: inst for inst in instructions}) ```
### Describe the bug I am loading datasets from custom `tsv` files stored locally and applying split instructions for each split. Although the ReadInstruction is being applied correctly and I was expecting it to be `DatasetDict` but instead it is a list of `Dataset`. ### Steps to reproduce the bug Steps to reproduce the behaviour: 1. Import `from datasets import load_dataset, ReadInstruction` 2. Instruction to load the dataset ``` instructions = [ ReadInstruction(split_name="train", from_=0, to=10, unit='%', rounding='closest'), ReadInstruction(split_name="dev", from_=0, to=10, unit='%', rounding='closest'), ReadInstruction(split_name="test", from_=0, to=5, unit='%', rounding='closest') ] ``` 3. Load `dataset = load_dataset('csv', data_dir="data/", data_files={"train":"train.tsv", "dev":"dev.tsv", "test":"test.tsv"}, delimiter="\t", split=instructions)` ### Expected behavior **Current behaviour** ![Screenshot from 2023-01-16 10-45-27](https://user-images.githubusercontent.com/25720695/212614754-306898d8-8c27-4475-9bb8-0321bd939561.png) : **Expected behaviour** ![Screenshot from 2023-01-16 10-45-42](https://user-images.githubusercontent.com/25720695/212614813-0d336bf7-5266-482e-bb96-ef51f64de204.png) ### Environment info ``datasets==2.8.0 `` `Python==3.8.5 ` `Platform - Ubuntu 20.04.4 LTS`
51
When applying `ReadInstruction` to custom load it's not DatasetDict but list of Dataset?
[ -0.10909020155668259, 0.07860314846038818, -0.21662545204162598, 0.34337854385375977, 0.15797340869903564, 0.10299388319253922, 0.23725509643554688, 0.09482745826244354, 0.7419365048408508, 0.20389997959136963, -0.3656909763813019, 0.24769017100334167, -0.00008574801177019253, 0.1307721734046936, 0.11327653378248215, 0.27005794644355774, -0.16369982063770294, 0.12134107947349548, -0.079111248254776, -0.06651940941810608, -0.2826041579246521, 0.23843547701835632, -0.24450932443141937, -0.17680718004703522, 0.1610194891691208, -0.06828375160694122, -0.027592740952968597, 0.424761027097702, -0.25844696164131165, -0.3615171015262604, 0.27197757363319397, 0.3690558969974518, 0.016238844022154808, 0.2024928480386734, -0.0001066625991370529, 0.2675056457519531, 0.1159689873456955, -0.11717486381530762, -0.39442405104637146, 0.15642181038856506, -0.16684894263744354, -0.123197540640831, 0.3681217432022095, -0.29709863662719727, -0.04467398673295975, 0.1742698699235916, -0.028603771701455116, -0.22021454572677612, 0.09936275333166122, 0.3178256154060364, 0.29487162828445435, 0.08437388390302658, -0.10246960818767548, -0.06908988207578659, 0.13162250816822052, 0.2656445801258087, -0.14742934703826904, -0.059467773884534836, 0.38969478011131287, 0.1599743813276291, -0.35875362157821655, 0.003450271673500538, -0.1333228498697281, 0.17429818212985992, -0.017146725207567215, -0.08562856912612915, 0.15235325694084167, 0.12172070145606995, -0.02919880300760269, -0.0662059485912323, 0.7498751282691956, -0.20422443747520447, -0.11561435461044312, -0.2836177945137024, -0.09622830152511597, -0.1832619160413742, -0.03232162445783615, -0.12244889885187149, -0.011258495971560478, 0.2586403787136078, -0.038439374417066574, 0.03859042748808861, -0.004371653310954571, -0.08913082629442215, -0.18485909700393677, 0.11433953791856766, -0.27171260118484497, 0.12287891656160355, 0.03373631834983826, 0.11205069720745087, 0.4421224594116211, -0.039966221898794174, -0.244474858045578, -0.16747570037841797, -0.3427445590496063, -0.06816410273313522, 0.05603586509823799, 0.18793384730815887, 0.07775077223777771, 0.2830151915550232, 0.4142962396144867, 0.40195992588996887, -0.20662996172904968, 0.019048282876610756, 0.21906524896621704, 0.14414645731449127, 0.2537749111652374, 0.23179513216018677, 0.02413821779191494, 0.12407916784286499, -0.16824154555797577, 0.07598057389259338, -0.061633989214897156, 0.07059341669082642, -0.1601952463388443, -0.10846540331840515, 0.1438925564289093, -0.21017031371593475, -0.6170465350151062, -0.04243163391947746, 0.05392922833561897, -0.18890506029129028, 0.19875551760196686, 0.39188945293426514, 0.12280520796775818, 0.06257935613393784, 0.2814771831035614, -0.13220356404781342, -0.05303019657731056, -0.3164215683937073, -0.32842886447906494, -0.15991827845573425, -0.07836677879095078, 0.008380246348679066, 0.2137683779001236, 0.2530599534511566, 0.3690507113933563, -0.2709623873233795, -0.25634902715682983, -0.22111837565898895, 0.1851193904876709, -0.10103971511125565, 0.36219942569732666, 0.1567469984292984, 0.16184422373771667, 0.049838677048683167, 0.31099310517311096, -0.4051942229270935, -0.16298924386501312, 0.2329501360654831, -0.3516722023487091, -0.13462947309017181, 0.286493718624115, 0.24446497857570648, -0.11673356592655182, -0.046405743807554245, -0.038268495351076126, 0.2103985995054245, 0.1539677232503891, -0.15446019172668457, -0.045343197882175446, -0.026317663490772247, -0.25068432092666626, -0.153786301612854, -0.013914891518652439, 0.39019110798835754, -0.6913002729415894, 0.12182405591011047, 0.04369691014289856, -0.31313496828079224, 0.09644011408090591, 0.2610355019569397, -0.2890152633190155, 0.46604791283607483, -0.3083576560020447, -0.035739097744226456, 0.4559958577156067, -0.30103829503059387, -0.5036657452583313, 0.6025742292404175, 0.007006866857409477, 0.005794768687337637, 0.10966320335865021, 0.14671051502227783, 0.07529900223016739, -0.08119436353445053, 0.22344619035720825, -0.03938741609454155, 0.272443950176239, 0.038579318672418594, 0.029825720936059952, 0.0359782800078392, 0.17177367210388184, 0.0329662449657917, -0.02966160885989666, 0.35899126529693604, 0.2168271243572235, -0.11171458661556244, 0.44693729281425476, 0.04624465852975845, 0.00686215702444315, 0.5115777850151062, -0.11338670551776886, 0.3397555351257324, 0.20297908782958984, 0.11006353795528412, -0.42884865403175354, 0.062183305621147156, 0.0603635273873806, -0.18023432791233063, 0.00726739689707756, -0.10316761583089828, -0.3292897939682007, 0.21420837938785553, -0.2824907600879669, 0.06003836542367935, 0.2273523509502411, 0.30870509147644043, -0.27235934138298035, -0.19390876591205597, -0.15226240456104279, 0.47479742765426636, -0.5767294764518738, -0.029929764568805695, -0.46593809127807617, 0.16865897178649902, 0.043608687818050385, -0.03670398145914078, 0.08263081312179565, 0.1027892455458641, 0.05141934007406235, 0.02130802720785141, -0.009104904718697071, 0.26448124647140503, 0.27063846588134766, -0.269937127828598, -0.008474062196910381, 0.05250142142176628, -0.10131089389324188, -0.35385626554489136, -0.05046335235238075, -0.0917365625500679, 0.37204834818840027, -0.31309154629707336, -0.1870305836200714, 0.011341921985149384, -0.0887114554643631, 0.15840689837932587, -0.1092548742890358, -0.20460711419582367, 0.17650282382965088, 0.05747508257627487, -0.2819737493991852, -0.28908777236938477, -0.13746529817581177, 0.38702794909477234, 0.3670830726623535, 0.07662372291088104, -0.08194434642791748, 0.004576596897095442, 0.509768545627594, -0.014198671095073223, 0.09402734041213989, -0.16172121465206146, -0.04822755604982376, -0.16284069418907166, 0.00434087123721838, 0.008465788327157497, 0.26293718814849854, 0.24309347569942474, 0.17767001688480377, -0.08198243379592896, 0.11113829910755157, -0.19386529922485352, 0.09454435855150223, 0.1034839004278183, 0.04555971547961235, 0.04339965805411339, 0.017744645476341248, -0.08690504729747772, -0.49026137590408325, -0.03944151848554611, 0.033062998205423355, -0.001798679237253964, -0.49240753054618835, -0.08736974745988846, -0.2700153887271881, 0.07175377011299133, -0.05732167139649391, -0.4887964427471161, 0.045611824840307236, -0.3791917562484741, -0.2736639976501465, 0.17617212235927582, -0.13332219421863556, 0.08846212923526764, -0.2578998804092407, 0.1236998662352562, 0.130817711353302, -0.06377828121185303, -0.07212529331445694, -0.07367771118879318, -0.105528824031353, 0.1298038810491562, 0.049724724143743515, 0.024541134014725685, 0.14897115528583527, -0.14095090329647064, -0.07783365249633789, -0.25078192353248596, -0.12507173418998718, 0.245091050863266, -0.10789041966199875, -0.1010337769985199, 0.2623662054538727, 0.16677626967430115, 0.005843412596732378, -0.0533437505364418, -0.043835654854774475, 0.13819341361522675, -0.25891590118408203, -0.1524237096309662, -0.043031223118305206, -0.06603021174669266, -0.0908225029706955, -0.3637637794017792, -0.13858304917812347, -0.3649235963821411, -0.012183694168925285, 0.38035112619400024, -0.01423072163015604, 0.22723834216594696, -0.11107263714075089, 0.25138944387435913, 0.4051732122898102, 0.07431342452764511, -0.32835331559181213, -0.24436107277870178, 0.13835649192333221, -0.24537153542041779, -0.21576917171478271, -0.024316631257534027, -0.027710188180208206, 0.21704702079296112, 0.18218472599983215, -0.38782164454460144, 0.3556840419769287, -0.2791050374507904, 0.11224322766065598, 0.032907601445913315, 0.06825758516788483, 0.48525470495224, 0.05663753300905228, -0.049496669322252274, -0.35060831904411316, -0.40747904777526855, 0.30688244104385376, -0.34248533844947815, -0.004328579641878605, -0.13613055646419525, 0.1823045015335083, 0.04782218113541603, 0.1911500096321106, -0.3002057671546936, -0.03597730025649071, 0.37694036960601807, -0.11698520928621292, 0.4666624069213867, -0.3968266248703003, 0.03257906809449196, -0.16141323745250702, 0.1257556974887848, -0.0035854324232786894, 0.43811488151550293, -0.1624504029750824, -0.3138745427131653, 0.06471551954746246, 0.07701274752616882, -0.42204052209854126, -0.05229826271533966, -0.14893080294132233, 0.09173662215471268, -0.0005342104705050588, 0.22621870040893555, 0.3064675033092499, -0.13477541506290436, 0.06781058758497238, 0.07494345307350159, 0.05624598637223244, -0.08661410212516785, -0.09514986723661423, -0.5040546655654907, -0.08887160569429398, -0.14250554144382477, 0.11515060812234879, -0.24946258962154388, 0.09992411732673645, -0.01795051433146, -0.28154540061950684, 0.10161196440458298, -0.03026721067726612, 0.41842710971832275, 0.16500243544578552, 0.04045305401086807, 0.14330467581748962, -0.20781876146793365, -0.23887687921524048, 0.03910592198371887, -0.10921670496463776, 0.4252488613128662, -0.13135021924972534, 0.061837442219257355, -0.1255226731300354, -0.10368505120277405, 0.12900130450725555, 0.0031546440441161394, -0.16243912279605865, -0.2879302501678467, -0.03145286813378334, -0.4169119894504547, -0.12014735490083694, -0.07250691205263138, 0.2266504317522049, -0.06105606257915497, -0.046660415828228, -0.18821728229522705, -0.1799202859401703, -0.1814284324645996, -0.09158007800579071, -0.0017232515383511782, 0.19727908074855804, 0.3861860930919647, -0.06261315941810608, 0.13570968806743622, 0.38009268045425415, 0.1678643673658371, 0.7106776833534241, -0.14122748374938965, -0.35537731647491455, 0.35446664690971375, -0.19553275406360626, 0.022835547104477882, 0.2187068909406662, 0.06831449270248413, -0.1043102815747261, 0.3160415291786194, -0.5300019383430481, -0.10386696457862854, 0.0786103904247284, -0.05808486044406891, -0.23968519270420074, -0.4763522148132324, -0.5892137289047241, 0.26866722106933594, -0.134355366230011, -0.2529824674129486, 0.40253639221191406, -0.013443253003060818, -0.4656042158603668, 0.3771304786205292, 0.05351973697543144, 0.5610945820808411, -0.004021571017801762, 0.09320652484893799, 0.5049654245376587, 0.008705572225153446, -0.1438809633255005, 0.05308247357606888, 0.00631125271320343, -0.4423850178718567, -0.11202090978622437, 0.028011472895741463, 0.0066337608732283115, 0.17928266525268555, 0.3292098045349121, -0.04490462690591812, -0.09579914808273315, 0.1460386961698532, -0.29430556297302246, 0.014583751559257507, 0.04266385734081268, 0.1432037651538849, -0.21399755775928497, -0.15479592978954315, 0.23340798914432526, -0.03252878412604332, -0.04727453365921974, -0.001458760816603899, 0.12186145037412643, -0.015323682688176632, -0.1661989390850067, 0.100876584649086, -0.05259978398680687, -0.22405081987380981, 0.19043360650539398, -0.09717883914709091, -0.14184464514255524, 0.0843472108244896, 0.3211333751678467, 0.273855060338974, 0.21350398659706116, -0.18197715282440186, 0.2687872648239136, 0.17961329221725464, 0.1614457368850708, -0.26845693588256836, 0.044888950884342194, 0.15792669355869293, 0.097352996468544, -0.18662302196025848, -0.13750629127025604, -0.20302456617355347, -0.28904950618743896, 0.04344840720295906, 0.20259277522563934, 0.30101633071899414, -0.5015570521354675, -0.33484116196632385, 0.11882124841213226, 0.16016893088817596, -0.11209666728973389, 0.17234830558300018, 0.06211476773023605, -0.05801611393690109, -0.0842042863368988, 0.01226278766989708, -0.3001980185508728, -0.06108196824789047, 0.33682191371917725, 0.3950016498565674, 0.08449490368366241, 0.5903511643409729, 0.10330548882484436, -0.036826275289058685, -0.40621984004974365, 0.04580911248922348, 0.30710381269454956, 0.21445830166339874, 0.10799738764762878, 0.030743176117539406, 0.006371587049216032, 0.21297836303710938, 0.49905771017074585, -0.09703300148248672, 0.02509291097521782, -0.28098154067993164, -0.04719723016023636, -0.4738679528236389, -0.08077100664377213, -0.08511514961719513, 0.345119446516037, 0.40438979864120483, -0.1549096703529358, 0.03821081668138504, 0.020278388634324074, -0.3689053952693939, -0.11716751009225845, -0.23496726155281067, 0.04184570536017418, 0.12102745473384857, 0.17113982141017914, -0.08721818029880524, 0.17156492173671722, 0.23000548779964447, 0.12785391509532928, -0.014656701125204563, -0.29586103558540344, -0.07498384267091751, 0.08468344807624817, 0.0977400690317154, 0.36101827025413513, -0.20104026794433594, -0.18506506085395813, -0.18539275228977203, -0.19489040970802307, 0.223343163728714, 0.38092589378356934, 0.10144666582345963, 0.37323305010795593, 0.31657078862190247, 0.12067066878080368, -0.12162911891937256, 0.22878682613372803, -0.09691642224788666, -0.11025317758321762, 0.007947477512061596, 0.041235387325286865, -0.19936349987983704, -0.007743143010884523, -0.1005251407623291, 0.17774595320224762, 0.20419354736804962, 0.3010355532169342, 0.1332855075597763, -0.4203561544418335, 0.08991670608520508, -0.0041343108750879765, 0.058480776846408844, 0.15587417781352997, -0.12039973586797714, -0.34256279468536377, 0.0002237469016108662, 0.2412954717874527, -0.07604321837425232, 0.03623269498348236, 0.43494537472724915, -0.39879605174064636, 0.26699525117874146, 0.18429136276245117, 0.17509081959724426, 0.01113735418766737, 0.20211221277713776, -0.005910362582653761, 0.6347767114639282, -0.11344555765390396, -0.08548953384160995, -0.008710191585123539, -0.09298648685216904, -0.01569421775639057, 0.09238804131746292, 0.10646729171276093, -0.0007260011625476182, 0.5260888338088989, 0.04417009651660919, 0.30778127908706665, 0.05683814734220505, 0.05694456398487091, -0.045579489320516586, -0.5602590441703796, 0.4504814147949219, 0.006439278833568096, -0.3470289707183838, 0.07983260601758957, 0.02942444384098053, -0.09750200062990189, -0.07458727806806564, 0.10893001407384872, -0.036838214844465256, -0.09575708955526352, -0.27428939938545227, -0.09301037341356277, -0.6350391507148743, -0.17980368435382843, 0.1673004925251007, -0.26025259494781494, -0.07497671991586685, -0.03149363026022911, 0.09744089841842651, -0.353823184967041, -0.08310174942016602, -0.36467093229293823, 0.19254760444164276, -0.07209303975105286, -0.044060591608285904, -0.21924184262752533, 0.3382717967033386, -0.3675152063369751, 0.21834106743335724, 0.4929405748844147, -0.034107137471437454, -0.026967467740178108, 0.021940354257822037, 0.3992171883583069, -0.2858141362667084, 0.03712894394993782, -0.3686402440071106, -0.5033126473426819, 0.3363826274871826, -0.13426001369953156, 0.22881418466567993, 0.5144400000572205, 0.2602594494819641, -0.1225893571972847, -0.00012832775246351957, 0.2994214594364166, -0.10332293808460236, -0.18987701833248138, 0.028773227706551552, -0.02170339599251747, -0.4458251893520355, -0.056356530636548996, 0.02166408859193325, -0.3451841175556183, -0.15810555219650269, 0.2765215337276459, -0.12997524440288544, 0.34867867827415466, -0.005186246242374182, 0.12908565998077393, -0.04075751081109047, 0.5401930809020996, 0.29674413800239563, 0.030965561047196388, 0.053442224860191345, -0.11823850125074387, -0.37848687171936035, 0.35349640250205994, 0.18226806819438934, -0.2210976481437683, -0.016930565237998962, 0.18297666311264038, 0.4525243639945984, 0.06281101703643799, -0.13271139562129974, -0.06628435850143433, 0.030825914815068245, 0.12150710821151733, -0.08182059973478317, -0.2555622458457947, 0.07257813215255737, 0.20484542846679688, -0.1382896900177002, -0.2585955560207367, 0.0391225665807724, 0.41020241379737854, 0.19376757740974426, -0.1777150183916092, 0.0888957530260086, 0.05398112162947655, 0.2622448801994324, 0.2054733783006668, 0.13454167544841766, 0.48419708013534546, -0.24880817532539368, 0.15046913921833038, -0.21020473539829254, -0.1423480212688446, -0.056821227073669434, 0.160268634557724, 0.18270279467105865, 0.36412152647972107, -0.1975395679473877, 0.0014437572099268436, -0.012929698452353477, 0.1073019951581955, 0.18782562017440796, 0.20750775933265686, -0.2926235496997833, 0.28567105531692505, -0.26476436853408813, 0.10263434797525406, 0.08834654837846756, 0.20867708325386047, 0.3715807795524597, -0.027253074571490288, 0.0030512406956404448, -0.14178726077079773, 0.33037421107292175, -0.2775501310825348, -0.28419795632362366, 0.18574143946170807, -0.0031567274127155542, -0.10043833404779434, -0.12285955250263214, -0.2425282597541809, 0.08151156455278397, 0.5466229319572449, -0.3097465932369232, -0.11131133139133453, 0.25249767303466797, -0.08720431476831436, 0.3199153542518616, -0.12139098346233368, 0.09067114442586899, 0.2895476520061493, -0.19118714332580566, -0.2565500736236572, -0.249798983335495 ]
https://github.com/huggingface/datasets/issues/5422
Datasets load error for saved github issues
I can confirm that the error exists! I'm trying to read 3 parquet files locally: ```python from datasets import load_dataset, Features, Value, ClassLabel review_dataset = load_dataset( "parquet", data_files={ "train": os.path.join(sentiment_analysis_data_path, "train.parquet"), "validation": os.path.join(sentiment_analysis_data_path, "validation.parquet"), "test": os.path.join(sentiment_analysis_data_path, "test.parquet"), }, ) ``` But you can fix it, by specifying `features` for `load_dataset()` function like this: ```python from datasets import load_dataset, Features, Value, ClassLabel features = Features( { "label": ClassLabel( num_classes=3, names=["negative", "neutral", "positive"], ), "text": Value(dtype="string"), } ) review_dataset = load_dataset( "parquet", data_files={ "train": os.path.join(sentiment_analysis_data_path, "train.parquet"), "validation": os.path.join(sentiment_analysis_data_path, "validation.parquet"), "test": os.path.join(sentiment_analysis_data_path, "test.parquet"), }, features=features, ) print(review_dataset) ```
### Describe the bug Loading a previously downloaded & saved dataset as described in the HuggingFace course: issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") Gives this error: datasets.builder.DatasetGenerationError: An error occurred while generating the dataset A work-around I found was to use streaming. ### Steps to reproduce the bug Reproduce by executing the code provided: https://huggingface.co/course/chapter5/5?fw=pt From the heading: 'let’s create a function that can download all the issues from a GitHub repository' ### Expected behavior No error ### Environment info Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp). **[EDIT]** This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`) ``` Using custom data configuration default-950028611d2860c8 Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s] Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s] Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last): File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single writer.write_table(table) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table pa_table = table_cast(pa_table, self._schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast return cast_table_to_schema(table, schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp> arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp> arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type timestamp[s] to null The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module> issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset builder_instance.download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare self._download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split for job_id, done, content in self._prepare_split_single( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset Generating train split: 2619 examples [00:19, 7155.72 examples/s] ```
95
Datasets load error for saved github issues
[ -0.5190645456314087, 0.3197609484195709, -0.1691041886806488, 0.21698835492134094, 0.2883802652359009, 0.062052901834249496, 0.41312453150749207, 0.2116403430700302, 0.09525398910045624, 0.1687288135290146, 0.03383130207657814, 0.08824964612722397, -0.04448274150490761, 0.3017023205757141, -0.18680883944034576, 0.1524825394153595, -0.1897348314523697, 0.035422928631305695, 0.11890462785959244, -0.14585915207862854, 0.0030955171678215265, 0.08614058047533035, -0.16078533232212067, 0.06822403520345688, -0.24450327455997467, -0.16823484003543854, 0.28465205430984497, 0.46470534801483154, -0.12128166854381561, -0.35337546467781067, 0.27164825797080994, 0.24998359382152557, 0.20927540957927704, 0.26565971970558167, -0.00010403661144664511, 0.17782841622829437, 0.36982911825180054, -0.16227304935455322, -0.4091351628303528, 0.06000009924173355, -0.3690836429595947, -0.23257052898406982, -0.0503213033080101, -0.2316104769706726, -0.15812306106090546, 0.033361636102199554, -0.04168209806084633, -0.3128145933151245, 0.42445358633995056, 0.3545616567134857, 0.3265363276004791, 0.22856391966342926, -0.07767343521118164, -0.25073087215423584, 0.45857182145118713, 0.026032349094748497, 0.027320552617311478, 0.34744197130203247, 0.19714373350143433, -0.030513372272253036, 0.04756017401814461, 0.31196847558021545, -0.0008000595262274146, 0.052249763160943985, -0.10293114185333252, -0.14182798564434052, -0.011711007915437222, -0.25638097524642944, 0.09800461679697037, -0.008554086089134216, 0.49537014961242676, -0.0855279490351677, -0.19728276133537292, -0.1410864144563675, -0.045506663620471954, 0.055784035474061966, 0.24186338484287262, 0.30781683325767517, -0.04405590146780014, 0.28270021080970764, -0.4077335000038147, -0.36594367027282715, -0.17948228120803833, 0.13901755213737488, 0.12746401131153107, -0.165938600897789, -0.20587126910686493, 0.0997835025191307, -0.05377591401338577, -0.14311814308166504, -0.20819662511348724, -0.23492717742919922, -0.21597348153591156, -0.07328368723392487, -0.08270075172185898, -0.11786670982837677, 0.08258472383022308, -0.17394237220287323, 0.298412948846817, 0.34998419880867004, -0.011002509854733944, 0.28717654943466187, 0.04912831634283066, 0.0118309510871768, 0.4021441340446472, 0.07414961606264114, 0.21733716130256653, 0.3040917217731476, 0.6682025194168091, 0.02394794672727585, -0.212291419506073, -0.0036949641071259975, -0.31120869517326355, -0.10911808907985687, -0.05926908552646637, -0.15998394787311554, 0.3035464584827423, -0.3372521996498108, -0.22072833776474, 0.25450393557548523, -0.0062381732277572155, -0.11894727498292923, -0.02845161035656929, 0.49004173278808594, -0.0703027993440628, -0.19850516319274902, -0.06909840553998947, 0.35084250569343567, -0.03204737603664398, -0.13205374777317047, -0.29444482922554016, -0.36112767457962036, 0.13693849742412567, 0.007114573381841183, 0.27912262082099915, -0.3028828501701355, 0.3746357560157776, 0.057126451283693314, -0.06314317882061005, -0.1861429512500763, 0.10211002826690674, 0.09975631535053253, -0.07545403391122818, 0.42394208908081055, 0.28399744629859924, 0.1294218748807907, 0.15428051352500916, -0.5124691128730774, 0.1281278282403946, 0.23074685037136078, -0.259751558303833, -0.3104010820388794, -0.2084590196609497, 0.27479153871536255, -0.07443976402282715, 0.12302035093307495, -0.7027380466461182, -0.03972788155078888, 0.22711537778377533, 0.00234692869707942, -0.12665480375289917, -0.09673372656106949, 0.20509210228919983, -0.14288415014743805, 0.13311493396759033, 0.23069263994693756, 0.14058825373649597, -0.1148749440908432, 0.0762396976351738, -0.28348004817962646, 0.08860823512077332, 0.3008795380592346, -0.28660523891448975, 0.11932796239852905, -0.17218460142612457, 0.18886400759220123, 0.3632759749889374, -0.25129324197769165, -0.4521426260471344, 0.17504757642745972, 0.20273368060588837, -0.04687662050127983, -0.2378540188074112, -0.03772128000855446, 0.2856234908103943, -0.15220284461975098, 0.14668413996696472, 0.2007427215576172, -0.021519292145967484, 0.17791514098644257, -0.34478509426116943, -0.1696075052022934, -0.31675153970718384, 0.2664659321308136, 0.032356489449739456, 0.18556228280067444, 0.39709025621414185, -0.14994677901268005, 0.020980315282940865, -0.3180169463157654, -0.1944204866886139, 0.46037808060646057, 0.18949376046657562, -0.07911913841962814, -0.12737467885017395, -0.03573022410273552, -0.5404778122901917, 0.11677590012550354, 0.05642953887581825, 0.0758734792470932, -0.10138783603906631, -0.07457917928695679, -0.386576384305954, -0.011110488325357437, -0.2836935818195343, 0.01622401736676693, 0.15380427241325378, 0.21136271953582764, -0.2590208649635315, 0.17940551042556763, -0.045067086815834045, 0.2506072521209717, -0.40055203437805176, 0.026761934161186218, -0.018444646149873734, 0.5404125452041626, -0.14457200467586517, -0.28398674726486206, 0.3528480529785156, -0.03382584825158119, 0.22558751702308655, -0.16688521206378937, -0.16566996276378632, 0.15567368268966675, -0.18118318915367126, 0.07268701493740082, 0.4200144112110138, 0.034559812396764755, 0.06283779442310333, -0.26751381158828735, 0.0880032479763031, -0.007050854619592428, 0.18817609548568726, -0.0008390303119085729, -0.23756204545497894, 0.22853678464889526, -0.003098732093349099, -0.10009513795375824, 0.03488815203309059, -0.0770515501499176, 0.5860109329223633, -0.0174611397087574, -0.02545955590903759, -0.27507346868515015, 0.01655738241970539, 0.3288594186306, 0.20389235019683838, -0.02167988196015358, -0.32725363969802856, 0.06845518201589584, 0.4714509844779968, 0.11148306727409363, 0.2789803147315979, 0.08119514584541321, -0.08356865495443344, -0.07408736646175385, 0.03756636753678322, 0.1405053585767746, 0.20709219574928284, 0.26533621549606323, -0.1830918788909912, -0.054760489612817764, -0.062399014830589294, -0.17854948341846466, 0.12007170915603638, -0.03779686242341995, -0.004344044718891382, 0.1575421839952469, 0.26611244678497314, -0.2849026322364807, -0.34544411301612854, 0.12071672827005386, -0.039113614708185196, 0.2696218490600586, -0.4080390930175781, 0.029113953933119774, -0.20729254186153412, -0.22819440066814423, 0.17323848605155945, -0.00640847347676754, -0.2168055921792984, -0.21547657251358032, 0.10110528767108917, 0.15849517285823822, -0.2621133327484131, 0.17848441004753113, 0.3950011134147644, 0.2807781994342804, 0.11010628938674927, 0.13927315175533295, 0.05390302464365959, -0.5247378349304199, -0.23850052058696747, 0.13133825361728668, 0.30054911971092224, -0.137980654835701, 0.40667620301246643, -0.336599200963974, 0.05185351520776749, -0.39810511469841003, -0.09200398623943329, 0.13457749783992767, 0.024230528622865677, 0.5202198028564453, -0.254189133644104, 0.4186612367630005, 0.214069202542305, -0.05978196859359741, 0.36641284823417664, 0.1772351711988449, -0.10915248095989227, -0.013527823612093925, 0.16925552487373352, -0.2674647867679596, -0.07685911655426025, -0.2703056037425995, -0.09204436093568802, -0.31230589747428894, -0.05799085274338722, 0.22447316348552704, 0.1699814349412918, 0.15073317289352417, 0.21720659732818604, -0.03686150908470154, 0.1827474981546402, -0.13975977897644043, -0.28313979506492615, -0.49208226799964905, 0.23434969782829285, -0.3360901474952698, -0.35309037566185, 0.09544447064399719, 0.31666767597198486, -0.12446139752864838, 0.20909301936626434, -0.39143121242523193, 0.1511538326740265, 0.08180778473615646, 0.2783040702342987, 0.2600444555282593, -0.006983060855418444, 0.06111305207014084, 0.09105958044528961, -0.04968218132853508, -0.19751352071762085, -0.3211199641227722, 0.201235830783844, -0.014347870834171772, 0.0075962133705616, -0.14113262295722961, 0.2310599833726883, -0.2191302478313446, 0.8387617468833923, 0.16479934751987457, -0.15595929324626923, 0.36416006088256836, -0.13291308283805847, 0.3904789984226227, -0.07509870082139969, -0.17054258286952972, -0.07233671098947525, 0.013096660375595093, -0.029758671298623085, 0.36237362027168274, 0.1508467197418213, -0.25738972425460815, -0.1526118367910385, -0.18463268876075745, -0.22109846770763397, -0.2959459125995636, -0.13000082969665527, -0.17200174927711487, 0.02975253388285637, 0.3309551775455475, 0.09637582302093506, -0.17156848311424255, 0.009741617366671562, 0.023249374702572823, 0.17701037228107452, -0.05654265731573105, -0.03722848370671272, -0.38589656352996826, 0.3132258653640747, -0.21156080067157745, 0.30956631898880005, 0.08936554938554764, 0.11812692880630493, -0.16944794356822968, 0.046429604291915894, 0.04006274789571762, -0.15827377140522003, -0.023354191333055496, -0.3953198492527008, 0.1815408617258072, 0.07895174622535706, 0.012800127267837524, 0.00045233560376800597, -0.16684946417808533, -0.012173225171864033, 0.4085753560066223, 0.13221526145935059, 0.5349738597869873, -0.24412193894386292, -0.22333166003227234, 0.17568987607955933, 0.04673770070075989, -0.17386406660079956, 0.11545690894126892, -0.2714964747428894, -0.2533334195613861, -0.5637241005897522, -0.0610867403447628, 0.0276800449937582, -0.16052082180976868, -0.05761469155550003, -0.10191738605499268, -0.40363362431526184, 0.11412487924098969, -0.14219827950000763, 0.2856441140174866, 0.33096978068351746, -0.15112556517124176, 0.1160426214337349, -0.0622447244822979, -0.00218845228664577, 0.5001676678657532, 0.7122893333435059, 0.12008455395698547, -0.10635355114936829, 0.11258863657712936, -0.348811537027359, -0.13654226064682007, 0.18737858533859253, 0.025691455230116844, -0.362856388092041, 0.11575146019458771, 0.21946373581886292, -0.18188847601413727, 0.29547208547592163, 0.18186914920806885, 0.014246390201151371, -0.4472142159938812, -0.32156670093536377, 0.35507357120513916, -0.19613642990589142, -0.1369044929742813, 0.37184813618659973, 0.04785428196191788, -0.08762484043836594, 0.024662120267748833, -0.027457676827907562, 0.6646745204925537, -0.10414978116750717, 0.01708269864320755, 0.20359396934509277, -0.2445290982723236, -0.0980912446975708, -0.26794561743736267, -0.05532996356487274, -0.368443101644516, -0.024991421028971672, 0.09864459186792374, -0.14518055319786072, 0.10265254229307175, 0.14792753756046295, -0.01986600086092949, 0.10280990600585938, 0.029220202937722206, 0.1791350394487381, 0.04146807640790939, 0.1599181890487671, 0.12252699583768845, 0.12544883787631989, -0.4119265079498291, 0.2611759305000305, -0.13991811871528625, 0.19911302626132965, -0.1866784393787384, -0.0975947305560112, -0.02272678352892399, -0.1642758846282959, -0.3887176811695099, 0.2325066179037094, -0.040618862956762314, 0.26478156447410583, -0.1501016467809677, -0.19010284543037415, -0.11755509674549103, 0.082859106361866, 0.3795430064201355, 0.23230387270450592, -0.2438056319952011, 0.34606605768203735, -0.06722119450569153, -0.0018528512446209788, -0.24146965146064758, 0.13418088853359222, 0.2220008671283722, -0.2642357647418976, -0.17082113027572632, -0.030267519876360893, -0.03771800175309181, -0.4239509701728821, -0.17084236443042755, 0.15164248645305634, -0.25223758816719055, -0.14648686349391937, -0.08260871469974518, -0.0043800706043839455, 0.11968817561864853, -0.28631311655044556, 0.2072199583053589, 0.15966105461120605, 0.2601108253002167, 0.16917940974235535, 0.20440059900283813, -0.2724972367286682, -0.14560511708259583, 0.29039517045021057, 0.014448096044361591, -0.062421999871730804, 0.3652566075325012, -0.012012496590614319, -0.16961218416690826, -0.370168536901474, 0.09448325634002686, 0.048393525183200836, -0.2916038930416107, 0.42379671335220337, -0.2826404273509979, -0.11045652627944946, -0.0809759795665741, 0.4087940752506256, -0.19089463353157043, -0.1510588824748993, 0.2512515187263489, -0.3049914538860321, -0.18276062607765198, 0.023532913997769356, -0.0707184299826622, 0.2531959116458893, 0.23113025724887848, -0.29317373037338257, -0.017249353229999542, 0.0013910809066146612, -0.41748014092445374, 0.1483941227197647, -0.49904829263687134, 0.09020176529884338, 0.16158747673034668, 0.02216505818068981, 0.2852477729320526, -0.3423284590244293, 0.1695074737071991, -0.1764441430568695, -0.16106043756008148, -0.32637250423431396, 0.035764120519161224, 0.06327302753925323, -0.04411729425191879, -0.02715388685464859, -0.029437579214572906, -0.16660548746585846, 0.08828970044851303, -0.02866736426949501, 0.35266363620758057, 0.11500341445207596, 0.0362495593726635, 0.009980949573218822, 0.13051699101924896, -0.021295329555869102, -0.04168921336531639, 0.16635368764400482, -0.09477027505636215, 0.24914462864398956, -0.0602598674595356, -0.006853573955595493, 0.014327323995530605, -0.1196165457367897, -0.09299084544181824, 0.0742398053407669, 0.1821150928735733, 0.37150031328201294, 0.3989873230457306, -0.5026693940162659, 0.030131597071886063, 0.3401198089122772, -0.010696986690163612, 0.22149142622947693, -0.2652699053287506, -0.18649183213710785, -0.012211132794618607, 0.2819102108478546, -0.20123392343521118, -0.14553946256637573, 0.27097904682159424, -0.24510470032691956, 0.040044065564870834, 0.12075360864400864, 0.18624520301818848, 0.06227947399020195, -0.097445547580719, 0.18480205535888672, 0.5148476362228394, 0.05131317675113678, 0.08691969513893127, -0.089381143450737, -0.09276377409696579, -0.0400519073009491, -0.09913575649261475, 0.11137985438108444, 0.1514521688222885, 0.07061014324426651, -0.15722642838954926, 0.06516488641500473, 0.41282328963279724, 0.01859251968562603, 0.06964362412691116, -0.4409233033657074, 0.2405087947845459, 0.05781644955277443, -0.17553314566612244, 0.06834198534488678, 0.19447796046733856, -0.06244910508394241, 0.14636725187301636, -0.09879309684038162, -0.1910969614982605, 0.18562133610248566, -0.18379464745521545, -0.09926676750183105, -0.31125953793525696, -0.29162198305130005, -0.0843079462647438, 0.1129554882645607, -0.3032706379890442, 0.0001487645204178989, 0.10612516850233078, 0.02081836760044098, -0.0825924277305603, -0.2978869378566742, 0.45896926522254944, 0.015334502793848515, -0.03696301579475403, -0.09329767525196075, 0.5055736303329468, 0.16538545489311218, -0.0805540382862091, 0.2248929888010025, 0.307780385017395, 0.5629498362541199, 0.1362704336643219, 0.02792019210755825, -0.10272352397441864, 0.13921938836574554, -0.17161481082439423, -0.12628860771656036, 0.13938729465007782, -0.009364786557853222, 0.28535526990890503, 0.21269692480564117, 0.27915075421333313, -0.18840083479881287, 0.07864155620336533, 0.0015754788182675838, -0.07690263539552689, -0.0051763588562607765, 0.007010535337030888, -0.20685036480426788, -0.20227168500423431, -0.15233482420444489, -0.3042212426662445, -0.015442067757248878, -0.11023582518100739, 0.3730226755142212, -0.02301115356385708, 0.12431733310222626, -0.13753992319107056, 0.15374821424484253, -0.17500270903110504, 0.6803292632102966, 0.28667786717414856, 0.039878033101558685, -0.051381926983594894, -0.17089985311031342, -0.47092485427856445, -0.01976272463798523, -0.11260350793600082, -0.011341138742864132, 0.11768374592065811, 0.19587282836437225, 0.14754217863082886, 0.22907313704490662, 0.2405625730752945, -0.2631620466709137, 0.09765146672725677, -0.06242239475250244, -0.5020051002502441, 0.04068829491734505, 0.07696454226970673, -0.00012238416820764542, 0.02402811124920845, -0.46933916211128235, 0.2431705743074417, 0.03343390300869942, 0.19194164872169495, 0.08374951034784317, 0.04409054294228554, 0.009345058351755142, -0.5076560378074646, 0.42391079664230347, -0.11164101213216782, 0.20196184515953064, -0.04143184423446655, -0.19341740012168884, 0.027239063754677773, -0.3823093771934509, 0.08448103815317154, 0.18473920226097107, 0.07689598947763443, 0.38627541065216064, -0.10778435319662094, 0.17731858789920807, -0.16517911851406097, -0.08077266067266464, 0.09185590595006943, 0.405920147895813, 0.10644076019525528, -0.17767298221588135, 0.09844470769166946, -0.009150516241788864, 0.08420412987470627, -0.10283023118972778, -0.0467718243598938, 0.25207918882369995, -0.16551616787910461, -0.19492009282112122, 0.3851172626018524, -0.03485878184437752, -0.20249511301517487, -0.07205873727798462, 0.21476006507873535, 0.3119916617870331, -0.16266299784183502, -0.4890868663787842, 0.2246839702129364, 0.44061803817749023, -0.15507295727729797, -0.2611546814441681, 0.2423250824213028, 0.03296881541609764, 0.05729087442159653, 0.05316288769245148, 0.13653729856014252, -0.1034083142876625, -0.3263894021511078, -0.05003935843706131, -0.15971620380878448 ]
https://github.com/huggingface/datasets/issues/5422
Datasets load error for saved github issues
@Extremesarova I think this is a different issue, but understand using features could be a work-around. It seems the field `closed_at` is `null` in many cases. I've not found a way to specify only a single feature without (succesfully) specifiying the full and quite detailed set of expected features. Using this features set gives an error the column names don't match. `features = Features({'closed_at': Value(dtype='timestamp[s]', id=None)})`
### Describe the bug Loading a previously downloaded & saved dataset as described in the HuggingFace course: issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") Gives this error: datasets.builder.DatasetGenerationError: An error occurred while generating the dataset A work-around I found was to use streaming. ### Steps to reproduce the bug Reproduce by executing the code provided: https://huggingface.co/course/chapter5/5?fw=pt From the heading: 'let’s create a function that can download all the issues from a GitHub repository' ### Expected behavior No error ### Environment info Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp). **[EDIT]** This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`) ``` Using custom data configuration default-950028611d2860c8 Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s] Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s] Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last): File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single writer.write_table(table) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table pa_table = table_cast(pa_table, self._schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast return cast_table_to_schema(table, schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp> arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp> arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type timestamp[s] to null The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module> issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset builder_instance.download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare self._download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split for job_id, done, content in self._prepare_split_single( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset Generating train split: 2619 examples [00:19, 7155.72 examples/s] ```
66
Datasets load error for saved github issues
[ -0.5190645456314087, 0.3197609484195709, -0.1691041886806488, 0.21698835492134094, 0.2883802652359009, 0.062052901834249496, 0.41312453150749207, 0.2116403430700302, 0.09525398910045624, 0.1687288135290146, 0.03383130207657814, 0.08824964612722397, -0.04448274150490761, 0.3017023205757141, -0.18680883944034576, 0.1524825394153595, -0.1897348314523697, 0.035422928631305695, 0.11890462785959244, -0.14585915207862854, 0.0030955171678215265, 0.08614058047533035, -0.16078533232212067, 0.06822403520345688, -0.24450327455997467, -0.16823484003543854, 0.28465205430984497, 0.46470534801483154, -0.12128166854381561, -0.35337546467781067, 0.27164825797080994, 0.24998359382152557, 0.20927540957927704, 0.26565971970558167, -0.00010403661144664511, 0.17782841622829437, 0.36982911825180054, -0.16227304935455322, -0.4091351628303528, 0.06000009924173355, -0.3690836429595947, -0.23257052898406982, -0.0503213033080101, -0.2316104769706726, -0.15812306106090546, 0.033361636102199554, -0.04168209806084633, -0.3128145933151245, 0.42445358633995056, 0.3545616567134857, 0.3265363276004791, 0.22856391966342926, -0.07767343521118164, -0.25073087215423584, 0.45857182145118713, 0.026032349094748497, 0.027320552617311478, 0.34744197130203247, 0.19714373350143433, -0.030513372272253036, 0.04756017401814461, 0.31196847558021545, -0.0008000595262274146, 0.052249763160943985, -0.10293114185333252, -0.14182798564434052, -0.011711007915437222, -0.25638097524642944, 0.09800461679697037, -0.008554086089134216, 0.49537014961242676, -0.0855279490351677, -0.19728276133537292, -0.1410864144563675, -0.045506663620471954, 0.055784035474061966, 0.24186338484287262, 0.30781683325767517, -0.04405590146780014, 0.28270021080970764, -0.4077335000038147, -0.36594367027282715, -0.17948228120803833, 0.13901755213737488, 0.12746401131153107, -0.165938600897789, -0.20587126910686493, 0.0997835025191307, -0.05377591401338577, -0.14311814308166504, -0.20819662511348724, -0.23492717742919922, -0.21597348153591156, -0.07328368723392487, -0.08270075172185898, -0.11786670982837677, 0.08258472383022308, -0.17394237220287323, 0.298412948846817, 0.34998419880867004, -0.011002509854733944, 0.28717654943466187, 0.04912831634283066, 0.0118309510871768, 0.4021441340446472, 0.07414961606264114, 0.21733716130256653, 0.3040917217731476, 0.6682025194168091, 0.02394794672727585, -0.212291419506073, -0.0036949641071259975, -0.31120869517326355, -0.10911808907985687, -0.05926908552646637, -0.15998394787311554, 0.3035464584827423, -0.3372521996498108, -0.22072833776474, 0.25450393557548523, -0.0062381732277572155, -0.11894727498292923, -0.02845161035656929, 0.49004173278808594, -0.0703027993440628, -0.19850516319274902, -0.06909840553998947, 0.35084250569343567, -0.03204737603664398, -0.13205374777317047, -0.29444482922554016, -0.36112767457962036, 0.13693849742412567, 0.007114573381841183, 0.27912262082099915, -0.3028828501701355, 0.3746357560157776, 0.057126451283693314, -0.06314317882061005, -0.1861429512500763, 0.10211002826690674, 0.09975631535053253, -0.07545403391122818, 0.42394208908081055, 0.28399744629859924, 0.1294218748807907, 0.15428051352500916, -0.5124691128730774, 0.1281278282403946, 0.23074685037136078, -0.259751558303833, -0.3104010820388794, -0.2084590196609497, 0.27479153871536255, -0.07443976402282715, 0.12302035093307495, -0.7027380466461182, -0.03972788155078888, 0.22711537778377533, 0.00234692869707942, -0.12665480375289917, -0.09673372656106949, 0.20509210228919983, -0.14288415014743805, 0.13311493396759033, 0.23069263994693756, 0.14058825373649597, -0.1148749440908432, 0.0762396976351738, -0.28348004817962646, 0.08860823512077332, 0.3008795380592346, -0.28660523891448975, 0.11932796239852905, -0.17218460142612457, 0.18886400759220123, 0.3632759749889374, -0.25129324197769165, -0.4521426260471344, 0.17504757642745972, 0.20273368060588837, -0.04687662050127983, -0.2378540188074112, -0.03772128000855446, 0.2856234908103943, -0.15220284461975098, 0.14668413996696472, 0.2007427215576172, -0.021519292145967484, 0.17791514098644257, -0.34478509426116943, -0.1696075052022934, -0.31675153970718384, 0.2664659321308136, 0.032356489449739456, 0.18556228280067444, 0.39709025621414185, -0.14994677901268005, 0.020980315282940865, -0.3180169463157654, -0.1944204866886139, 0.46037808060646057, 0.18949376046657562, -0.07911913841962814, -0.12737467885017395, -0.03573022410273552, -0.5404778122901917, 0.11677590012550354, 0.05642953887581825, 0.0758734792470932, -0.10138783603906631, -0.07457917928695679, -0.386576384305954, -0.011110488325357437, -0.2836935818195343, 0.01622401736676693, 0.15380427241325378, 0.21136271953582764, -0.2590208649635315, 0.17940551042556763, -0.045067086815834045, 0.2506072521209717, -0.40055203437805176, 0.026761934161186218, -0.018444646149873734, 0.5404125452041626, -0.14457200467586517, -0.28398674726486206, 0.3528480529785156, -0.03382584825158119, 0.22558751702308655, -0.16688521206378937, -0.16566996276378632, 0.15567368268966675, -0.18118318915367126, 0.07268701493740082, 0.4200144112110138, 0.034559812396764755, 0.06283779442310333, -0.26751381158828735, 0.0880032479763031, -0.007050854619592428, 0.18817609548568726, -0.0008390303119085729, -0.23756204545497894, 0.22853678464889526, -0.003098732093349099, -0.10009513795375824, 0.03488815203309059, -0.0770515501499176, 0.5860109329223633, -0.0174611397087574, -0.02545955590903759, -0.27507346868515015, 0.01655738241970539, 0.3288594186306, 0.20389235019683838, -0.02167988196015358, -0.32725363969802856, 0.06845518201589584, 0.4714509844779968, 0.11148306727409363, 0.2789803147315979, 0.08119514584541321, -0.08356865495443344, -0.07408736646175385, 0.03756636753678322, 0.1405053585767746, 0.20709219574928284, 0.26533621549606323, -0.1830918788909912, -0.054760489612817764, -0.062399014830589294, -0.17854948341846466, 0.12007170915603638, -0.03779686242341995, -0.004344044718891382, 0.1575421839952469, 0.26611244678497314, -0.2849026322364807, -0.34544411301612854, 0.12071672827005386, -0.039113614708185196, 0.2696218490600586, -0.4080390930175781, 0.029113953933119774, -0.20729254186153412, -0.22819440066814423, 0.17323848605155945, -0.00640847347676754, -0.2168055921792984, -0.21547657251358032, 0.10110528767108917, 0.15849517285823822, -0.2621133327484131, 0.17848441004753113, 0.3950011134147644, 0.2807781994342804, 0.11010628938674927, 0.13927315175533295, 0.05390302464365959, -0.5247378349304199, -0.23850052058696747, 0.13133825361728668, 0.30054911971092224, -0.137980654835701, 0.40667620301246643, -0.336599200963974, 0.05185351520776749, -0.39810511469841003, -0.09200398623943329, 0.13457749783992767, 0.024230528622865677, 0.5202198028564453, -0.254189133644104, 0.4186612367630005, 0.214069202542305, -0.05978196859359741, 0.36641284823417664, 0.1772351711988449, -0.10915248095989227, -0.013527823612093925, 0.16925552487373352, -0.2674647867679596, -0.07685911655426025, -0.2703056037425995, -0.09204436093568802, -0.31230589747428894, -0.05799085274338722, 0.22447316348552704, 0.1699814349412918, 0.15073317289352417, 0.21720659732818604, -0.03686150908470154, 0.1827474981546402, -0.13975977897644043, -0.28313979506492615, -0.49208226799964905, 0.23434969782829285, -0.3360901474952698, -0.35309037566185, 0.09544447064399719, 0.31666767597198486, -0.12446139752864838, 0.20909301936626434, -0.39143121242523193, 0.1511538326740265, 0.08180778473615646, 0.2783040702342987, 0.2600444555282593, -0.006983060855418444, 0.06111305207014084, 0.09105958044528961, -0.04968218132853508, -0.19751352071762085, -0.3211199641227722, 0.201235830783844, -0.014347870834171772, 0.0075962133705616, -0.14113262295722961, 0.2310599833726883, -0.2191302478313446, 0.8387617468833923, 0.16479934751987457, -0.15595929324626923, 0.36416006088256836, -0.13291308283805847, 0.3904789984226227, -0.07509870082139969, -0.17054258286952972, -0.07233671098947525, 0.013096660375595093, -0.029758671298623085, 0.36237362027168274, 0.1508467197418213, -0.25738972425460815, -0.1526118367910385, -0.18463268876075745, -0.22109846770763397, -0.2959459125995636, -0.13000082969665527, -0.17200174927711487, 0.02975253388285637, 0.3309551775455475, 0.09637582302093506, -0.17156848311424255, 0.009741617366671562, 0.023249374702572823, 0.17701037228107452, -0.05654265731573105, -0.03722848370671272, -0.38589656352996826, 0.3132258653640747, -0.21156080067157745, 0.30956631898880005, 0.08936554938554764, 0.11812692880630493, -0.16944794356822968, 0.046429604291915894, 0.04006274789571762, -0.15827377140522003, -0.023354191333055496, -0.3953198492527008, 0.1815408617258072, 0.07895174622535706, 0.012800127267837524, 0.00045233560376800597, -0.16684946417808533, -0.012173225171864033, 0.4085753560066223, 0.13221526145935059, 0.5349738597869873, -0.24412193894386292, -0.22333166003227234, 0.17568987607955933, 0.04673770070075989, -0.17386406660079956, 0.11545690894126892, -0.2714964747428894, -0.2533334195613861, -0.5637241005897522, -0.0610867403447628, 0.0276800449937582, -0.16052082180976868, -0.05761469155550003, -0.10191738605499268, -0.40363362431526184, 0.11412487924098969, -0.14219827950000763, 0.2856441140174866, 0.33096978068351746, -0.15112556517124176, 0.1160426214337349, -0.0622447244822979, -0.00218845228664577, 0.5001676678657532, 0.7122893333435059, 0.12008455395698547, -0.10635355114936829, 0.11258863657712936, -0.348811537027359, -0.13654226064682007, 0.18737858533859253, 0.025691455230116844, -0.362856388092041, 0.11575146019458771, 0.21946373581886292, -0.18188847601413727, 0.29547208547592163, 0.18186914920806885, 0.014246390201151371, -0.4472142159938812, -0.32156670093536377, 0.35507357120513916, -0.19613642990589142, -0.1369044929742813, 0.37184813618659973, 0.04785428196191788, -0.08762484043836594, 0.024662120267748833, -0.027457676827907562, 0.6646745204925537, -0.10414978116750717, 0.01708269864320755, 0.20359396934509277, -0.2445290982723236, -0.0980912446975708, -0.26794561743736267, -0.05532996356487274, -0.368443101644516, -0.024991421028971672, 0.09864459186792374, -0.14518055319786072, 0.10265254229307175, 0.14792753756046295, -0.01986600086092949, 0.10280990600585938, 0.029220202937722206, 0.1791350394487381, 0.04146807640790939, 0.1599181890487671, 0.12252699583768845, 0.12544883787631989, -0.4119265079498291, 0.2611759305000305, -0.13991811871528625, 0.19911302626132965, -0.1866784393787384, -0.0975947305560112, -0.02272678352892399, -0.1642758846282959, -0.3887176811695099, 0.2325066179037094, -0.040618862956762314, 0.26478156447410583, -0.1501016467809677, -0.19010284543037415, -0.11755509674549103, 0.082859106361866, 0.3795430064201355, 0.23230387270450592, -0.2438056319952011, 0.34606605768203735, -0.06722119450569153, -0.0018528512446209788, -0.24146965146064758, 0.13418088853359222, 0.2220008671283722, -0.2642357647418976, -0.17082113027572632, -0.030267519876360893, -0.03771800175309181, -0.4239509701728821, -0.17084236443042755, 0.15164248645305634, -0.25223758816719055, -0.14648686349391937, -0.08260871469974518, -0.0043800706043839455, 0.11968817561864853, -0.28631311655044556, 0.2072199583053589, 0.15966105461120605, 0.2601108253002167, 0.16917940974235535, 0.20440059900283813, -0.2724972367286682, -0.14560511708259583, 0.29039517045021057, 0.014448096044361591, -0.062421999871730804, 0.3652566075325012, -0.012012496590614319, -0.16961218416690826, -0.370168536901474, 0.09448325634002686, 0.048393525183200836, -0.2916038930416107, 0.42379671335220337, -0.2826404273509979, -0.11045652627944946, -0.0809759795665741, 0.4087940752506256, -0.19089463353157043, -0.1510588824748993, 0.2512515187263489, -0.3049914538860321, -0.18276062607765198, 0.023532913997769356, -0.0707184299826622, 0.2531959116458893, 0.23113025724887848, -0.29317373037338257, -0.017249353229999542, 0.0013910809066146612, -0.41748014092445374, 0.1483941227197647, -0.49904829263687134, 0.09020176529884338, 0.16158747673034668, 0.02216505818068981, 0.2852477729320526, -0.3423284590244293, 0.1695074737071991, -0.1764441430568695, -0.16106043756008148, -0.32637250423431396, 0.035764120519161224, 0.06327302753925323, -0.04411729425191879, -0.02715388685464859, -0.029437579214572906, -0.16660548746585846, 0.08828970044851303, -0.02866736426949501, 0.35266363620758057, 0.11500341445207596, 0.0362495593726635, 0.009980949573218822, 0.13051699101924896, -0.021295329555869102, -0.04168921336531639, 0.16635368764400482, -0.09477027505636215, 0.24914462864398956, -0.0602598674595356, -0.006853573955595493, 0.014327323995530605, -0.1196165457367897, -0.09299084544181824, 0.0742398053407669, 0.1821150928735733, 0.37150031328201294, 0.3989873230457306, -0.5026693940162659, 0.030131597071886063, 0.3401198089122772, -0.010696986690163612, 0.22149142622947693, -0.2652699053287506, -0.18649183213710785, -0.012211132794618607, 0.2819102108478546, -0.20123392343521118, -0.14553946256637573, 0.27097904682159424, -0.24510470032691956, 0.040044065564870834, 0.12075360864400864, 0.18624520301818848, 0.06227947399020195, -0.097445547580719, 0.18480205535888672, 0.5148476362228394, 0.05131317675113678, 0.08691969513893127, -0.089381143450737, -0.09276377409696579, -0.0400519073009491, -0.09913575649261475, 0.11137985438108444, 0.1514521688222885, 0.07061014324426651, -0.15722642838954926, 0.06516488641500473, 0.41282328963279724, 0.01859251968562603, 0.06964362412691116, -0.4409233033657074, 0.2405087947845459, 0.05781644955277443, -0.17553314566612244, 0.06834198534488678, 0.19447796046733856, -0.06244910508394241, 0.14636725187301636, -0.09879309684038162, -0.1910969614982605, 0.18562133610248566, -0.18379464745521545, -0.09926676750183105, -0.31125953793525696, -0.29162198305130005, -0.0843079462647438, 0.1129554882645607, -0.3032706379890442, 0.0001487645204178989, 0.10612516850233078, 0.02081836760044098, -0.0825924277305603, -0.2978869378566742, 0.45896926522254944, 0.015334502793848515, -0.03696301579475403, -0.09329767525196075, 0.5055736303329468, 0.16538545489311218, -0.0805540382862091, 0.2248929888010025, 0.307780385017395, 0.5629498362541199, 0.1362704336643219, 0.02792019210755825, -0.10272352397441864, 0.13921938836574554, -0.17161481082439423, -0.12628860771656036, 0.13938729465007782, -0.009364786557853222, 0.28535526990890503, 0.21269692480564117, 0.27915075421333313, -0.18840083479881287, 0.07864155620336533, 0.0015754788182675838, -0.07690263539552689, -0.0051763588562607765, 0.007010535337030888, -0.20685036480426788, -0.20227168500423431, -0.15233482420444489, -0.3042212426662445, -0.015442067757248878, -0.11023582518100739, 0.3730226755142212, -0.02301115356385708, 0.12431733310222626, -0.13753992319107056, 0.15374821424484253, -0.17500270903110504, 0.6803292632102966, 0.28667786717414856, 0.039878033101558685, -0.051381926983594894, -0.17089985311031342, -0.47092485427856445, -0.01976272463798523, -0.11260350793600082, -0.011341138742864132, 0.11768374592065811, 0.19587282836437225, 0.14754217863082886, 0.22907313704490662, 0.2405625730752945, -0.2631620466709137, 0.09765146672725677, -0.06242239475250244, -0.5020051002502441, 0.04068829491734505, 0.07696454226970673, -0.00012238416820764542, 0.02402811124920845, -0.46933916211128235, 0.2431705743074417, 0.03343390300869942, 0.19194164872169495, 0.08374951034784317, 0.04409054294228554, 0.009345058351755142, -0.5076560378074646, 0.42391079664230347, -0.11164101213216782, 0.20196184515953064, -0.04143184423446655, -0.19341740012168884, 0.027239063754677773, -0.3823093771934509, 0.08448103815317154, 0.18473920226097107, 0.07689598947763443, 0.38627541065216064, -0.10778435319662094, 0.17731858789920807, -0.16517911851406097, -0.08077266067266464, 0.09185590595006943, 0.405920147895813, 0.10644076019525528, -0.17767298221588135, 0.09844470769166946, -0.009150516241788864, 0.08420412987470627, -0.10283023118972778, -0.0467718243598938, 0.25207918882369995, -0.16551616787910461, -0.19492009282112122, 0.3851172626018524, -0.03485878184437752, -0.20249511301517487, -0.07205873727798462, 0.21476006507873535, 0.3119916617870331, -0.16266299784183502, -0.4890868663787842, 0.2246839702129364, 0.44061803817749023, -0.15507295727729797, -0.2611546814441681, 0.2423250824213028, 0.03296881541609764, 0.05729087442159653, 0.05316288769245148, 0.13653729856014252, -0.1034083142876625, -0.3263894021511078, -0.05003935843706131, -0.15971620380878448 ]
https://github.com/huggingface/datasets/issues/5422
Datasets load error for saved github issues
Found this when searching for the same error, looks like based on #3965 it's just an issue with the data. I found that changing `df = pd.DataFrame.from_records(all_issues)` to `df = pd.DataFrame.from_records(all_issues).dropna(axis=1, how='all').drop(['milestone'], axis=1)` from the fetch_issues function fixed the issue. The "milestone" column seemed to be problematic (only ~50 non null rows) and dropped any columns that were all null as well just in case.
### Describe the bug Loading a previously downloaded & saved dataset as described in the HuggingFace course: issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") Gives this error: datasets.builder.DatasetGenerationError: An error occurred while generating the dataset A work-around I found was to use streaming. ### Steps to reproduce the bug Reproduce by executing the code provided: https://huggingface.co/course/chapter5/5?fw=pt From the heading: 'let’s create a function that can download all the issues from a GitHub repository' ### Expected behavior No error ### Environment info Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp). **[EDIT]** This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`) ``` Using custom data configuration default-950028611d2860c8 Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s] Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s] Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last): File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single writer.write_table(table) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table pa_table = table_cast(pa_table, self._schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast return cast_table_to_schema(table, schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp> arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp> arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type timestamp[s] to null The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module> issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset builder_instance.download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare self._download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split for job_id, done, content in self._prepare_split_single( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset Generating train split: 2619 examples [00:19, 7155.72 examples/s] ```
65
Datasets load error for saved github issues
[ -0.5190645456314087, 0.3197609484195709, -0.1691041886806488, 0.21698835492134094, 0.2883802652359009, 0.062052901834249496, 0.41312453150749207, 0.2116403430700302, 0.09525398910045624, 0.1687288135290146, 0.03383130207657814, 0.08824964612722397, -0.04448274150490761, 0.3017023205757141, -0.18680883944034576, 0.1524825394153595, -0.1897348314523697, 0.035422928631305695, 0.11890462785959244, -0.14585915207862854, 0.0030955171678215265, 0.08614058047533035, -0.16078533232212067, 0.06822403520345688, -0.24450327455997467, -0.16823484003543854, 0.28465205430984497, 0.46470534801483154, -0.12128166854381561, -0.35337546467781067, 0.27164825797080994, 0.24998359382152557, 0.20927540957927704, 0.26565971970558167, -0.00010403661144664511, 0.17782841622829437, 0.36982911825180054, -0.16227304935455322, -0.4091351628303528, 0.06000009924173355, -0.3690836429595947, -0.23257052898406982, -0.0503213033080101, -0.2316104769706726, -0.15812306106090546, 0.033361636102199554, -0.04168209806084633, -0.3128145933151245, 0.42445358633995056, 0.3545616567134857, 0.3265363276004791, 0.22856391966342926, -0.07767343521118164, -0.25073087215423584, 0.45857182145118713, 0.026032349094748497, 0.027320552617311478, 0.34744197130203247, 0.19714373350143433, -0.030513372272253036, 0.04756017401814461, 0.31196847558021545, -0.0008000595262274146, 0.052249763160943985, -0.10293114185333252, -0.14182798564434052, -0.011711007915437222, -0.25638097524642944, 0.09800461679697037, -0.008554086089134216, 0.49537014961242676, -0.0855279490351677, -0.19728276133537292, -0.1410864144563675, -0.045506663620471954, 0.055784035474061966, 0.24186338484287262, 0.30781683325767517, -0.04405590146780014, 0.28270021080970764, -0.4077335000038147, -0.36594367027282715, -0.17948228120803833, 0.13901755213737488, 0.12746401131153107, -0.165938600897789, -0.20587126910686493, 0.0997835025191307, -0.05377591401338577, -0.14311814308166504, -0.20819662511348724, -0.23492717742919922, -0.21597348153591156, -0.07328368723392487, -0.08270075172185898, -0.11786670982837677, 0.08258472383022308, -0.17394237220287323, 0.298412948846817, 0.34998419880867004, -0.011002509854733944, 0.28717654943466187, 0.04912831634283066, 0.0118309510871768, 0.4021441340446472, 0.07414961606264114, 0.21733716130256653, 0.3040917217731476, 0.6682025194168091, 0.02394794672727585, -0.212291419506073, -0.0036949641071259975, -0.31120869517326355, -0.10911808907985687, -0.05926908552646637, -0.15998394787311554, 0.3035464584827423, -0.3372521996498108, -0.22072833776474, 0.25450393557548523, -0.0062381732277572155, -0.11894727498292923, -0.02845161035656929, 0.49004173278808594, -0.0703027993440628, -0.19850516319274902, -0.06909840553998947, 0.35084250569343567, -0.03204737603664398, -0.13205374777317047, -0.29444482922554016, -0.36112767457962036, 0.13693849742412567, 0.007114573381841183, 0.27912262082099915, -0.3028828501701355, 0.3746357560157776, 0.057126451283693314, -0.06314317882061005, -0.1861429512500763, 0.10211002826690674, 0.09975631535053253, -0.07545403391122818, 0.42394208908081055, 0.28399744629859924, 0.1294218748807907, 0.15428051352500916, -0.5124691128730774, 0.1281278282403946, 0.23074685037136078, -0.259751558303833, -0.3104010820388794, -0.2084590196609497, 0.27479153871536255, -0.07443976402282715, 0.12302035093307495, -0.7027380466461182, -0.03972788155078888, 0.22711537778377533, 0.00234692869707942, -0.12665480375289917, -0.09673372656106949, 0.20509210228919983, -0.14288415014743805, 0.13311493396759033, 0.23069263994693756, 0.14058825373649597, -0.1148749440908432, 0.0762396976351738, -0.28348004817962646, 0.08860823512077332, 0.3008795380592346, -0.28660523891448975, 0.11932796239852905, -0.17218460142612457, 0.18886400759220123, 0.3632759749889374, -0.25129324197769165, -0.4521426260471344, 0.17504757642745972, 0.20273368060588837, -0.04687662050127983, -0.2378540188074112, -0.03772128000855446, 0.2856234908103943, -0.15220284461975098, 0.14668413996696472, 0.2007427215576172, -0.021519292145967484, 0.17791514098644257, -0.34478509426116943, -0.1696075052022934, -0.31675153970718384, 0.2664659321308136, 0.032356489449739456, 0.18556228280067444, 0.39709025621414185, -0.14994677901268005, 0.020980315282940865, -0.3180169463157654, -0.1944204866886139, 0.46037808060646057, 0.18949376046657562, -0.07911913841962814, -0.12737467885017395, -0.03573022410273552, -0.5404778122901917, 0.11677590012550354, 0.05642953887581825, 0.0758734792470932, -0.10138783603906631, -0.07457917928695679, -0.386576384305954, -0.011110488325357437, -0.2836935818195343, 0.01622401736676693, 0.15380427241325378, 0.21136271953582764, -0.2590208649635315, 0.17940551042556763, -0.045067086815834045, 0.2506072521209717, -0.40055203437805176, 0.026761934161186218, -0.018444646149873734, 0.5404125452041626, -0.14457200467586517, -0.28398674726486206, 0.3528480529785156, -0.03382584825158119, 0.22558751702308655, -0.16688521206378937, -0.16566996276378632, 0.15567368268966675, -0.18118318915367126, 0.07268701493740082, 0.4200144112110138, 0.034559812396764755, 0.06283779442310333, -0.26751381158828735, 0.0880032479763031, -0.007050854619592428, 0.18817609548568726, -0.0008390303119085729, -0.23756204545497894, 0.22853678464889526, -0.003098732093349099, -0.10009513795375824, 0.03488815203309059, -0.0770515501499176, 0.5860109329223633, -0.0174611397087574, -0.02545955590903759, -0.27507346868515015, 0.01655738241970539, 0.3288594186306, 0.20389235019683838, -0.02167988196015358, -0.32725363969802856, 0.06845518201589584, 0.4714509844779968, 0.11148306727409363, 0.2789803147315979, 0.08119514584541321, -0.08356865495443344, -0.07408736646175385, 0.03756636753678322, 0.1405053585767746, 0.20709219574928284, 0.26533621549606323, -0.1830918788909912, -0.054760489612817764, -0.062399014830589294, -0.17854948341846466, 0.12007170915603638, -0.03779686242341995, -0.004344044718891382, 0.1575421839952469, 0.26611244678497314, -0.2849026322364807, -0.34544411301612854, 0.12071672827005386, -0.039113614708185196, 0.2696218490600586, -0.4080390930175781, 0.029113953933119774, -0.20729254186153412, -0.22819440066814423, 0.17323848605155945, -0.00640847347676754, -0.2168055921792984, -0.21547657251358032, 0.10110528767108917, 0.15849517285823822, -0.2621133327484131, 0.17848441004753113, 0.3950011134147644, 0.2807781994342804, 0.11010628938674927, 0.13927315175533295, 0.05390302464365959, -0.5247378349304199, -0.23850052058696747, 0.13133825361728668, 0.30054911971092224, -0.137980654835701, 0.40667620301246643, -0.336599200963974, 0.05185351520776749, -0.39810511469841003, -0.09200398623943329, 0.13457749783992767, 0.024230528622865677, 0.5202198028564453, -0.254189133644104, 0.4186612367630005, 0.214069202542305, -0.05978196859359741, 0.36641284823417664, 0.1772351711988449, -0.10915248095989227, -0.013527823612093925, 0.16925552487373352, -0.2674647867679596, -0.07685911655426025, -0.2703056037425995, -0.09204436093568802, -0.31230589747428894, -0.05799085274338722, 0.22447316348552704, 0.1699814349412918, 0.15073317289352417, 0.21720659732818604, -0.03686150908470154, 0.1827474981546402, -0.13975977897644043, -0.28313979506492615, -0.49208226799964905, 0.23434969782829285, -0.3360901474952698, -0.35309037566185, 0.09544447064399719, 0.31666767597198486, -0.12446139752864838, 0.20909301936626434, -0.39143121242523193, 0.1511538326740265, 0.08180778473615646, 0.2783040702342987, 0.2600444555282593, -0.006983060855418444, 0.06111305207014084, 0.09105958044528961, -0.04968218132853508, -0.19751352071762085, -0.3211199641227722, 0.201235830783844, -0.014347870834171772, 0.0075962133705616, -0.14113262295722961, 0.2310599833726883, -0.2191302478313446, 0.8387617468833923, 0.16479934751987457, -0.15595929324626923, 0.36416006088256836, -0.13291308283805847, 0.3904789984226227, -0.07509870082139969, -0.17054258286952972, -0.07233671098947525, 0.013096660375595093, -0.029758671298623085, 0.36237362027168274, 0.1508467197418213, -0.25738972425460815, -0.1526118367910385, -0.18463268876075745, -0.22109846770763397, -0.2959459125995636, -0.13000082969665527, -0.17200174927711487, 0.02975253388285637, 0.3309551775455475, 0.09637582302093506, -0.17156848311424255, 0.009741617366671562, 0.023249374702572823, 0.17701037228107452, -0.05654265731573105, -0.03722848370671272, -0.38589656352996826, 0.3132258653640747, -0.21156080067157745, 0.30956631898880005, 0.08936554938554764, 0.11812692880630493, -0.16944794356822968, 0.046429604291915894, 0.04006274789571762, -0.15827377140522003, -0.023354191333055496, -0.3953198492527008, 0.1815408617258072, 0.07895174622535706, 0.012800127267837524, 0.00045233560376800597, -0.16684946417808533, -0.012173225171864033, 0.4085753560066223, 0.13221526145935059, 0.5349738597869873, -0.24412193894386292, -0.22333166003227234, 0.17568987607955933, 0.04673770070075989, -0.17386406660079956, 0.11545690894126892, -0.2714964747428894, -0.2533334195613861, -0.5637241005897522, -0.0610867403447628, 0.0276800449937582, -0.16052082180976868, -0.05761469155550003, -0.10191738605499268, -0.40363362431526184, 0.11412487924098969, -0.14219827950000763, 0.2856441140174866, 0.33096978068351746, -0.15112556517124176, 0.1160426214337349, -0.0622447244822979, -0.00218845228664577, 0.5001676678657532, 0.7122893333435059, 0.12008455395698547, -0.10635355114936829, 0.11258863657712936, -0.348811537027359, -0.13654226064682007, 0.18737858533859253, 0.025691455230116844, -0.362856388092041, 0.11575146019458771, 0.21946373581886292, -0.18188847601413727, 0.29547208547592163, 0.18186914920806885, 0.014246390201151371, -0.4472142159938812, -0.32156670093536377, 0.35507357120513916, -0.19613642990589142, -0.1369044929742813, 0.37184813618659973, 0.04785428196191788, -0.08762484043836594, 0.024662120267748833, -0.027457676827907562, 0.6646745204925537, -0.10414978116750717, 0.01708269864320755, 0.20359396934509277, -0.2445290982723236, -0.0980912446975708, -0.26794561743736267, -0.05532996356487274, -0.368443101644516, -0.024991421028971672, 0.09864459186792374, -0.14518055319786072, 0.10265254229307175, 0.14792753756046295, -0.01986600086092949, 0.10280990600585938, 0.029220202937722206, 0.1791350394487381, 0.04146807640790939, 0.1599181890487671, 0.12252699583768845, 0.12544883787631989, -0.4119265079498291, 0.2611759305000305, -0.13991811871528625, 0.19911302626132965, -0.1866784393787384, -0.0975947305560112, -0.02272678352892399, -0.1642758846282959, -0.3887176811695099, 0.2325066179037094, -0.040618862956762314, 0.26478156447410583, -0.1501016467809677, -0.19010284543037415, -0.11755509674549103, 0.082859106361866, 0.3795430064201355, 0.23230387270450592, -0.2438056319952011, 0.34606605768203735, -0.06722119450569153, -0.0018528512446209788, -0.24146965146064758, 0.13418088853359222, 0.2220008671283722, -0.2642357647418976, -0.17082113027572632, -0.030267519876360893, -0.03771800175309181, -0.4239509701728821, -0.17084236443042755, 0.15164248645305634, -0.25223758816719055, -0.14648686349391937, -0.08260871469974518, -0.0043800706043839455, 0.11968817561864853, -0.28631311655044556, 0.2072199583053589, 0.15966105461120605, 0.2601108253002167, 0.16917940974235535, 0.20440059900283813, -0.2724972367286682, -0.14560511708259583, 0.29039517045021057, 0.014448096044361591, -0.062421999871730804, 0.3652566075325012, -0.012012496590614319, -0.16961218416690826, -0.370168536901474, 0.09448325634002686, 0.048393525183200836, -0.2916038930416107, 0.42379671335220337, -0.2826404273509979, -0.11045652627944946, -0.0809759795665741, 0.4087940752506256, -0.19089463353157043, -0.1510588824748993, 0.2512515187263489, -0.3049914538860321, -0.18276062607765198, 0.023532913997769356, -0.0707184299826622, 0.2531959116458893, 0.23113025724887848, -0.29317373037338257, -0.017249353229999542, 0.0013910809066146612, -0.41748014092445374, 0.1483941227197647, -0.49904829263687134, 0.09020176529884338, 0.16158747673034668, 0.02216505818068981, 0.2852477729320526, -0.3423284590244293, 0.1695074737071991, -0.1764441430568695, -0.16106043756008148, -0.32637250423431396, 0.035764120519161224, 0.06327302753925323, -0.04411729425191879, -0.02715388685464859, -0.029437579214572906, -0.16660548746585846, 0.08828970044851303, -0.02866736426949501, 0.35266363620758057, 0.11500341445207596, 0.0362495593726635, 0.009980949573218822, 0.13051699101924896, -0.021295329555869102, -0.04168921336531639, 0.16635368764400482, -0.09477027505636215, 0.24914462864398956, -0.0602598674595356, -0.006853573955595493, 0.014327323995530605, -0.1196165457367897, -0.09299084544181824, 0.0742398053407669, 0.1821150928735733, 0.37150031328201294, 0.3989873230457306, -0.5026693940162659, 0.030131597071886063, 0.3401198089122772, -0.010696986690163612, 0.22149142622947693, -0.2652699053287506, -0.18649183213710785, -0.012211132794618607, 0.2819102108478546, -0.20123392343521118, -0.14553946256637573, 0.27097904682159424, -0.24510470032691956, 0.040044065564870834, 0.12075360864400864, 0.18624520301818848, 0.06227947399020195, -0.097445547580719, 0.18480205535888672, 0.5148476362228394, 0.05131317675113678, 0.08691969513893127, -0.089381143450737, -0.09276377409696579, -0.0400519073009491, -0.09913575649261475, 0.11137985438108444, 0.1514521688222885, 0.07061014324426651, -0.15722642838954926, 0.06516488641500473, 0.41282328963279724, 0.01859251968562603, 0.06964362412691116, -0.4409233033657074, 0.2405087947845459, 0.05781644955277443, -0.17553314566612244, 0.06834198534488678, 0.19447796046733856, -0.06244910508394241, 0.14636725187301636, -0.09879309684038162, -0.1910969614982605, 0.18562133610248566, -0.18379464745521545, -0.09926676750183105, -0.31125953793525696, -0.29162198305130005, -0.0843079462647438, 0.1129554882645607, -0.3032706379890442, 0.0001487645204178989, 0.10612516850233078, 0.02081836760044098, -0.0825924277305603, -0.2978869378566742, 0.45896926522254944, 0.015334502793848515, -0.03696301579475403, -0.09329767525196075, 0.5055736303329468, 0.16538545489311218, -0.0805540382862091, 0.2248929888010025, 0.307780385017395, 0.5629498362541199, 0.1362704336643219, 0.02792019210755825, -0.10272352397441864, 0.13921938836574554, -0.17161481082439423, -0.12628860771656036, 0.13938729465007782, -0.009364786557853222, 0.28535526990890503, 0.21269692480564117, 0.27915075421333313, -0.18840083479881287, 0.07864155620336533, 0.0015754788182675838, -0.07690263539552689, -0.0051763588562607765, 0.007010535337030888, -0.20685036480426788, -0.20227168500423431, -0.15233482420444489, -0.3042212426662445, -0.015442067757248878, -0.11023582518100739, 0.3730226755142212, -0.02301115356385708, 0.12431733310222626, -0.13753992319107056, 0.15374821424484253, -0.17500270903110504, 0.6803292632102966, 0.28667786717414856, 0.039878033101558685, -0.051381926983594894, -0.17089985311031342, -0.47092485427856445, -0.01976272463798523, -0.11260350793600082, -0.011341138742864132, 0.11768374592065811, 0.19587282836437225, 0.14754217863082886, 0.22907313704490662, 0.2405625730752945, -0.2631620466709137, 0.09765146672725677, -0.06242239475250244, -0.5020051002502441, 0.04068829491734505, 0.07696454226970673, -0.00012238416820764542, 0.02402811124920845, -0.46933916211128235, 0.2431705743074417, 0.03343390300869942, 0.19194164872169495, 0.08374951034784317, 0.04409054294228554, 0.009345058351755142, -0.5076560378074646, 0.42391079664230347, -0.11164101213216782, 0.20196184515953064, -0.04143184423446655, -0.19341740012168884, 0.027239063754677773, -0.3823093771934509, 0.08448103815317154, 0.18473920226097107, 0.07689598947763443, 0.38627541065216064, -0.10778435319662094, 0.17731858789920807, -0.16517911851406097, -0.08077266067266464, 0.09185590595006943, 0.405920147895813, 0.10644076019525528, -0.17767298221588135, 0.09844470769166946, -0.009150516241788864, 0.08420412987470627, -0.10283023118972778, -0.0467718243598938, 0.25207918882369995, -0.16551616787910461, -0.19492009282112122, 0.3851172626018524, -0.03485878184437752, -0.20249511301517487, -0.07205873727798462, 0.21476006507873535, 0.3119916617870331, -0.16266299784183502, -0.4890868663787842, 0.2246839702129364, 0.44061803817749023, -0.15507295727729797, -0.2611546814441681, 0.2423250824213028, 0.03296881541609764, 0.05729087442159653, 0.05316288769245148, 0.13653729856014252, -0.1034083142876625, -0.3263894021511078, -0.05003935843706131, -0.15971620380878448 ]
https://github.com/huggingface/datasets/issues/5422
Datasets load error for saved github issues
I have this same issue. I saved a dataset to disk and now I can't load it.
### Describe the bug Loading a previously downloaded & saved dataset as described in the HuggingFace course: issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") Gives this error: datasets.builder.DatasetGenerationError: An error occurred while generating the dataset A work-around I found was to use streaming. ### Steps to reproduce the bug Reproduce by executing the code provided: https://huggingface.co/course/chapter5/5?fw=pt From the heading: 'let’s create a function that can download all the issues from a GitHub repository' ### Expected behavior No error ### Environment info Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp). **[EDIT]** This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`) ``` Using custom data configuration default-950028611d2860c8 Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s] Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s] Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last): File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single writer.write_table(table) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table pa_table = table_cast(pa_table, self._schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast return cast_table_to_schema(table, schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp> arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp> arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type timestamp[s] to null The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module> issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset builder_instance.download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare self._download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split for job_id, done, content in self._prepare_split_single( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset Generating train split: 2619 examples [00:19, 7155.72 examples/s] ```
17
Datasets load error for saved github issues
[ -0.5190645456314087, 0.3197609484195709, -0.1691041886806488, 0.21698835492134094, 0.2883802652359009, 0.062052901834249496, 0.41312453150749207, 0.2116403430700302, 0.09525398910045624, 0.1687288135290146, 0.03383130207657814, 0.08824964612722397, -0.04448274150490761, 0.3017023205757141, -0.18680883944034576, 0.1524825394153595, -0.1897348314523697, 0.035422928631305695, 0.11890462785959244, -0.14585915207862854, 0.0030955171678215265, 0.08614058047533035, -0.16078533232212067, 0.06822403520345688, -0.24450327455997467, -0.16823484003543854, 0.28465205430984497, 0.46470534801483154, -0.12128166854381561, -0.35337546467781067, 0.27164825797080994, 0.24998359382152557, 0.20927540957927704, 0.26565971970558167, -0.00010403661144664511, 0.17782841622829437, 0.36982911825180054, -0.16227304935455322, -0.4091351628303528, 0.06000009924173355, -0.3690836429595947, -0.23257052898406982, -0.0503213033080101, -0.2316104769706726, -0.15812306106090546, 0.033361636102199554, -0.04168209806084633, -0.3128145933151245, 0.42445358633995056, 0.3545616567134857, 0.3265363276004791, 0.22856391966342926, -0.07767343521118164, -0.25073087215423584, 0.45857182145118713, 0.026032349094748497, 0.027320552617311478, 0.34744197130203247, 0.19714373350143433, -0.030513372272253036, 0.04756017401814461, 0.31196847558021545, -0.0008000595262274146, 0.052249763160943985, -0.10293114185333252, -0.14182798564434052, -0.011711007915437222, -0.25638097524642944, 0.09800461679697037, -0.008554086089134216, 0.49537014961242676, -0.0855279490351677, -0.19728276133537292, -0.1410864144563675, -0.045506663620471954, 0.055784035474061966, 0.24186338484287262, 0.30781683325767517, -0.04405590146780014, 0.28270021080970764, -0.4077335000038147, -0.36594367027282715, -0.17948228120803833, 0.13901755213737488, 0.12746401131153107, -0.165938600897789, -0.20587126910686493, 0.0997835025191307, -0.05377591401338577, -0.14311814308166504, -0.20819662511348724, -0.23492717742919922, -0.21597348153591156, -0.07328368723392487, -0.08270075172185898, -0.11786670982837677, 0.08258472383022308, -0.17394237220287323, 0.298412948846817, 0.34998419880867004, -0.011002509854733944, 0.28717654943466187, 0.04912831634283066, 0.0118309510871768, 0.4021441340446472, 0.07414961606264114, 0.21733716130256653, 0.3040917217731476, 0.6682025194168091, 0.02394794672727585, -0.212291419506073, -0.0036949641071259975, -0.31120869517326355, -0.10911808907985687, -0.05926908552646637, -0.15998394787311554, 0.3035464584827423, -0.3372521996498108, -0.22072833776474, 0.25450393557548523, -0.0062381732277572155, -0.11894727498292923, -0.02845161035656929, 0.49004173278808594, -0.0703027993440628, -0.19850516319274902, -0.06909840553998947, 0.35084250569343567, -0.03204737603664398, -0.13205374777317047, -0.29444482922554016, -0.36112767457962036, 0.13693849742412567, 0.007114573381841183, 0.27912262082099915, -0.3028828501701355, 0.3746357560157776, 0.057126451283693314, -0.06314317882061005, -0.1861429512500763, 0.10211002826690674, 0.09975631535053253, -0.07545403391122818, 0.42394208908081055, 0.28399744629859924, 0.1294218748807907, 0.15428051352500916, -0.5124691128730774, 0.1281278282403946, 0.23074685037136078, -0.259751558303833, -0.3104010820388794, -0.2084590196609497, 0.27479153871536255, -0.07443976402282715, 0.12302035093307495, -0.7027380466461182, -0.03972788155078888, 0.22711537778377533, 0.00234692869707942, -0.12665480375289917, -0.09673372656106949, 0.20509210228919983, -0.14288415014743805, 0.13311493396759033, 0.23069263994693756, 0.14058825373649597, -0.1148749440908432, 0.0762396976351738, -0.28348004817962646, 0.08860823512077332, 0.3008795380592346, -0.28660523891448975, 0.11932796239852905, -0.17218460142612457, 0.18886400759220123, 0.3632759749889374, -0.25129324197769165, -0.4521426260471344, 0.17504757642745972, 0.20273368060588837, -0.04687662050127983, -0.2378540188074112, -0.03772128000855446, 0.2856234908103943, -0.15220284461975098, 0.14668413996696472, 0.2007427215576172, -0.021519292145967484, 0.17791514098644257, -0.34478509426116943, -0.1696075052022934, -0.31675153970718384, 0.2664659321308136, 0.032356489449739456, 0.18556228280067444, 0.39709025621414185, -0.14994677901268005, 0.020980315282940865, -0.3180169463157654, -0.1944204866886139, 0.46037808060646057, 0.18949376046657562, -0.07911913841962814, -0.12737467885017395, -0.03573022410273552, -0.5404778122901917, 0.11677590012550354, 0.05642953887581825, 0.0758734792470932, -0.10138783603906631, -0.07457917928695679, -0.386576384305954, -0.011110488325357437, -0.2836935818195343, 0.01622401736676693, 0.15380427241325378, 0.21136271953582764, -0.2590208649635315, 0.17940551042556763, -0.045067086815834045, 0.2506072521209717, -0.40055203437805176, 0.026761934161186218, -0.018444646149873734, 0.5404125452041626, -0.14457200467586517, -0.28398674726486206, 0.3528480529785156, -0.03382584825158119, 0.22558751702308655, -0.16688521206378937, -0.16566996276378632, 0.15567368268966675, -0.18118318915367126, 0.07268701493740082, 0.4200144112110138, 0.034559812396764755, 0.06283779442310333, -0.26751381158828735, 0.0880032479763031, -0.007050854619592428, 0.18817609548568726, -0.0008390303119085729, -0.23756204545497894, 0.22853678464889526, -0.003098732093349099, -0.10009513795375824, 0.03488815203309059, -0.0770515501499176, 0.5860109329223633, -0.0174611397087574, -0.02545955590903759, -0.27507346868515015, 0.01655738241970539, 0.3288594186306, 0.20389235019683838, -0.02167988196015358, -0.32725363969802856, 0.06845518201589584, 0.4714509844779968, 0.11148306727409363, 0.2789803147315979, 0.08119514584541321, -0.08356865495443344, -0.07408736646175385, 0.03756636753678322, 0.1405053585767746, 0.20709219574928284, 0.26533621549606323, -0.1830918788909912, -0.054760489612817764, -0.062399014830589294, -0.17854948341846466, 0.12007170915603638, -0.03779686242341995, -0.004344044718891382, 0.1575421839952469, 0.26611244678497314, -0.2849026322364807, -0.34544411301612854, 0.12071672827005386, -0.039113614708185196, 0.2696218490600586, -0.4080390930175781, 0.029113953933119774, -0.20729254186153412, -0.22819440066814423, 0.17323848605155945, -0.00640847347676754, -0.2168055921792984, -0.21547657251358032, 0.10110528767108917, 0.15849517285823822, -0.2621133327484131, 0.17848441004753113, 0.3950011134147644, 0.2807781994342804, 0.11010628938674927, 0.13927315175533295, 0.05390302464365959, -0.5247378349304199, -0.23850052058696747, 0.13133825361728668, 0.30054911971092224, -0.137980654835701, 0.40667620301246643, -0.336599200963974, 0.05185351520776749, -0.39810511469841003, -0.09200398623943329, 0.13457749783992767, 0.024230528622865677, 0.5202198028564453, -0.254189133644104, 0.4186612367630005, 0.214069202542305, -0.05978196859359741, 0.36641284823417664, 0.1772351711988449, -0.10915248095989227, -0.013527823612093925, 0.16925552487373352, -0.2674647867679596, -0.07685911655426025, -0.2703056037425995, -0.09204436093568802, -0.31230589747428894, -0.05799085274338722, 0.22447316348552704, 0.1699814349412918, 0.15073317289352417, 0.21720659732818604, -0.03686150908470154, 0.1827474981546402, -0.13975977897644043, -0.28313979506492615, -0.49208226799964905, 0.23434969782829285, -0.3360901474952698, -0.35309037566185, 0.09544447064399719, 0.31666767597198486, -0.12446139752864838, 0.20909301936626434, -0.39143121242523193, 0.1511538326740265, 0.08180778473615646, 0.2783040702342987, 0.2600444555282593, -0.006983060855418444, 0.06111305207014084, 0.09105958044528961, -0.04968218132853508, -0.19751352071762085, -0.3211199641227722, 0.201235830783844, -0.014347870834171772, 0.0075962133705616, -0.14113262295722961, 0.2310599833726883, -0.2191302478313446, 0.8387617468833923, 0.16479934751987457, -0.15595929324626923, 0.36416006088256836, -0.13291308283805847, 0.3904789984226227, -0.07509870082139969, -0.17054258286952972, -0.07233671098947525, 0.013096660375595093, -0.029758671298623085, 0.36237362027168274, 0.1508467197418213, -0.25738972425460815, -0.1526118367910385, -0.18463268876075745, -0.22109846770763397, -0.2959459125995636, -0.13000082969665527, -0.17200174927711487, 0.02975253388285637, 0.3309551775455475, 0.09637582302093506, -0.17156848311424255, 0.009741617366671562, 0.023249374702572823, 0.17701037228107452, -0.05654265731573105, -0.03722848370671272, -0.38589656352996826, 0.3132258653640747, -0.21156080067157745, 0.30956631898880005, 0.08936554938554764, 0.11812692880630493, -0.16944794356822968, 0.046429604291915894, 0.04006274789571762, -0.15827377140522003, -0.023354191333055496, -0.3953198492527008, 0.1815408617258072, 0.07895174622535706, 0.012800127267837524, 0.00045233560376800597, -0.16684946417808533, -0.012173225171864033, 0.4085753560066223, 0.13221526145935059, 0.5349738597869873, -0.24412193894386292, -0.22333166003227234, 0.17568987607955933, 0.04673770070075989, -0.17386406660079956, 0.11545690894126892, -0.2714964747428894, -0.2533334195613861, -0.5637241005897522, -0.0610867403447628, 0.0276800449937582, -0.16052082180976868, -0.05761469155550003, -0.10191738605499268, -0.40363362431526184, 0.11412487924098969, -0.14219827950000763, 0.2856441140174866, 0.33096978068351746, -0.15112556517124176, 0.1160426214337349, -0.0622447244822979, -0.00218845228664577, 0.5001676678657532, 0.7122893333435059, 0.12008455395698547, -0.10635355114936829, 0.11258863657712936, -0.348811537027359, -0.13654226064682007, 0.18737858533859253, 0.025691455230116844, -0.362856388092041, 0.11575146019458771, 0.21946373581886292, -0.18188847601413727, 0.29547208547592163, 0.18186914920806885, 0.014246390201151371, -0.4472142159938812, -0.32156670093536377, 0.35507357120513916, -0.19613642990589142, -0.1369044929742813, 0.37184813618659973, 0.04785428196191788, -0.08762484043836594, 0.024662120267748833, -0.027457676827907562, 0.6646745204925537, -0.10414978116750717, 0.01708269864320755, 0.20359396934509277, -0.2445290982723236, -0.0980912446975708, -0.26794561743736267, -0.05532996356487274, -0.368443101644516, -0.024991421028971672, 0.09864459186792374, -0.14518055319786072, 0.10265254229307175, 0.14792753756046295, -0.01986600086092949, 0.10280990600585938, 0.029220202937722206, 0.1791350394487381, 0.04146807640790939, 0.1599181890487671, 0.12252699583768845, 0.12544883787631989, -0.4119265079498291, 0.2611759305000305, -0.13991811871528625, 0.19911302626132965, -0.1866784393787384, -0.0975947305560112, -0.02272678352892399, -0.1642758846282959, -0.3887176811695099, 0.2325066179037094, -0.040618862956762314, 0.26478156447410583, -0.1501016467809677, -0.19010284543037415, -0.11755509674549103, 0.082859106361866, 0.3795430064201355, 0.23230387270450592, -0.2438056319952011, 0.34606605768203735, -0.06722119450569153, -0.0018528512446209788, -0.24146965146064758, 0.13418088853359222, 0.2220008671283722, -0.2642357647418976, -0.17082113027572632, -0.030267519876360893, -0.03771800175309181, -0.4239509701728821, -0.17084236443042755, 0.15164248645305634, -0.25223758816719055, -0.14648686349391937, -0.08260871469974518, -0.0043800706043839455, 0.11968817561864853, -0.28631311655044556, 0.2072199583053589, 0.15966105461120605, 0.2601108253002167, 0.16917940974235535, 0.20440059900283813, -0.2724972367286682, -0.14560511708259583, 0.29039517045021057, 0.014448096044361591, -0.062421999871730804, 0.3652566075325012, -0.012012496590614319, -0.16961218416690826, -0.370168536901474, 0.09448325634002686, 0.048393525183200836, -0.2916038930416107, 0.42379671335220337, -0.2826404273509979, -0.11045652627944946, -0.0809759795665741, 0.4087940752506256, -0.19089463353157043, -0.1510588824748993, 0.2512515187263489, -0.3049914538860321, -0.18276062607765198, 0.023532913997769356, -0.0707184299826622, 0.2531959116458893, 0.23113025724887848, -0.29317373037338257, -0.017249353229999542, 0.0013910809066146612, -0.41748014092445374, 0.1483941227197647, -0.49904829263687134, 0.09020176529884338, 0.16158747673034668, 0.02216505818068981, 0.2852477729320526, -0.3423284590244293, 0.1695074737071991, -0.1764441430568695, -0.16106043756008148, -0.32637250423431396, 0.035764120519161224, 0.06327302753925323, -0.04411729425191879, -0.02715388685464859, -0.029437579214572906, -0.16660548746585846, 0.08828970044851303, -0.02866736426949501, 0.35266363620758057, 0.11500341445207596, 0.0362495593726635, 0.009980949573218822, 0.13051699101924896, -0.021295329555869102, -0.04168921336531639, 0.16635368764400482, -0.09477027505636215, 0.24914462864398956, -0.0602598674595356, -0.006853573955595493, 0.014327323995530605, -0.1196165457367897, -0.09299084544181824, 0.0742398053407669, 0.1821150928735733, 0.37150031328201294, 0.3989873230457306, -0.5026693940162659, 0.030131597071886063, 0.3401198089122772, -0.010696986690163612, 0.22149142622947693, -0.2652699053287506, -0.18649183213710785, -0.012211132794618607, 0.2819102108478546, -0.20123392343521118, -0.14553946256637573, 0.27097904682159424, -0.24510470032691956, 0.040044065564870834, 0.12075360864400864, 0.18624520301818848, 0.06227947399020195, -0.097445547580719, 0.18480205535888672, 0.5148476362228394, 0.05131317675113678, 0.08691969513893127, -0.089381143450737, -0.09276377409696579, -0.0400519073009491, -0.09913575649261475, 0.11137985438108444, 0.1514521688222885, 0.07061014324426651, -0.15722642838954926, 0.06516488641500473, 0.41282328963279724, 0.01859251968562603, 0.06964362412691116, -0.4409233033657074, 0.2405087947845459, 0.05781644955277443, -0.17553314566612244, 0.06834198534488678, 0.19447796046733856, -0.06244910508394241, 0.14636725187301636, -0.09879309684038162, -0.1910969614982605, 0.18562133610248566, -0.18379464745521545, -0.09926676750183105, -0.31125953793525696, -0.29162198305130005, -0.0843079462647438, 0.1129554882645607, -0.3032706379890442, 0.0001487645204178989, 0.10612516850233078, 0.02081836760044098, -0.0825924277305603, -0.2978869378566742, 0.45896926522254944, 0.015334502793848515, -0.03696301579475403, -0.09329767525196075, 0.5055736303329468, 0.16538545489311218, -0.0805540382862091, 0.2248929888010025, 0.307780385017395, 0.5629498362541199, 0.1362704336643219, 0.02792019210755825, -0.10272352397441864, 0.13921938836574554, -0.17161481082439423, -0.12628860771656036, 0.13938729465007782, -0.009364786557853222, 0.28535526990890503, 0.21269692480564117, 0.27915075421333313, -0.18840083479881287, 0.07864155620336533, 0.0015754788182675838, -0.07690263539552689, -0.0051763588562607765, 0.007010535337030888, -0.20685036480426788, -0.20227168500423431, -0.15233482420444489, -0.3042212426662445, -0.015442067757248878, -0.11023582518100739, 0.3730226755142212, -0.02301115356385708, 0.12431733310222626, -0.13753992319107056, 0.15374821424484253, -0.17500270903110504, 0.6803292632102966, 0.28667786717414856, 0.039878033101558685, -0.051381926983594894, -0.17089985311031342, -0.47092485427856445, -0.01976272463798523, -0.11260350793600082, -0.011341138742864132, 0.11768374592065811, 0.19587282836437225, 0.14754217863082886, 0.22907313704490662, 0.2405625730752945, -0.2631620466709137, 0.09765146672725677, -0.06242239475250244, -0.5020051002502441, 0.04068829491734505, 0.07696454226970673, -0.00012238416820764542, 0.02402811124920845, -0.46933916211128235, 0.2431705743074417, 0.03343390300869942, 0.19194164872169495, 0.08374951034784317, 0.04409054294228554, 0.009345058351755142, -0.5076560378074646, 0.42391079664230347, -0.11164101213216782, 0.20196184515953064, -0.04143184423446655, -0.19341740012168884, 0.027239063754677773, -0.3823093771934509, 0.08448103815317154, 0.18473920226097107, 0.07689598947763443, 0.38627541065216064, -0.10778435319662094, 0.17731858789920807, -0.16517911851406097, -0.08077266067266464, 0.09185590595006943, 0.405920147895813, 0.10644076019525528, -0.17767298221588135, 0.09844470769166946, -0.009150516241788864, 0.08420412987470627, -0.10283023118972778, -0.0467718243598938, 0.25207918882369995, -0.16551616787910461, -0.19492009282112122, 0.3851172626018524, -0.03485878184437752, -0.20249511301517487, -0.07205873727798462, 0.21476006507873535, 0.3119916617870331, -0.16266299784183502, -0.4890868663787842, 0.2246839702129364, 0.44061803817749023, -0.15507295727729797, -0.2611546814441681, 0.2423250824213028, 0.03296881541609764, 0.05729087442159653, 0.05316288769245148, 0.13653729856014252, -0.1034083142876625, -0.3263894021511078, -0.05003935843706131, -0.15971620380878448 ]
https://github.com/huggingface/datasets/issues/5422
Datasets load error for saved github issues
Hi @folterj , I faced same issue while creating `issues_dataset` (https://huggingface.co/learn/nlp-course/chapter5/5?fw=pt). The fix which worked for me was loading the *.jsonl file as pd.read_json and then converting it into a Dataset using datasets API. ``` import pandas as pd df=pd.read_json("datasets-issues.jsonl", lines=True) df.head() from datasets import Dataset issues_dataset = Dataset.from_pandas(df) issues_dataset sample = issues_dataset.shuffle(seed=666).select(range(3)) sample[0] ```
### Describe the bug Loading a previously downloaded & saved dataset as described in the HuggingFace course: issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") Gives this error: datasets.builder.DatasetGenerationError: An error occurred while generating the dataset A work-around I found was to use streaming. ### Steps to reproduce the bug Reproduce by executing the code provided: https://huggingface.co/course/chapter5/5?fw=pt From the heading: 'let’s create a function that can download all the issues from a GitHub repository' ### Expected behavior No error ### Environment info Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp). **[EDIT]** This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`) ``` Using custom data configuration default-950028611d2860c8 Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s] Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s] Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last): File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single writer.write_table(table) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table pa_table = table_cast(pa_table, self._schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast return cast_table_to_schema(table, schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp> arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp> arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type timestamp[s] to null The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module> issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset builder_instance.download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare self._download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split for job_id, done, content in self._prepare_split_single( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset Generating train split: 2619 examples [00:19, 7155.72 examples/s] ```
55
Datasets load error for saved github issues
[ -0.5190645456314087, 0.3197609484195709, -0.1691041886806488, 0.21698835492134094, 0.2883802652359009, 0.062052901834249496, 0.41312453150749207, 0.2116403430700302, 0.09525398910045624, 0.1687288135290146, 0.03383130207657814, 0.08824964612722397, -0.04448274150490761, 0.3017023205757141, -0.18680883944034576, 0.1524825394153595, -0.1897348314523697, 0.035422928631305695, 0.11890462785959244, -0.14585915207862854, 0.0030955171678215265, 0.08614058047533035, -0.16078533232212067, 0.06822403520345688, -0.24450327455997467, -0.16823484003543854, 0.28465205430984497, 0.46470534801483154, -0.12128166854381561, -0.35337546467781067, 0.27164825797080994, 0.24998359382152557, 0.20927540957927704, 0.26565971970558167, -0.00010403661144664511, 0.17782841622829437, 0.36982911825180054, -0.16227304935455322, -0.4091351628303528, 0.06000009924173355, -0.3690836429595947, -0.23257052898406982, -0.0503213033080101, -0.2316104769706726, -0.15812306106090546, 0.033361636102199554, -0.04168209806084633, -0.3128145933151245, 0.42445358633995056, 0.3545616567134857, 0.3265363276004791, 0.22856391966342926, -0.07767343521118164, -0.25073087215423584, 0.45857182145118713, 0.026032349094748497, 0.027320552617311478, 0.34744197130203247, 0.19714373350143433, -0.030513372272253036, 0.04756017401814461, 0.31196847558021545, -0.0008000595262274146, 0.052249763160943985, -0.10293114185333252, -0.14182798564434052, -0.011711007915437222, -0.25638097524642944, 0.09800461679697037, -0.008554086089134216, 0.49537014961242676, -0.0855279490351677, -0.19728276133537292, -0.1410864144563675, -0.045506663620471954, 0.055784035474061966, 0.24186338484287262, 0.30781683325767517, -0.04405590146780014, 0.28270021080970764, -0.4077335000038147, -0.36594367027282715, -0.17948228120803833, 0.13901755213737488, 0.12746401131153107, -0.165938600897789, -0.20587126910686493, 0.0997835025191307, -0.05377591401338577, -0.14311814308166504, -0.20819662511348724, -0.23492717742919922, -0.21597348153591156, -0.07328368723392487, -0.08270075172185898, -0.11786670982837677, 0.08258472383022308, -0.17394237220287323, 0.298412948846817, 0.34998419880867004, -0.011002509854733944, 0.28717654943466187, 0.04912831634283066, 0.0118309510871768, 0.4021441340446472, 0.07414961606264114, 0.21733716130256653, 0.3040917217731476, 0.6682025194168091, 0.02394794672727585, -0.212291419506073, -0.0036949641071259975, -0.31120869517326355, -0.10911808907985687, -0.05926908552646637, -0.15998394787311554, 0.3035464584827423, -0.3372521996498108, -0.22072833776474, 0.25450393557548523, -0.0062381732277572155, -0.11894727498292923, -0.02845161035656929, 0.49004173278808594, -0.0703027993440628, -0.19850516319274902, -0.06909840553998947, 0.35084250569343567, -0.03204737603664398, -0.13205374777317047, -0.29444482922554016, -0.36112767457962036, 0.13693849742412567, 0.007114573381841183, 0.27912262082099915, -0.3028828501701355, 0.3746357560157776, 0.057126451283693314, -0.06314317882061005, -0.1861429512500763, 0.10211002826690674, 0.09975631535053253, -0.07545403391122818, 0.42394208908081055, 0.28399744629859924, 0.1294218748807907, 0.15428051352500916, -0.5124691128730774, 0.1281278282403946, 0.23074685037136078, -0.259751558303833, -0.3104010820388794, -0.2084590196609497, 0.27479153871536255, -0.07443976402282715, 0.12302035093307495, -0.7027380466461182, -0.03972788155078888, 0.22711537778377533, 0.00234692869707942, -0.12665480375289917, -0.09673372656106949, 0.20509210228919983, -0.14288415014743805, 0.13311493396759033, 0.23069263994693756, 0.14058825373649597, -0.1148749440908432, 0.0762396976351738, -0.28348004817962646, 0.08860823512077332, 0.3008795380592346, -0.28660523891448975, 0.11932796239852905, -0.17218460142612457, 0.18886400759220123, 0.3632759749889374, -0.25129324197769165, -0.4521426260471344, 0.17504757642745972, 0.20273368060588837, -0.04687662050127983, -0.2378540188074112, -0.03772128000855446, 0.2856234908103943, -0.15220284461975098, 0.14668413996696472, 0.2007427215576172, -0.021519292145967484, 0.17791514098644257, -0.34478509426116943, -0.1696075052022934, -0.31675153970718384, 0.2664659321308136, 0.032356489449739456, 0.18556228280067444, 0.39709025621414185, -0.14994677901268005, 0.020980315282940865, -0.3180169463157654, -0.1944204866886139, 0.46037808060646057, 0.18949376046657562, -0.07911913841962814, -0.12737467885017395, -0.03573022410273552, -0.5404778122901917, 0.11677590012550354, 0.05642953887581825, 0.0758734792470932, -0.10138783603906631, -0.07457917928695679, -0.386576384305954, -0.011110488325357437, -0.2836935818195343, 0.01622401736676693, 0.15380427241325378, 0.21136271953582764, -0.2590208649635315, 0.17940551042556763, -0.045067086815834045, 0.2506072521209717, -0.40055203437805176, 0.026761934161186218, -0.018444646149873734, 0.5404125452041626, -0.14457200467586517, -0.28398674726486206, 0.3528480529785156, -0.03382584825158119, 0.22558751702308655, -0.16688521206378937, -0.16566996276378632, 0.15567368268966675, -0.18118318915367126, 0.07268701493740082, 0.4200144112110138, 0.034559812396764755, 0.06283779442310333, -0.26751381158828735, 0.0880032479763031, -0.007050854619592428, 0.18817609548568726, -0.0008390303119085729, -0.23756204545497894, 0.22853678464889526, -0.003098732093349099, -0.10009513795375824, 0.03488815203309059, -0.0770515501499176, 0.5860109329223633, -0.0174611397087574, -0.02545955590903759, -0.27507346868515015, 0.01655738241970539, 0.3288594186306, 0.20389235019683838, -0.02167988196015358, -0.32725363969802856, 0.06845518201589584, 0.4714509844779968, 0.11148306727409363, 0.2789803147315979, 0.08119514584541321, -0.08356865495443344, -0.07408736646175385, 0.03756636753678322, 0.1405053585767746, 0.20709219574928284, 0.26533621549606323, -0.1830918788909912, -0.054760489612817764, -0.062399014830589294, -0.17854948341846466, 0.12007170915603638, -0.03779686242341995, -0.004344044718891382, 0.1575421839952469, 0.26611244678497314, -0.2849026322364807, -0.34544411301612854, 0.12071672827005386, -0.039113614708185196, 0.2696218490600586, -0.4080390930175781, 0.029113953933119774, -0.20729254186153412, -0.22819440066814423, 0.17323848605155945, -0.00640847347676754, -0.2168055921792984, -0.21547657251358032, 0.10110528767108917, 0.15849517285823822, -0.2621133327484131, 0.17848441004753113, 0.3950011134147644, 0.2807781994342804, 0.11010628938674927, 0.13927315175533295, 0.05390302464365959, -0.5247378349304199, -0.23850052058696747, 0.13133825361728668, 0.30054911971092224, -0.137980654835701, 0.40667620301246643, -0.336599200963974, 0.05185351520776749, -0.39810511469841003, -0.09200398623943329, 0.13457749783992767, 0.024230528622865677, 0.5202198028564453, -0.254189133644104, 0.4186612367630005, 0.214069202542305, -0.05978196859359741, 0.36641284823417664, 0.1772351711988449, -0.10915248095989227, -0.013527823612093925, 0.16925552487373352, -0.2674647867679596, -0.07685911655426025, -0.2703056037425995, -0.09204436093568802, -0.31230589747428894, -0.05799085274338722, 0.22447316348552704, 0.1699814349412918, 0.15073317289352417, 0.21720659732818604, -0.03686150908470154, 0.1827474981546402, -0.13975977897644043, -0.28313979506492615, -0.49208226799964905, 0.23434969782829285, -0.3360901474952698, -0.35309037566185, 0.09544447064399719, 0.31666767597198486, -0.12446139752864838, 0.20909301936626434, -0.39143121242523193, 0.1511538326740265, 0.08180778473615646, 0.2783040702342987, 0.2600444555282593, -0.006983060855418444, 0.06111305207014084, 0.09105958044528961, -0.04968218132853508, -0.19751352071762085, -0.3211199641227722, 0.201235830783844, -0.014347870834171772, 0.0075962133705616, -0.14113262295722961, 0.2310599833726883, -0.2191302478313446, 0.8387617468833923, 0.16479934751987457, -0.15595929324626923, 0.36416006088256836, -0.13291308283805847, 0.3904789984226227, -0.07509870082139969, -0.17054258286952972, -0.07233671098947525, 0.013096660375595093, -0.029758671298623085, 0.36237362027168274, 0.1508467197418213, -0.25738972425460815, -0.1526118367910385, -0.18463268876075745, -0.22109846770763397, -0.2959459125995636, -0.13000082969665527, -0.17200174927711487, 0.02975253388285637, 0.3309551775455475, 0.09637582302093506, -0.17156848311424255, 0.009741617366671562, 0.023249374702572823, 0.17701037228107452, -0.05654265731573105, -0.03722848370671272, -0.38589656352996826, 0.3132258653640747, -0.21156080067157745, 0.30956631898880005, 0.08936554938554764, 0.11812692880630493, -0.16944794356822968, 0.046429604291915894, 0.04006274789571762, -0.15827377140522003, -0.023354191333055496, -0.3953198492527008, 0.1815408617258072, 0.07895174622535706, 0.012800127267837524, 0.00045233560376800597, -0.16684946417808533, -0.012173225171864033, 0.4085753560066223, 0.13221526145935059, 0.5349738597869873, -0.24412193894386292, -0.22333166003227234, 0.17568987607955933, 0.04673770070075989, -0.17386406660079956, 0.11545690894126892, -0.2714964747428894, -0.2533334195613861, -0.5637241005897522, -0.0610867403447628, 0.0276800449937582, -0.16052082180976868, -0.05761469155550003, -0.10191738605499268, -0.40363362431526184, 0.11412487924098969, -0.14219827950000763, 0.2856441140174866, 0.33096978068351746, -0.15112556517124176, 0.1160426214337349, -0.0622447244822979, -0.00218845228664577, 0.5001676678657532, 0.7122893333435059, 0.12008455395698547, -0.10635355114936829, 0.11258863657712936, -0.348811537027359, -0.13654226064682007, 0.18737858533859253, 0.025691455230116844, -0.362856388092041, 0.11575146019458771, 0.21946373581886292, -0.18188847601413727, 0.29547208547592163, 0.18186914920806885, 0.014246390201151371, -0.4472142159938812, -0.32156670093536377, 0.35507357120513916, -0.19613642990589142, -0.1369044929742813, 0.37184813618659973, 0.04785428196191788, -0.08762484043836594, 0.024662120267748833, -0.027457676827907562, 0.6646745204925537, -0.10414978116750717, 0.01708269864320755, 0.20359396934509277, -0.2445290982723236, -0.0980912446975708, -0.26794561743736267, -0.05532996356487274, -0.368443101644516, -0.024991421028971672, 0.09864459186792374, -0.14518055319786072, 0.10265254229307175, 0.14792753756046295, -0.01986600086092949, 0.10280990600585938, 0.029220202937722206, 0.1791350394487381, 0.04146807640790939, 0.1599181890487671, 0.12252699583768845, 0.12544883787631989, -0.4119265079498291, 0.2611759305000305, -0.13991811871528625, 0.19911302626132965, -0.1866784393787384, -0.0975947305560112, -0.02272678352892399, -0.1642758846282959, -0.3887176811695099, 0.2325066179037094, -0.040618862956762314, 0.26478156447410583, -0.1501016467809677, -0.19010284543037415, -0.11755509674549103, 0.082859106361866, 0.3795430064201355, 0.23230387270450592, -0.2438056319952011, 0.34606605768203735, -0.06722119450569153, -0.0018528512446209788, -0.24146965146064758, 0.13418088853359222, 0.2220008671283722, -0.2642357647418976, -0.17082113027572632, -0.030267519876360893, -0.03771800175309181, -0.4239509701728821, -0.17084236443042755, 0.15164248645305634, -0.25223758816719055, -0.14648686349391937, -0.08260871469974518, -0.0043800706043839455, 0.11968817561864853, -0.28631311655044556, 0.2072199583053589, 0.15966105461120605, 0.2601108253002167, 0.16917940974235535, 0.20440059900283813, -0.2724972367286682, -0.14560511708259583, 0.29039517045021057, 0.014448096044361591, -0.062421999871730804, 0.3652566075325012, -0.012012496590614319, -0.16961218416690826, -0.370168536901474, 0.09448325634002686, 0.048393525183200836, -0.2916038930416107, 0.42379671335220337, -0.2826404273509979, -0.11045652627944946, -0.0809759795665741, 0.4087940752506256, -0.19089463353157043, -0.1510588824748993, 0.2512515187263489, -0.3049914538860321, -0.18276062607765198, 0.023532913997769356, -0.0707184299826622, 0.2531959116458893, 0.23113025724887848, -0.29317373037338257, -0.017249353229999542, 0.0013910809066146612, -0.41748014092445374, 0.1483941227197647, -0.49904829263687134, 0.09020176529884338, 0.16158747673034668, 0.02216505818068981, 0.2852477729320526, -0.3423284590244293, 0.1695074737071991, -0.1764441430568695, -0.16106043756008148, -0.32637250423431396, 0.035764120519161224, 0.06327302753925323, -0.04411729425191879, -0.02715388685464859, -0.029437579214572906, -0.16660548746585846, 0.08828970044851303, -0.02866736426949501, 0.35266363620758057, 0.11500341445207596, 0.0362495593726635, 0.009980949573218822, 0.13051699101924896, -0.021295329555869102, -0.04168921336531639, 0.16635368764400482, -0.09477027505636215, 0.24914462864398956, -0.0602598674595356, -0.006853573955595493, 0.014327323995530605, -0.1196165457367897, -0.09299084544181824, 0.0742398053407669, 0.1821150928735733, 0.37150031328201294, 0.3989873230457306, -0.5026693940162659, 0.030131597071886063, 0.3401198089122772, -0.010696986690163612, 0.22149142622947693, -0.2652699053287506, -0.18649183213710785, -0.012211132794618607, 0.2819102108478546, -0.20123392343521118, -0.14553946256637573, 0.27097904682159424, -0.24510470032691956, 0.040044065564870834, 0.12075360864400864, 0.18624520301818848, 0.06227947399020195, -0.097445547580719, 0.18480205535888672, 0.5148476362228394, 0.05131317675113678, 0.08691969513893127, -0.089381143450737, -0.09276377409696579, -0.0400519073009491, -0.09913575649261475, 0.11137985438108444, 0.1514521688222885, 0.07061014324426651, -0.15722642838954926, 0.06516488641500473, 0.41282328963279724, 0.01859251968562603, 0.06964362412691116, -0.4409233033657074, 0.2405087947845459, 0.05781644955277443, -0.17553314566612244, 0.06834198534488678, 0.19447796046733856, -0.06244910508394241, 0.14636725187301636, -0.09879309684038162, -0.1910969614982605, 0.18562133610248566, -0.18379464745521545, -0.09926676750183105, -0.31125953793525696, -0.29162198305130005, -0.0843079462647438, 0.1129554882645607, -0.3032706379890442, 0.0001487645204178989, 0.10612516850233078, 0.02081836760044098, -0.0825924277305603, -0.2978869378566742, 0.45896926522254944, 0.015334502793848515, -0.03696301579475403, -0.09329767525196075, 0.5055736303329468, 0.16538545489311218, -0.0805540382862091, 0.2248929888010025, 0.307780385017395, 0.5629498362541199, 0.1362704336643219, 0.02792019210755825, -0.10272352397441864, 0.13921938836574554, -0.17161481082439423, -0.12628860771656036, 0.13938729465007782, -0.009364786557853222, 0.28535526990890503, 0.21269692480564117, 0.27915075421333313, -0.18840083479881287, 0.07864155620336533, 0.0015754788182675838, -0.07690263539552689, -0.0051763588562607765, 0.007010535337030888, -0.20685036480426788, -0.20227168500423431, -0.15233482420444489, -0.3042212426662445, -0.015442067757248878, -0.11023582518100739, 0.3730226755142212, -0.02301115356385708, 0.12431733310222626, -0.13753992319107056, 0.15374821424484253, -0.17500270903110504, 0.6803292632102966, 0.28667786717414856, 0.039878033101558685, -0.051381926983594894, -0.17089985311031342, -0.47092485427856445, -0.01976272463798523, -0.11260350793600082, -0.011341138742864132, 0.11768374592065811, 0.19587282836437225, 0.14754217863082886, 0.22907313704490662, 0.2405625730752945, -0.2631620466709137, 0.09765146672725677, -0.06242239475250244, -0.5020051002502441, 0.04068829491734505, 0.07696454226970673, -0.00012238416820764542, 0.02402811124920845, -0.46933916211128235, 0.2431705743074417, 0.03343390300869942, 0.19194164872169495, 0.08374951034784317, 0.04409054294228554, 0.009345058351755142, -0.5076560378074646, 0.42391079664230347, -0.11164101213216782, 0.20196184515953064, -0.04143184423446655, -0.19341740012168884, 0.027239063754677773, -0.3823093771934509, 0.08448103815317154, 0.18473920226097107, 0.07689598947763443, 0.38627541065216064, -0.10778435319662094, 0.17731858789920807, -0.16517911851406097, -0.08077266067266464, 0.09185590595006943, 0.405920147895813, 0.10644076019525528, -0.17767298221588135, 0.09844470769166946, -0.009150516241788864, 0.08420412987470627, -0.10283023118972778, -0.0467718243598938, 0.25207918882369995, -0.16551616787910461, -0.19492009282112122, 0.3851172626018524, -0.03485878184437752, -0.20249511301517487, -0.07205873727798462, 0.21476006507873535, 0.3119916617870331, -0.16266299784183502, -0.4890868663787842, 0.2246839702129364, 0.44061803817749023, -0.15507295727729797, -0.2611546814441681, 0.2423250824213028, 0.03296881541609764, 0.05729087442159653, 0.05316288769245148, 0.13653729856014252, -0.1034083142876625, -0.3263894021511078, -0.05003935843706131, -0.15971620380878448 ]
https://github.com/huggingface/datasets/issues/5422
Datasets load error for saved github issues
I understand some work-around suggestions would be to not use load_dataset(), and instead using a different API function. Another alternative would be using the same function using streaming, as I had already suggested in my original post. However, the fact remains that there is an issue in this function as reported.
### Describe the bug Loading a previously downloaded & saved dataset as described in the HuggingFace course: issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") Gives this error: datasets.builder.DatasetGenerationError: An error occurred while generating the dataset A work-around I found was to use streaming. ### Steps to reproduce the bug Reproduce by executing the code provided: https://huggingface.co/course/chapter5/5?fw=pt From the heading: 'let’s create a function that can download all the issues from a GitHub repository' ### Expected behavior No error ### Environment info Datasets version 2.8.0. Note that version 2.6.1 gives the same error (related to null timestamp). **[EDIT]** This is the complete error trace confirming the issue is related to the timestamp (`Couldn't cast array of type timestamp[s] to null`) ``` Using custom data configuration default-950028611d2860c8 Downloading and preparing dataset json/default to [...]/.cache/huggingface/datasets/json/default-950028611d2860c8/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51... Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s] Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 500.63it/s] Generating train split: 2619 examples [00:00, 7155.72 examples/s]Traceback (most recent call last): File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1831, in _prepare_split_single writer.write_table(table) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\arrow_writer.py", line 567, in write_table pa_table = table_cast(pa_table, self._schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2282, in table_cast return cast_table_to_schema(table, schema) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in cast_table_to_schema arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2241, in <listcomp> arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1807, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in cast_array_to_feature arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2035, in <listcomp> arrays = [_c(array.field(name), subfeature) for name, subfeature in feature.items()] File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 2101, in cast_array_to_feature return array_cast(array, feature(), allow_number_to_str=allow_number_to_str) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1809, in wrapper return func(array, *args, **kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\table.py", line 1990, in array_cast raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}") TypeError: Couldn't cast array of type timestamp[s] to null The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode coro = func() File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 198, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm 2022.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "[...]\PycharmProjects\TransformersTesting\dataset_issues.py", line 20, in <module> issues_dataset = load_dataset("json", data_files="issues/datasets-issues.jsonl", split="train") File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\load.py", line 1757, in load_dataset builder_instance.download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 860, in download_and_prepare self._download_and_prepare( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 953, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1706, in _prepare_split for job_id, done, content in self._prepare_split_single( File "[...]\miniconda3\envs\HuggingFace\lib\site-packages\datasets\builder.py", line 1849, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.builder.DatasetGenerationError: An error occurred while generating the dataset Generating train split: 2619 examples [00:19, 7155.72 examples/s] ```
51
Datasets load error for saved github issues
[ -0.5190645456314087, 0.3197609484195709, -0.1691041886806488, 0.21698835492134094, 0.2883802652359009, 0.062052901834249496, 0.41312453150749207, 0.2116403430700302, 0.09525398910045624, 0.1687288135290146, 0.03383130207657814, 0.08824964612722397, -0.04448274150490761, 0.3017023205757141, -0.18680883944034576, 0.1524825394153595, -0.1897348314523697, 0.035422928631305695, 0.11890462785959244, -0.14585915207862854, 0.0030955171678215265, 0.08614058047533035, -0.16078533232212067, 0.06822403520345688, -0.24450327455997467, -0.16823484003543854, 0.28465205430984497, 0.46470534801483154, -0.12128166854381561, -0.35337546467781067, 0.27164825797080994, 0.24998359382152557, 0.20927540957927704, 0.26565971970558167, -0.00010403661144664511, 0.17782841622829437, 0.36982911825180054, -0.16227304935455322, -0.4091351628303528, 0.06000009924173355, -0.3690836429595947, -0.23257052898406982, -0.0503213033080101, -0.2316104769706726, -0.15812306106090546, 0.033361636102199554, -0.04168209806084633, -0.3128145933151245, 0.42445358633995056, 0.3545616567134857, 0.3265363276004791, 0.22856391966342926, -0.07767343521118164, -0.25073087215423584, 0.45857182145118713, 0.026032349094748497, 0.027320552617311478, 0.34744197130203247, 0.19714373350143433, -0.030513372272253036, 0.04756017401814461, 0.31196847558021545, -0.0008000595262274146, 0.052249763160943985, -0.10293114185333252, -0.14182798564434052, -0.011711007915437222, -0.25638097524642944, 0.09800461679697037, -0.008554086089134216, 0.49537014961242676, -0.0855279490351677, -0.19728276133537292, -0.1410864144563675, -0.045506663620471954, 0.055784035474061966, 0.24186338484287262, 0.30781683325767517, -0.04405590146780014, 0.28270021080970764, -0.4077335000038147, -0.36594367027282715, -0.17948228120803833, 0.13901755213737488, 0.12746401131153107, -0.165938600897789, -0.20587126910686493, 0.0997835025191307, -0.05377591401338577, -0.14311814308166504, -0.20819662511348724, -0.23492717742919922, -0.21597348153591156, -0.07328368723392487, -0.08270075172185898, -0.11786670982837677, 0.08258472383022308, -0.17394237220287323, 0.298412948846817, 0.34998419880867004, -0.011002509854733944, 0.28717654943466187, 0.04912831634283066, 0.0118309510871768, 0.4021441340446472, 0.07414961606264114, 0.21733716130256653, 0.3040917217731476, 0.6682025194168091, 0.02394794672727585, -0.212291419506073, -0.0036949641071259975, -0.31120869517326355, -0.10911808907985687, -0.05926908552646637, -0.15998394787311554, 0.3035464584827423, -0.3372521996498108, -0.22072833776474, 0.25450393557548523, -0.0062381732277572155, -0.11894727498292923, -0.02845161035656929, 0.49004173278808594, -0.0703027993440628, -0.19850516319274902, -0.06909840553998947, 0.35084250569343567, -0.03204737603664398, -0.13205374777317047, -0.29444482922554016, -0.36112767457962036, 0.13693849742412567, 0.007114573381841183, 0.27912262082099915, -0.3028828501701355, 0.3746357560157776, 0.057126451283693314, -0.06314317882061005, -0.1861429512500763, 0.10211002826690674, 0.09975631535053253, -0.07545403391122818, 0.42394208908081055, 0.28399744629859924, 0.1294218748807907, 0.15428051352500916, -0.5124691128730774, 0.1281278282403946, 0.23074685037136078, -0.259751558303833, -0.3104010820388794, -0.2084590196609497, 0.27479153871536255, -0.07443976402282715, 0.12302035093307495, -0.7027380466461182, -0.03972788155078888, 0.22711537778377533, 0.00234692869707942, -0.12665480375289917, -0.09673372656106949, 0.20509210228919983, -0.14288415014743805, 0.13311493396759033, 0.23069263994693756, 0.14058825373649597, -0.1148749440908432, 0.0762396976351738, -0.28348004817962646, 0.08860823512077332, 0.3008795380592346, -0.28660523891448975, 0.11932796239852905, -0.17218460142612457, 0.18886400759220123, 0.3632759749889374, -0.25129324197769165, -0.4521426260471344, 0.17504757642745972, 0.20273368060588837, -0.04687662050127983, -0.2378540188074112, -0.03772128000855446, 0.2856234908103943, -0.15220284461975098, 0.14668413996696472, 0.2007427215576172, -0.021519292145967484, 0.17791514098644257, -0.34478509426116943, -0.1696075052022934, -0.31675153970718384, 0.2664659321308136, 0.032356489449739456, 0.18556228280067444, 0.39709025621414185, -0.14994677901268005, 0.020980315282940865, -0.3180169463157654, -0.1944204866886139, 0.46037808060646057, 0.18949376046657562, -0.07911913841962814, -0.12737467885017395, -0.03573022410273552, -0.5404778122901917, 0.11677590012550354, 0.05642953887581825, 0.0758734792470932, -0.10138783603906631, -0.07457917928695679, -0.386576384305954, -0.011110488325357437, -0.2836935818195343, 0.01622401736676693, 0.15380427241325378, 0.21136271953582764, -0.2590208649635315, 0.17940551042556763, -0.045067086815834045, 0.2506072521209717, -0.40055203437805176, 0.026761934161186218, -0.018444646149873734, 0.5404125452041626, -0.14457200467586517, -0.28398674726486206, 0.3528480529785156, -0.03382584825158119, 0.22558751702308655, -0.16688521206378937, -0.16566996276378632, 0.15567368268966675, -0.18118318915367126, 0.07268701493740082, 0.4200144112110138, 0.034559812396764755, 0.06283779442310333, -0.26751381158828735, 0.0880032479763031, -0.007050854619592428, 0.18817609548568726, -0.0008390303119085729, -0.23756204545497894, 0.22853678464889526, -0.003098732093349099, -0.10009513795375824, 0.03488815203309059, -0.0770515501499176, 0.5860109329223633, -0.0174611397087574, -0.02545955590903759, -0.27507346868515015, 0.01655738241970539, 0.3288594186306, 0.20389235019683838, -0.02167988196015358, -0.32725363969802856, 0.06845518201589584, 0.4714509844779968, 0.11148306727409363, 0.2789803147315979, 0.08119514584541321, -0.08356865495443344, -0.07408736646175385, 0.03756636753678322, 0.1405053585767746, 0.20709219574928284, 0.26533621549606323, -0.1830918788909912, -0.054760489612817764, -0.062399014830589294, -0.17854948341846466, 0.12007170915603638, -0.03779686242341995, -0.004344044718891382, 0.1575421839952469, 0.26611244678497314, -0.2849026322364807, -0.34544411301612854, 0.12071672827005386, -0.039113614708185196, 0.2696218490600586, -0.4080390930175781, 0.029113953933119774, -0.20729254186153412, -0.22819440066814423, 0.17323848605155945, -0.00640847347676754, -0.2168055921792984, -0.21547657251358032, 0.10110528767108917, 0.15849517285823822, -0.2621133327484131, 0.17848441004753113, 0.3950011134147644, 0.2807781994342804, 0.11010628938674927, 0.13927315175533295, 0.05390302464365959, -0.5247378349304199, -0.23850052058696747, 0.13133825361728668, 0.30054911971092224, -0.137980654835701, 0.40667620301246643, -0.336599200963974, 0.05185351520776749, -0.39810511469841003, -0.09200398623943329, 0.13457749783992767, 0.024230528622865677, 0.5202198028564453, -0.254189133644104, 0.4186612367630005, 0.214069202542305, -0.05978196859359741, 0.36641284823417664, 0.1772351711988449, -0.10915248095989227, -0.013527823612093925, 0.16925552487373352, -0.2674647867679596, -0.07685911655426025, -0.2703056037425995, -0.09204436093568802, -0.31230589747428894, -0.05799085274338722, 0.22447316348552704, 0.1699814349412918, 0.15073317289352417, 0.21720659732818604, -0.03686150908470154, 0.1827474981546402, -0.13975977897644043, -0.28313979506492615, -0.49208226799964905, 0.23434969782829285, -0.3360901474952698, -0.35309037566185, 0.09544447064399719, 0.31666767597198486, -0.12446139752864838, 0.20909301936626434, -0.39143121242523193, 0.1511538326740265, 0.08180778473615646, 0.2783040702342987, 0.2600444555282593, -0.006983060855418444, 0.06111305207014084, 0.09105958044528961, -0.04968218132853508, -0.19751352071762085, -0.3211199641227722, 0.201235830783844, -0.014347870834171772, 0.0075962133705616, -0.14113262295722961, 0.2310599833726883, -0.2191302478313446, 0.8387617468833923, 0.16479934751987457, -0.15595929324626923, 0.36416006088256836, -0.13291308283805847, 0.3904789984226227, -0.07509870082139969, -0.17054258286952972, -0.07233671098947525, 0.013096660375595093, -0.029758671298623085, 0.36237362027168274, 0.1508467197418213, -0.25738972425460815, -0.1526118367910385, -0.18463268876075745, -0.22109846770763397, -0.2959459125995636, -0.13000082969665527, -0.17200174927711487, 0.02975253388285637, 0.3309551775455475, 0.09637582302093506, -0.17156848311424255, 0.009741617366671562, 0.023249374702572823, 0.17701037228107452, -0.05654265731573105, -0.03722848370671272, -0.38589656352996826, 0.3132258653640747, -0.21156080067157745, 0.30956631898880005, 0.08936554938554764, 0.11812692880630493, -0.16944794356822968, 0.046429604291915894, 0.04006274789571762, -0.15827377140522003, -0.023354191333055496, -0.3953198492527008, 0.1815408617258072, 0.07895174622535706, 0.012800127267837524, 0.00045233560376800597, -0.16684946417808533, -0.012173225171864033, 0.4085753560066223, 0.13221526145935059, 0.5349738597869873, -0.24412193894386292, -0.22333166003227234, 0.17568987607955933, 0.04673770070075989, -0.17386406660079956, 0.11545690894126892, -0.2714964747428894, -0.2533334195613861, -0.5637241005897522, -0.0610867403447628, 0.0276800449937582, -0.16052082180976868, -0.05761469155550003, -0.10191738605499268, -0.40363362431526184, 0.11412487924098969, -0.14219827950000763, 0.2856441140174866, 0.33096978068351746, -0.15112556517124176, 0.1160426214337349, -0.0622447244822979, -0.00218845228664577, 0.5001676678657532, 0.7122893333435059, 0.12008455395698547, -0.10635355114936829, 0.11258863657712936, -0.348811537027359, -0.13654226064682007, 0.18737858533859253, 0.025691455230116844, -0.362856388092041, 0.11575146019458771, 0.21946373581886292, -0.18188847601413727, 0.29547208547592163, 0.18186914920806885, 0.014246390201151371, -0.4472142159938812, -0.32156670093536377, 0.35507357120513916, -0.19613642990589142, -0.1369044929742813, 0.37184813618659973, 0.04785428196191788, -0.08762484043836594, 0.024662120267748833, -0.027457676827907562, 0.6646745204925537, -0.10414978116750717, 0.01708269864320755, 0.20359396934509277, -0.2445290982723236, -0.0980912446975708, -0.26794561743736267, -0.05532996356487274, -0.368443101644516, -0.024991421028971672, 0.09864459186792374, -0.14518055319786072, 0.10265254229307175, 0.14792753756046295, -0.01986600086092949, 0.10280990600585938, 0.029220202937722206, 0.1791350394487381, 0.04146807640790939, 0.1599181890487671, 0.12252699583768845, 0.12544883787631989, -0.4119265079498291, 0.2611759305000305, -0.13991811871528625, 0.19911302626132965, -0.1866784393787384, -0.0975947305560112, -0.02272678352892399, -0.1642758846282959, -0.3887176811695099, 0.2325066179037094, -0.040618862956762314, 0.26478156447410583, -0.1501016467809677, -0.19010284543037415, -0.11755509674549103, 0.082859106361866, 0.3795430064201355, 0.23230387270450592, -0.2438056319952011, 0.34606605768203735, -0.06722119450569153, -0.0018528512446209788, -0.24146965146064758, 0.13418088853359222, 0.2220008671283722, -0.2642357647418976, -0.17082113027572632, -0.030267519876360893, -0.03771800175309181, -0.4239509701728821, -0.17084236443042755, 0.15164248645305634, -0.25223758816719055, -0.14648686349391937, -0.08260871469974518, -0.0043800706043839455, 0.11968817561864853, -0.28631311655044556, 0.2072199583053589, 0.15966105461120605, 0.2601108253002167, 0.16917940974235535, 0.20440059900283813, -0.2724972367286682, -0.14560511708259583, 0.29039517045021057, 0.014448096044361591, -0.062421999871730804, 0.3652566075325012, -0.012012496590614319, -0.16961218416690826, -0.370168536901474, 0.09448325634002686, 0.048393525183200836, -0.2916038930416107, 0.42379671335220337, -0.2826404273509979, -0.11045652627944946, -0.0809759795665741, 0.4087940752506256, -0.19089463353157043, -0.1510588824748993, 0.2512515187263489, -0.3049914538860321, -0.18276062607765198, 0.023532913997769356, -0.0707184299826622, 0.2531959116458893, 0.23113025724887848, -0.29317373037338257, -0.017249353229999542, 0.0013910809066146612, -0.41748014092445374, 0.1483941227197647, -0.49904829263687134, 0.09020176529884338, 0.16158747673034668, 0.02216505818068981, 0.2852477729320526, -0.3423284590244293, 0.1695074737071991, -0.1764441430568695, -0.16106043756008148, -0.32637250423431396, 0.035764120519161224, 0.06327302753925323, -0.04411729425191879, -0.02715388685464859, -0.029437579214572906, -0.16660548746585846, 0.08828970044851303, -0.02866736426949501, 0.35266363620758057, 0.11500341445207596, 0.0362495593726635, 0.009980949573218822, 0.13051699101924896, -0.021295329555869102, -0.04168921336531639, 0.16635368764400482, -0.09477027505636215, 0.24914462864398956, -0.0602598674595356, -0.006853573955595493, 0.014327323995530605, -0.1196165457367897, -0.09299084544181824, 0.0742398053407669, 0.1821150928735733, 0.37150031328201294, 0.3989873230457306, -0.5026693940162659, 0.030131597071886063, 0.3401198089122772, -0.010696986690163612, 0.22149142622947693, -0.2652699053287506, -0.18649183213710785, -0.012211132794618607, 0.2819102108478546, -0.20123392343521118, -0.14553946256637573, 0.27097904682159424, -0.24510470032691956, 0.040044065564870834, 0.12075360864400864, 0.18624520301818848, 0.06227947399020195, -0.097445547580719, 0.18480205535888672, 0.5148476362228394, 0.05131317675113678, 0.08691969513893127, -0.089381143450737, -0.09276377409696579, -0.0400519073009491, -0.09913575649261475, 0.11137985438108444, 0.1514521688222885, 0.07061014324426651, -0.15722642838954926, 0.06516488641500473, 0.41282328963279724, 0.01859251968562603, 0.06964362412691116, -0.4409233033657074, 0.2405087947845459, 0.05781644955277443, -0.17553314566612244, 0.06834198534488678, 0.19447796046733856, -0.06244910508394241, 0.14636725187301636, -0.09879309684038162, -0.1910969614982605, 0.18562133610248566, -0.18379464745521545, -0.09926676750183105, -0.31125953793525696, -0.29162198305130005, -0.0843079462647438, 0.1129554882645607, -0.3032706379890442, 0.0001487645204178989, 0.10612516850233078, 0.02081836760044098, -0.0825924277305603, -0.2978869378566742, 0.45896926522254944, 0.015334502793848515, -0.03696301579475403, -0.09329767525196075, 0.5055736303329468, 0.16538545489311218, -0.0805540382862091, 0.2248929888010025, 0.307780385017395, 0.5629498362541199, 0.1362704336643219, 0.02792019210755825, -0.10272352397441864, 0.13921938836574554, -0.17161481082439423, -0.12628860771656036, 0.13938729465007782, -0.009364786557853222, 0.28535526990890503, 0.21269692480564117, 0.27915075421333313, -0.18840083479881287, 0.07864155620336533, 0.0015754788182675838, -0.07690263539552689, -0.0051763588562607765, 0.007010535337030888, -0.20685036480426788, -0.20227168500423431, -0.15233482420444489, -0.3042212426662445, -0.015442067757248878, -0.11023582518100739, 0.3730226755142212, -0.02301115356385708, 0.12431733310222626, -0.13753992319107056, 0.15374821424484253, -0.17500270903110504, 0.6803292632102966, 0.28667786717414856, 0.039878033101558685, -0.051381926983594894, -0.17089985311031342, -0.47092485427856445, -0.01976272463798523, -0.11260350793600082, -0.011341138742864132, 0.11768374592065811, 0.19587282836437225, 0.14754217863082886, 0.22907313704490662, 0.2405625730752945, -0.2631620466709137, 0.09765146672725677, -0.06242239475250244, -0.5020051002502441, 0.04068829491734505, 0.07696454226970673, -0.00012238416820764542, 0.02402811124920845, -0.46933916211128235, 0.2431705743074417, 0.03343390300869942, 0.19194164872169495, 0.08374951034784317, 0.04409054294228554, 0.009345058351755142, -0.5076560378074646, 0.42391079664230347, -0.11164101213216782, 0.20196184515953064, -0.04143184423446655, -0.19341740012168884, 0.027239063754677773, -0.3823093771934509, 0.08448103815317154, 0.18473920226097107, 0.07689598947763443, 0.38627541065216064, -0.10778435319662094, 0.17731858789920807, -0.16517911851406097, -0.08077266067266464, 0.09185590595006943, 0.405920147895813, 0.10644076019525528, -0.17767298221588135, 0.09844470769166946, -0.009150516241788864, 0.08420412987470627, -0.10283023118972778, -0.0467718243598938, 0.25207918882369995, -0.16551616787910461, -0.19492009282112122, 0.3851172626018524, -0.03485878184437752, -0.20249511301517487, -0.07205873727798462, 0.21476006507873535, 0.3119916617870331, -0.16266299784183502, -0.4890868663787842, 0.2246839702129364, 0.44061803817749023, -0.15507295727729797, -0.2611546814441681, 0.2423250824213028, 0.03296881541609764, 0.05729087442159653, 0.05316288769245148, 0.13653729856014252, -0.1034083142876625, -0.3263894021511078, -0.05003935843706131, -0.15971620380878448 ]
https://github.com/huggingface/datasets/issues/5421
Support case-insensitive Hub dataset name in load_dataset
Closing as case-insensitivity should be only for URL redirection on the Hub. In the APIs, we will only support the canonical name (https://github.com/huggingface/moon-landing/pull/2399#issuecomment-1382085611)
### Feature request The dataset name on the Hub is case-insensitive (see https://github.com/huggingface/moon-landing/pull/2399, internal issue), i.e., https://huggingface.co/datasets/GLUE redirects to https://huggingface.co/datasets/glue. Ideally, we could load the glue dataset using the following: ``` from datasets import load_dataset load_dataset('GLUE', 'cola') ``` It breaks because the loading script `GLUE.py` does not exist (`glue.py` should be selected instead). Minor additional comment: in other cases without a loading script, we can load the dataset, but the automatically generated config name depends on the casing: - `load_dataset('severo/danish-wit')` generates the config name `severo--danish-wit-e6fda5b070deb133`, while - `load_dataset('severo/danish-WIT')` generates the config name `severo--danish-WIT-e6fda5b070deb133` ### Motivation To follow the same UX on the Hub and in the datasets library. ### Your contribution ...
23
Support case-insensitive Hub dataset name in load_dataset
[ -0.4061428904533386, -0.05164360627532005, -0.17339198291301727, 0.13419407606124878, 0.3419477343559265, 0.2044130116701126, 0.5756955742835999, 0.14179988205432892, 0.1739257574081421, 0.31072765588760376, -0.3171529769897461, 0.37382960319519043, -0.04496792331337929, 0.11962396651506424, -0.007634681649506092, 0.24260665476322174, 0.017672894522547722, 0.1615491509437561, 0.2227056324481964, 0.050731904804706573, 0.0814891830086708, 0.11848843842744827, -0.04716779291629791, 0.13764052093029022, -0.23973684012889862, 0.09197837114334106, 0.30179810523986816, 0.24689871072769165, -0.2695019543170929, -0.2264658808708191, 0.5273927450180054, 0.5854129791259766, 0.10313661396503448, 0.10508722066879272, -0.0001131013486883603, 0.1619945466518402, 0.3761824369430542, -0.1786893606185913, -0.1205623522400856, -0.07494799792766571, -0.4537859857082367, -0.09781944006681442, -0.013874610885977745, -0.24677638709545135, -0.07588808983564377, 0.2553020715713501, 0.11203218251466751, -0.06606851518154144, -0.017703745514154434, 0.07164976000785828, 0.16371582448482513, 0.3043958246707916, -0.2693063020706177, -0.24769502878189087, -0.011791327968239784, 0.094693623483181, -0.21357780694961548, 0.31348687410354614, 0.22881489992141724, -0.07058032602071762, -0.4347843825817108, 0.09760475158691406, 0.08245725184679031, 0.01251994725316763, -0.19054026901721954, 0.007724716328084469, -0.040474068373441696, 0.4306783676147461, 0.06961119174957275, 0.3225496709346771, 0.44862452149391174, -0.36392033100128174, -0.2623211145401001, -0.2635008692741394, 0.08160938322544098, -0.1585669070482254, 0.10431898385286331, -0.2919171452522278, 0.02590162493288517, 0.16589827835559845, 0.26134058833122253, -0.20784422755241394, -0.3142549991607666, -0.020051321014761925, 0.021533196792006493, 0.4019719362258911, 0.008566634729504585, 0.00021683347586076707, -0.2516320049762726, -0.23322418332099915, 0.7844210267066956, -0.09764990955591202, 0.08499892055988312, -0.22838447988033295, -0.38475483655929565, -0.18620237708091736, -0.12801581621170044, 0.25891533493995667, 0.17251715064048767, -0.08443203568458557, 0.3739015758037567, 0.44117751717567444, -0.013459703885018826, 0.021033259108662605, -0.020276593044400215, 0.013026922941207886, 0.4763794243335724, -0.04248959943652153, 0.4259643256664276, 0.19619342684745789, -0.0807136669754982, 0.09487483650445938, -0.4592934250831604, -0.24671512842178345, -0.46573832631111145, -0.0023770462721586227, 0.10370264202356339, 0.10238049179315567, -0.39637845754623413, -0.1290246844291687, 0.576587975025177, -0.006175159942358732, 0.09110009670257568, 0.15938305854797363, 0.4238293766975403, 0.3576365113258362, -0.34947580099105835, 0.31974709033966064, -0.08250335603952408, -0.1941656619310379, -0.2220464050769806, -0.07565626502037048, -0.07172023504972458, 0.03858605772256851, 0.18437862396240234, 0.15212829411029816, 0.08433052897453308, -0.2803881764411926, 0.2226569503545761, 0.016554662957787514, -0.16718193888664246, 0.13555453717708588, -0.05722929537296295, -0.04367460310459137, 0.15505176782608032, 0.0018616076558828354, -0.1402519792318344, -0.3575252592563629, -0.09047725051641464, 0.12239330261945724, -0.40337657928466797, -0.15209007263183594, -0.09415090084075928, 0.10543594509363174, -0.24331077933311462, -0.12392833828926086, -0.2661619782447815, 0.0915052741765976, -0.020671214908361435, -0.27186113595962524, 0.0016049606492742896, 0.06811961531639099, -0.02512987144291401, 0.15263402462005615, -0.1104426309466362, 0.07221062481403351, -0.22201520204544067, -0.08511167764663696, -0.047672662883996964, -0.19930939376354218, 0.014597183093428612, -0.14775070548057556, -0.05308213457465172, -0.1984850913286209, -0.13340634107589722, 0.37478742003440857, 0.491983562707901, -0.7661689519882202, -0.4594871401786804, -0.18668359518051147, -0.11260911077260971, -0.1976250857114792, 0.3637688159942627, 0.009586564265191555, -0.23899801075458527, -0.004876552149653435, 0.20298786461353302, 0.17655213177204132, 0.05613258481025696, -0.0028365349862724543, 0.10449068993330002, -0.08755534142255783, 0.10087818652391434, 0.36124759912490845, 0.031273070722818375, 0.12189918756484985, 0.2049921751022339, 0.3141584098339081, 0.515376091003418, -0.026327848434448242, 0.05470037832856178, 0.11666028201580048, -0.12830255925655365, -0.05098233371973038, 0.1340884268283844, -0.08942701667547226, -0.2862824499607086, 0.19683612883090973, -0.04581146687269211, 0.1968352198600769, -0.18611128628253937, -0.105809286236763, -0.3279557526111603, -0.20283949375152588, -0.20358002185821533, 0.41715994477272034, 0.2255840003490448, 0.17336226999759674, -0.4017638862133026, -0.29235807061195374, -0.11713634431362152, 0.23319551348686218, -0.2803381681442261, 0.08155117183923721, -0.4637902081012726, 0.2914900481700897, 0.2871159017086029, -0.17167752981185913, 0.12106743454933167, 0.07715007662773132, 0.084077388048172, 0.0019275534432381392, 0.009778881445527077, 0.17380018532276154, 0.28095945715904236, 0.5990213751792908, 0.337759405374527, 0.037996165454387665, 0.045611314475536346, 0.02404058538377285, 0.054238658398389816, -0.4972139298915863, 0.11794503033161163, 0.04114975780248642, -0.15384556353092194, 0.2851189970970154, -0.10277997702360153, 0.048560917377471924, -0.11422116309404373, -0.23818260431289673, 0.27145203948020935, -0.10769109427928925, -0.13276883959770203, -0.4032922387123108, -0.028833607211709023, 0.05890451744198799, 0.286118745803833, -0.18721534311771393, 0.09368616342544556, -0.32425200939178467, 0.45223191380500793, -0.0840250551700592, 0.19327081739902496, -0.15960092842578888, -0.06376270949840546, 0.07782953977584839, 0.3451966941356659, -0.12215134501457214, 0.19927115738391876, 0.2226119041442871, -0.050050295889377594, 0.037240318953990936, 0.03174968808889389, -0.25669434666633606, 0.046875059604644775, 0.09448562562465668, 0.2878437936306, 0.18851543962955475, 0.255502313375473, -0.26228731870651245, -0.6866026520729065, -0.11884628236293793, 0.2237987518310547, -0.30358996987342834, -0.2790616750717163, -0.23445092141628265, -0.2591261863708496, 0.15291330218315125, 0.03004521131515503, -0.030542664229869843, -0.15470856428146362, -0.22421765327453613, 0.08321788907051086, 0.295439213514328, -0.11514228582382202, 0.34985196590423584, 0.16385537385940552, 0.3240927457809448, 0.16934993863105774, -0.42216601967811584, -0.19260989129543304, -0.2935275137424469, 0.2593873143196106, 0.13781532645225525, -0.07806434482336044, -0.04429197311401367, -0.005772113800048828, -0.2714616656303406, 0.1675441861152649, -0.1848023533821106, -0.18291789293289185, 0.20731502771377563, -0.17625920474529266, -0.07628154009580612, 0.2625259757041931, -0.016596073284745216, 0.09615109115839005, 0.004754343535751104, 0.16064277291297913, -0.04029502347111702, 0.07663310319185257, 0.020488714799284935, 0.0026328270323574543, 0.0739404708147049, 0.06650448590517044, 0.010586721822619438, -0.29757267236709595, -0.47439274191856384, -0.23515841364860535, -0.0836578831076622, -0.009361512959003448, 0.03002396784722805, -0.27006325125694275, -0.17903107404708862, 0.1950896829366684, -0.2879946529865265, -0.2853316068649292, -0.2451287806034088, 0.3477764129638672, -0.40277376770973206, 0.006344049237668514, -0.3010872006416321, 0.017445696517825127, 0.4644830524921417, -0.036192361265420914, 0.04608718305826187, -0.25032171607017517, 0.1664651483297348, 0.2053733766078949, 0.13434858620166779, -0.04365367069840431, 0.22167222201824188, 0.12064789980649948, -0.12762592732906342, -0.35207366943359375, -0.1499038189649582, 0.118571437895298, 0.3814518451690674, -0.1370859295129776, 0.2331974059343338, -0.2923017740249634, -0.07592309266328812, -0.011313546448946, -0.1785714030265808, 0.07232613861560822, 0.6927390098571777, -0.08955460041761398, 0.2502991855144501, 0.05457315966486931, 0.3214106261730194, 0.04580730199813843, 0.12605701386928558, 0.13866998255252838, 0.31593555212020874, -0.01298101618885994, -0.10488459467887878, -0.15316401422023773, -0.353540301322937, -0.06078400835394859, -0.2527012825012207, -0.007458190433681011, -0.19409897923469543, -0.17183759808540344, 0.37278982996940613, 0.07356245070695877, -0.30188894271850586, -0.21353662014007568, 0.2739998400211334, -0.08881021291017532, -0.1122915968298912, -0.11665958166122437, -0.06077395752072334, 0.1311868131160736, -0.26782721281051636, 0.2211439609527588, -0.07497885078191757, 0.25804078578948975, 0.0883449986577034, 0.04837983101606369, -0.12182127684354782, 0.1678907573223114, 0.5195914506912231, -0.5253376960754395, 0.3091158866882324, 0.035611946135759354, 0.22417834401130676, -0.2812612056732178, -0.0912899300456047, -0.2029215395450592, 0.3267385959625244, -0.6614667773246765, 0.42008039355278015, -0.12330421060323715, -0.20844459533691406, -0.14306911826133728, -0.04136389121413231, -0.16392408311367035, -0.24767638742923737, -0.025046760216355324, -0.057551391422748566, -0.19058457016944885, 0.08866605162620544, 0.24603968858718872, 0.2959960997104645, 0.001070170197635889, -0.1363619863986969, -0.1886138916015625, -0.07337335497140884, 0.20843961834907532, 0.37857624888420105, 0.14571811258792877, 0.22177396714687347, -0.21508502960205078, 0.14956170320510864, 0.30030637979507446, 0.2422013282775879, 0.5430067181587219, -0.1648322343826294, -0.36798304319381714, 0.28190547227859497, -0.13670405745506287, 0.17303740978240967, 0.35264167189598083, 0.049748990684747696, -0.03728717565536499, -0.005054239649325609, -0.04740317910909653, -0.6582498550415039, 0.2699032127857208, 0.04902767017483711, 0.07124348729848862, -0.48108163475990295, -0.00025426261709071696, 0.5303648114204407, -0.10009580850601196, -0.2382293939590454, 0.24873416125774384, 0.5541831851005554, -0.7056730389595032, 0.4254239499568939, -0.10654746741056442, 0.6208104491233826, 0.13221916556358337, 0.08822903782129288, 0.007664381060749292, 0.05955592170357704, 0.20834530889987946, -0.3115140199661255, 0.10124777257442474, -0.14093583822250366, -0.385989785194397, -0.043146248906850815, 0.016931114718317986, 0.27061882615089417, 0.6659579277038574, 0.1233806386590004, 0.2700669765472412, -0.013300729915499687, 0.3948591947555542, -0.035953741520643234, 0.306056946516037, -0.28932303190231323, -0.2756369411945343, -0.36925533413887024, 0.05700574442744255, 0.00043092414853163064, -0.15602616965770721, -0.028291193768382072, 0.0033872281201183796, -0.0566694475710392, -0.09085077047348022, 0.005168392788618803, -0.09429740160703659, -0.0663340836763382, 0.010093925520777702, -0.3237111270427704, -0.2080375701189041, 0.2216518074274063, 0.06728286296129227, 0.20691558718681335, 0.07857118546962738, -0.26189640164375305, 0.5456233024597168, -0.07212837785482407, 0.241786390542984, -0.15590228140354156, -0.1545127034187317, 0.0719815045595169, 0.08339763432741165, -0.1540594846010208, -0.31370246410369873, 0.1554107815027237, -0.21204529702663422, 0.2438555806875229, -0.2159491330385208, 0.1400582194328308, -0.45939621329307556, -0.09502718597650528, -0.24736115336418152, 0.08651785552501678, -0.2273140251636505, 0.10209249705076218, -0.1806446760892868, -0.10292965173721313, 0.03785453736782074, 0.20660096406936646, -0.08548673987388611, -0.05394158884882927, 0.41748666763305664, 0.04906424880027771, -0.15276315808296204, 0.1281139999628067, -0.23691368103027344, -0.16593647003173828, -0.216342955827713, 0.08441342413425446, 0.5369913578033447, -0.19468700885772705, 0.08160968869924545, 0.19675840437412262, -0.5545848608016968, -0.07043619453907013, -0.068320132791996, -0.099357470870018, 0.32273006439208984, -0.08601999282836914, -0.27688249945640564, -0.14023707807064056, 0.2482847422361374, 0.012332557700574398, 0.3061879277229309, 0.244900181889534, -0.28252699971199036, -0.23332731425762177, -0.14954118430614471, -0.2900533080101013, -0.017262812703847885, -0.21412314474582672, 0.07689670473337173, -0.43644222617149353, 0.2507978081703186, 0.19228090345859528, -0.24239274859428406, 0.2374180257320404, 0.20581042766571045, -0.0242008063942194, -0.20728172361850739, -0.2224208563566208, 0.13834238052368164, -0.00005591105582425371, 0.32016560435295105, -0.000523851253092289, -0.2124788463115692, -0.13608898222446442, -0.22771328687667847, 0.49703216552734375, 0.2613360285758972, 0.11094173789024353, 0.24463947117328644, 0.4192648231983185, -0.024344302713871002, -0.11000377684831619, 0.05973458290100098, 0.14495621621608734, 0.3896515667438507, 0.04136276617646217, 0.1183599978685379, -0.12857528030872345, 0.11762736737728119, 0.31999748945236206, 0.2068498134613037, 0.4406236410140991, -0.010420968756079674, -0.03373340144753456, -0.04414399340748787, -0.29167690873146057, 0.1688309907913208, 0.30116701126098633, 0.41428738832473755, -0.24545526504516602, -0.37500542402267456, 0.07374729961156845, 0.17563921213150024, -0.31953686475753784, -0.22798773646354675, 0.1269318014383316, -0.3851195275783539, 0.2610378861427307, 0.16274160146713257, 0.41687408089637756, 0.10968469828367233, -0.16714714467525482, -0.08884142339229584, 0.5752971172332764, -0.056852225214242935, 0.027776410803198814, 0.21925628185272217, -0.008094034157693386, 0.21443207561969757, 0.25015440583229065, 0.09290110319852829, 0.03425437957048416, 0.7068631649017334, 0.0028452954720705748, 0.6155632138252258, 0.1008104756474495, 0.17748324573040009, 0.18229402601718903, 0.008715401403605938, -0.0062595512717962265, 0.09637829661369324, -0.19297462701797485, 0.13177116215229034, -0.03808486834168434, 0.04355117306113243, -0.011789863929152489, 0.14954127371311188, -0.22609713673591614, -0.3473091423511505, -0.11749454587697983, -0.34124982357025146, -0.24170421063899994, -0.16548047959804535, -0.23256495594978333, -0.06723909825086594, -0.22257781028747559, 0.023618454113602638, 0.12483382225036621, -0.13294804096221924, 0.37943586707115173, 0.09799432754516602, 0.09825171530246735, 0.10113800317049026, 0.05963649973273277, -0.19455286860466003, 0.41067203879356384, 0.1895749568939209, 0.06582697480916977, 0.38303080201148987, -0.011244948953390121, 0.04918687418103218, -0.42990007996559143, 0.13621056079864502, -0.2892814576625824, -0.016774557530879974, -0.1880299150943756, -0.1125689223408699, 0.122293621301651, 0.2100646048784256, 0.11811867356300354, 0.3520888686180115, 0.2230323702096939, -0.10865390300750732, -0.21752837300300598, 0.38186874985694885, -0.2199883908033371, 0.04255186766386032, -0.020562946796417236, 0.14458122849464417, 0.054235268384218216, -0.18324865400791168, -0.10750014334917068, -0.08353839814662933, 0.04855803772807121, 0.46238064765930176, -0.1310410052537918, 0.15593791007995605, 0.11706846207380295, 0.07579303532838821, 0.06451160460710526, 0.5958800315856934, -0.21936023235321045, -0.050343193113803864, -0.09980645775794983, -0.2734154462814331, -0.39020994305610657, 0.3889179825782776, 0.4662935137748718, 0.021311504766345024, 0.06925398111343384, -0.37476474046707153, 0.48386645317077637, 0.00026031164452433586, -0.08103832602500916, -0.076909638941288, 0.11455889791250229, 0.0048002442345023155, -0.2385616898536682, -0.12165732681751251, 0.2573554515838623, 0.07868967205286026, 0.028535788878798485, -0.2599979639053345, 0.07825880497694016, 0.3395271897315979, -0.0906045138835907, -0.3684837818145752, 0.180477112531662, 0.17106325924396515, -0.012267323210835457, 0.3550383746623993, -0.06792884320020676, 0.4041379392147064, -0.4490772783756256, 0.1541680097579956, -0.18445855379104614, -0.37516140937805176, -0.3108768165111542, -0.0016819011652842164, 0.029065240174531937, 0.018407661467790604, -0.024372708052396774, 0.05258369818329811, 0.0380578450858593, -0.05491557717323303, -0.20967578887939453, 0.45792829990386963, -0.24472643435001373, 0.1525021195411682, -0.11663224548101425, 0.11588117480278015, -0.10584507137537003, -0.07037387043237686, 0.1126587763428688, 0.04598988965153694, 0.13738109171390533, -0.5185456871986389, 0.46908843517303467, 0.08361382782459259, -0.566241443157196, -0.011988203041255474, 0.0958516001701355, -0.16913911700248718, 0.08962566405534744, -0.25168684124946594, 0.29433056712150574, 0.18864406645298004, 0.09153324365615845, -0.031663358211517334, 0.29615235328674316, 0.23412075638771057, 0.09620591998100281, -0.07205401360988617, -0.11169716715812683, 0.3201122581958771, -0.21375387907028198, -0.5561701059341431, -0.36923664808273315 ]
https://github.com/huggingface/datasets/issues/5419
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
Hi! Thanks for pointing out this inconsistency. Changing the default value at this point is probably not worth it, considering we've started discussing the state of the task API internally - we will most likely deprecate the current one and replace it with a more robust solution that relies on the `train_eval_index` field stored in the YAML section of the dataset cards.
### Describe the bug When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem. It is required to rename the column accordingly to the expected name : `label` or `label_ids` ### Steps to reproduce the bug ```python from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')) print(ds_prepared) tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased") ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True) print(ds_tokenized) data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf") tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator) print(tf_data) ``` ### Expected behavior Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator. To correct this, we have to rename the column: ```python ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label') ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.6 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 - `transformers` version: 4.26.0.dev0 - Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.11.1 - PyTorch version (GPU?): not installed (NA) - Tensorflow version (GPU?): 2.11.0 (True) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
62
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
[ -0.23238693177700043, 0.023027248680591583, -0.12125081568956375, 0.13765475153923035, 0.3713729977607727, 0.06785734742879868, 0.6863289475440979, 0.08610206842422485, -0.14527387917041779, 0.21960599720478058, -0.20435595512390137, 0.40607941150665283, -0.03532999008893967, 0.0935828685760498, -0.163448765873909, -0.23460334539413452, -0.09010467678308487, 0.29689672589302063, -0.12303397059440613, -0.15829935669898987, -0.1682080626487732, -0.007180567365139723, -0.031182393431663513, 0.08557476103305817, -0.619655966758728, -0.09720838814973831, 0.11023280024528503, -0.21564273536205292, -0.19314908981323242, -0.3983169496059418, 0.3455711901187897, 0.386567622423172, 0.08100631088018417, 0.21336376667022705, -0.00010182186815654859, 0.1333341896533966, 0.09753412753343582, 0.055235642939805984, -0.3068345785140991, 0.0526888333261013, -0.16113314032554626, 0.10461746156215668, 0.11063442379236221, -0.2704719007015228, -0.2641163170337677, 0.029848411679267883, 0.09142808616161346, 0.2783423662185669, 0.02253042906522751, 0.16389507055282593, 0.2961920499801636, 0.18453703820705414, 0.11989876627922058, -0.030872348695993423, 0.3436032831668854, -0.016887731850147247, -0.14197681844234467, 0.09295262396335602, 0.012008882127702236, 0.28499695658683777, -0.13024312257766724, 0.5187792778015137, 0.07033300399780273, 0.0272365789860487, 0.2745630443096161, 0.13082219660282135, 0.010059786029160023, -0.2632133960723877, 0.2563945949077606, 0.14363405108451843, 0.815477728843689, -0.37212780117988586, -0.4449939429759979, -0.08855899423360825, -0.03889361768960953, -0.24743279814720154, 0.1643708050251007, -0.12764941155910492, 0.23699304461479187, 0.163588747382164, -0.013201067224144936, 0.07445096969604492, -0.14516912400722504, -0.057612720876932144, -0.06961605697870255, 0.7801772952079773, -0.14494074881076813, 0.008306480012834072, -0.012242897413671017, -0.20052507519721985, 0.4615210294723511, -0.05013253167271614, 0.10614220052957535, 0.18571984767913818, -0.1823844164609909, -0.4074257016181946, 0.04555010795593262, -0.24073342978954315, -0.07394257187843323, 0.02121179923415184, -0.2756149470806122, 0.016371477395296097, 0.08690755814313889, 0.1051083505153656, 0.09047744423151016, 0.26936957240104675, 0.2549479901790619, 0.6997146010398865, 0.23517541587352753, -0.13822714984416962, -0.22206901013851166, -0.0775509923696518, -0.2704007625579834, -0.05343098193407059, 0.36570486426353455, 0.16264507174491882, -0.020344890654087067, -0.10732385516166687, -0.09715218096971512, -0.13119210302829742, 0.17455404996871948, 0.015177764929831028, 0.20676110684871674, 0.3000534176826477, 0.17380619049072266, 0.41324836015701294, -0.1341172307729721, 0.032207977026700974, -0.00883159227669239, 0.022049052640795708, -0.285524845123291, 0.21595165133476257, 0.06651484221220016, -0.1568506360054016, 0.14362378418445587, 0.16123488545417786, 0.2697647511959076, -0.09206636250019073, -0.18433088064193726, 0.02124915085732937, -0.14367447793483734, -0.07678467035293579, -0.04413074254989624, 0.2659817337989807, -0.22531487047672272, 0.1902131289243698, 0.0922195240855217, -0.2797580063343048, -0.22342754900455475, -0.03521094098687172, -0.07968417555093765, -0.1049547865986824, -0.013456749729812145, 0.30916690826416016, 0.23902009427547455, -0.2011038362979889, 0.09529910981655121, 0.20928707718849182, 0.34475943446159363, -0.0036885803565382957, 0.13750305771827698, -0.10653697699308395, 0.11389043927192688, -0.02581854723393917, -0.18412305414676666, 0.053201090544462204, -0.3630341589450836, -0.3654461205005646, 0.2734327018260956, -0.2119292914867401, 0.1402437537908554, 0.05517711862921715, -0.09964510798454285, 0.14479289948940277, 0.24931877851486206, 0.04745180532336235, 0.3491642475128174, -0.43978869915008545, -0.33192339539527893, -0.09381996840238571, 0.19351772964000702, -0.2262837290763855, 0.12079949676990509, 0.11066251993179321, 0.0942414179444313, 0.08995092660188675, 0.022465994581580162, 0.0702255442738533, 0.034364260733127594, 0.22546488046646118, -0.07664237916469574, -0.03108072467148304, 0.09320276230573654, 0.3410659432411194, 0.14343231916427612, 0.20140066742897034, -0.19144119322299957, 0.1361856907606125, -0.22041204571723938, -0.21947191655635834, 0.10394130647182465, 0.1471431404352188, -0.0762907862663269, 0.13784316182136536, -0.0670582726597786, -0.1409464031457901, -0.1668817549943924, -0.05193859711289406, 0.0029869440477341413, 0.29289764165878296, -0.3006700873374939, -0.3786866366863251, -0.22139453887939453, 0.0578642413020134, -0.14278365671634674, -0.21129314601421356, 0.2706228792667389, 0.05956628546118736, 0.08496769517660141, -0.21295228600502014, -0.2900713086128235, 0.10362901538610458, 0.051324304193258286, 0.26709914207458496, -0.014031299389898777, -0.14493399858474731, -0.07662582397460938, 0.04867744818329811, -0.12301082909107208, 0.022431857883930206, 0.2717111110687256, 0.08671080321073532, -0.04042423143982887, 0.328879177570343, -0.07934083789587021, -0.1959194839000702, -0.11254814267158508, 0.19261714816093445, 0.1729382872581482, -0.013096293434500694, -0.09698489308357239, -0.12955902516841888, 0.1888706535100937, 0.13295845687389374, -0.3556755483150482, 0.22828026115894318, 0.0019647767767310143, 0.011126280762255192, 0.15921156108379364, -0.04467348754405975, 0.4031064808368683, 0.014273427426815033, -0.08405421674251556, -0.07907730340957642, -0.2440185695886612, -0.13093441724777222, 0.3495064079761505, 0.12553483247756958, -0.19092664122581482, 0.40266475081443787, 0.4394877552986145, -0.08613251149654388, 0.2989208698272705, -0.026903484016656876, -0.38086897134780884, 0.11697627604007721, 0.056548330932855606, 0.3578607439994812, 0.09655404835939407, 0.19948671758174896, 0.025232333689928055, -0.1043190136551857, -0.34723007678985596, -0.09435342252254486, 0.16232162714004517, -0.015064381062984467, 0.14015403389930725, 0.07030516117811203, 0.04725777730345726, -0.10134629905223846, -0.3206102252006531, -0.20631836354732513, -0.05311888828873634, 0.13637998700141907, -0.28373730182647705, 0.061301104724407196, -0.13556815683841705, -0.23141637444496155, -0.05007936805486679, 0.016417136415839195, 0.060478534549474716, -0.2823193073272705, 0.19253015518188477, 0.1690867841243744, -0.23626071214675903, 0.292942613363266, 0.10114746540784836, 0.12373129278421402, 0.16477897763252258, 0.08462786674499512, -0.023777898401021957, -0.3701488971710205, -0.017195142805576324, 0.18392153084278107, -0.25466296076774597, -0.07764597237110138, 0.015616347081959248, -0.2107066959142685, 0.18872247636318207, 0.12174881249666214, -0.36131739616394043, 0.21911464631557465, -0.00411583436653018, -0.09737350791692734, 0.10303618758916855, 0.06733199954032898, -0.102302186191082, -0.29152974486351013, 0.11753326654434204, -0.18504564464092255, 0.02782101184129715, -0.10191081464290619, 0.0849987342953682, -0.2772027850151062, -0.14314940571784973, -0.5051857233047485, -0.46707582473754883, -0.23940692842006683, 0.02537100948393345, -0.014009959995746613, 0.1186537891626358, 0.5046694874763489, -0.1354738026857376, 0.015027770772576332, 0.29009073972702026, 0.10579460859298706, -0.28489431738853455, -0.09802896529436111, 0.37381285429000854, -0.20943059027194977, -0.07578946650028229, -0.2712707817554474, -0.2730230689048767, 0.05755074694752693, -0.08081615716218948, 0.16483508050441742, 0.04967190697789192, -0.2756113111972809, -0.03882109001278877, 0.18721669912338257, 0.2978205680847168, 0.3752846121788025, 0.3171590268611908, -0.10010495036840439, -0.16625933349132538, -0.1957419365644455, 0.07958576828241348, -0.02466798759996891, -0.053766898810863495, -0.3646925091743469, 0.22623321413993835, -0.26760971546173096, 0.324401319026947, -0.23198848962783813, -0.2084047943353653, 0.07745448499917984, -0.07831424474716187, 0.1972704827785492, 0.028485646471381187, -0.1772693693637848, -0.09189756959676743, 0.09729090332984924, 0.0010886137606576085, 0.2070843130350113, -0.06526707112789154, -0.35466405749320984, 0.06459026783704758, 0.17864692211151123, -0.17046047747135162, -0.2076559066772461, -0.049292344599962234, 0.18383488059043884, 0.11446867883205414, 0.17458754777908325, 0.12708522379398346, -0.31285813450813293, 0.06828729063272476, -0.16621366143226624, 0.0975056141614914, -0.22846698760986328, -0.04692563787102699, -0.582123875617981, -0.02069167234003544, -0.35970059037208557, -0.05525076389312744, 0.23878370225429535, 0.09691549092531204, 0.07597698271274567, -0.07172172516584396, -0.0998445376753807, 0.08250680565834045, 0.48442044854164124, -0.5675110816955566, 0.12516425549983978, 0.26597321033477783, 0.03621021285653114, -0.03954440727829933, -0.09800899028778076, -0.33509770035743713, 0.04265395924448967, -0.07922288030385971, 0.18762874603271484, -0.3042137324810028, -0.033269017934799194, 0.3697907030582428, -0.20651556551456451, -0.06436286121606827, 0.01311268750578165, -0.08916620910167694, -0.13521285355091095, -0.09724868088960648, 0.04740522801876068, 0.27958211302757263, 0.20416536927223206, -0.15312981605529785, 0.14973533153533936, -0.14603562653064728, 0.0965292751789093, 0.024225696921348572, 0.4246114194393158, 0.036467790603637695, 0.11687357723712921, -0.08288780599832535, 0.07837080210447311, 0.05500836297869682, -0.12038194388151169, 0.2919105291366577, -0.10942460596561432, -0.6766223907470703, 0.2436930388212204, -0.14998850226402283, 0.09471282362937927, -0.018219906836748123, 0.09306751191616058, 0.07877608388662338, -0.24765625596046448, -0.07635200023651123, 0.10858818143606186, 0.2576789855957031, -0.016666686162352562, 0.347919762134552, -0.3929029703140259, -0.39222225546836853, 0.4393368065357208, -0.08380208909511566, -0.11938876658678055, -0.15352658927440643, -0.03001096285879612, -0.45406612753868103, 0.26543718576431274, 0.022781221196055412, 0.7061102390289307, 0.06439103186130524, 0.016025898978114128, -0.15769952535629272, -0.21417991816997528, 0.7159817218780518, -0.39758574962615967, 0.3789982795715332, -0.4174797534942627, -0.3309074640274048, -0.05409722030162811, 0.0348544679582119, -0.0420139878988266, 0.497226744890213, -0.30704474449157715, 0.2811996638774872, -0.021588807925581932, 0.1306532621383667, -0.010900260880589485, 0.04464994743466377, 0.03365376591682434, -0.40117037296295166, -0.21557247638702393, 0.24430491030216217, -0.124233677983284, 0.20872096717357635, -0.18814511597156525, 0.133148193359375, 0.037777338176965714, -0.12721511721611023, 0.0027470269706100225, 0.031847186386585236, -0.17307306826114655, 0.39662984013557434, 0.21674615144729614, 0.13104307651519775, -0.09374108910560608, 0.01511667761951685, 0.6647681593894958, 0.061716824769973755, 0.12289649248123169, 0.27387580275535583, -0.06950700283050537, 0.31123441457748413, 0.02184099517762661, 0.309552937746048, 0.43371090292930603, 0.05823494493961334, -0.10547276586294174, -0.2616083025932312, 0.025110118091106415, -0.32236403226852417, 0.03747076541185379, -0.3964276909828186, 0.0916983112692833, -0.3511944115161896, 0.3372547924518585, 0.10947076976299286, -0.1306077092885971, -0.22524608671665192, 0.21551722288131714, -0.18867409229278564, -0.007564355153590441, 0.012322983704507351, 0.15228691697120667, -0.1144578605890274, -0.08439484983682632, 0.3721334934234619, 0.17791689932346344, 0.22898460924625397, 0.17449882626533508, -0.09914734214544296, -0.3049570620059967, -0.24817131459712982, -0.020136332139372826, 0.07667715847492218, -0.5361904501914978, 0.14948004484176636, -0.1529337614774704, -0.5848526358604431, -0.050281934440135956, 0.2688123881816864, 0.10613348335027695, 0.3858700692653656, -0.16413705050945282, -0.09202401340007782, -0.5317977070808411, 0.16573931276798248, 0.03843827173113823, 0.2797611355781555, 0.13890138268470764, 0.31357425451278687, 0.0022171519231051207, -0.020064260810613632, -0.4158649742603302, -0.27984294295310974, -0.2463490515947342, 0.10234358161687851, 0.21528808772563934, -0.22092695534229279, 0.06463973969221115, -0.10180730372667313, 0.25841355323791504, 0.16017211973667145, 0.029252124950289726, -0.3334571123123169, -0.30582666397094727, 0.016247566789388657, 0.10679678618907928, 0.08458525687456131, -0.20960892736911774, 0.12757185101509094, -0.0948265865445137, -0.11000192910432816, 0.34107837080955505, -0.10399326682090759, 0.07580157369375229, 0.4486641585826874, -0.37602683901786804, 0.2733882665634155, -0.11987359076738358, -0.048695988953113556, 0.1777704358100891, -0.1523885577917099, 0.1314609795808792, 0.04947403818368912, -0.09590145200490952, 0.018038900569081306, -0.10853205621242523, 0.12894506752490997, 0.1177157312631607, -0.11346729844808578, 0.16828033328056335, -0.2736872732639313, 0.1859758198261261, 0.21186202764511108, -0.043451257050037384, 0.06514662504196167, -0.013056540861725807, -0.11080467700958252, 0.1633855551481247, 0.3627083897590637, -0.31782904267311096, -0.1732865571975708, -0.07861866801977158, -0.129111647605896, 0.19652783870697021, 0.21111713349819183, 0.03038163110613823, 0.3293274939060211, 0.28335943818092346, 0.14671824872493744, 0.6741534471511841, -0.18713341653347015, 0.1250576674938202, 0.459347128868103, -0.14296557009220123, 0.1405184268951416, 0.6524130702018738, 0.3103501796722412, 0.1588628739118576, 0.22879543900489807, 0.17609864473342896, 0.14333899319171906, -0.15137998759746552, 0.04920429363846779, 0.18456973135471344, 0.1338595598936081, -0.06425146013498306, 0.1071823313832283, -0.08223193883895874, 0.14420437812805176, 0.04249341040849686, -0.23483602702617645, -0.37984785437583923, -0.24116255342960358, -0.07744940370321274, 0.11852248758077621, -0.3206639289855957, -0.4818485379219055, 0.043733224272727966, -0.11202351003885269, -0.07651564478874207, -0.09814522415399551, -0.1924443542957306, -0.0049635274335742, 0.06969311088323593, -0.38064414262771606, -0.017661741003394127, -0.39696574211120605, 0.06781794130802155, 0.10079076886177063, 0.39134979248046875, -0.011898437514901161, 0.1653970181941986, 0.03783264756202698, 0.020467940717935562, 0.032302845269441605, 0.38604387640953064, 0.04169193655252457, 0.052692852914333344, 0.10491891950368881, -0.17242661118507385, -0.202318012714386, -0.26575055718421936, 0.07992015779018402, -0.07487022131681442, 0.10046321153640747, -0.07391410320997238, 0.07398028671741486, 0.23280245065689087, -0.21003146469593048, 0.1843080222606659, 0.0294840969145298, 0.2409491240978241, 0.07889369875192642, 0.031883373856544495, 0.1928265243768692, -0.2221251279115677, 0.16466303169727325, 0.03174993768334389, -0.30954381823539734, -0.13841983675956726, 0.15420427918434143, -0.02979971095919609, 0.27487415075302124, -0.22234667837619781, 0.16328302025794983, 0.23156556487083435, 0.4740362763404846, 0.09141270816326141, -0.34760597348213196, 0.08648034930229187, 0.19643628597259521, -0.2326541543006897, -0.2045855075120926, 0.1610550582408905, -0.4637678563594818, -0.019781555980443954, 0.08745643496513367, 0.22701483964920044, 0.026461491361260414, -0.09050694108009338, -0.10004640370607376, 0.026104141026735306, -0.20017185807228088, -0.0793035626411438, -0.03623252734541893, 0.019394222646951675, 0.13599267601966858, 0.1622447669506073, -0.267759770154953, -0.048446815460920334, 0.3059135675430298, 0.17257753014564514, -0.19694828987121582, 0.3461127281188965, 0.11937670409679413, -0.40135136246681213, 0.04710067808628082, -0.0019489885307848454, 0.5104163885116577, -0.23391605913639069, 0.22741323709487915, 0.007980217225849628, -0.4487672448158264, -0.2417091429233551, 0.09451822936534882, 0.16850914061069489, 0.38024163246154785, 0.16989527642726898, 0.07462296634912491, -0.0553150549530983, -0.09455644339323044, 0.15668492019176483, 0.1406920850276947, -0.1245233565568924, 0.19681544601917267, -0.07363323122262955, -0.07799087464809418, 0.04249313846230507, 0.1462078094482422, 0.015781929716467857, 0.008054214529693127, -0.07936081290245056, -0.6164310574531555, 0.19685782492160797, -0.26573047041893005, -0.5091540217399597, 0.014838127419352531, 0.02867421880364418, 0.44756388664245605, 0.049800217151641846, -0.35251742601394653, 0.27998995780944824, 0.059372976422309875, -0.21571436524391174, -0.5388692617416382, 0.3218468427658081, 0.2531697154045105, 0.11642086505889893, -0.15402637422084808, 0.2215195596218109, 0.006424666382372379, 0.002853390760719776, -0.38283205032348633, -0.24477562308311462 ]
https://github.com/huggingface/datasets/issues/5419
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
The task templates API has been deprecated (will be removed in version 3.0), so I'm closing this issue.
### Describe the bug When preparing a dataset for a task using `datasets.TextClassification`, the output feature is named `labels`. When preparing the trainer using the `transformers.DataCollator` the default column name is `label` if binary or `label_ids` if multi-class problem. It is required to rename the column accordingly to the expected name : `label` or `label_ids` ### Steps to reproduce the bug ```python from datasets import TextClassification, AutoTokenized, DataCollatorWithPadding ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')) print(ds_prepared) tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased") ds_tokenized = ds_prepared.map(lambda x: tokenizer(x['text'], truncation=True), batched=True) print(ds_tokenized) data_collator = DataCollatorWithPadding(tokenizer=tokenizer, return_tensors="tf") tf_data = model.prepare_tf_dataset(ds_tokenized, shuffle=True, batch_size=16, collate_fn=data_collator) print(tf_data) ``` ### Expected behavior Without renaming the the column, the target column is not in the final tf_data since it is not in the column name expected by the data_collator. To correct this, we have to rename the column: ```python ds_prepared = my_dataset.prepare_for_task(TextClassification(text_column='TEXT', label_column='MY_LABEL_COLUMN_1_OR_0')).rename_column('labels', 'label') ``` ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.6 - PyArrow version: 10.0.1 - Pandas version: 1.5.2 - `transformers` version: 4.26.0.dev0 - Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.6 - Huggingface_hub version: 0.11.1 - PyTorch version (GPU?): not installed (NA) - Tensorflow version (GPU?): 2.11.0 (True) - Flax version (CPU?/GPU?/TPU?): not installed (NA) - Jax version: not installed - JaxLib version: not installed - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
18
label_column='labels' in datasets.TextClassification and 'label' or 'label_ids' in transformers.DataColator
[ -0.23238693177700043, 0.023027248680591583, -0.12125081568956375, 0.13765475153923035, 0.3713729977607727, 0.06785734742879868, 0.6863289475440979, 0.08610206842422485, -0.14527387917041779, 0.21960599720478058, -0.20435595512390137, 0.40607941150665283, -0.03532999008893967, 0.0935828685760498, -0.163448765873909, -0.23460334539413452, -0.09010467678308487, 0.29689672589302063, -0.12303397059440613, -0.15829935669898987, -0.1682080626487732, -0.007180567365139723, -0.031182393431663513, 0.08557476103305817, -0.619655966758728, -0.09720838814973831, 0.11023280024528503, -0.21564273536205292, -0.19314908981323242, -0.3983169496059418, 0.3455711901187897, 0.386567622423172, 0.08100631088018417, 0.21336376667022705, -0.00010182186815654859, 0.1333341896533966, 0.09753412753343582, 0.055235642939805984, -0.3068345785140991, 0.0526888333261013, -0.16113314032554626, 0.10461746156215668, 0.11063442379236221, -0.2704719007015228, -0.2641163170337677, 0.029848411679267883, 0.09142808616161346, 0.2783423662185669, 0.02253042906522751, 0.16389507055282593, 0.2961920499801636, 0.18453703820705414, 0.11989876627922058, -0.030872348695993423, 0.3436032831668854, -0.016887731850147247, -0.14197681844234467, 0.09295262396335602, 0.012008882127702236, 0.28499695658683777, -0.13024312257766724, 0.5187792778015137, 0.07033300399780273, 0.0272365789860487, 0.2745630443096161, 0.13082219660282135, 0.010059786029160023, -0.2632133960723877, 0.2563945949077606, 0.14363405108451843, 0.815477728843689, -0.37212780117988586, -0.4449939429759979, -0.08855899423360825, -0.03889361768960953, -0.24743279814720154, 0.1643708050251007, -0.12764941155910492, 0.23699304461479187, 0.163588747382164, -0.013201067224144936, 0.07445096969604492, -0.14516912400722504, -0.057612720876932144, -0.06961605697870255, 0.7801772952079773, -0.14494074881076813, 0.008306480012834072, -0.012242897413671017, -0.20052507519721985, 0.4615210294723511, -0.05013253167271614, 0.10614220052957535, 0.18571984767913818, -0.1823844164609909, -0.4074257016181946, 0.04555010795593262, -0.24073342978954315, -0.07394257187843323, 0.02121179923415184, -0.2756149470806122, 0.016371477395296097, 0.08690755814313889, 0.1051083505153656, 0.09047744423151016, 0.26936957240104675, 0.2549479901790619, 0.6997146010398865, 0.23517541587352753, -0.13822714984416962, -0.22206901013851166, -0.0775509923696518, -0.2704007625579834, -0.05343098193407059, 0.36570486426353455, 0.16264507174491882, -0.020344890654087067, -0.10732385516166687, -0.09715218096971512, -0.13119210302829742, 0.17455404996871948, 0.015177764929831028, 0.20676110684871674, 0.3000534176826477, 0.17380619049072266, 0.41324836015701294, -0.1341172307729721, 0.032207977026700974, -0.00883159227669239, 0.022049052640795708, -0.285524845123291, 0.21595165133476257, 0.06651484221220016, -0.1568506360054016, 0.14362378418445587, 0.16123488545417786, 0.2697647511959076, -0.09206636250019073, -0.18433088064193726, 0.02124915085732937, -0.14367447793483734, -0.07678467035293579, -0.04413074254989624, 0.2659817337989807, -0.22531487047672272, 0.1902131289243698, 0.0922195240855217, -0.2797580063343048, -0.22342754900455475, -0.03521094098687172, -0.07968417555093765, -0.1049547865986824, -0.013456749729812145, 0.30916690826416016, 0.23902009427547455, -0.2011038362979889, 0.09529910981655121, 0.20928707718849182, 0.34475943446159363, -0.0036885803565382957, 0.13750305771827698, -0.10653697699308395, 0.11389043927192688, -0.02581854723393917, -0.18412305414676666, 0.053201090544462204, -0.3630341589450836, -0.3654461205005646, 0.2734327018260956, -0.2119292914867401, 0.1402437537908554, 0.05517711862921715, -0.09964510798454285, 0.14479289948940277, 0.24931877851486206, 0.04745180532336235, 0.3491642475128174, -0.43978869915008545, -0.33192339539527893, -0.09381996840238571, 0.19351772964000702, -0.2262837290763855, 0.12079949676990509, 0.11066251993179321, 0.0942414179444313, 0.08995092660188675, 0.022465994581580162, 0.0702255442738533, 0.034364260733127594, 0.22546488046646118, -0.07664237916469574, -0.03108072467148304, 0.09320276230573654, 0.3410659432411194, 0.14343231916427612, 0.20140066742897034, -0.19144119322299957, 0.1361856907606125, -0.22041204571723938, -0.21947191655635834, 0.10394130647182465, 0.1471431404352188, -0.0762907862663269, 0.13784316182136536, -0.0670582726597786, -0.1409464031457901, -0.1668817549943924, -0.05193859711289406, 0.0029869440477341413, 0.29289764165878296, -0.3006700873374939, -0.3786866366863251, -0.22139453887939453, 0.0578642413020134, -0.14278365671634674, -0.21129314601421356, 0.2706228792667389, 0.05956628546118736, 0.08496769517660141, -0.21295228600502014, -0.2900713086128235, 0.10362901538610458, 0.051324304193258286, 0.26709914207458496, -0.014031299389898777, -0.14493399858474731, -0.07662582397460938, 0.04867744818329811, -0.12301082909107208, 0.022431857883930206, 0.2717111110687256, 0.08671080321073532, -0.04042423143982887, 0.328879177570343, -0.07934083789587021, -0.1959194839000702, -0.11254814267158508, 0.19261714816093445, 0.1729382872581482, -0.013096293434500694, -0.09698489308357239, -0.12955902516841888, 0.1888706535100937, 0.13295845687389374, -0.3556755483150482, 0.22828026115894318, 0.0019647767767310143, 0.011126280762255192, 0.15921156108379364, -0.04467348754405975, 0.4031064808368683, 0.014273427426815033, -0.08405421674251556, -0.07907730340957642, -0.2440185695886612, -0.13093441724777222, 0.3495064079761505, 0.12553483247756958, -0.19092664122581482, 0.40266475081443787, 0.4394877552986145, -0.08613251149654388, 0.2989208698272705, -0.026903484016656876, -0.38086897134780884, 0.11697627604007721, 0.056548330932855606, 0.3578607439994812, 0.09655404835939407, 0.19948671758174896, 0.025232333689928055, -0.1043190136551857, -0.34723007678985596, -0.09435342252254486, 0.16232162714004517, -0.015064381062984467, 0.14015403389930725, 0.07030516117811203, 0.04725777730345726, -0.10134629905223846, -0.3206102252006531, -0.20631836354732513, -0.05311888828873634, 0.13637998700141907, -0.28373730182647705, 0.061301104724407196, -0.13556815683841705, -0.23141637444496155, -0.05007936805486679, 0.016417136415839195, 0.060478534549474716, -0.2823193073272705, 0.19253015518188477, 0.1690867841243744, -0.23626071214675903, 0.292942613363266, 0.10114746540784836, 0.12373129278421402, 0.16477897763252258, 0.08462786674499512, -0.023777898401021957, -0.3701488971710205, -0.017195142805576324, 0.18392153084278107, -0.25466296076774597, -0.07764597237110138, 0.015616347081959248, -0.2107066959142685, 0.18872247636318207, 0.12174881249666214, -0.36131739616394043, 0.21911464631557465, -0.00411583436653018, -0.09737350791692734, 0.10303618758916855, 0.06733199954032898, -0.102302186191082, -0.29152974486351013, 0.11753326654434204, -0.18504564464092255, 0.02782101184129715, -0.10191081464290619, 0.0849987342953682, -0.2772027850151062, -0.14314940571784973, -0.5051857233047485, -0.46707582473754883, -0.23940692842006683, 0.02537100948393345, -0.014009959995746613, 0.1186537891626358, 0.5046694874763489, -0.1354738026857376, 0.015027770772576332, 0.29009073972702026, 0.10579460859298706, -0.28489431738853455, -0.09802896529436111, 0.37381285429000854, -0.20943059027194977, -0.07578946650028229, -0.2712707817554474, -0.2730230689048767, 0.05755074694752693, -0.08081615716218948, 0.16483508050441742, 0.04967190697789192, -0.2756113111972809, -0.03882109001278877, 0.18721669912338257, 0.2978205680847168, 0.3752846121788025, 0.3171590268611908, -0.10010495036840439, -0.16625933349132538, -0.1957419365644455, 0.07958576828241348, -0.02466798759996891, -0.053766898810863495, -0.3646925091743469, 0.22623321413993835, -0.26760971546173096, 0.324401319026947, -0.23198848962783813, -0.2084047943353653, 0.07745448499917984, -0.07831424474716187, 0.1972704827785492, 0.028485646471381187, -0.1772693693637848, -0.09189756959676743, 0.09729090332984924, 0.0010886137606576085, 0.2070843130350113, -0.06526707112789154, -0.35466405749320984, 0.06459026783704758, 0.17864692211151123, -0.17046047747135162, -0.2076559066772461, -0.049292344599962234, 0.18383488059043884, 0.11446867883205414, 0.17458754777908325, 0.12708522379398346, -0.31285813450813293, 0.06828729063272476, -0.16621366143226624, 0.0975056141614914, -0.22846698760986328, -0.04692563787102699, -0.582123875617981, -0.02069167234003544, -0.35970059037208557, -0.05525076389312744, 0.23878370225429535, 0.09691549092531204, 0.07597698271274567, -0.07172172516584396, -0.0998445376753807, 0.08250680565834045, 0.48442044854164124, -0.5675110816955566, 0.12516425549983978, 0.26597321033477783, 0.03621021285653114, -0.03954440727829933, -0.09800899028778076, -0.33509770035743713, 0.04265395924448967, -0.07922288030385971, 0.18762874603271484, -0.3042137324810028, -0.033269017934799194, 0.3697907030582428, -0.20651556551456451, -0.06436286121606827, 0.01311268750578165, -0.08916620910167694, -0.13521285355091095, -0.09724868088960648, 0.04740522801876068, 0.27958211302757263, 0.20416536927223206, -0.15312981605529785, 0.14973533153533936, -0.14603562653064728, 0.0965292751789093, 0.024225696921348572, 0.4246114194393158, 0.036467790603637695, 0.11687357723712921, -0.08288780599832535, 0.07837080210447311, 0.05500836297869682, -0.12038194388151169, 0.2919105291366577, -0.10942460596561432, -0.6766223907470703, 0.2436930388212204, -0.14998850226402283, 0.09471282362937927, -0.018219906836748123, 0.09306751191616058, 0.07877608388662338, -0.24765625596046448, -0.07635200023651123, 0.10858818143606186, 0.2576789855957031, -0.016666686162352562, 0.347919762134552, -0.3929029703140259, -0.39222225546836853, 0.4393368065357208, -0.08380208909511566, -0.11938876658678055, -0.15352658927440643, -0.03001096285879612, -0.45406612753868103, 0.26543718576431274, 0.022781221196055412, 0.7061102390289307, 0.06439103186130524, 0.016025898978114128, -0.15769952535629272, -0.21417991816997528, 0.7159817218780518, -0.39758574962615967, 0.3789982795715332, -0.4174797534942627, -0.3309074640274048, -0.05409722030162811, 0.0348544679582119, -0.0420139878988266, 0.497226744890213, -0.30704474449157715, 0.2811996638774872, -0.021588807925581932, 0.1306532621383667, -0.010900260880589485, 0.04464994743466377, 0.03365376591682434, -0.40117037296295166, -0.21557247638702393, 0.24430491030216217, -0.124233677983284, 0.20872096717357635, -0.18814511597156525, 0.133148193359375, 0.037777338176965714, -0.12721511721611023, 0.0027470269706100225, 0.031847186386585236, -0.17307306826114655, 0.39662984013557434, 0.21674615144729614, 0.13104307651519775, -0.09374108910560608, 0.01511667761951685, 0.6647681593894958, 0.061716824769973755, 0.12289649248123169, 0.27387580275535583, -0.06950700283050537, 0.31123441457748413, 0.02184099517762661, 0.309552937746048, 0.43371090292930603, 0.05823494493961334, -0.10547276586294174, -0.2616083025932312, 0.025110118091106415, -0.32236403226852417, 0.03747076541185379, -0.3964276909828186, 0.0916983112692833, -0.3511944115161896, 0.3372547924518585, 0.10947076976299286, -0.1306077092885971, -0.22524608671665192, 0.21551722288131714, -0.18867409229278564, -0.007564355153590441, 0.012322983704507351, 0.15228691697120667, -0.1144578605890274, -0.08439484983682632, 0.3721334934234619, 0.17791689932346344, 0.22898460924625397, 0.17449882626533508, -0.09914734214544296, -0.3049570620059967, -0.24817131459712982, -0.020136332139372826, 0.07667715847492218, -0.5361904501914978, 0.14948004484176636, -0.1529337614774704, -0.5848526358604431, -0.050281934440135956, 0.2688123881816864, 0.10613348335027695, 0.3858700692653656, -0.16413705050945282, -0.09202401340007782, -0.5317977070808411, 0.16573931276798248, 0.03843827173113823, 0.2797611355781555, 0.13890138268470764, 0.31357425451278687, 0.0022171519231051207, -0.020064260810613632, -0.4158649742603302, -0.27984294295310974, -0.2463490515947342, 0.10234358161687851, 0.21528808772563934, -0.22092695534229279, 0.06463973969221115, -0.10180730372667313, 0.25841355323791504, 0.16017211973667145, 0.029252124950289726, -0.3334571123123169, -0.30582666397094727, 0.016247566789388657, 0.10679678618907928, 0.08458525687456131, -0.20960892736911774, 0.12757185101509094, -0.0948265865445137, -0.11000192910432816, 0.34107837080955505, -0.10399326682090759, 0.07580157369375229, 0.4486641585826874, -0.37602683901786804, 0.2733882665634155, -0.11987359076738358, -0.048695988953113556, 0.1777704358100891, -0.1523885577917099, 0.1314609795808792, 0.04947403818368912, -0.09590145200490952, 0.018038900569081306, -0.10853205621242523, 0.12894506752490997, 0.1177157312631607, -0.11346729844808578, 0.16828033328056335, -0.2736872732639313, 0.1859758198261261, 0.21186202764511108, -0.043451257050037384, 0.06514662504196167, -0.013056540861725807, -0.11080467700958252, 0.1633855551481247, 0.3627083897590637, -0.31782904267311096, -0.1732865571975708, -0.07861866801977158, -0.129111647605896, 0.19652783870697021, 0.21111713349819183, 0.03038163110613823, 0.3293274939060211, 0.28335943818092346, 0.14671824872493744, 0.6741534471511841, -0.18713341653347015, 0.1250576674938202, 0.459347128868103, -0.14296557009220123, 0.1405184268951416, 0.6524130702018738, 0.3103501796722412, 0.1588628739118576, 0.22879543900489807, 0.17609864473342896, 0.14333899319171906, -0.15137998759746552, 0.04920429363846779, 0.18456973135471344, 0.1338595598936081, -0.06425146013498306, 0.1071823313832283, -0.08223193883895874, 0.14420437812805176, 0.04249341040849686, -0.23483602702617645, -0.37984785437583923, -0.24116255342960358, -0.07744940370321274, 0.11852248758077621, -0.3206639289855957, -0.4818485379219055, 0.043733224272727966, -0.11202351003885269, -0.07651564478874207, -0.09814522415399551, -0.1924443542957306, -0.0049635274335742, 0.06969311088323593, -0.38064414262771606, -0.017661741003394127, -0.39696574211120605, 0.06781794130802155, 0.10079076886177063, 0.39134979248046875, -0.011898437514901161, 0.1653970181941986, 0.03783264756202698, 0.020467940717935562, 0.032302845269441605, 0.38604387640953064, 0.04169193655252457, 0.052692852914333344, 0.10491891950368881, -0.17242661118507385, -0.202318012714386, -0.26575055718421936, 0.07992015779018402, -0.07487022131681442, 0.10046321153640747, -0.07391410320997238, 0.07398028671741486, 0.23280245065689087, -0.21003146469593048, 0.1843080222606659, 0.0294840969145298, 0.2409491240978241, 0.07889369875192642, 0.031883373856544495, 0.1928265243768692, -0.2221251279115677, 0.16466303169727325, 0.03174993768334389, -0.30954381823539734, -0.13841983675956726, 0.15420427918434143, -0.02979971095919609, 0.27487415075302124, -0.22234667837619781, 0.16328302025794983, 0.23156556487083435, 0.4740362763404846, 0.09141270816326141, -0.34760597348213196, 0.08648034930229187, 0.19643628597259521, -0.2326541543006897, -0.2045855075120926, 0.1610550582408905, -0.4637678563594818, -0.019781555980443954, 0.08745643496513367, 0.22701483964920044, 0.026461491361260414, -0.09050694108009338, -0.10004640370607376, 0.026104141026735306, -0.20017185807228088, -0.0793035626411438, -0.03623252734541893, 0.019394222646951675, 0.13599267601966858, 0.1622447669506073, -0.267759770154953, -0.048446815460920334, 0.3059135675430298, 0.17257753014564514, -0.19694828987121582, 0.3461127281188965, 0.11937670409679413, -0.40135136246681213, 0.04710067808628082, -0.0019489885307848454, 0.5104163885116577, -0.23391605913639069, 0.22741323709487915, 0.007980217225849628, -0.4487672448158264, -0.2417091429233551, 0.09451822936534882, 0.16850914061069489, 0.38024163246154785, 0.16989527642726898, 0.07462296634912491, -0.0553150549530983, -0.09455644339323044, 0.15668492019176483, 0.1406920850276947, -0.1245233565568924, 0.19681544601917267, -0.07363323122262955, -0.07799087464809418, 0.04249313846230507, 0.1462078094482422, 0.015781929716467857, 0.008054214529693127, -0.07936081290245056, -0.6164310574531555, 0.19685782492160797, -0.26573047041893005, -0.5091540217399597, 0.014838127419352531, 0.02867421880364418, 0.44756388664245605, 0.049800217151641846, -0.35251742601394653, 0.27998995780944824, 0.059372976422309875, -0.21571436524391174, -0.5388692617416382, 0.3218468427658081, 0.2531697154045105, 0.11642086505889893, -0.15402637422084808, 0.2215195596218109, 0.006424666382372379, 0.002853390760719776, -0.38283205032348633, -0.24477562308311462 ]
https://github.com/huggingface/datasets/issues/5418
Add ProgressBar for `to_parquet`
Thanks for your proposal, @zanussbaum. Yes, I agree that would definitely be a nice feature to have!
### Feature request Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works. ### Motivation It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar ### Your contribution Sure I can help if needed
17
Add ProgressBar for `to_parquet`
[ -0.33994925022125244, 0.21125103533267975, -0.21712523698806763, -0.12165769189596176, -0.011998319998383522, -0.0456177182495594, 0.08702035248279572, 0.1625550538301468, -0.14985114336013794, 0.22252842783927917, 0.2636817693710327, 0.36376017332077026, -0.018550610169768333, 0.5000436305999756, 0.42244601249694824, 0.013920578174293041, 0.2608164846897125, 0.1742316633462906, 0.24804164469242096, 0.06442232429981232, -0.3132365047931671, 0.2789529860019684, 0.11126316338777542, 0.1996610015630722, 0.3701488673686981, -0.02843860164284706, -0.07425699383020401, -0.08221426606178284, 0.09774360060691833, -0.6813075542449951, 0.14467556774616241, 0.05704818293452263, -0.18462182581424713, 0.06743945181369781, -0.00011545872257556766, -0.1387690305709839, 0.3065738081932068, -0.010377665050327778, -0.19378437101840973, -0.10998617112636566, 0.08010910451412201, -0.41784337162971497, 0.3607150614261627, -0.26116716861724854, -0.08126693964004517, 0.07616754621267319, 0.13030166923999786, -0.0666547641158104, 0.10567077994346619, -0.042856939136981964, 0.19581177830696106, -0.07103141397237778, -0.04497309401631355, -0.09897109866142273, 0.5658693313598633, -0.3315994143486023, -0.20462974905967712, -0.2753590941429138, 0.38718193769454956, 0.045125626027584076, -0.11668288707733154, 0.17654810845851898, 0.2302684783935547, -0.25047633051872253, -0.1421920210123062, 0.0393313392996788, 0.4529859125614166, 0.06509987264871597, 0.09560848772525787, -0.13360290229320526, -0.055887024849653244, -0.34849813580513, -0.011990857310593128, -0.3238500654697418, -0.03707803413271904, -0.46207815408706665, -0.3414286971092224, 0.05750742927193642, 0.14332608878612518, -0.07411179691553116, -0.031846486032009125, -0.39493292570114136, -0.26750436425209045, -0.1723744124174118, -0.09848804026842117, 0.18558244407176971, -0.031992871314287186, 0.1122092455625534, -0.02251228131353855, 0.18461179733276367, -0.1952408105134964, 0.28439947962760925, -0.032973747700452805, -0.04632619768381119, -0.2383735477924347, -0.2365524172782898, 0.4026866853237152, 0.18311546742916107, -0.04863569140434265, 0.19790443778038025, -0.3766745626926422, 0.0528104305267334, 0.26605817675590515, -0.08532201498746872, 0.2226451337337494, -0.5055727362632751, 0.23056380450725555, -0.3309631943702698, -0.057545557618141174, 0.2237055003643036, 0.05679742619395256, 0.06943243741989136, 0.0856342688202858, -0.07153420895338058, 0.169041246175766, 0.1139364242553711, 0.04583434760570526, -0.24247339367866516, 0.13062451779842377, 0.38551026582717896, 0.6225541830062866, 0.05403506010770798, -0.05572577565908432, 0.3453228771686554, 0.11062496900558472, -0.4886680841445923, -0.07910768687725067, 0.37224873900413513, 0.1023673564195633, 0.06308203190565109, -0.300830602645874, 0.09539718925952911, -0.29501813650131226, 0.07570266723632812, -0.1350630670785904, 0.18568488955497742, -0.14403840899467468, -0.13787788152694702, -0.0784534141421318, 0.2977938652038574, -0.037682048976421356, 0.18462032079696655, 0.11647729575634003, 0.02064891904592514, -0.01809544302523136, -0.07042820751667023, 0.17493291199207306, -0.17029716074466705, -0.427695631980896, 0.19466128945350647, 0.10324838757514954, -0.21285295486450195, -0.026220867410302162, 0.1577443778514862, -0.12003591656684875, -0.1818021535873413, -0.4887721538543701, 0.4613751471042633, 0.0011845878325402737, 0.08546115458011627, -0.026825962588191032, 0.0299744363874197, -0.3557256758213043, -0.07992150634527206, -0.06598227471113205, 0.15744313597679138, -0.2728743255138397, -0.1708306223154068, 0.21830937266349792, -0.2603791356086731, 0.2488560974597931, -0.12572549283504486, 0.15976844727993011, -0.09251734614372253, -0.03237532451748848, 0.21992051601409912, 0.39855048060417175, 0.17777174711227417, 0.011447534896433353, -0.15214601159095764, -0.273354709148407, -0.11854767054319382, 0.4277688264846802, -0.30007681250572205, 0.5456897020339966, -0.16435185074806213, 0.012638363987207413, 0.08601624518632889, -0.1855015754699707, -0.027387792244553566, -0.05923733487725258, 0.21025322377681732, 0.11015532165765762, 0.3202422261238098, 0.22719396650791168, 0.1060817688703537, 0.08809394389390945, 0.05309101194143295, 0.242031067609787, 0.003935253247618675, 0.15947195887565613, -0.012653482146561146, 0.2797156870365143, -0.08119168877601624, -0.13227978348731995, -0.16144347190856934, 0.3399661183357239, 0.09180501103401184, 0.10980840027332306, 0.10581231862306595, 0.10336492210626602, 0.022222163155674934, -0.2247181236743927, 0.3009485602378845, -0.09836025536060333, -0.016702888533473015, 0.1735682636499405, 0.11731357872486115, 0.037274111062288284, 0.0008711416157893836, -0.27966731786727905, 0.03456621244549751, -0.3960186541080475, -0.1347019374370575, 0.1523747444152832, 0.48140060901641846, 0.05521532520651817, -0.5428650379180908, 0.20961891114711761, 0.2457595318555832, 0.1602698266506195, -0.06189122796058655, 0.27323630452156067, -0.002795253414660692, 0.10484836250543594, 0.2382136583328247, 0.24743138253688812, 0.21743866801261902, -0.06364025920629501, 0.10656580328941345, -0.15639366209506989, -0.14064644277095795, -0.3262331187725067, 0.10631223022937775, 0.08553414791822433, 0.10223551839590073, 0.3335314691066742, 0.45403653383255005, 0.18664249777793884, -0.319068968296051, 0.23583921790122986, 0.14855612814426422, -0.010441145859658718, -0.047055888921022415, 0.13591717183589935, 0.16312652826309204, -0.14366021752357483, -0.5687581896781921, -0.2926408648490906, 0.45377686619758606, 0.634922981262207, 0.1788048893213272, -0.04588809236884117, 0.22997547686100006, 0.25182291865348816, -0.13228902220726013, 0.048271749168634415, -0.18540534377098083, -0.1805756837129593, 0.3391907513141632, 0.39012742042541504, 0.2216467559337616, -0.10777487605810165, -0.2165672481060028, -0.1179300844669342, -0.06084715202450752, 0.02748597040772438, 0.16440625488758087, 0.20785820484161377, -0.1724112182855606, -0.20746943354606628, -0.14622895419597626, -0.37122493982315063, -0.03127184510231018, 0.03129586949944496, -0.08920049667358398, 0.04795335605740547, 0.05212092772126198, 0.07951423525810242, 0.15097105503082275, 0.18156759440898895, -0.36687925457954407, 0.3644970655441284, 0.35677075386047363, -0.07573830336332321, 0.2144164741039276, -0.08194154500961304, 0.21604447066783905, -0.004308844916522503, 0.07014163583517075, -0.42042309045791626, -0.5004510879516602, 0.071088507771492, 0.1678309291601181, -0.30532681941986084, -0.29597899317741394, 0.2345593124628067, -0.20949134230613708, 0.4201360046863556, -0.40604618191719055, -0.2682904601097107, 0.09373967349529266, -0.2293034940958023, -0.21596938371658325, 0.27641457319259644, 0.15775184333324432, 0.07540835440158844, 0.05392322316765785, 0.17416533827781677, -0.2903050184249878, -0.0750502198934555, 0.0650755986571312, -0.14038001000881195, -0.048302363604307175, 0.19346003234386444, 0.22255006432533264, -0.22012978792190552, -0.1924930214881897, 0.3872866928577423, 0.48481065034866333, 0.07556229829788208, -0.5020958185195923, -0.3285568654537201, -0.03195592388510704, 0.045630019158124924, 0.045504335314035416, -0.07427419722080231, -0.23999102413654327, 0.1537645161151886, -0.14144380390644073, 0.06974628567695618, 0.1381581723690033, -0.10545197129249573, 0.10629361867904663, -0.05673053488135338, -0.37936267256736755, -0.0232715904712677, 0.029380062595009804, -0.22425609827041626, -0.1443811058998108, -0.17447398602962494, 0.38975292444229126, 0.10331404209136963, -0.2493133246898651, -0.0896170511841774, -0.5545992255210876, 0.18595384061336517, 0.4256289601325989, 0.04016590490937233, -0.365958571434021, 0.24433162808418274, 0.07418441027402878, 0.4059006869792938, -0.3626396059989929, 0.10969359427690506, 0.5443781018257141, -0.18153557181358337, 0.21153990924358368, -0.1902361959218979, 0.09466610103845596, 0.05148237943649292, 0.061709366738796234, -0.22349806129932404, 0.15132886171340942, -0.2290915846824646, -0.14559271931648254, 0.09919247031211853, -0.08544451743364334, -0.051031406968832016, -0.15625512599945068, -0.3050065040588379, 0.33596017956733704, 0.0226177666336298, -0.11204273998737335, -0.11292882263660431, 0.006218641065061092, 0.10295518487691879, 0.31222254037857056, 0.42272278666496277, 0.20779350399971008, -0.082763671875, 0.11595634371042252, 0.04052766039967537, -0.22018679976463318, 0.028516720980405807, -0.25996166467666626, -0.40259337425231934, -0.31262290477752686, -0.33179640769958496, 0.05730312317609787, -0.1886983960866928, 0.5794462561607361, -0.09379962831735611, 0.29980283975601196, 0.31775858998298645, -0.182674840092659, -0.13967455923557281, -0.18701283633708954, 0.06860938668251038, 0.054763685911893845, 0.3347460925579071, 0.8064769506454468, -0.4006449580192566, 0.23924116790294647, 0.1811596006155014, 0.015499011613428593, -0.12534913420677185, -0.07132082432508469, -0.5683373212814331, 0.16481533646583557, -0.4424400329589844, 0.6995319128036499, -0.10772233456373215, 0.22447550296783447, 0.32358357310295105, -0.2940632998943329, -0.09353180974721909, -0.43549126386642456, -0.37706729769706726, -0.0032584802247583866, 0.059552159160375595, 0.04685838893055916, 0.03992711752653122, -0.4500661790370941, 0.33491936326026917, -0.16850906610488892, 0.006812229286879301, 0.054769061505794525, -0.26025766134262085, 0.451043963432312, -0.05831769108772278, 0.3686210513114929, 0.23573251068592072, 0.04263093322515488, 0.33869197964668274, -0.10520876944065094, 0.29578927159309387, -0.014041926711797714, 0.15599387884140015, -0.15399925410747528, -0.2015524059534073, -0.05505257844924927, 0.04693035036325455, 0.1210765466094017, -0.4238658547401428, -0.006058181636035442, -0.11749734729528427, 0.3107573986053467, -0.04309171065688133, 0.09004466235637665, 0.03549326956272125, 0.9247646331787109, -0.5033352375030518, -0.00836055725812912, 0.09832202643156052, -0.5326629877090454, 0.23281429708003998, -0.30168262124061584, 0.03263407573103905, -0.4215744137763977, -0.0330931581556797, 0.12047459930181503, -0.17633099853992462, -0.1220802441239357, 0.06967976689338684, -0.10641918331384659, 0.2477717250585556, -0.027876462787389755, 0.0008165371255017817, -0.24392405152320862, 0.06260820478200912, 0.3019687831401825, -0.04086969047784805, -0.5906639695167542, 0.19152043759822845, 0.10298500210046768, -0.14919917285442352, -0.18607082962989807, 0.06855063885450363, 0.15244664251804352, 0.2142612487077713, -0.11307933926582336, 0.22219465672969818, 0.26766425371170044, -0.1699218600988388, -0.05991771072149277, -0.6391355991363525, -0.3341035842895508, -0.5125489234924316, 0.4118728041648865, 0.016217874363064766, -0.054110996425151825, 0.08978420495986938, -0.1583888977766037, -0.11715218424797058, -0.13406765460968018, 0.14646627008914948, 0.27555495500564575, -0.3010233938694, 0.06223016604781151, 0.29128843545913696, -0.028487632051110268, -0.5536574125289917, 0.021120741963386536, 0.013867812231183052, 0.6607714891433716, -0.048933424055576324, -0.03850866109132767, 0.21322090923786163, 0.12399158626794815, -0.3517656624317169, 0.1480906456708908, 0.11744847148656845, -0.1881345957517624, -0.347957968711853, -0.24632662534713745, -0.1668427288532257, -0.13408248126506805, -0.11909308284521103, -0.22007256746292114, 0.03391806781291962, 0.0018501502927392721, 0.2138095647096634, -0.23720481991767883, -0.14154033362865448, -0.6291661858558655, 0.6922802329063416, 0.10393087565898895, 0.0051968456245958805, 0.03400178253650665, 0.014097562991082668, 0.03728761151432991, -0.03543086722493172, -0.052654292434453964, 0.1618865579366684, -0.24995014071464539, -0.07814311981201172, -0.187192901968956, -0.0541250966489315, -0.18182487785816193, 0.1883937418460846, 0.3964705765247345, 0.29699838161468506, -0.11562944948673248, -0.32005295157432556, -0.29332053661346436, -0.29677367210388184, -0.32414767146110535, 0.021008193492889404, 0.5525450706481934, -0.05385288968682289, -0.3342117667198181, 0.13847842812538147, 0.11935168504714966, -0.04867341369390488, -0.2346244901418686, -0.26969680190086365, 0.11038470268249512, 0.05448957160115242, 0.07042619585990906, 0.5011372566223145, -0.2902398109436035, 0.2808365523815155, -0.13193641602993011, 0.132785826921463, 0.10214585810899734, -0.3405316472053528, -0.027995865792036057, -0.2487417310476303, 0.6011353135108948, 0.05138341709971428, -0.1049683690071106, -0.2869914174079895, 0.12457292526960373, 0.22778759896755219, -0.28195419907569885, 0.07587040215730667, -0.20846505463123322, -0.020732717588543892, 0.324629545211792, 0.21635766327381134, 0.4677085876464844, 0.3558347523212433, -0.06972359865903854, 0.18322277069091797, -0.26583269238471985, -0.02999691106379032, 0.29936447739601135, 0.2667045295238495, 0.15301986038684845, -0.4571552872657776, 0.12314194440841675, 0.18874987959861755, -0.08030771464109421, 0.1431274265050888, 0.2859196662902832, -0.09579126536846161, 0.022268176078796387, 0.15765917301177979, -0.1011776253581047, 0.3256348669528961, 0.17017623782157898, 0.2873381972312927, 0.11528516560792923, -0.22940906882286072, -0.19598758220672607, -0.18486662209033966, 0.007832231000065804, 0.2732069194316864, 0.2796488404273987, 0.3174947202205658, 0.01859612576663494, 0.08394650369882584, 0.014613672159612179, 0.3450586795806885, 0.45273682475090027, -0.08582600206136703, -0.03464963287115097, 0.3820434808731079, -0.24534833431243896, 0.20802557468414307, 0.45690828561782837, -0.10451263189315796, 0.31537023186683655, -0.029897872358560562, 0.5747234225273132, -0.22277452051639557, -0.13575631380081177, 0.3510975241661072, 0.005519784055650234, -0.009957551024854183, 0.35265523195266724, -0.11771059036254883, 0.034279242157936096, 0.15727035701274872, -0.040946003049612045, 0.2148478478193283, -0.3371880054473877, -0.2620169222354889, 0.5706636905670166, 0.06412395089864731, -0.11489886790513992, -0.10156713426113129, 0.06339415162801743, 0.1613093763589859, 0.08090303838253021, -0.11300269514322281, 0.014810727909207344, -0.12489888817071915, -0.0934421718120575, -0.08472029864788055, 0.03247184678912163, -0.12869687378406525, -0.127656489610672, 0.10091975331306458, 0.007297815755009651, -0.09863284975290298, -0.0620829276740551, 0.032770704478025436, 0.136047825217247, 0.24269424378871918, 0.1384977251291275, -0.22387579083442688, 0.3618384897708893, 0.19502213597297668, -0.20067836344242096, -0.09561509639024734, 0.016517339274287224, 0.2368488907814026, -0.3183491826057434, 0.12837038934230804, 0.062452927231788635, -0.13744057714939117, -0.08900296688079834, -0.18174396455287933, -0.03132033720612526, -0.10211027413606644, 0.09068333357572556, 0.11743153631687164, 0.15659210085868835, 0.11158636212348938, -0.15981613099575043, 0.24028000235557556, -0.2449861615896225, -0.3850120007991791, -0.21140046417713165, 0.26441213488578796, 0.18713678419589996, -0.2692665457725525, 0.0173515472561121, 0.31294015049934387, 0.09178651124238968, 0.3432903289794922, 0.3115777373313904, 0.047430358827114105, -0.3455953896045685, -0.10164453834295273, -0.15019360184669495, 0.12418532371520996, 0.53741055727005, -0.19852684438228607, -0.09220059216022491, 0.28571251034736633, -0.08982856571674347, 0.05460680276155472, 0.1768478900194168, 0.17159101366996765, -0.30306801199913025, -0.16022410988807678, -0.07517653703689575, 0.2869185507297516, -0.27932068705558777, -0.15894360840320587, -0.2240287810564041, 0.03446482867002487, 0.22302120923995972, -0.2964988350868225, -0.039226047694683075, 0.4042458236217499, -0.4114537239074707, 0.12766125798225403, 0.10050391405820847, 0.22476455569267273, -0.08789819478988647, -0.16217605769634247, 0.2672497630119324, 0.12010981142520905, 0.23815910518169403, 0.08725272119045258, 0.40816107392311096, 0.11802853643894196, -0.1778874695301056, -0.2643207609653473, 0.2576141059398651, 0.2690664231777191, 0.0003223468957003206, -0.09339945018291473, 0.0948939397931099, -0.11428651958703995, -0.6098423004150391, 0.03790563344955444, 0.060170598328113556, 0.16986629366874695, 0.09045015275478363, -0.27076220512390137, -0.10286371409893036, 0.16507551074028015, -0.04179520905017853, -0.062132906168699265, 0.29855623841285706, -0.2975948750972748, -0.007779755629599094, -0.018479887396097183, -0.1778210997581482, 0.4083423316478729, 0.075439453125, -0.45630380511283875, -0.41375479102134705 ]
https://github.com/huggingface/datasets/issues/5418
Add ProgressBar for `to_parquet`
That would be awesome ! You can comment `#self-assign` to assign you to this issue and open a PR :) Will be happy to review
### Feature request Add a progress bar for `Dataset.to_parquet`, similar to how `to_json` works. ### Motivation It's a bit frustrating to not know how long a dataset will take to write to file and if it's stuck or not without a progress bar ### Your contribution Sure I can help if needed
25
Add ProgressBar for `to_parquet`
[ -0.33994925022125244, 0.21125103533267975, -0.21712523698806763, -0.12165769189596176, -0.011998319998383522, -0.0456177182495594, 0.08702035248279572, 0.1625550538301468, -0.14985114336013794, 0.22252842783927917, 0.2636817693710327, 0.36376017332077026, -0.018550610169768333, 0.5000436305999756, 0.42244601249694824, 0.013920578174293041, 0.2608164846897125, 0.1742316633462906, 0.24804164469242096, 0.06442232429981232, -0.3132365047931671, 0.2789529860019684, 0.11126316338777542, 0.1996610015630722, 0.3701488673686981, -0.02843860164284706, -0.07425699383020401, -0.08221426606178284, 0.09774360060691833, -0.6813075542449951, 0.14467556774616241, 0.05704818293452263, -0.18462182581424713, 0.06743945181369781, -0.00011545872257556766, -0.1387690305709839, 0.3065738081932068, -0.010377665050327778, -0.19378437101840973, -0.10998617112636566, 0.08010910451412201, -0.41784337162971497, 0.3607150614261627, -0.26116716861724854, -0.08126693964004517, 0.07616754621267319, 0.13030166923999786, -0.0666547641158104, 0.10567077994346619, -0.042856939136981964, 0.19581177830696106, -0.07103141397237778, -0.04497309401631355, -0.09897109866142273, 0.5658693313598633, -0.3315994143486023, -0.20462974905967712, -0.2753590941429138, 0.38718193769454956, 0.045125626027584076, -0.11668288707733154, 0.17654810845851898, 0.2302684783935547, -0.25047633051872253, -0.1421920210123062, 0.0393313392996788, 0.4529859125614166, 0.06509987264871597, 0.09560848772525787, -0.13360290229320526, -0.055887024849653244, -0.34849813580513, -0.011990857310593128, -0.3238500654697418, -0.03707803413271904, -0.46207815408706665, -0.3414286971092224, 0.05750742927193642, 0.14332608878612518, -0.07411179691553116, -0.031846486032009125, -0.39493292570114136, -0.26750436425209045, -0.1723744124174118, -0.09848804026842117, 0.18558244407176971, -0.031992871314287186, 0.1122092455625534, -0.02251228131353855, 0.18461179733276367, -0.1952408105134964, 0.28439947962760925, -0.032973747700452805, -0.04632619768381119, -0.2383735477924347, -0.2365524172782898, 0.4026866853237152, 0.18311546742916107, -0.04863569140434265, 0.19790443778038025, -0.3766745626926422, 0.0528104305267334, 0.26605817675590515, -0.08532201498746872, 0.2226451337337494, -0.5055727362632751, 0.23056380450725555, -0.3309631943702698, -0.057545557618141174, 0.2237055003643036, 0.05679742619395256, 0.06943243741989136, 0.0856342688202858, -0.07153420895338058, 0.169041246175766, 0.1139364242553711, 0.04583434760570526, -0.24247339367866516, 0.13062451779842377, 0.38551026582717896, 0.6225541830062866, 0.05403506010770798, -0.05572577565908432, 0.3453228771686554, 0.11062496900558472, -0.4886680841445923, -0.07910768687725067, 0.37224873900413513, 0.1023673564195633, 0.06308203190565109, -0.300830602645874, 0.09539718925952911, -0.29501813650131226, 0.07570266723632812, -0.1350630670785904, 0.18568488955497742, -0.14403840899467468, -0.13787788152694702, -0.0784534141421318, 0.2977938652038574, -0.037682048976421356, 0.18462032079696655, 0.11647729575634003, 0.02064891904592514, -0.01809544302523136, -0.07042820751667023, 0.17493291199207306, -0.17029716074466705, -0.427695631980896, 0.19466128945350647, 0.10324838757514954, -0.21285295486450195, -0.026220867410302162, 0.1577443778514862, -0.12003591656684875, -0.1818021535873413, -0.4887721538543701, 0.4613751471042633, 0.0011845878325402737, 0.08546115458011627, -0.026825962588191032, 0.0299744363874197, -0.3557256758213043, -0.07992150634527206, -0.06598227471113205, 0.15744313597679138, -0.2728743255138397, -0.1708306223154068, 0.21830937266349792, -0.2603791356086731, 0.2488560974597931, -0.12572549283504486, 0.15976844727993011, -0.09251734614372253, -0.03237532451748848, 0.21992051601409912, 0.39855048060417175, 0.17777174711227417, 0.011447534896433353, -0.15214601159095764, -0.273354709148407, -0.11854767054319382, 0.4277688264846802, -0.30007681250572205, 0.5456897020339966, -0.16435185074806213, 0.012638363987207413, 0.08601624518632889, -0.1855015754699707, -0.027387792244553566, -0.05923733487725258, 0.21025322377681732, 0.11015532165765762, 0.3202422261238098, 0.22719396650791168, 0.1060817688703537, 0.08809394389390945, 0.05309101194143295, 0.242031067609787, 0.003935253247618675, 0.15947195887565613, -0.012653482146561146, 0.2797156870365143, -0.08119168877601624, -0.13227978348731995, -0.16144347190856934, 0.3399661183357239, 0.09180501103401184, 0.10980840027332306, 0.10581231862306595, 0.10336492210626602, 0.022222163155674934, -0.2247181236743927, 0.3009485602378845, -0.09836025536060333, -0.016702888533473015, 0.1735682636499405, 0.11731357872486115, 0.037274111062288284, 0.0008711416157893836, -0.27966731786727905, 0.03456621244549751, -0.3960186541080475, -0.1347019374370575, 0.1523747444152832, 0.48140060901641846, 0.05521532520651817, -0.5428650379180908, 0.20961891114711761, 0.2457595318555832, 0.1602698266506195, -0.06189122796058655, 0.27323630452156067, -0.002795253414660692, 0.10484836250543594, 0.2382136583328247, 0.24743138253688812, 0.21743866801261902, -0.06364025920629501, 0.10656580328941345, -0.15639366209506989, -0.14064644277095795, -0.3262331187725067, 0.10631223022937775, 0.08553414791822433, 0.10223551839590073, 0.3335314691066742, 0.45403653383255005, 0.18664249777793884, -0.319068968296051, 0.23583921790122986, 0.14855612814426422, -0.010441145859658718, -0.047055888921022415, 0.13591717183589935, 0.16312652826309204, -0.14366021752357483, -0.5687581896781921, -0.2926408648490906, 0.45377686619758606, 0.634922981262207, 0.1788048893213272, -0.04588809236884117, 0.22997547686100006, 0.25182291865348816, -0.13228902220726013, 0.048271749168634415, -0.18540534377098083, -0.1805756837129593, 0.3391907513141632, 0.39012742042541504, 0.2216467559337616, -0.10777487605810165, -0.2165672481060028, -0.1179300844669342, -0.06084715202450752, 0.02748597040772438, 0.16440625488758087, 0.20785820484161377, -0.1724112182855606, -0.20746943354606628, -0.14622895419597626, -0.37122493982315063, -0.03127184510231018, 0.03129586949944496, -0.08920049667358398, 0.04795335605740547, 0.05212092772126198, 0.07951423525810242, 0.15097105503082275, 0.18156759440898895, -0.36687925457954407, 0.3644970655441284, 0.35677075386047363, -0.07573830336332321, 0.2144164741039276, -0.08194154500961304, 0.21604447066783905, -0.004308844916522503, 0.07014163583517075, -0.42042309045791626, -0.5004510879516602, 0.071088507771492, 0.1678309291601181, -0.30532681941986084, -0.29597899317741394, 0.2345593124628067, -0.20949134230613708, 0.4201360046863556, -0.40604618191719055, -0.2682904601097107, 0.09373967349529266, -0.2293034940958023, -0.21596938371658325, 0.27641457319259644, 0.15775184333324432, 0.07540835440158844, 0.05392322316765785, 0.17416533827781677, -0.2903050184249878, -0.0750502198934555, 0.0650755986571312, -0.14038001000881195, -0.048302363604307175, 0.19346003234386444, 0.22255006432533264, -0.22012978792190552, -0.1924930214881897, 0.3872866928577423, 0.48481065034866333, 0.07556229829788208, -0.5020958185195923, -0.3285568654537201, -0.03195592388510704, 0.045630019158124924, 0.045504335314035416, -0.07427419722080231, -0.23999102413654327, 0.1537645161151886, -0.14144380390644073, 0.06974628567695618, 0.1381581723690033, -0.10545197129249573, 0.10629361867904663, -0.05673053488135338, -0.37936267256736755, -0.0232715904712677, 0.029380062595009804, -0.22425609827041626, -0.1443811058998108, -0.17447398602962494, 0.38975292444229126, 0.10331404209136963, -0.2493133246898651, -0.0896170511841774, -0.5545992255210876, 0.18595384061336517, 0.4256289601325989, 0.04016590490937233, -0.365958571434021, 0.24433162808418274, 0.07418441027402878, 0.4059006869792938, -0.3626396059989929, 0.10969359427690506, 0.5443781018257141, -0.18153557181358337, 0.21153990924358368, -0.1902361959218979, 0.09466610103845596, 0.05148237943649292, 0.061709366738796234, -0.22349806129932404, 0.15132886171340942, -0.2290915846824646, -0.14559271931648254, 0.09919247031211853, -0.08544451743364334, -0.051031406968832016, -0.15625512599945068, -0.3050065040588379, 0.33596017956733704, 0.0226177666336298, -0.11204273998737335, -0.11292882263660431, 0.006218641065061092, 0.10295518487691879, 0.31222254037857056, 0.42272278666496277, 0.20779350399971008, -0.082763671875, 0.11595634371042252, 0.04052766039967537, -0.22018679976463318, 0.028516720980405807, -0.25996166467666626, -0.40259337425231934, -0.31262290477752686, -0.33179640769958496, 0.05730312317609787, -0.1886983960866928, 0.5794462561607361, -0.09379962831735611, 0.29980283975601196, 0.31775858998298645, -0.182674840092659, -0.13967455923557281, -0.18701283633708954, 0.06860938668251038, 0.054763685911893845, 0.3347460925579071, 0.8064769506454468, -0.4006449580192566, 0.23924116790294647, 0.1811596006155014, 0.015499011613428593, -0.12534913420677185, -0.07132082432508469, -0.5683373212814331, 0.16481533646583557, -0.4424400329589844, 0.6995319128036499, -0.10772233456373215, 0.22447550296783447, 0.32358357310295105, -0.2940632998943329, -0.09353180974721909, -0.43549126386642456, -0.37706729769706726, -0.0032584802247583866, 0.059552159160375595, 0.04685838893055916, 0.03992711752653122, -0.4500661790370941, 0.33491936326026917, -0.16850906610488892, 0.006812229286879301, 0.054769061505794525, -0.26025766134262085, 0.451043963432312, -0.05831769108772278, 0.3686210513114929, 0.23573251068592072, 0.04263093322515488, 0.33869197964668274, -0.10520876944065094, 0.29578927159309387, -0.014041926711797714, 0.15599387884140015, -0.15399925410747528, -0.2015524059534073, -0.05505257844924927, 0.04693035036325455, 0.1210765466094017, -0.4238658547401428, -0.006058181636035442, -0.11749734729528427, 0.3107573986053467, -0.04309171065688133, 0.09004466235637665, 0.03549326956272125, 0.9247646331787109, -0.5033352375030518, -0.00836055725812912, 0.09832202643156052, -0.5326629877090454, 0.23281429708003998, -0.30168262124061584, 0.03263407573103905, -0.4215744137763977, -0.0330931581556797, 0.12047459930181503, -0.17633099853992462, -0.1220802441239357, 0.06967976689338684, -0.10641918331384659, 0.2477717250585556, -0.027876462787389755, 0.0008165371255017817, -0.24392405152320862, 0.06260820478200912, 0.3019687831401825, -0.04086969047784805, -0.5906639695167542, 0.19152043759822845, 0.10298500210046768, -0.14919917285442352, -0.18607082962989807, 0.06855063885450363, 0.15244664251804352, 0.2142612487077713, -0.11307933926582336, 0.22219465672969818, 0.26766425371170044, -0.1699218600988388, -0.05991771072149277, -0.6391355991363525, -0.3341035842895508, -0.5125489234924316, 0.4118728041648865, 0.016217874363064766, -0.054110996425151825, 0.08978420495986938, -0.1583888977766037, -0.11715218424797058, -0.13406765460968018, 0.14646627008914948, 0.27555495500564575, -0.3010233938694, 0.06223016604781151, 0.29128843545913696, -0.028487632051110268, -0.5536574125289917, 0.021120741963386536, 0.013867812231183052, 0.6607714891433716, -0.048933424055576324, -0.03850866109132767, 0.21322090923786163, 0.12399158626794815, -0.3517656624317169, 0.1480906456708908, 0.11744847148656845, -0.1881345957517624, -0.347957968711853, -0.24632662534713745, -0.1668427288532257, -0.13408248126506805, -0.11909308284521103, -0.22007256746292114, 0.03391806781291962, 0.0018501502927392721, 0.2138095647096634, -0.23720481991767883, -0.14154033362865448, -0.6291661858558655, 0.6922802329063416, 0.10393087565898895, 0.0051968456245958805, 0.03400178253650665, 0.014097562991082668, 0.03728761151432991, -0.03543086722493172, -0.052654292434453964, 0.1618865579366684, -0.24995014071464539, -0.07814311981201172, -0.187192901968956, -0.0541250966489315, -0.18182487785816193, 0.1883937418460846, 0.3964705765247345, 0.29699838161468506, -0.11562944948673248, -0.32005295157432556, -0.29332053661346436, -0.29677367210388184, -0.32414767146110535, 0.021008193492889404, 0.5525450706481934, -0.05385288968682289, -0.3342117667198181, 0.13847842812538147, 0.11935168504714966, -0.04867341369390488, -0.2346244901418686, -0.26969680190086365, 0.11038470268249512, 0.05448957160115242, 0.07042619585990906, 0.5011372566223145, -0.2902398109436035, 0.2808365523815155, -0.13193641602993011, 0.132785826921463, 0.10214585810899734, -0.3405316472053528, -0.027995865792036057, -0.2487417310476303, 0.6011353135108948, 0.05138341709971428, -0.1049683690071106, -0.2869914174079895, 0.12457292526960373, 0.22778759896755219, -0.28195419907569885, 0.07587040215730667, -0.20846505463123322, -0.020732717588543892, 0.324629545211792, 0.21635766327381134, 0.4677085876464844, 0.3558347523212433, -0.06972359865903854, 0.18322277069091797, -0.26583269238471985, -0.02999691106379032, 0.29936447739601135, 0.2667045295238495, 0.15301986038684845, -0.4571552872657776, 0.12314194440841675, 0.18874987959861755, -0.08030771464109421, 0.1431274265050888, 0.2859196662902832, -0.09579126536846161, 0.022268176078796387, 0.15765917301177979, -0.1011776253581047, 0.3256348669528961, 0.17017623782157898, 0.2873381972312927, 0.11528516560792923, -0.22940906882286072, -0.19598758220672607, -0.18486662209033966, 0.007832231000065804, 0.2732069194316864, 0.2796488404273987, 0.3174947202205658, 0.01859612576663494, 0.08394650369882584, 0.014613672159612179, 0.3450586795806885, 0.45273682475090027, -0.08582600206136703, -0.03464963287115097, 0.3820434808731079, -0.24534833431243896, 0.20802557468414307, 0.45690828561782837, -0.10451263189315796, 0.31537023186683655, -0.029897872358560562, 0.5747234225273132, -0.22277452051639557, -0.13575631380081177, 0.3510975241661072, 0.005519784055650234, -0.009957551024854183, 0.35265523195266724, -0.11771059036254883, 0.034279242157936096, 0.15727035701274872, -0.040946003049612045, 0.2148478478193283, -0.3371880054473877, -0.2620169222354889, 0.5706636905670166, 0.06412395089864731, -0.11489886790513992, -0.10156713426113129, 0.06339415162801743, 0.1613093763589859, 0.08090303838253021, -0.11300269514322281, 0.014810727909207344, -0.12489888817071915, -0.0934421718120575, -0.08472029864788055, 0.03247184678912163, -0.12869687378406525, -0.127656489610672, 0.10091975331306458, 0.007297815755009651, -0.09863284975290298, -0.0620829276740551, 0.032770704478025436, 0.136047825217247, 0.24269424378871918, 0.1384977251291275, -0.22387579083442688, 0.3618384897708893, 0.19502213597297668, -0.20067836344242096, -0.09561509639024734, 0.016517339274287224, 0.2368488907814026, -0.3183491826057434, 0.12837038934230804, 0.062452927231788635, -0.13744057714939117, -0.08900296688079834, -0.18174396455287933, -0.03132033720612526, -0.10211027413606644, 0.09068333357572556, 0.11743153631687164, 0.15659210085868835, 0.11158636212348938, -0.15981613099575043, 0.24028000235557556, -0.2449861615896225, -0.3850120007991791, -0.21140046417713165, 0.26441213488578796, 0.18713678419589996, -0.2692665457725525, 0.0173515472561121, 0.31294015049934387, 0.09178651124238968, 0.3432903289794922, 0.3115777373313904, 0.047430358827114105, -0.3455953896045685, -0.10164453834295273, -0.15019360184669495, 0.12418532371520996, 0.53741055727005, -0.19852684438228607, -0.09220059216022491, 0.28571251034736633, -0.08982856571674347, 0.05460680276155472, 0.1768478900194168, 0.17159101366996765, -0.30306801199913025, -0.16022410988807678, -0.07517653703689575, 0.2869185507297516, -0.27932068705558777, -0.15894360840320587, -0.2240287810564041, 0.03446482867002487, 0.22302120923995972, -0.2964988350868225, -0.039226047694683075, 0.4042458236217499, -0.4114537239074707, 0.12766125798225403, 0.10050391405820847, 0.22476455569267273, -0.08789819478988647, -0.16217605769634247, 0.2672497630119324, 0.12010981142520905, 0.23815910518169403, 0.08725272119045258, 0.40816107392311096, 0.11802853643894196, -0.1778874695301056, -0.2643207609653473, 0.2576141059398651, 0.2690664231777191, 0.0003223468957003206, -0.09339945018291473, 0.0948939397931099, -0.11428651958703995, -0.6098423004150391, 0.03790563344955444, 0.060170598328113556, 0.16986629366874695, 0.09045015275478363, -0.27076220512390137, -0.10286371409893036, 0.16507551074028015, -0.04179520905017853, -0.062132906168699265, 0.29855623841285706, -0.2975948750972748, -0.007779755629599094, -0.018479887396097183, -0.1778210997581482, 0.4083423316478729, 0.075439453125, -0.45630380511283875, -0.41375479102134705 ]
https://github.com/huggingface/datasets/issues/5414
Sharding error with Multilingual LibriSpeech
Thanks for reporting, @Nithin-Holla. This is a known issue for multiple datasets and we are investigating it: - See e.g.: https://huggingface.co/datasets/ami/discussions/3
### Describe the bug Loading the German Multilingual LibriSpeech dataset results in a RuntimeError regarding sharding with the following stacktrace: ``` Downloading and preparing dataset multilingual_librispeech/german to /home/nithin/datadrive/cache/huggingface/datasets/facebook___multilingual_librispeech/german/2.1.0/1904af50f57a5c370c9364cc337699cfe496d4e9edcae6648a96be23086362d0... Downloading data files: 100% 3/3 [00:00<00:00, 107.23it/s] Downloading data files: 100% 1/1 [00:00<00:00, 35.08it/s] Downloading data files: 100% 6/6 [00:00<00:00, 303.36it/s] Downloading data files: 100% 3/3 [00:00<00:00, 130.37it/s] Downloading data files: 100% 1049/1049 [00:00<00:00, 4491.40it/s] Downloading data files: 100% 37/37 [00:00<00:00, 1096.78it/s] Downloading data files: 100% 40/40 [00:00<00:00, 1003.93it/s] Extracting data files: 100% 3/3 [00:11<00:00, 2.62s/it] Generating train split: 469942/0 [34:13<00:00, 273.21 examples/s] Output exceeds the size limit. Open the full output data in a text editor --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-14-74fa6d092bdc> in <module> ----> 1 mls = load_dataset(MLS_DATASET, 2 LANGUAGE, 3 cache_dir="~/datadrive/cache/huggingface/datasets", 4 ignore_verifications=True) /anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, **config_kwargs) 1755 1756 # Download and prepare data -> 1757 builder_instance.download_and_prepare( 1758 download_config=download_config, 1759 download_mode=download_mode, /anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs) 858 if num_proc is not None: 859 prepare_split_kwargs["num_proc"] = num_proc --> 860 self._download_and_prepare( 861 dl_manager=dl_manager, 862 verify_infos=verify_infos, /anaconda/envs/py38_default/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs) 1609 1610 def _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs): ... RuntimeError: Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we don't know over which list we should parallelize: - key audio_archives has length 1049 - key local_extracted_archive has length 1049 - key limited_ids_paths has length 1 To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, and use tuples otherwise. In the end there should only be one single list, or several lists with the same length. ``` ### Steps to reproduce the bug Here is the code to reproduce it: ```python from datasets import load_dataset MLS_DATASET = "facebook/multilingual_librispeech" LANGUAGE = "german" mls = load_dataset(MLS_DATASET, LANGUAGE, cache_dir="~/datadrive/cache/huggingface/datasets", ignore_verifications=True) ``` ### Expected behavior The expected behaviour is that the dataset is successfully loaded. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-1094-azure-x86_64-with-glibc2.10 - Python version: 3.8.8 - PyArrow version: 10.0.1 - Pandas version: 1.2.4
21
Sharding error with Multilingual LibriSpeech
[ -0.1542888581752777, -0.38078638911247253, -0.11201471090316772, 0.4511337876319885, 0.06292271614074707, -0.26626056432724, 0.2973268926143646, 0.0068584019318223, -0.26120588183403015, 0.07190269976854324, 0.050112172961235046, -0.4731749892234802, 0.022747432813048363, 0.1959872990846634, -0.0905652567744255, -0.148742213845253, -0.06580035388469696, 0.03401227295398712, -0.18251892924308777, -0.30595844984054565, -0.02813826873898506, 0.4519636631011963, -0.14333327114582062, 0.15710172057151794, -0.11472296714782715, 0.14676564931869507, -0.15135101974010468, 0.3226862847805023, -0.045186955481767654, 0.34967032074928284, -0.01889905333518982, -0.17344284057617188, -0.008253959007561207, -0.19461071491241455, -0.00010253710206598043, -0.157723069190979, 0.36006593704223633, -0.17132630944252014, 0.1794770210981369, -0.1664883941411972, -0.014922581613063812, 0.000022884041754878126, -0.4241096079349518, -0.15090830624103546, -0.08584602922201157, 0.42954930663108826, 0.03984653577208519, -0.09807852655649185, -0.06366897374391556, 0.01917821168899536, 0.29995113611221313, -0.11319749057292938, -0.03324495255947113, 0.13079433143138885, 0.5492326021194458, -0.35421061515808105, 0.10202334821224213, -0.17795881628990173, -0.14993639290332794, 0.02170736715197563, -0.2093774825334549, 0.25170305371284485, 0.11397241801023483, -0.3052985668182373, -0.54099041223526, 0.020841369405388832, -0.0953948125243187, 0.18870298564434052, 0.31194743514060974, 0.16124384105205536, -0.15206918120384216, -0.0006057299906387925, 0.0985897108912468, 0.3917602002620697, -0.15665563941001892, -0.26492661237716675, 0.39145421981811523, 0.2130776345729828, 0.14802363514900208, -0.0004385089559946209, 0.21993029117584229, -0.4309559166431427, -0.03329925239086151, 0.12147688865661621, 0.09768930822610855, 0.4077244997024536, 0.020661119371652603, 0.055540069937705994, 0.17873622477054596, -0.21667325496673584, 0.05808320268988609, -0.0008154925890266895, -0.3205561935901642, -0.028599796816706657, -0.11091748625040054, 0.18071980774402618, 0.23275694251060486, 0.49486473202705383, 0.1394737809896469, -0.17759130895137787, 0.22582826018333435, 0.4980282187461853, -0.03378232195973396, 0.2003210186958313, -0.18497620522975922, 0.0593135766685009, 0.34307435154914856, 0.024777408689260483, 0.07195796072483063, -0.02766130492091179, 0.013186954893171787, 0.10174201428890228, 0.17052777111530304, -0.5779863595962524, -0.3810424208641052, 0.24875274300575256, -0.3081056773662567, -0.23879778385162354, 0.15393182635307312, 0.17359136044979095, -0.4036519229412079, -0.10261163860559464, 0.1207144558429718, 0.13843286037445068, 0.11538428068161011, -0.08424937725067139, -0.069400355219841, 0.022815188392996788, -0.35963544249534607, -0.2481241077184677, -0.2988051176071167, 0.38716307282447815, -0.5097915530204773, -0.16117605566978455, -0.2016167938709259, 0.12651528418064117, 0.009837815538048744, -0.09757117182016373, 0.013651655055582523, -0.016438735648989677, -0.34998562932014465, -0.012313569895923138, 0.1571996808052063, -0.16947945952415466, -0.18670864403247833, -0.3018941581249237, 0.0546063557267189, -0.30220839381217957, 0.002143408404663205, 0.11378029733896255, 0.014744416810572147, -0.10787303000688553, -0.07690974324941635, 0.22989502549171448, -0.035581666976213455, 0.21155011653900146, -0.10645359754562378, 0.19622519612312317, 0.4147152304649353, -0.1225605309009552, 0.004916421603411436, -0.14134886860847473, -0.20917591452598572, -0.1607930213212967, 0.11394111812114716, 0.21673442423343658, 0.05974099040031433, -0.08957888185977936, -0.04170897603034973, -0.2555684745311737, 0.6907575130462646, 0.24876700341701508, 0.02605467103421688, -0.3670181632041931, -0.19926874339580536, 0.8420689105987549, 0.27937448024749756, -0.11045309156179428, -0.2588641047477722, 0.1621669977903366, -0.0937589481472969, -0.017995545640587807, 0.202445387840271, 0.0822637528181076, -0.029232921078801155, 0.047074079513549805, -0.3876539468765259, 0.2534814178943634, 0.03404183313250542, -0.005455507431179285, -0.40902286767959595, 0.0819159522652626, -0.3247310221195221, -0.09219304472208023, 0.06400686502456665, -0.17142552137374878, 0.5494961738586426, 0.20918753743171692, 0.17388783395290375, -0.3238382041454315, 0.34962624311447144, 0.05796096846461296, 0.08596773445606232, 0.041871972382068634, 0.002313997596502304, -0.019301453605294228, -0.17369721829891205, -0.10254127532243729, -0.21768255531787872, 0.4827970266342163, -0.1613536775112152, 0.12696079909801483, 0.3378102779388428, -0.20884810388088226, -0.04200729355216026, 0.09996029734611511, 0.22547312080860138, 0.18016166985034943, -0.27197030186653137, 0.0011333486763760448, 0.26103755831718445, 0.1261371523141861, -0.16056261956691742, -0.1425124555826187, -0.36625275015830994, 0.02412797510623932, -0.2355358749628067, -0.39129751920700073, 0.002682778052985668, 0.14853718876838684, 0.16615936160087585, -0.08857234567403793, -0.13529160618782043, 0.17039138078689575, -0.07777027040719986, 0.17382405698299408, 0.012507461942732334, 0.030754443258047104, 0.09131017327308655, -0.26768869161605835, 0.0586656853556633, -0.1747930347919464, -0.07395083457231522, -0.21384327113628387, 0.4433285593986511, 0.30971258878707886, -0.016996530815958977, 0.06350989639759064, 0.12894511222839355, 0.06653404980897903, 0.20174099504947662, -0.18058252334594727, 0.03677760064601898, -0.48833662271499634, 0.3529369533061981, -0.2943674325942993, -0.24308526515960693, 0.1269846111536026, -0.40589481592178345, -0.37805044651031494, 0.4541189968585968, 0.2297893464565277, 0.1142001748085022, -0.04674157127737999, 0.41061165928840637, 0.041961248964071274, 0.29933902621269226, 0.2526513338088989, 0.016666432842612267, 0.10175581276416779, 0.2811323404312134, 0.13943585753440857, 0.08502167463302612, -0.3121607303619385, 0.05322731286287308, -0.49606451392173767, 0.03942165896296501, 0.009534059092402458, -0.17361675202846527, -0.22334110736846924, -0.3100746273994446, -0.16655102372169495, -0.10611608624458313, 0.021504396572709084, -0.11612987518310547, -0.3119852542877197, -0.5135195851325989, -0.12037678062915802, -0.3294660151004791, -0.12242021411657333, -0.28134724497795105, -0.0764893889427185, 0.023558247834444046, -0.006073000840842724, -0.33226433396339417, 0.2201332002878189, 0.4142240881919861, -0.20409120619297028, -0.14726819097995758, 0.08064703643321991, 0.011044060811400414, -0.2590993642807007, -0.4382477104663849, 0.14576897025108337, 0.2631431818008423, 0.17967164516448975, -0.09954626858234406, -0.3880983889102936, -0.12111787497997284, -0.3137843608856201, -0.3934954106807709, 0.20591650903224945, -0.0977710485458374, 0.040158793330192566, 0.17834672331809998, -0.35019657015800476, -0.4063583016395569, -0.2042681723833084, 0.4997023046016693, 0.05393597483634949, -0.23194362223148346, 0.452396422624588, 0.14264829456806183, -0.07044756412506104, -0.19507542252540588, -0.08504868298768997, 0.15425163507461548, -0.22377511858940125, -0.029282651841640472, -0.24001754820346832, 0.1874135285615921, -0.1951666921377182, 0.0472240187227726, -0.1219107136130333, -0.4181939363479614, 0.238336980342865, 0.06492341309785843, -0.08995526283979416, -0.044913385063409805, -0.11410625278949738, -0.30258291959762573, -0.1375599056482315, 0.22168442606925964, 0.3778473734855652, 0.35898610949516296, -0.229991152882576, 0.11963801831007004, 0.1275072544813156, -0.028724534437060356, -0.040242113173007965, -0.14378361403942108, 0.1702681928873062, 0.2010556310415268, -0.09931138902902603, -0.19771456718444824, -0.060597799718379974, 0.36304908990859985, -0.2715449929237366, 0.425813227891922, 0.15897779166698456, 0.21930396556854248, 0.4407074451446533, 0.5451906323432922, -0.02619505673646927, 0.025045379996299744, 0.5250062942504883, 0.22513920068740845, -0.11948185414075851, -0.03808186575770378, -0.13071100413799286, 0.19327838718891144, 0.2927527129650116, -0.01537542138248682, 0.34665045142173767, -0.11939062178134918, -0.3912122845649719, -0.14896458387374878, -0.29288768768310547, -0.2154095619916916, -0.3158706724643707, 0.1489570289850235, -0.30222588777542114, 0.1453736573457718, 0.023084715008735657, -0.19647397100925446, 0.34087681770324707, -0.1181844100356102, 0.19266904890537262, 0.08718311786651611, -0.11679819971323013, -0.08314666897058487, 0.1990247517824173, -0.29479843378067017, 0.18061138689517975, 0.4045845568180084, 0.278989315032959, 0.3575219511985779, -0.41524529457092285, -0.1900947540998459, 0.08529409766197205, -0.0632714033126831, 0.07551991939544678, -0.32065874338150024, -0.05401471629738808, -0.017344459891319275, -0.040407586842775345, 0.1284787654876709, 0.0956391990184784, -0.12535656988620758, 0.05396648496389389, 0.3070633113384247, -0.041435111314058304, -0.4625735878944397, 0.22625775635242462, 0.009053025394678116, 0.039835378527641296, 0.010093112476170063, -0.02596408501267433, -0.1404593586921692, -0.1457844078540802, -0.17854860424995422, 0.08426026254892349, -0.22626733779907227, 0.13795344531536102, 0.3580233156681061, 0.1366806924343109, 0.2227245271205902, -0.15233130753040314, 0.01812235824763775, -0.016155919060111046, 0.05023333057761192, -0.13211673498153687, -0.09887085855007172, -0.4954946041107178, 0.2284066081047058, 0.08347565680742264, 0.14745379984378815, 0.08826380223035812, -0.07032305747270584, -0.13016103208065033, -0.13716742396354675, 0.33307790756225586, 0.04432584345340729, 0.05242094397544861, -0.004976061172783375, 0.270228773355484, -0.05104154720902443, 0.3609313666820526, 0.029806887730956078, 0.11620590090751648, 0.4313308000564575, -0.14262902736663818, 0.1578003317117691, -0.05734686180949211, 0.005311958491802216, -0.08794064819812775, -0.005164795555174351, 0.01237562857568264, -0.2283702939748764, 0.37605759501457214, 0.062872976064682, 1.0178343057632446, -0.03703256696462631, -0.12144710123538971, -0.21996884047985077, -0.07855869084596634, -0.35459524393081665, 0.2852456867694855, 0.11513407528400421, -0.3170114755630493, -0.08876519650220871, 0.12870265543460846, 0.13905629515647888, 0.2652323544025421, 0.26362621784210205, -0.20186729729175568, 0.18611660599708557, -0.06698033958673477, -0.02057204581797123, -0.01664952002465725, 0.18619246780872345, -0.3221973478794098, -0.06928428262472153, 0.35372087359428406, 0.13765603303909302, 0.04166378825902939, 0.10554420202970505, -0.11290960758924484, -0.06561923772096634, -0.03237215429544449, -0.18805666267871857, -0.26086944341659546, 0.34393182396888733, -0.17468766868114471, 0.23285043239593506, -0.4053474962711334, -0.22303719818592072, -0.02311493270099163, 0.2129439264535904, 0.23217721283435822, 0.11518146097660065, 0.1165071502327919, 0.11896421015262604, 0.44635987281799316, -0.25980526208877563, -0.0628034919500351, -0.09216488152742386, 0.05726252868771553, -0.19876649975776672, -0.30966511368751526, -0.09067529439926147, 0.16795845329761505, -0.15948224067687988, -0.2457648366689682, 0.07422707974910736, -0.0006491867243312299, 0.1345098316669464, 0.10213074088096619, 0.2737935781478882, -0.024867195636034012, -0.012979342602193356, 0.2515260875225067, 0.005615455564111471, -0.24199038743972778, 0.11037248373031616, 0.14698870480060577, -0.08265804499387741, -0.2027958184480667, 0.20812584459781647, 0.20815737545490265, 0.26384255290031433, 0.10896754264831543, 0.13131622970104218, -0.25612595677375793, -0.2986471951007843, -0.19286121428012848, -0.1801348179578781, -0.26905277371406555, -0.26564502716064453, -0.10923760384321213, -0.20390266180038452, -0.1600903868675232, 0.48974260687828064, 0.20348258316516876, 0.4614834189414978, -0.013181325048208237, -0.050550151616334915, -0.011432995088398457, 0.3223356604576111, -0.27546602487564087, -0.05849052593111992, -0.2240951657295227, 0.4228683412075043, 0.03842557221651077, 0.2051917165517807, -0.3653639853000641, 0.007902657613158226, -0.2439493089914322, 0.26596319675445557, 0.3980690538883209, 0.0184476338326931, 0.004177910275757313, 0.17741887271404266, 0.2406448870897293, 0.11177776008844376, -0.05551393702626228, -0.23937566578388214, 0.15773291885852814, 0.04784726724028587, 0.17599272727966309, 0.23274661600589752, -0.20016975700855255, -0.1693873405456543, 0.11480584740638733, -0.05667443573474884, -0.09232184290885925, 0.25059616565704346, 0.03853129968047142, 0.20561754703521729, 0.12279412150382996, 0.15325088798999786, 0.17892278730869293, 0.028966618701815605, -0.16176281869411469, 0.051138050854206085, -0.2108868807554245, -0.1319562792778015, 0.03987444192171097, -0.2071167528629303, 0.5061684846878052, -0.1862984001636505, -0.029693249613046646, 0.1287393420934677, 0.01221480779349804, 0.016945933923125267, -0.15051479637622833, 0.056483685970306396, 0.3455723524093628, -0.10521052777767181, 0.11678764224052429, -0.431791216135025, 0.32037338614463806, 0.3199377954006195, -0.12104343622922897, -0.005200313404202461, 0.15976987779140472, -0.10464305430650711, 0.13817942142486572, 0.3864026665687561, 0.034011565148830414, -0.21064913272857666, 0.34078219532966614, -0.02244793251156807, -0.0011418475769460201, -0.4482939839363098, -0.1110093966126442, -0.2890567481517792, -0.33424505591392517, 0.21673452854156494, 0.24948452413082123, -0.11643669754266739, -0.03298366442322731, 0.10528556257486343, -0.17513886094093323, 0.2326638251543045, -0.061598487198352814, 0.4358268678188324, -0.15231144428253174, -0.3068230152130127, 0.09097420424222946, 0.3231315314769745, 0.22205065190792084, 0.03435177728533745, -0.024909351021051407, 0.8288172483444214, 0.23264457285404205, 0.045685168355703354, 0.011087613180279732, 0.4530091881752014, -0.36868712306022644, -0.1912975311279297, -0.1651473492383957, 0.054978713393211365, -0.17527711391448975, 0.03328077867627144, 0.16991491615772247, 0.6062958240509033, 0.5030739903450012, 0.11287331581115723, -0.02078787051141262, 0.14829224348068237, -0.2530914545059204, -0.06319785118103027, -0.1596842110157013, -0.23592811822891235, 0.5109761953353882, 0.010492540895938873, 0.027881311252713203, -0.13761912286281586, 0.12444385141134262, 0.17794272303581238, 0.1918972134590149, 0.28278103470802307, -0.2174663245677948, -0.022371875122189522, 0.15441645681858063, -0.1952105462551117, 0.4075002372264862, 0.44218242168426514, 0.5511507391929626, 0.19691157341003418, 0.11473283171653748, -0.2723623812198639, 0.28572723269462585, 0.315348356962204, 0.17589932680130005, 0.30662500858306885, -0.15867295861244202, -0.1397588849067688, 0.12759527564048767, -0.44253483414649963, 0.014666171744465828, -0.466194212436676, 0.07200849056243896, 0.1561155766248703, -0.39336878061294556, 0.09623916447162628, 0.0009019809658639133, 0.11815324425697327, 0.41287606954574585, 0.13140994310379028, 0.17510434985160828, 0.1038055568933487, -0.13223527371883392, -0.33885741233825684, -0.3542328178882599, 0.2900504171848297, -0.045321665704250336, 0.5100414156913757, -0.5574930906295776, 0.23485714197158813, 0.16430765390396118, -0.09361047297716141, -0.006973650772124529, -0.19339068233966827, -0.24648921191692352, 0.0866507738828659, 0.0036277812905609608, 0.28145092725753784, 0.1700228452682495, -0.31024169921875, 0.039081644266843796, -0.10969805717468262, 0.19208677113056183, 0.0676446408033371, 0.24869786202907562, -0.1771908849477768, -0.18385806679725647, -0.18595750629901886, 0.103249192237854, 0.07452526688575745, 0.25047487020492554, 0.2271890938282013, -0.41302087903022766, 0.0985407903790474, -0.11223284900188446, -0.3202795088291168, 0.00012105099449399859, 0.3399907052516937, 0.039832890033721924, 0.04819635674357414, -0.023990344256162643, 0.33109694719314575, -0.13898538053035736, 0.2549511194229126, 0.04667496308684349, 0.3038896918296814, 0.03729412332177162, 0.09079311788082123, 0.17086245119571686, -0.22268423438072205, -0.2312358021736145, 0.23082460463047028, 0.09137308597564697, -0.26376014947891235, -0.15118761360645294, -0.5986199975013733, 0.30469465255737305, -0.03866512328386307, 0.0026843389496207237, 0.19979797303676605, 0.2136547714471817, 0.020015472546219826, -0.10300631821155548, -0.40766170620918274, -0.2920043468475342, 0.12493192404508591, 0.18041731417179108, -0.08202901482582092, 0.1139051765203476, 0.12265463173389435, -0.27929404377937317, 0.015795979648828506, -0.2886646091938019, 0.30398666858673096, -0.4988362193107605, 0.1860647350549698, -0.11511542648077011 ]
https://github.com/huggingface/datasets/issues/5413
concatenate_datasets fails when two dataset with shards > 1 and unequal shard numbers
Hi ! Thanks for reporting :) I managed to reproduce the hub using ```python from datasets import concatenate_datasets, Dataset, load_from_disk Dataset.from_dict({"a": range(9)}).save_to_disk("tmp/ds1") ds1 = load_from_disk("tmp/ds1") ds1 = concatenate_datasets([ds1, ds1]) Dataset.from_dict({"b": range(6)}).save_to_disk("tmp/ds2") ds2 = load_from_disk("tmp/ds2") ds2 = concatenate_datasets([ds2, ds2, ds2]) concatenate_datasets([ds1, ds2], axis=1) ``` and I get ```python Traceback (most recent call last): File "test.py", line 98, in <module> dds = concatenate_datasets([ds1, ds2], axis=1) File "/Users/.../datasets/combine.py", line 182, in concatenate_datasets return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis) File "/Users/.../datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets table = concat_tables([dset._data for dset in dsets], axis=axis) File "/Users/.../datasets/table.py", line 1778, in concat_tables return ConcatenationTable.from_tables(tables, axis=axis) File "/Users/.../datasets/table.py", line 1483, in from_tables blocks = _extend_blocks(blocks, table_blocks, axis=axis) File "/Users/.../datasets/table.py", line 1477, in _extend_blocks result[i].extend(row_blocks) IndexError: list index out of range ``` It appears to happen when the two datasets have a number of shards that is not the same
### Describe the bug When using `concatenate_datasets([dataset1, dataset2], axis = 1)` to concatenate two datasets with shards > 1, it fails: ``` File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/combine.py", line 182, in concatenate_datasets return _concatenate_map_style_datasets(dsets, info=info, split=split, axis=axis) File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 5499, in _concatenate_map_style_datasets table = concat_tables([dset._data for dset in dsets], axis=axis) File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1778, in concat_tables return ConcatenationTable.from_tables(tables, axis=axis) File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1483, in from_tables blocks = _extend_blocks(blocks, table_blocks, axis=axis) File "/home/xzg/anaconda3/envs/tri-transfer/lib/python3.9/site-packages/datasets/table.py", line 1477, in _extend_blocks result[i].extend(row_blocks) IndexError: list index out of range ``` ### Steps to reproduce the bug dataset = concatenate_datasets([dataset1, dataset2], axis = 1) ### Expected behavior The datasets are correctly concatenated. ### Environment info datasets==2.8.0
140
concatenate_datasets fails when two dataset with shards > 1 and unequal shard numbers
[ -0.7089456915855408, 0.11838175356388092, -0.20427308976650238, 0.16614151000976562, -0.07145633548498154, -0.022043095901608467, 0.27766096591949463, 0.2078704833984375, -0.37286001443862915, 0.23067639768123627, 0.048080239444971085, -0.01782083511352539, 0.14367051422595978, 0.3441729247570038, -0.34617897868156433, 0.025193091481924057, 0.06179629638791084, 0.18307100236415863, -0.43035897612571716, 0.07568017393350601, -0.08831264078617096, 0.2671511173248291, -0.1946248561143875, -0.32991769909858704, -0.43913963437080383, 0.46667635440826416, 0.08208832144737244, 0.31142982840538025, -0.154878631234169, 0.11540522426366806, 0.2935693860054016, 0.37896767258644104, -0.0179772786796093, 0.16724897921085358, -0.00010558740905253217, -0.10761198401451111, 0.15033259987831116, -0.10382039099931717, -0.30810850858688354, -0.08148503303527832, -0.6150872707366943, -0.28822797536849976, -0.2940359115600586, -0.011789152398705482, 0.0022123747039586306, -0.01973220892250538, -0.10808490216732025, 0.00018645594536792487, 0.21748995780944824, 0.056551139801740646, 0.1786281317472458, 0.04882301017642021, 0.24089640378952026, -0.34883376955986023, 0.23652441799640656, -0.014484614133834839, 0.1288316696882248, -0.2222415655851364, -0.22934205830097198, 0.08536931872367859, -0.0029176766984164715, 0.232207253575325, 0.08171019703149796, -0.14298637211322784, -0.2858150601387024, 0.13191959261894226, -0.1272120177745819, -0.039988283067941666, 0.3153313398361206, -0.04854856804013252, -0.0066566551104187965, -0.28813233971595764, -0.06412732601165771, -0.014178707264363766, 0.010611537843942642, -0.20323269069194794, 0.0809776708483696, 0.01192138995975256, 0.1358489841222763, 0.10143904387950897, -0.21385498344898224, 0.1298186182975769, -0.11024942249059677, 0.18276315927505493, -0.059729285538196564, 0.27445173263549805, 0.08759220689535141, 0.22356551885604858, -0.030635466799139977, -0.36145761609077454, 0.00372457061894238, -0.28936004638671875, -0.20937886834144592, -0.012763227336108685, -0.5864046812057495, -0.06824158877134323, 0.01620517298579216, -0.07313879579305649, 0.44727209210395813, 0.19394966959953308, -0.02017122320830822, 0.20722264051437378, 0.29121965169906616, 0.12396188825368881, -0.043690308928489685, -0.12220022827386856, 0.37657538056373596, 0.176704540848732, -0.2439507097005844, -0.12226814776659012, 0.09967190772294998, 0.2698450982570648, 0.02447723224759102, -0.6263928413391113, -0.22308684885501862, -0.015419898554682732, -0.04955537989735603, -0.040773529559373856, -0.12924295663833618, 0.16965025663375854, -0.04082148149609566, 0.04373139515519142, -0.12478692829608917, 0.05049941688776016, 0.1909051239490509, -0.0543990284204483, -0.1723330020904541, 0.23825614154338837, 0.058467548340559006, -0.24622616171836853, -0.3084993064403534, 0.11214780807495117, -0.013828103430569172, -0.06743381172418594, 0.10134157538414001, -0.03768523409962654, -0.17861275374889374, 0.15695779025554657, 0.29499274492263794, 0.28649142384529114, 0.03550863265991211, -0.10799194127321243, 0.2439151555299759, 0.14424633979797363, 0.2425258457660675, -0.2582779824733734, -0.041085436940193176, -0.04304288327693939, 0.20397590100765228, 0.01985456794500351, -0.045207660645246506, -0.11698289960622787, -0.24500751495361328, 0.2582131326198578, 0.00929854717105627, 0.22442173957824707, -0.019730227068066597, 0.3096252381801605, 0.4377806782722473, -0.21696937084197998, -0.3054674565792084, -0.09335839748382568, -0.12733444571495056, -0.19733037054538727, 0.2512471079826355, 0.130946084856987, -0.2891668379306793, 0.19669361412525177, 0.061007700860500336, -0.14880774915218353, 0.12940503656864166, 0.17043408751487732, -0.1780310422182083, -0.46026885509490967, -0.22117945551872253, 0.5553763508796692, 0.4351276755332947, 0.08691439777612686, -0.40508249402046204, 0.22841942310333252, -0.24089160561561584, -0.2594029903411865, 0.41547366976737976, -0.11150645464658737, 0.026228230446577072, -0.13573642075061798, 0.3917843699455261, 0.22547410428524017, -0.13345959782600403, -0.29853853583335876, -0.17855846881866455, -0.23197808861732483, -0.08650121837854385, -0.00930214487016201, 0.16657167673110962, -0.059692658483982086, 0.3349637985229492, -0.3169229328632355, 0.3159392476081848, -0.16008605062961578, 0.30474627017974854, 0.18111488223075867, 0.03661525622010231, -0.38845059275627136, -0.07027193903923035, -0.033203016966581345, -0.28971272706985474, -0.019063081592321396, 0.0032725268974900246, 0.08117855340242386, -0.10071921348571777, -0.06645815074443817, -0.16930030286312103, -0.0510135293006897, 0.10941176116466522, 0.2106758952140808, 0.2582026422023773, 0.10450132191181183, 0.12839995324611664, -0.22873379290103912, 0.13949231803417206, 0.16106367111206055, -0.3302418291568756, -0.2852754592895508, -0.35078391432762146, 0.34614431858062744, -0.08117906749248505, -0.23422931134700775, 0.08964461088180542, 0.18959346413612366, 0.1459108293056488, 0.04969936981797218, 0.11041955649852753, 0.3691149055957794, -0.35855668783187866, -0.13573023676872253, 0.2765090763568878, -0.10975562036037445, -0.2702455520629883, 0.1002647876739502, -0.1824154257774353, -0.29978951811790466, -0.09462341666221619, 0.014759188517928123, -0.22424477338790894, 0.46740496158599854, 0.10291208326816559, 0.040138427168130875, 0.05770206078886986, -0.04954369366168976, 0.23369893431663513, -0.07443919777870178, -0.0029919424559921026, -0.4383925199508667, 0.18046434223651886, 0.09353061020374298, 0.0255038533359766, 0.27144551277160645, -0.17772726714611053, 0.29285070300102234, 0.2893335819244385, 0.06744564324617386, 0.01359071210026741, -0.13137923181056976, 0.07380436360836029, -0.08331679552793503, 0.17522400617599487, 0.4997546374797821, 0.39559823274612427, 0.43223246932029724, 0.037067051976919174, -0.11203087866306305, -0.3661801218986511, -0.32113441824913025, -0.023424111306667328, -0.18808041512966156, -0.09958097338676453, 0.5555937886238098, 0.30462580919265747, -0.2066749483346939, -0.18555879592895508, -0.25096753239631653, 0.09331927448511124, -0.0006764638819731772, -0.19462431967258453, -0.1368357539176941, -0.20107129216194153, -0.005319387651979923, -0.2517610490322113, 0.08810123056173325, -0.2292322963476181, -0.4838525950908661, -0.1304645538330078, 0.22737577557563782, -0.21830645203590393, 0.290481835603714, 0.23606321215629578, -0.2856852114200592, 0.24609774351119995, 0.055072084069252014, -0.03320516273379326, 0.09100691974163055, -0.08347243815660477, 0.17812739312648773, 0.1385350525379181, -0.019355986267328262, 0.025421010330319405, -0.27271798253059387, 0.05127336084842682, -0.3951537311077118, -0.19649745523929596, 0.02937452681362629, -0.19699431955814362, 0.08031317591667175, 0.23391249775886536, -0.04309181496500969, -0.24040460586547852, -0.33682307600975037, 0.2087855190038681, 0.555306077003479, -0.024604564532637596, 0.36323872208595276, 0.08546483516693115, -0.20724773406982422, -0.18050840497016907, -0.2558518946170807, 0.006981006823480129, -0.29978153109550476, -0.20729966461658478, -0.049531321972608566, 0.13320240378379822, 0.021076861768960953, 0.5201963186264038, -0.1645037978887558, -0.060758404433727264, -0.033895935863256454, -0.2901211082935333, -0.14298191666603088, 0.423808217048645, -0.067575603723526, -0.34872889518737793, -0.14547719061374664, -0.06866567581892014, 0.11915186792612076, 0.5551146864891052, 0.09571028500795364, 0.11899115145206451, 0.06190868467092514, 0.02773456647992134, -0.13128826022148132, 0.06300196051597595, 0.331064373254776, 0.27169862389564514, -0.14534683525562286, -0.23306676745414734, 0.21127021312713623, 0.38985371589660645, -0.16527995467185974, 0.10128989070653915, -0.2902664542198181, 0.06694552302360535, 0.06550659239292145, 0.3513730764389038, 0.3488696813583374, -0.2316792905330658, 0.14749152958393097, 0.08623093366622925, 0.25077852606773376, 0.14973080158233643, -0.0958779901266098, 0.0676194280385971, 0.3043786585330963, 0.17788495123386383, 0.0736321359872818, -0.0991201251745224, 0.15801334381103516, 0.013662743382155895, 0.11338090151548386, -0.06376814097166061, -0.1385420858860016, 0.05465727671980858, -0.05882739648222923, 0.13084973394870758, 0.24812975525856018, -0.012604457326233387, -0.21032845973968506, 0.09500004351139069, -0.37009069323539734, 0.008321127854287624, -0.11277090758085251, 0.08000864833593369, -0.19344304502010345, -0.005365462973713875, -0.3563125729560852, 0.3746470510959625, 0.25474146008491516, 0.43364956974983215, 0.035863664001226425, -0.23915743827819824, -0.2623792290687561, -0.034255437552928925, 0.5305023789405823, -0.4441863000392914, -0.22248859703540802, 0.14077696204185486, 0.23113791644573212, -0.16344128549098969, 0.02118012122809887, 0.024279993027448654, 0.22311946749687195, -0.037330929189920425, 0.41866207122802734, -0.46719738841056824, 0.04601345956325531, 0.365833044052124, 0.12201262265443802, 0.1472538262605667, -0.05188931152224541, -0.10649780929088593, 0.07521943002939224, -0.45885562896728516, -0.220236673951149, -0.024060672149062157, 0.4132579267024994, -0.2580417990684509, -0.03666800633072853, -0.33618834614753723, -0.4127897620201111, 0.24633559584617615, 0.07441210746765137, 0.3191084861755371, -0.06224435567855835, 0.28840553760528564, -0.4046514630317688, 0.12948554754257202, 0.428951233625412, 0.2013530135154724, 0.21464771032333374, -0.26332393288612366, 0.2594927251338959, -0.17884984612464905, 0.3047502338886261, 0.043770577758550644, -0.32986903190612793, 0.06449093669652939, -0.20384995639324188, 0.018011869862675667, 0.09539710730314255, 0.13209643959999084, 0.014361274428665638, 0.1828346848487854, -0.5488374829292297, 0.01105446182191372, 0.21867318451404572, -0.03418784961104393, -0.11260292679071426, -0.040701087564229965, 0.011195898056030273, -0.32641294598579407, 0.05026815086603165, -0.1426050364971161, 0.5296660661697388, 0.2583237588405609, 0.1138145700097084, -0.05376005172729492, 0.24048744142055511, 0.290062814950943, 0.15109896659851074, 0.1279018223285675, -0.17785976827144623, -0.1363486349582672, -0.004707381594926119, -0.2154068499803543, 0.01876763254404068, 0.36139070987701416, -0.1548728346824646, 0.11603813618421555, -0.08098433166742325, 0.260315865278244, 0.04026694968342781, 0.12474105507135391, -0.047272905707359314, -0.07446037977933884, -0.16101358830928802, 0.14106741547584534, 0.32289981842041016, -0.47748661041259766, -0.15050123631954193, -0.07918063551187515, -0.1935724914073944, -0.18907880783081055, 0.03139366954565048, 0.28076618909835815, 0.04052557796239853, 0.4544619619846344, 0.06684422492980957, -0.5371842384338379, -0.18181772530078888, -0.06464985013008118, 0.21243909001350403, 0.2734030783176422, -0.06062251329421997, -0.029222900047898293, -0.019489964470267296, -0.042542967945337296, -0.06309060752391815, -0.3725071847438812, 0.1674542874097824, 0.21681474149227142, 0.01217418909072876, -0.09224887937307358, 0.30773550271987915, -0.0872587189078331, -0.39858996868133545, 0.14501942694187164, -0.25279247760772705, -0.3862621784210205, -0.11556241661310196, 0.10757392644882202, -0.11736791580915451, -0.20062953233718872, 0.13890546560287476, 0.10520904511213303, -0.09029163420200348, -0.05352892726659775, -0.0878043994307518, -0.26467177271842957, -0.1995738446712494, 0.45825934410095215, 0.09643299877643585, 0.0031446933280676603, 0.14208178222179413, -0.08787322044372559, -0.05291060358285904, -0.1461840271949768, -0.15358655154705048, 0.21889430284500122, -0.42121249437332153, -0.034326788038015366, -0.23131060600280762, -0.061697717756032944, 0.019926726818084717, 0.1916099488735199, 0.15791136026382446, 0.19861607253551483, 0.35675060749053955, -0.270030677318573, -0.14572027325630188, 0.022640159353613853, -0.03148115798830986, 0.25522106885910034, 0.03680144622921944, 0.3127649426460266, -0.30142995715141296, 0.13317285478115082, -0.3938135504722595, -0.16581088304519653, -0.058184344321489334, 0.15838295221328735, 0.0702567845582962, -0.14040373265743256, -0.14040614664554596, -0.13910222053527832, 0.2673385441303253, 0.18625320494174957, -0.2919482886791229, -0.2782858610153198, 0.10711359232664108, 0.013382242992520332, 0.09361369907855988, 0.06975245475769043, -0.23129862546920776, 0.03457287698984146, -0.1561630219221115, -0.25541791319847107, 0.22821296751499176, 0.10259981453418732, -0.21983107924461365, -0.07246880978345871, 0.2956399917602539, 0.10072142630815506, 0.06462035328149796, -0.041015736758708954, 0.09324206411838531, 0.01439612451940775, -0.34297963976860046, 0.18608544766902924, 0.04437028616666794, 0.010599054396152496, 0.19137240946292877, 0.18936635553836823, 0.2847867012023926, 0.008002848364412785, 0.05800282955169678, -0.2700592875480652, -0.27418646216392517, -0.047537002712488174, 0.5676194429397583, 0.2884262204170227, 0.019226204603910446, -0.3151427209377289, -0.046986810863018036, 0.30750560760498047, -0.182301864027977, -0.1288147270679474, 0.1549239456653595, 0.12515409290790558, 0.19331665337085724, -0.003986574709415436, 0.1122550517320633, -0.24331185221672058, 0.06437354534864426, 0.32493624091148376, 0.13216517865657806, -0.1972000151872635, -0.08884429931640625, 0.20213155448436737, 0.14379793405532837, 0.1537432074546814, 0.09545912593603134, 0.10670391470193863, 0.20556090772151947, 0.40367940068244934, -0.04158006235957146, 0.6074607372283936, 0.14126230776309967, -0.21409209072589874, -0.13656669855117798, -0.2598918080329895, 0.35194146633148193, 0.33556535840034485, -0.08509188890457153, 0.054756149649620056, 0.12842823565006256, 0.18848879635334015, 0.035004597157239914, -0.010902930051088333, -0.09347779303789139, 0.05596282705664635, -0.2496025711297989, -0.25712981820106506, -0.043294474482536316, -0.24663621187210083, -0.23216214776039124, -0.09584573656320572, 0.1885647177696228, 0.06475399434566498, 0.6579800248146057, -0.20720520615577698, 0.2502737045288086, -0.0886102169752121, 0.2814740836620331, 0.35863783955574036, -0.11394011229276657, -0.25962334871292114, 0.18154877424240112, 0.38720834255218506, -0.1320684254169464, 0.4062134027481079, -0.028162861242890358, 0.6129322052001953, 0.21623505651950836, 0.247142493724823, -0.05123303830623627, 0.14927345514297485, -0.10020303726196289, -0.29407089948654175, 0.08709529787302017, 0.008332740515470505, -0.026605835184454918, 0.5262330770492554, 0.24554842710494995, -0.17741553485393524, -0.1871383637189865, 0.23373448848724365, -0.10808628052473068, -0.3618464469909668, -0.05711428076028824, -0.2647233009338379, -0.1642511487007141, 0.23261575400829315, 0.005499321036040783, -0.28645747900009155, -0.3765713572502136, 0.39813968539237976, -0.00943831354379654, 0.22392897307872772, -0.1259758323431015, 0.18645666539669037, -0.02161715365946293, 0.4448813498020172, -0.04931708052754402, -0.010943032801151276, -0.2652413845062256, -0.2058541625738144, -0.338408499956131, 0.1551881730556488, 0.041657157242298126, 0.1285294145345688, -0.307128369808197, 0.40849849581718445, 0.21570073068141937, 0.07550768554210663, 0.020976785570383072, 0.14571186900138855, 0.007708151824772358, 0.05307752639055252, -0.36325669288635254, -0.04343615472316742, 0.14426575601100922, -0.48803624510765076, 0.10055672377347946, -0.21181195974349976, 0.36414575576782227, 0.04908085614442825, 0.2785895764827728, -0.22341777384281158, 0.03449372202157974, 0.5199140310287476, -0.2005740851163864, 0.07693373411893845, 0.3956417143344879, 0.4714438021183014, -0.4158778190612793, 0.09150750935077667, -0.12062506377696991, -0.14578162133693695, -0.10657937079668045, 0.21618223190307617, -0.013007596135139465, 0.17567631602287292, -0.14776070415973663, -0.012119327671825886, 0.29952719807624817, 0.030342593789100647, 0.27866846323013306, 0.2512807548046112, 0.048682987689971924, 0.2780708372592926, 0.01931094191968441, 0.060982685536146164, -0.2816287577152252, 0.16570965945720673, 0.18594160676002502, 0.4447827935218811, 0.1926773488521576, -0.7017194032669067, 0.1888113170862198, -0.02637304551899433, -0.4037764072418213, -0.21661578118801117, -0.1884353756904602, 0.11239771544933319, 0.018523169681429863, -0.3010176122188568, -0.052235186100006104, 0.1344936341047287, 0.06751164048910141, -0.05461211875081062, 0.3866822123527527, 0.01893126778304577, -0.11180675029754639, 0.059024225920438766, 0.09022382646799088, 0.13424713909626007, -0.5086567997932434, 0.1163412407040596, -0.2747972309589386 ]
https://github.com/huggingface/datasets/issues/5412
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
Hi ! It fails because the dataset is already being prepared by your first run. I'd encourage you to prepare your dataset before using it for multiple trainings. You can also specify another cache directory by passing `cache_dir=` to `load_dataset()`.
### Describe the bug I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error. If there is a workaround to ignore the cache I think that would solve my problem too. I am using datasets version 2.8.0. ### Steps to reproduce the bug 1. Start training run of GPU 0 loading dataset from ``` load_dataset( "json", data_files=tr_dataset_path, split=f"train", download_mode="force_redownload", ) ``` 2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error: ``` Traceback (most recent call last): File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module> main() File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main load_dataset( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset builder_instance = load_dataset_builder( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__ self.info = DatasetInfo.from_directory(self._cache_dir) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f: File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open self.open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open f = self._open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open return LocalFileOpener(path, mode, fs=self, **kwargs) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__ self._open() File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open self.f = open(self.path, mode=self.mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json' ``` ### Expected behavior Expected behavior: 2nd GPU training run should run the same as 1st GPU training run. ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10 - Python version: 3.8.15 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
40
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
[ -0.45626404881477356, 0.1598930060863495, -0.18178649246692657, 0.37631669640541077, 0.19635573029518127, 0.13453294336795807, 0.41071993112564087, 0.34542590379714966, -0.03330771252512932, 0.05051781237125397, 0.11889174580574036, 0.3173251152038574, 0.11299068480730057, 0.09797313064336777, -0.09743411839008331, -0.08001500368118286, -0.01484317984431982, 0.142511248588562, -0.05079507827758789, -0.022663544863462448, 0.0009652735316194594, 0.18564100563526154, -0.06442122161388397, -0.03687281161546707, -0.3621998131275177, -0.13420163094997406, 0.004733345005661249, 0.2779025435447693, 0.03767196834087372, -0.26248738169670105, 0.10377738624811172, 0.16725295782089233, 0.12026440352201462, 0.40881070494651794, -0.00010416052100481465, 0.316168874502182, 0.1937483549118042, -0.12091106921434402, -0.47235846519470215, 0.11950051784515381, -0.3978196680545807, -0.16267062723636627, 0.18076837062835693, -0.3331298530101776, -0.22299940884113312, -0.321971595287323, 0.15591426193714142, -0.32701805233955383, 0.2545017600059509, 0.07855108380317688, 0.25659501552581787, 0.3439159095287323, -0.17164109647274017, -0.29684096574783325, -0.1040564775466919, 0.00522987823933363, 0.13062448799610138, 0.08241505175828934, 0.01194099709391594, -0.2522156834602356, -0.24142958223819733, 0.43923890590667725, 0.12326699495315552, 0.14018812775611877, -0.11703535914421082, -0.04793372005224228, -0.04330972582101822, 0.11733011901378632, 0.07773515582084656, -0.2010570466518402, 0.41083237528800964, -0.21943752467632294, -0.1362641155719757, -0.2929810881614685, 0.08419913798570633, -0.1386544108390808, 0.05714256316423416, 0.07567395269870758, -0.07402421534061432, -0.029983825981616974, -0.2482743263244629, -0.02757161296904087, -0.06440819799900055, -0.04687059298157692, 0.1950800120830536, 0.09580685198307037, -0.03860420361161232, 0.20955631136894226, 0.17429476976394653, 0.20574210584163666, 0.16411280632019043, -0.015804089605808258, 0.07869283854961395, -0.16769097745418549, -0.3405458331108093, -0.09361565113067627, 0.08018622547388077, -0.4915391504764557, 0.10729558765888214, 0.10098668932914734, 0.3385576605796814, 0.09835568815469742, 0.1820213496685028, 0.12243099510669708, 0.28407353162765503, -0.047600600868463516, -0.05437545105814934, 0.07771831750869751, 0.03143785893917084, 0.12419924139976501, -0.2964343726634979, 0.059658996760845184, -0.23169909417629242, -0.08789127320051193, -0.2578463554382324, 0.08108864724636078, -0.1670726090669632, 0.07613999396562576, -0.27250581979751587, -0.020428434014320374, -0.30943989753723145, -0.20219269394874573, 0.09498836100101471, 0.46053802967071533, 0.018773430958390236, 0.2144961655139923, 0.08984582871198654, 0.01900791935622692, -0.16424019634723663, -0.22442278265953064, -0.3781847655773163, 0.1604102998971939, -0.09615073353052139, -0.06975547969341278, 0.29714271426200867, 0.2321709841489792, 0.6210660338401794, -0.14198236167430878, -0.09369847178459167, -0.10737860202789307, 0.4119514524936676, -0.1696624606847763, -0.037220750004053116, 0.25315991044044495, 0.13463467359542847, -0.06424248218536377, 0.11139699816703796, 0.2404850423336029, 0.0009328765445388854, -0.01888839527964592, -0.27389422059059143, -0.19813266396522522, 0.3486476540565491, 0.23447129130363464, 0.10650388896465302, 0.04945044219493866, -0.22100453078746796, 0.26236283779144287, 0.1559593826532364, -0.21914450824260712, -0.12023100256919861, -0.09007271379232407, -0.16212742030620575, -0.13008753955364227, 0.19550618529319763, 0.27242374420166016, -0.22461971640586853, -0.017534499987959862, 0.17045378684997559, -0.15963727235794067, -0.14173710346221924, 0.12858623266220093, -0.42412328720092773, 0.46242839097976685, -0.09560373425483704, 0.2542265057563782, 0.3176499009132385, -0.4530825614929199, -0.12383569777011871, 0.23789480328559875, -0.20926034450531006, -0.0849718227982521, 0.15302880108356476, 0.03636603429913521, -0.034126244485378265, 0.15583741664886475, 0.4249001145362854, 0.300218403339386, -0.0042821732349693775, 0.05219167470932007, -0.03845591843128204, -0.1937129944562912, -0.0887620821595192, 0.5365886092185974, 0.0437149852514267, -0.2006899118423462, -0.005562271922826767, 0.020389968529343605, 0.41339096426963806, -0.12533284723758698, -0.000178095608134754, 0.26652291417121887, -0.4568031132221222, 0.03190585970878601, -0.04723963141441345, 0.2577916383743286, -0.4281242787837982, 0.020670568570494652, 0.25084319710731506, -0.06718800216913223, -0.08725591003894806, 0.12128355354070663, -0.06851588189601898, 0.05871528759598732, -0.27975994348526, -0.09448514878749847, 0.2394811511039734, 0.4405581057071686, 0.000798544439021498, 0.04802021011710167, -0.21356524527072906, 0.512752890586853, -0.3583436608314514, 0.0035098735243082047, -0.611510694026947, 0.16231873631477356, 0.14053258299827576, -0.035267289727926254, 0.21922029554843903, -0.013149047270417213, -0.007273631636053324, -0.19663885235786438, -0.009678316302597523, 0.2770852744579315, -0.02123970352113247, -0.058838751167058945, 0.3232947587966919, -0.06499182432889938, -0.07842638343572617, 0.09415028244256973, -0.002425422426313162, 0.04188914597034454, 0.16481438279151917, -0.08412008732557297, -0.1634436845779419, 0.33542871475219727, 0.13098064064979553, -0.04836287349462509, 0.252908855676651, -0.24816879630088806, 0.24625219404697418, -0.033686667680740356, -0.11767493188381195, 0.08387618511915207, 0.11067422479391098, 0.18204021453857422, 0.18171624839305878, -0.06835491955280304, -0.5206676721572876, 0.08414778858423233, 0.6187365055084229, 0.01575862430036068, 0.08020633459091187, -0.1845749020576477, 0.07657350599765778, 0.06656765192747116, 0.14778339862823486, 0.32123154401779175, 0.5344426035881042, 0.20967796444892883, 0.15711531043052673, -0.08577627688646317, -0.06535360962152481, -0.14472033083438873, -0.04294467717409134, -0.10795218497514725, 0.3745338022708893, 0.18985366821289062, 0.234375, -0.3606826066970825, -0.46672213077545166, -0.3905530869960785, 0.40427374839782715, 0.14572568237781525, -0.03311620652675629, 0.2179567515850067, -0.07454831153154373, 0.27324870228767395, -0.22327937185764313, 0.043071649968624115, 0.29233890771865845, -0.029383251443505287, 0.08175652474164963, 0.24147896468639374, -0.10493569076061249, 0.2917158901691437, -0.20329783856868744, 0.13287371397018433, 0.22370055317878723, -0.22658278048038483, 0.19006307423114777, -0.04563511908054352, -0.2770851254463196, 0.10439648479223251, 0.11631058901548386, 0.08955328911542892, 0.11072190850973129, -0.2236926108598709, -0.2102842628955841, 0.056040577590465546, 0.10959593206644058, 0.07975618541240692, -0.1034926027059555, -0.25355103611946106, -0.02143046259880066, 0.23591893911361694, -0.11243296414613724, -0.28290215134620667, 0.30860334634780884, -0.051689263433218, -0.18576817214488983, -0.22637486457824707, 0.18817590177059174, 0.008970801718533039, -0.017860449850559235, -0.7673947811126709, -0.2632763385772705, -0.2867491543292999, 0.2377098947763443, -0.09423115104436874, 0.021880626678466797, -0.03872409462928772, 0.3949354290962219, 0.05815395340323448, 0.036218006163835526, 0.06811662018299103, -0.27929356694221497, -0.4816545844078064, 0.14717315137386322, -0.24622386693954468, -0.07712273299694061, -0.06350035220384598, -0.007810138165950775, 0.2486465722322464, 0.15836100280284882, -0.5461559891700745, 0.08846229314804077, 0.19654545187950134, 0.013190166093409061, -0.2745968699455261, 0.023736238479614258, 0.3310632109642029, -0.0658688098192215, -0.14993831515312195, -0.19881172478199005, -0.12284201383590698, 0.34166499972343445, -0.24148684740066528, 0.10377708822488785, -0.24086390435695648, 0.3342761993408203, -0.039199694991111755, 0.5288744568824768, 0.09533777832984924, -0.16487906873226166, -0.037252284586429596, -0.11155849695205688, 0.173318013548851, -0.1080930083990097, -0.17893747985363007, -0.09847712516784668, -0.07114425301551819, -0.15595301985740662, 0.25720861554145813, -0.140699565410614, -0.33683276176452637, -0.1907845288515091, -0.02847725711762905, -0.18609683215618134, -0.08279252052307129, 0.20710252225399017, -0.0190616175532341, 0.09891882538795471, 0.0332883782684803, 0.4236782193183899, -0.1794859915971756, 0.30926913022994995, -0.13938455283641815, -0.07320213317871094, -0.09161394089460373, -0.03770850598812103, -0.39776384830474854, -0.026532188057899475, -0.22052718698978424, 0.13106173276901245, -0.15856501460075378, 0.4102172553539276, -0.13165105879306793, -0.050515394657850266, 0.10592538118362427, -0.17556652426719666, 0.6099921464920044, -0.18635901808738708, 0.07528543472290039, 0.11797258257865906, -0.2007681280374527, -0.06079517677426338, -0.1064949482679367, -0.10428496450185776, 0.23216670751571655, 0.17750121653079987, 0.3291718661785126, -0.26518794894218445, -0.14217327535152435, 0.38196060061454773, -0.09182168543338776, 0.0032964551355689764, -0.08337735384702682, -0.20737263560295105, -0.3486119210720062, -0.2249954491853714, 0.17581740021705627, 0.05513448268175125, 0.18448346853256226, -0.1336347460746765, -0.11767837405204773, -0.04374043270945549, 0.06509154289960861, 0.1119355857372284, 0.28477880358695984, 0.07768553495407104, 0.23322470486164093, 0.15444062650203705, 0.37751010060310364, 0.20402339100837708, 0.5071033239364624, 0.38024914264678955, 0.06808676570653915, -0.2011273354291916, 0.3132205307483673, 0.07748907059431076, 0.2998301684856415, 0.4130437970161438, 0.0383329875767231, -0.05830547958612442, 0.18040640652179718, -0.08239202946424484, -0.14888471364974976, 0.30309200286865234, 0.3036433756351471, -0.11662326008081436, -0.181401327252388, -0.5397744178771973, 0.32807713747024536, -0.05737217888236046, 0.09704515337944031, 0.21609029173851013, -0.6515226364135742, -0.21445956826210022, 0.0785825327038765, -0.24247299134731293, 0.3195216655731201, 0.08988282084465027, 0.26525700092315674, 0.4841023087501526, 0.01632693037390709, 0.15236744284629822, -0.7743749022483826, 0.48950469493865967, -0.2681422829627991, -0.062415845692157745, 0.11843045055866241, -0.10630318522453308, -0.04835866764187813, 0.5179651975631714, 0.12469852715730667, 0.052401475608348846, 0.23463155329227448, 0.1174369752407074, -0.1713201403617859, 0.31597110629081726, 0.1352735310792923, -0.21825993061065674, -0.5791332125663757, 0.1740436553955078, 0.01721830852329731, -0.043168798089027405, -0.12583228945732117, -0.3115445375442505, -0.03209322690963745, -0.14234764873981476, 0.16138234734535217, 0.18553680181503296, -0.16148561239242554, 0.4925242066383362, -0.10201199352741241, -0.31552237272262573, -0.20762984454631805, -0.045482032001018524, 0.1655578315258026, -0.0606706440448761, -0.10410746932029724, 0.3031597137451172, -0.24667862057685852, -0.008960848674178123, -0.28391727805137634, -0.1609160602092743, 0.06867974251508713, 0.01736179180443287, -0.2786684036254883, 0.170790433883667, -0.2112622708082199, -0.5086578726768494, 0.03484756126999855, 0.1831747144460678, -0.1996052861213684, -0.16065284609794617, -0.055864159017801285, 0.42089515924453735, 0.10978583246469498, -0.24010129272937775, 0.18832148611545563, 0.009464665316045284, -0.3435862362384796, 0.1774878203868866, 0.07279060781002045, -0.11742520332336426, -0.21275141835212708, 0.4644439220428467, 0.14915847778320312, 0.09483811259269714, 0.5984646677970886, 0.25051388144493103, 0.0026970021426677704, -0.40541741251945496, -0.003516464726999402, 0.5642431378364563, 0.13917109370231628, 0.10525399446487427, 0.03996903449296951, -0.0734710767865181, 0.15196840465068817, -0.0059171440079808235, -0.11485937982797623, -0.10968254506587982, 0.1502874493598938, -0.2663021683692932, -0.5207412838935852, 0.2869183421134949, -0.025955930352211, 0.1840500831604004, 0.34572485089302063, 0.17196214199066162, -0.1137697696685791, 0.01611105166375637, -0.37902674078941345, 0.20755137503147125, -0.23801454901695251, 0.015261336229741573, 0.06038098409771919, -0.17555642127990723, 0.3759225010871887, 0.2898412048816681, 0.21408578753471375, 0.0331948883831501, -0.22823190689086914, -0.23152905702590942, 0.13206085562705994, 0.04075220972299576, -0.12285991758108139, 0.47256770730018616, -0.007922815158963203, -0.2898012697696686, -0.34076693654060364, 0.009272389113903046, 0.2703309953212738, -0.0031949381809681654, 0.056695736944675446, 0.14120231568813324, -0.16718819737434387, 0.04219375178217888, 0.09157509356737137, -0.009027525782585144, -0.0038587229792028666, 0.07011260092258453, 0.018610892817378044, -0.01806819811463356, -0.09350737184286118, 0.03912604972720146, -0.17214198410511017, -0.014384530484676361, 0.03511418029665947, 0.14805881679058075, 0.056364063173532486, -0.4784240424633026, -0.14881156384944916, -0.092691570520401, 0.23762862384319305, 0.40512463450431824, -0.25012901425361633, -0.1587529480457306, -0.11245505511760712, 0.25243183970451355, -0.1933019459247589, -0.14899714291095734, 0.391153484582901, -0.07555264979600906, 0.11079073697328568, 0.2734520733356476, 0.06024406477808952, -0.05751126632094383, -0.09006476402282715, 0.3082033395767212, 0.2186656892299652, -0.08858653157949448, 0.11509974300861359, 0.10210059583187103, -0.069743812084198, -0.0850340723991394, 0.06993264704942703, 0.23404665291309357, 0.30923837423324585, 0.4753246605396271, -0.06624288111925125, 0.42680397629737854, 0.05411047115921974, -0.1793549507856369, -0.3722577691078186, -0.4034786522388458, -0.01355290599167347, 0.27468523383140564, 0.030276484787464142, 0.003154065925627947, -0.2583683133125305, 0.27974745631217957, -0.16328755021095276, -0.12110311537981033, -0.511189341545105, 0.06621115654706955, -0.35419806838035583, -0.14511236548423767, -0.21457427740097046, -0.2732461094856262, 0.10474089533090591, 0.20420478284358978, 0.02694733254611492, 0.13132070004940033, 0.3947701156139374, -0.2524853050708771, -0.1895761787891388, -0.16941793262958527, 0.18416465818881989, 0.35495084524154663, -0.056152064353227615, -0.2015514373779297, 0.19080938398838043, 0.044144172221422195, -0.33542773127555847, -0.00017563739675097167, 0.16328288614749908, 0.2824857234954834, 0.11869843304157257, 0.16714437305927277, -0.244338259100914, 0.07269265502691269, -0.07945474982261658, -0.20434463024139404, 0.24214324355125427, 0.24017511308193207, -0.27027377486228943, 0.35207968950271606, 0.19343753159046173, -0.16698405146598816, 0.2281632423400879, 0.3878518044948578, -0.05266594886779785, -0.17533105611801147, -0.1976456493139267, -0.0789974108338356, 0.13706962764263153, -0.026859106495976448, -0.03810393065214157, -0.3931657671928406, -0.19249078631401062, 0.3502611517906189, 0.0776500329375267, 0.17738907039165497, -0.07375738769769669, 0.1270056515932083, -0.3955896198749542, 0.6006048917770386, -0.1680826097726822, -0.221482053399086, -0.27507153153419495, -0.18260112404823303, -0.4449683129787445, 0.06653939187526703, -0.35474327206611633, 0.05311782658100128, -0.06497317552566528, 0.4004480540752411, 0.44279807806015015, -0.05354726314544678, -0.031818583607673645, -0.311303973197937, 0.20871129631996155, 0.2548162043094635, -0.4169965088367462, -0.1376151144504547, -0.13858066499233246, 0.11448578536510468, 0.24802812933921814, -0.22445407509803772, 0.054495468735694885, -0.12034547328948975, 0.10765629261732101, -0.061504509299993515, 0.013851198367774487, 0.08708292990922928, -0.11091706156730652, 0.29657307267189026, -0.1700412482023239, 0.41989248991012573, -0.07581939548254013, -0.09666062146425247, -0.2475915402173996, -0.22361847758293152, 0.024525858461856842, 0.33405518531799316, 0.21460480988025665, 0.49526217579841614, -0.22813798487186432, 0.3416171967983246, -0.07664171606302261, -0.0826425850391388, 0.0958096832036972, -0.05187394469976425, 0.0168424304574728, 0.09607426077127457, 0.04572838172316551, 0.2561379373073578, 0.022475389763712883, 0.2787264287471771, -0.02945825830101967, -0.008949835784733295, -0.3364945352077484, -0.0982675850391388, 0.3796485960483551, -0.29179951548576355, -0.4726312756538391, -0.2096146196126938, 0.05776270478963852, -0.05060253664851189, 0.20655867457389832, -0.5184623599052429, 0.2700488567352295, 0.13247811794281006, -0.03999278321862221, -0.3767392635345459, 0.3621032238006592, -0.07292839884757996, -0.10919204354286194, 0.08400152623653412, 0.04056835174560547, -0.11414919793605804, -0.3539161682128906, -0.12934903800487518, -0.24576716125011444 ]
https://github.com/huggingface/datasets/issues/5412
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
Thank you! What do you mean by prepare it beforehand? I am unclear how to conduct dataset preparation outside of using the `load_dataset` function.
### Describe the bug I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error. If there is a workaround to ignore the cache I think that would solve my problem too. I am using datasets version 2.8.0. ### Steps to reproduce the bug 1. Start training run of GPU 0 loading dataset from ``` load_dataset( "json", data_files=tr_dataset_path, split=f"train", download_mode="force_redownload", ) ``` 2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error: ``` Traceback (most recent call last): File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module> main() File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main load_dataset( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset builder_instance = load_dataset_builder( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__ self.info = DatasetInfo.from_directory(self._cache_dir) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f: File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open self.open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open f = self._open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open return LocalFileOpener(path, mode, fs=self, **kwargs) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__ self._open() File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open self.f = open(self.path, mode=self.mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json' ``` ### Expected behavior Expected behavior: 2nd GPU training run should run the same as 1st GPU training run. ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10 - Python version: 3.8.15 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
24
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
[ -0.45626404881477356, 0.1598930060863495, -0.18178649246692657, 0.37631669640541077, 0.19635573029518127, 0.13453294336795807, 0.41071993112564087, 0.34542590379714966, -0.03330771252512932, 0.05051781237125397, 0.11889174580574036, 0.3173251152038574, 0.11299068480730057, 0.09797313064336777, -0.09743411839008331, -0.08001500368118286, -0.01484317984431982, 0.142511248588562, -0.05079507827758789, -0.022663544863462448, 0.0009652735316194594, 0.18564100563526154, -0.06442122161388397, -0.03687281161546707, -0.3621998131275177, -0.13420163094997406, 0.004733345005661249, 0.2779025435447693, 0.03767196834087372, -0.26248738169670105, 0.10377738624811172, 0.16725295782089233, 0.12026440352201462, 0.40881070494651794, -0.00010416052100481465, 0.316168874502182, 0.1937483549118042, -0.12091106921434402, -0.47235846519470215, 0.11950051784515381, -0.3978196680545807, -0.16267062723636627, 0.18076837062835693, -0.3331298530101776, -0.22299940884113312, -0.321971595287323, 0.15591426193714142, -0.32701805233955383, 0.2545017600059509, 0.07855108380317688, 0.25659501552581787, 0.3439159095287323, -0.17164109647274017, -0.29684096574783325, -0.1040564775466919, 0.00522987823933363, 0.13062448799610138, 0.08241505175828934, 0.01194099709391594, -0.2522156834602356, -0.24142958223819733, 0.43923890590667725, 0.12326699495315552, 0.14018812775611877, -0.11703535914421082, -0.04793372005224228, -0.04330972582101822, 0.11733011901378632, 0.07773515582084656, -0.2010570466518402, 0.41083237528800964, -0.21943752467632294, -0.1362641155719757, -0.2929810881614685, 0.08419913798570633, -0.1386544108390808, 0.05714256316423416, 0.07567395269870758, -0.07402421534061432, -0.029983825981616974, -0.2482743263244629, -0.02757161296904087, -0.06440819799900055, -0.04687059298157692, 0.1950800120830536, 0.09580685198307037, -0.03860420361161232, 0.20955631136894226, 0.17429476976394653, 0.20574210584163666, 0.16411280632019043, -0.015804089605808258, 0.07869283854961395, -0.16769097745418549, -0.3405458331108093, -0.09361565113067627, 0.08018622547388077, -0.4915391504764557, 0.10729558765888214, 0.10098668932914734, 0.3385576605796814, 0.09835568815469742, 0.1820213496685028, 0.12243099510669708, 0.28407353162765503, -0.047600600868463516, -0.05437545105814934, 0.07771831750869751, 0.03143785893917084, 0.12419924139976501, -0.2964343726634979, 0.059658996760845184, -0.23169909417629242, -0.08789127320051193, -0.2578463554382324, 0.08108864724636078, -0.1670726090669632, 0.07613999396562576, -0.27250581979751587, -0.020428434014320374, -0.30943989753723145, -0.20219269394874573, 0.09498836100101471, 0.46053802967071533, 0.018773430958390236, 0.2144961655139923, 0.08984582871198654, 0.01900791935622692, -0.16424019634723663, -0.22442278265953064, -0.3781847655773163, 0.1604102998971939, -0.09615073353052139, -0.06975547969341278, 0.29714271426200867, 0.2321709841489792, 0.6210660338401794, -0.14198236167430878, -0.09369847178459167, -0.10737860202789307, 0.4119514524936676, -0.1696624606847763, -0.037220750004053116, 0.25315991044044495, 0.13463467359542847, -0.06424248218536377, 0.11139699816703796, 0.2404850423336029, 0.0009328765445388854, -0.01888839527964592, -0.27389422059059143, -0.19813266396522522, 0.3486476540565491, 0.23447129130363464, 0.10650388896465302, 0.04945044219493866, -0.22100453078746796, 0.26236283779144287, 0.1559593826532364, -0.21914450824260712, -0.12023100256919861, -0.09007271379232407, -0.16212742030620575, -0.13008753955364227, 0.19550618529319763, 0.27242374420166016, -0.22461971640586853, -0.017534499987959862, 0.17045378684997559, -0.15963727235794067, -0.14173710346221924, 0.12858623266220093, -0.42412328720092773, 0.46242839097976685, -0.09560373425483704, 0.2542265057563782, 0.3176499009132385, -0.4530825614929199, -0.12383569777011871, 0.23789480328559875, -0.20926034450531006, -0.0849718227982521, 0.15302880108356476, 0.03636603429913521, -0.034126244485378265, 0.15583741664886475, 0.4249001145362854, 0.300218403339386, -0.0042821732349693775, 0.05219167470932007, -0.03845591843128204, -0.1937129944562912, -0.0887620821595192, 0.5365886092185974, 0.0437149852514267, -0.2006899118423462, -0.005562271922826767, 0.020389968529343605, 0.41339096426963806, -0.12533284723758698, -0.000178095608134754, 0.26652291417121887, -0.4568031132221222, 0.03190585970878601, -0.04723963141441345, 0.2577916383743286, -0.4281242787837982, 0.020670568570494652, 0.25084319710731506, -0.06718800216913223, -0.08725591003894806, 0.12128355354070663, -0.06851588189601898, 0.05871528759598732, -0.27975994348526, -0.09448514878749847, 0.2394811511039734, 0.4405581057071686, 0.000798544439021498, 0.04802021011710167, -0.21356524527072906, 0.512752890586853, -0.3583436608314514, 0.0035098735243082047, -0.611510694026947, 0.16231873631477356, 0.14053258299827576, -0.035267289727926254, 0.21922029554843903, -0.013149047270417213, -0.007273631636053324, -0.19663885235786438, -0.009678316302597523, 0.2770852744579315, -0.02123970352113247, -0.058838751167058945, 0.3232947587966919, -0.06499182432889938, -0.07842638343572617, 0.09415028244256973, -0.002425422426313162, 0.04188914597034454, 0.16481438279151917, -0.08412008732557297, -0.1634436845779419, 0.33542871475219727, 0.13098064064979553, -0.04836287349462509, 0.252908855676651, -0.24816879630088806, 0.24625219404697418, -0.033686667680740356, -0.11767493188381195, 0.08387618511915207, 0.11067422479391098, 0.18204021453857422, 0.18171624839305878, -0.06835491955280304, -0.5206676721572876, 0.08414778858423233, 0.6187365055084229, 0.01575862430036068, 0.08020633459091187, -0.1845749020576477, 0.07657350599765778, 0.06656765192747116, 0.14778339862823486, 0.32123154401779175, 0.5344426035881042, 0.20967796444892883, 0.15711531043052673, -0.08577627688646317, -0.06535360962152481, -0.14472033083438873, -0.04294467717409134, -0.10795218497514725, 0.3745338022708893, 0.18985366821289062, 0.234375, -0.3606826066970825, -0.46672213077545166, -0.3905530869960785, 0.40427374839782715, 0.14572568237781525, -0.03311620652675629, 0.2179567515850067, -0.07454831153154373, 0.27324870228767395, -0.22327937185764313, 0.043071649968624115, 0.29233890771865845, -0.029383251443505287, 0.08175652474164963, 0.24147896468639374, -0.10493569076061249, 0.2917158901691437, -0.20329783856868744, 0.13287371397018433, 0.22370055317878723, -0.22658278048038483, 0.19006307423114777, -0.04563511908054352, -0.2770851254463196, 0.10439648479223251, 0.11631058901548386, 0.08955328911542892, 0.11072190850973129, -0.2236926108598709, -0.2102842628955841, 0.056040577590465546, 0.10959593206644058, 0.07975618541240692, -0.1034926027059555, -0.25355103611946106, -0.02143046259880066, 0.23591893911361694, -0.11243296414613724, -0.28290215134620667, 0.30860334634780884, -0.051689263433218, -0.18576817214488983, -0.22637486457824707, 0.18817590177059174, 0.008970801718533039, -0.017860449850559235, -0.7673947811126709, -0.2632763385772705, -0.2867491543292999, 0.2377098947763443, -0.09423115104436874, 0.021880626678466797, -0.03872409462928772, 0.3949354290962219, 0.05815395340323448, 0.036218006163835526, 0.06811662018299103, -0.27929356694221497, -0.4816545844078064, 0.14717315137386322, -0.24622386693954468, -0.07712273299694061, -0.06350035220384598, -0.007810138165950775, 0.2486465722322464, 0.15836100280284882, -0.5461559891700745, 0.08846229314804077, 0.19654545187950134, 0.013190166093409061, -0.2745968699455261, 0.023736238479614258, 0.3310632109642029, -0.0658688098192215, -0.14993831515312195, -0.19881172478199005, -0.12284201383590698, 0.34166499972343445, -0.24148684740066528, 0.10377708822488785, -0.24086390435695648, 0.3342761993408203, -0.039199694991111755, 0.5288744568824768, 0.09533777832984924, -0.16487906873226166, -0.037252284586429596, -0.11155849695205688, 0.173318013548851, -0.1080930083990097, -0.17893747985363007, -0.09847712516784668, -0.07114425301551819, -0.15595301985740662, 0.25720861554145813, -0.140699565410614, -0.33683276176452637, -0.1907845288515091, -0.02847725711762905, -0.18609683215618134, -0.08279252052307129, 0.20710252225399017, -0.0190616175532341, 0.09891882538795471, 0.0332883782684803, 0.4236782193183899, -0.1794859915971756, 0.30926913022994995, -0.13938455283641815, -0.07320213317871094, -0.09161394089460373, -0.03770850598812103, -0.39776384830474854, -0.026532188057899475, -0.22052718698978424, 0.13106173276901245, -0.15856501460075378, 0.4102172553539276, -0.13165105879306793, -0.050515394657850266, 0.10592538118362427, -0.17556652426719666, 0.6099921464920044, -0.18635901808738708, 0.07528543472290039, 0.11797258257865906, -0.2007681280374527, -0.06079517677426338, -0.1064949482679367, -0.10428496450185776, 0.23216670751571655, 0.17750121653079987, 0.3291718661785126, -0.26518794894218445, -0.14217327535152435, 0.38196060061454773, -0.09182168543338776, 0.0032964551355689764, -0.08337735384702682, -0.20737263560295105, -0.3486119210720062, -0.2249954491853714, 0.17581740021705627, 0.05513448268175125, 0.18448346853256226, -0.1336347460746765, -0.11767837405204773, -0.04374043270945549, 0.06509154289960861, 0.1119355857372284, 0.28477880358695984, 0.07768553495407104, 0.23322470486164093, 0.15444062650203705, 0.37751010060310364, 0.20402339100837708, 0.5071033239364624, 0.38024914264678955, 0.06808676570653915, -0.2011273354291916, 0.3132205307483673, 0.07748907059431076, 0.2998301684856415, 0.4130437970161438, 0.0383329875767231, -0.05830547958612442, 0.18040640652179718, -0.08239202946424484, -0.14888471364974976, 0.30309200286865234, 0.3036433756351471, -0.11662326008081436, -0.181401327252388, -0.5397744178771973, 0.32807713747024536, -0.05737217888236046, 0.09704515337944031, 0.21609029173851013, -0.6515226364135742, -0.21445956826210022, 0.0785825327038765, -0.24247299134731293, 0.3195216655731201, 0.08988282084465027, 0.26525700092315674, 0.4841023087501526, 0.01632693037390709, 0.15236744284629822, -0.7743749022483826, 0.48950469493865967, -0.2681422829627991, -0.062415845692157745, 0.11843045055866241, -0.10630318522453308, -0.04835866764187813, 0.5179651975631714, 0.12469852715730667, 0.052401475608348846, 0.23463155329227448, 0.1174369752407074, -0.1713201403617859, 0.31597110629081726, 0.1352735310792923, -0.21825993061065674, -0.5791332125663757, 0.1740436553955078, 0.01721830852329731, -0.043168798089027405, -0.12583228945732117, -0.3115445375442505, -0.03209322690963745, -0.14234764873981476, 0.16138234734535217, 0.18553680181503296, -0.16148561239242554, 0.4925242066383362, -0.10201199352741241, -0.31552237272262573, -0.20762984454631805, -0.045482032001018524, 0.1655578315258026, -0.0606706440448761, -0.10410746932029724, 0.3031597137451172, -0.24667862057685852, -0.008960848674178123, -0.28391727805137634, -0.1609160602092743, 0.06867974251508713, 0.01736179180443287, -0.2786684036254883, 0.170790433883667, -0.2112622708082199, -0.5086578726768494, 0.03484756126999855, 0.1831747144460678, -0.1996052861213684, -0.16065284609794617, -0.055864159017801285, 0.42089515924453735, 0.10978583246469498, -0.24010129272937775, 0.18832148611545563, 0.009464665316045284, -0.3435862362384796, 0.1774878203868866, 0.07279060781002045, -0.11742520332336426, -0.21275141835212708, 0.4644439220428467, 0.14915847778320312, 0.09483811259269714, 0.5984646677970886, 0.25051388144493103, 0.0026970021426677704, -0.40541741251945496, -0.003516464726999402, 0.5642431378364563, 0.13917109370231628, 0.10525399446487427, 0.03996903449296951, -0.0734710767865181, 0.15196840465068817, -0.0059171440079808235, -0.11485937982797623, -0.10968254506587982, 0.1502874493598938, -0.2663021683692932, -0.5207412838935852, 0.2869183421134949, -0.025955930352211, 0.1840500831604004, 0.34572485089302063, 0.17196214199066162, -0.1137697696685791, 0.01611105166375637, -0.37902674078941345, 0.20755137503147125, -0.23801454901695251, 0.015261336229741573, 0.06038098409771919, -0.17555642127990723, 0.3759225010871887, 0.2898412048816681, 0.21408578753471375, 0.0331948883831501, -0.22823190689086914, -0.23152905702590942, 0.13206085562705994, 0.04075220972299576, -0.12285991758108139, 0.47256770730018616, -0.007922815158963203, -0.2898012697696686, -0.34076693654060364, 0.009272389113903046, 0.2703309953212738, -0.0031949381809681654, 0.056695736944675446, 0.14120231568813324, -0.16718819737434387, 0.04219375178217888, 0.09157509356737137, -0.009027525782585144, -0.0038587229792028666, 0.07011260092258453, 0.018610892817378044, -0.01806819811463356, -0.09350737184286118, 0.03912604972720146, -0.17214198410511017, -0.014384530484676361, 0.03511418029665947, 0.14805881679058075, 0.056364063173532486, -0.4784240424633026, -0.14881156384944916, -0.092691570520401, 0.23762862384319305, 0.40512463450431824, -0.25012901425361633, -0.1587529480457306, -0.11245505511760712, 0.25243183970451355, -0.1933019459247589, -0.14899714291095734, 0.391153484582901, -0.07555264979600906, 0.11079073697328568, 0.2734520733356476, 0.06024406477808952, -0.05751126632094383, -0.09006476402282715, 0.3082033395767212, 0.2186656892299652, -0.08858653157949448, 0.11509974300861359, 0.10210059583187103, -0.069743812084198, -0.0850340723991394, 0.06993264704942703, 0.23404665291309357, 0.30923837423324585, 0.4753246605396271, -0.06624288111925125, 0.42680397629737854, 0.05411047115921974, -0.1793549507856369, -0.3722577691078186, -0.4034786522388458, -0.01355290599167347, 0.27468523383140564, 0.030276484787464142, 0.003154065925627947, -0.2583683133125305, 0.27974745631217957, -0.16328755021095276, -0.12110311537981033, -0.511189341545105, 0.06621115654706955, -0.35419806838035583, -0.14511236548423767, -0.21457427740097046, -0.2732461094856262, 0.10474089533090591, 0.20420478284358978, 0.02694733254611492, 0.13132070004940033, 0.3947701156139374, -0.2524853050708771, -0.1895761787891388, -0.16941793262958527, 0.18416465818881989, 0.35495084524154663, -0.056152064353227615, -0.2015514373779297, 0.19080938398838043, 0.044144172221422195, -0.33542773127555847, -0.00017563739675097167, 0.16328288614749908, 0.2824857234954834, 0.11869843304157257, 0.16714437305927277, -0.244338259100914, 0.07269265502691269, -0.07945474982261658, -0.20434463024139404, 0.24214324355125427, 0.24017511308193207, -0.27027377486228943, 0.35207968950271606, 0.19343753159046173, -0.16698405146598816, 0.2281632423400879, 0.3878518044948578, -0.05266594886779785, -0.17533105611801147, -0.1976456493139267, -0.0789974108338356, 0.13706962764263153, -0.026859106495976448, -0.03810393065214157, -0.3931657671928406, -0.19249078631401062, 0.3502611517906189, 0.0776500329375267, 0.17738907039165497, -0.07375738769769669, 0.1270056515932083, -0.3955896198749542, 0.6006048917770386, -0.1680826097726822, -0.221482053399086, -0.27507153153419495, -0.18260112404823303, -0.4449683129787445, 0.06653939187526703, -0.35474327206611633, 0.05311782658100128, -0.06497317552566528, 0.4004480540752411, 0.44279807806015015, -0.05354726314544678, -0.031818583607673645, -0.311303973197937, 0.20871129631996155, 0.2548162043094635, -0.4169965088367462, -0.1376151144504547, -0.13858066499233246, 0.11448578536510468, 0.24802812933921814, -0.22445407509803772, 0.054495468735694885, -0.12034547328948975, 0.10765629261732101, -0.061504509299993515, 0.013851198367774487, 0.08708292990922928, -0.11091706156730652, 0.29657307267189026, -0.1700412482023239, 0.41989248991012573, -0.07581939548254013, -0.09666062146425247, -0.2475915402173996, -0.22361847758293152, 0.024525858461856842, 0.33405518531799316, 0.21460480988025665, 0.49526217579841614, -0.22813798487186432, 0.3416171967983246, -0.07664171606302261, -0.0826425850391388, 0.0958096832036972, -0.05187394469976425, 0.0168424304574728, 0.09607426077127457, 0.04572838172316551, 0.2561379373073578, 0.022475389763712883, 0.2787264287471771, -0.02945825830101967, -0.008949835784733295, -0.3364945352077484, -0.0982675850391388, 0.3796485960483551, -0.29179951548576355, -0.4726312756538391, -0.2096146196126938, 0.05776270478963852, -0.05060253664851189, 0.20655867457389832, -0.5184623599052429, 0.2700488567352295, 0.13247811794281006, -0.03999278321862221, -0.3767392635345459, 0.3621032238006592, -0.07292839884757996, -0.10919204354286194, 0.08400152623653412, 0.04056835174560547, -0.11414919793605804, -0.3539161682128906, -0.12934903800487518, -0.24576716125011444 ]
https://github.com/huggingface/datasets/issues/5412
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
You can have a separate script that does load_dataset + map + save_to_disk to save your prepared dataset somewhere. Then in your training script you can reload the dataset with load_from_disk
### Describe the bug I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error. If there is a workaround to ignore the cache I think that would solve my problem too. I am using datasets version 2.8.0. ### Steps to reproduce the bug 1. Start training run of GPU 0 loading dataset from ``` load_dataset( "json", data_files=tr_dataset_path, split=f"train", download_mode="force_redownload", ) ``` 2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error: ``` Traceback (most recent call last): File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module> main() File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main load_dataset( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset builder_instance = load_dataset_builder( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__ self.info = DatasetInfo.from_directory(self._cache_dir) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f: File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open self.open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open f = self._open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open return LocalFileOpener(path, mode, fs=self, **kwargs) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__ self._open() File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open self.f = open(self.path, mode=self.mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json' ``` ### Expected behavior Expected behavior: 2nd GPU training run should run the same as 1st GPU training run. ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10 - Python version: 3.8.15 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
31
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
[ -0.45626404881477356, 0.1598930060863495, -0.18178649246692657, 0.37631669640541077, 0.19635573029518127, 0.13453294336795807, 0.41071993112564087, 0.34542590379714966, -0.03330771252512932, 0.05051781237125397, 0.11889174580574036, 0.3173251152038574, 0.11299068480730057, 0.09797313064336777, -0.09743411839008331, -0.08001500368118286, -0.01484317984431982, 0.142511248588562, -0.05079507827758789, -0.022663544863462448, 0.0009652735316194594, 0.18564100563526154, -0.06442122161388397, -0.03687281161546707, -0.3621998131275177, -0.13420163094997406, 0.004733345005661249, 0.2779025435447693, 0.03767196834087372, -0.26248738169670105, 0.10377738624811172, 0.16725295782089233, 0.12026440352201462, 0.40881070494651794, -0.00010416052100481465, 0.316168874502182, 0.1937483549118042, -0.12091106921434402, -0.47235846519470215, 0.11950051784515381, -0.3978196680545807, -0.16267062723636627, 0.18076837062835693, -0.3331298530101776, -0.22299940884113312, -0.321971595287323, 0.15591426193714142, -0.32701805233955383, 0.2545017600059509, 0.07855108380317688, 0.25659501552581787, 0.3439159095287323, -0.17164109647274017, -0.29684096574783325, -0.1040564775466919, 0.00522987823933363, 0.13062448799610138, 0.08241505175828934, 0.01194099709391594, -0.2522156834602356, -0.24142958223819733, 0.43923890590667725, 0.12326699495315552, 0.14018812775611877, -0.11703535914421082, -0.04793372005224228, -0.04330972582101822, 0.11733011901378632, 0.07773515582084656, -0.2010570466518402, 0.41083237528800964, -0.21943752467632294, -0.1362641155719757, -0.2929810881614685, 0.08419913798570633, -0.1386544108390808, 0.05714256316423416, 0.07567395269870758, -0.07402421534061432, -0.029983825981616974, -0.2482743263244629, -0.02757161296904087, -0.06440819799900055, -0.04687059298157692, 0.1950800120830536, 0.09580685198307037, -0.03860420361161232, 0.20955631136894226, 0.17429476976394653, 0.20574210584163666, 0.16411280632019043, -0.015804089605808258, 0.07869283854961395, -0.16769097745418549, -0.3405458331108093, -0.09361565113067627, 0.08018622547388077, -0.4915391504764557, 0.10729558765888214, 0.10098668932914734, 0.3385576605796814, 0.09835568815469742, 0.1820213496685028, 0.12243099510669708, 0.28407353162765503, -0.047600600868463516, -0.05437545105814934, 0.07771831750869751, 0.03143785893917084, 0.12419924139976501, -0.2964343726634979, 0.059658996760845184, -0.23169909417629242, -0.08789127320051193, -0.2578463554382324, 0.08108864724636078, -0.1670726090669632, 0.07613999396562576, -0.27250581979751587, -0.020428434014320374, -0.30943989753723145, -0.20219269394874573, 0.09498836100101471, 0.46053802967071533, 0.018773430958390236, 0.2144961655139923, 0.08984582871198654, 0.01900791935622692, -0.16424019634723663, -0.22442278265953064, -0.3781847655773163, 0.1604102998971939, -0.09615073353052139, -0.06975547969341278, 0.29714271426200867, 0.2321709841489792, 0.6210660338401794, -0.14198236167430878, -0.09369847178459167, -0.10737860202789307, 0.4119514524936676, -0.1696624606847763, -0.037220750004053116, 0.25315991044044495, 0.13463467359542847, -0.06424248218536377, 0.11139699816703796, 0.2404850423336029, 0.0009328765445388854, -0.01888839527964592, -0.27389422059059143, -0.19813266396522522, 0.3486476540565491, 0.23447129130363464, 0.10650388896465302, 0.04945044219493866, -0.22100453078746796, 0.26236283779144287, 0.1559593826532364, -0.21914450824260712, -0.12023100256919861, -0.09007271379232407, -0.16212742030620575, -0.13008753955364227, 0.19550618529319763, 0.27242374420166016, -0.22461971640586853, -0.017534499987959862, 0.17045378684997559, -0.15963727235794067, -0.14173710346221924, 0.12858623266220093, -0.42412328720092773, 0.46242839097976685, -0.09560373425483704, 0.2542265057563782, 0.3176499009132385, -0.4530825614929199, -0.12383569777011871, 0.23789480328559875, -0.20926034450531006, -0.0849718227982521, 0.15302880108356476, 0.03636603429913521, -0.034126244485378265, 0.15583741664886475, 0.4249001145362854, 0.300218403339386, -0.0042821732349693775, 0.05219167470932007, -0.03845591843128204, -0.1937129944562912, -0.0887620821595192, 0.5365886092185974, 0.0437149852514267, -0.2006899118423462, -0.005562271922826767, 0.020389968529343605, 0.41339096426963806, -0.12533284723758698, -0.000178095608134754, 0.26652291417121887, -0.4568031132221222, 0.03190585970878601, -0.04723963141441345, 0.2577916383743286, -0.4281242787837982, 0.020670568570494652, 0.25084319710731506, -0.06718800216913223, -0.08725591003894806, 0.12128355354070663, -0.06851588189601898, 0.05871528759598732, -0.27975994348526, -0.09448514878749847, 0.2394811511039734, 0.4405581057071686, 0.000798544439021498, 0.04802021011710167, -0.21356524527072906, 0.512752890586853, -0.3583436608314514, 0.0035098735243082047, -0.611510694026947, 0.16231873631477356, 0.14053258299827576, -0.035267289727926254, 0.21922029554843903, -0.013149047270417213, -0.007273631636053324, -0.19663885235786438, -0.009678316302597523, 0.2770852744579315, -0.02123970352113247, -0.058838751167058945, 0.3232947587966919, -0.06499182432889938, -0.07842638343572617, 0.09415028244256973, -0.002425422426313162, 0.04188914597034454, 0.16481438279151917, -0.08412008732557297, -0.1634436845779419, 0.33542871475219727, 0.13098064064979553, -0.04836287349462509, 0.252908855676651, -0.24816879630088806, 0.24625219404697418, -0.033686667680740356, -0.11767493188381195, 0.08387618511915207, 0.11067422479391098, 0.18204021453857422, 0.18171624839305878, -0.06835491955280304, -0.5206676721572876, 0.08414778858423233, 0.6187365055084229, 0.01575862430036068, 0.08020633459091187, -0.1845749020576477, 0.07657350599765778, 0.06656765192747116, 0.14778339862823486, 0.32123154401779175, 0.5344426035881042, 0.20967796444892883, 0.15711531043052673, -0.08577627688646317, -0.06535360962152481, -0.14472033083438873, -0.04294467717409134, -0.10795218497514725, 0.3745338022708893, 0.18985366821289062, 0.234375, -0.3606826066970825, -0.46672213077545166, -0.3905530869960785, 0.40427374839782715, 0.14572568237781525, -0.03311620652675629, 0.2179567515850067, -0.07454831153154373, 0.27324870228767395, -0.22327937185764313, 0.043071649968624115, 0.29233890771865845, -0.029383251443505287, 0.08175652474164963, 0.24147896468639374, -0.10493569076061249, 0.2917158901691437, -0.20329783856868744, 0.13287371397018433, 0.22370055317878723, -0.22658278048038483, 0.19006307423114777, -0.04563511908054352, -0.2770851254463196, 0.10439648479223251, 0.11631058901548386, 0.08955328911542892, 0.11072190850973129, -0.2236926108598709, -0.2102842628955841, 0.056040577590465546, 0.10959593206644058, 0.07975618541240692, -0.1034926027059555, -0.25355103611946106, -0.02143046259880066, 0.23591893911361694, -0.11243296414613724, -0.28290215134620667, 0.30860334634780884, -0.051689263433218, -0.18576817214488983, -0.22637486457824707, 0.18817590177059174, 0.008970801718533039, -0.017860449850559235, -0.7673947811126709, -0.2632763385772705, -0.2867491543292999, 0.2377098947763443, -0.09423115104436874, 0.021880626678466797, -0.03872409462928772, 0.3949354290962219, 0.05815395340323448, 0.036218006163835526, 0.06811662018299103, -0.27929356694221497, -0.4816545844078064, 0.14717315137386322, -0.24622386693954468, -0.07712273299694061, -0.06350035220384598, -0.007810138165950775, 0.2486465722322464, 0.15836100280284882, -0.5461559891700745, 0.08846229314804077, 0.19654545187950134, 0.013190166093409061, -0.2745968699455261, 0.023736238479614258, 0.3310632109642029, -0.0658688098192215, -0.14993831515312195, -0.19881172478199005, -0.12284201383590698, 0.34166499972343445, -0.24148684740066528, 0.10377708822488785, -0.24086390435695648, 0.3342761993408203, -0.039199694991111755, 0.5288744568824768, 0.09533777832984924, -0.16487906873226166, -0.037252284586429596, -0.11155849695205688, 0.173318013548851, -0.1080930083990097, -0.17893747985363007, -0.09847712516784668, -0.07114425301551819, -0.15595301985740662, 0.25720861554145813, -0.140699565410614, -0.33683276176452637, -0.1907845288515091, -0.02847725711762905, -0.18609683215618134, -0.08279252052307129, 0.20710252225399017, -0.0190616175532341, 0.09891882538795471, 0.0332883782684803, 0.4236782193183899, -0.1794859915971756, 0.30926913022994995, -0.13938455283641815, -0.07320213317871094, -0.09161394089460373, -0.03770850598812103, -0.39776384830474854, -0.026532188057899475, -0.22052718698978424, 0.13106173276901245, -0.15856501460075378, 0.4102172553539276, -0.13165105879306793, -0.050515394657850266, 0.10592538118362427, -0.17556652426719666, 0.6099921464920044, -0.18635901808738708, 0.07528543472290039, 0.11797258257865906, -0.2007681280374527, -0.06079517677426338, -0.1064949482679367, -0.10428496450185776, 0.23216670751571655, 0.17750121653079987, 0.3291718661785126, -0.26518794894218445, -0.14217327535152435, 0.38196060061454773, -0.09182168543338776, 0.0032964551355689764, -0.08337735384702682, -0.20737263560295105, -0.3486119210720062, -0.2249954491853714, 0.17581740021705627, 0.05513448268175125, 0.18448346853256226, -0.1336347460746765, -0.11767837405204773, -0.04374043270945549, 0.06509154289960861, 0.1119355857372284, 0.28477880358695984, 0.07768553495407104, 0.23322470486164093, 0.15444062650203705, 0.37751010060310364, 0.20402339100837708, 0.5071033239364624, 0.38024914264678955, 0.06808676570653915, -0.2011273354291916, 0.3132205307483673, 0.07748907059431076, 0.2998301684856415, 0.4130437970161438, 0.0383329875767231, -0.05830547958612442, 0.18040640652179718, -0.08239202946424484, -0.14888471364974976, 0.30309200286865234, 0.3036433756351471, -0.11662326008081436, -0.181401327252388, -0.5397744178771973, 0.32807713747024536, -0.05737217888236046, 0.09704515337944031, 0.21609029173851013, -0.6515226364135742, -0.21445956826210022, 0.0785825327038765, -0.24247299134731293, 0.3195216655731201, 0.08988282084465027, 0.26525700092315674, 0.4841023087501526, 0.01632693037390709, 0.15236744284629822, -0.7743749022483826, 0.48950469493865967, -0.2681422829627991, -0.062415845692157745, 0.11843045055866241, -0.10630318522453308, -0.04835866764187813, 0.5179651975631714, 0.12469852715730667, 0.052401475608348846, 0.23463155329227448, 0.1174369752407074, -0.1713201403617859, 0.31597110629081726, 0.1352735310792923, -0.21825993061065674, -0.5791332125663757, 0.1740436553955078, 0.01721830852329731, -0.043168798089027405, -0.12583228945732117, -0.3115445375442505, -0.03209322690963745, -0.14234764873981476, 0.16138234734535217, 0.18553680181503296, -0.16148561239242554, 0.4925242066383362, -0.10201199352741241, -0.31552237272262573, -0.20762984454631805, -0.045482032001018524, 0.1655578315258026, -0.0606706440448761, -0.10410746932029724, 0.3031597137451172, -0.24667862057685852, -0.008960848674178123, -0.28391727805137634, -0.1609160602092743, 0.06867974251508713, 0.01736179180443287, -0.2786684036254883, 0.170790433883667, -0.2112622708082199, -0.5086578726768494, 0.03484756126999855, 0.1831747144460678, -0.1996052861213684, -0.16065284609794617, -0.055864159017801285, 0.42089515924453735, 0.10978583246469498, -0.24010129272937775, 0.18832148611545563, 0.009464665316045284, -0.3435862362384796, 0.1774878203868866, 0.07279060781002045, -0.11742520332336426, -0.21275141835212708, 0.4644439220428467, 0.14915847778320312, 0.09483811259269714, 0.5984646677970886, 0.25051388144493103, 0.0026970021426677704, -0.40541741251945496, -0.003516464726999402, 0.5642431378364563, 0.13917109370231628, 0.10525399446487427, 0.03996903449296951, -0.0734710767865181, 0.15196840465068817, -0.0059171440079808235, -0.11485937982797623, -0.10968254506587982, 0.1502874493598938, -0.2663021683692932, -0.5207412838935852, 0.2869183421134949, -0.025955930352211, 0.1840500831604004, 0.34572485089302063, 0.17196214199066162, -0.1137697696685791, 0.01611105166375637, -0.37902674078941345, 0.20755137503147125, -0.23801454901695251, 0.015261336229741573, 0.06038098409771919, -0.17555642127990723, 0.3759225010871887, 0.2898412048816681, 0.21408578753471375, 0.0331948883831501, -0.22823190689086914, -0.23152905702590942, 0.13206085562705994, 0.04075220972299576, -0.12285991758108139, 0.47256770730018616, -0.007922815158963203, -0.2898012697696686, -0.34076693654060364, 0.009272389113903046, 0.2703309953212738, -0.0031949381809681654, 0.056695736944675446, 0.14120231568813324, -0.16718819737434387, 0.04219375178217888, 0.09157509356737137, -0.009027525782585144, -0.0038587229792028666, 0.07011260092258453, 0.018610892817378044, -0.01806819811463356, -0.09350737184286118, 0.03912604972720146, -0.17214198410511017, -0.014384530484676361, 0.03511418029665947, 0.14805881679058075, 0.056364063173532486, -0.4784240424633026, -0.14881156384944916, -0.092691570520401, 0.23762862384319305, 0.40512463450431824, -0.25012901425361633, -0.1587529480457306, -0.11245505511760712, 0.25243183970451355, -0.1933019459247589, -0.14899714291095734, 0.391153484582901, -0.07555264979600906, 0.11079073697328568, 0.2734520733356476, 0.06024406477808952, -0.05751126632094383, -0.09006476402282715, 0.3082033395767212, 0.2186656892299652, -0.08858653157949448, 0.11509974300861359, 0.10210059583187103, -0.069743812084198, -0.0850340723991394, 0.06993264704942703, 0.23404665291309357, 0.30923837423324585, 0.4753246605396271, -0.06624288111925125, 0.42680397629737854, 0.05411047115921974, -0.1793549507856369, -0.3722577691078186, -0.4034786522388458, -0.01355290599167347, 0.27468523383140564, 0.030276484787464142, 0.003154065925627947, -0.2583683133125305, 0.27974745631217957, -0.16328755021095276, -0.12110311537981033, -0.511189341545105, 0.06621115654706955, -0.35419806838035583, -0.14511236548423767, -0.21457427740097046, -0.2732461094856262, 0.10474089533090591, 0.20420478284358978, 0.02694733254611492, 0.13132070004940033, 0.3947701156139374, -0.2524853050708771, -0.1895761787891388, -0.16941793262958527, 0.18416465818881989, 0.35495084524154663, -0.056152064353227615, -0.2015514373779297, 0.19080938398838043, 0.044144172221422195, -0.33542773127555847, -0.00017563739675097167, 0.16328288614749908, 0.2824857234954834, 0.11869843304157257, 0.16714437305927277, -0.244338259100914, 0.07269265502691269, -0.07945474982261658, -0.20434463024139404, 0.24214324355125427, 0.24017511308193207, -0.27027377486228943, 0.35207968950271606, 0.19343753159046173, -0.16698405146598816, 0.2281632423400879, 0.3878518044948578, -0.05266594886779785, -0.17533105611801147, -0.1976456493139267, -0.0789974108338356, 0.13706962764263153, -0.026859106495976448, -0.03810393065214157, -0.3931657671928406, -0.19249078631401062, 0.3502611517906189, 0.0776500329375267, 0.17738907039165497, -0.07375738769769669, 0.1270056515932083, -0.3955896198749542, 0.6006048917770386, -0.1680826097726822, -0.221482053399086, -0.27507153153419495, -0.18260112404823303, -0.4449683129787445, 0.06653939187526703, -0.35474327206611633, 0.05311782658100128, -0.06497317552566528, 0.4004480540752411, 0.44279807806015015, -0.05354726314544678, -0.031818583607673645, -0.311303973197937, 0.20871129631996155, 0.2548162043094635, -0.4169965088367462, -0.1376151144504547, -0.13858066499233246, 0.11448578536510468, 0.24802812933921814, -0.22445407509803772, 0.054495468735694885, -0.12034547328948975, 0.10765629261732101, -0.061504509299993515, 0.013851198367774487, 0.08708292990922928, -0.11091706156730652, 0.29657307267189026, -0.1700412482023239, 0.41989248991012573, -0.07581939548254013, -0.09666062146425247, -0.2475915402173996, -0.22361847758293152, 0.024525858461856842, 0.33405518531799316, 0.21460480988025665, 0.49526217579841614, -0.22813798487186432, 0.3416171967983246, -0.07664171606302261, -0.0826425850391388, 0.0958096832036972, -0.05187394469976425, 0.0168424304574728, 0.09607426077127457, 0.04572838172316551, 0.2561379373073578, 0.022475389763712883, 0.2787264287471771, -0.02945825830101967, -0.008949835784733295, -0.3364945352077484, -0.0982675850391388, 0.3796485960483551, -0.29179951548576355, -0.4726312756538391, -0.2096146196126938, 0.05776270478963852, -0.05060253664851189, 0.20655867457389832, -0.5184623599052429, 0.2700488567352295, 0.13247811794281006, -0.03999278321862221, -0.3767392635345459, 0.3621032238006592, -0.07292839884757996, -0.10919204354286194, 0.08400152623653412, 0.04056835174560547, -0.11414919793605804, -0.3539161682128906, -0.12934903800487518, -0.24576716125011444 ]
https://github.com/huggingface/datasets/issues/5412
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
Thank you! I believe I was running additional map steps after loading, resulting in the cache conflict.
### Describe the bug I have a custom local dataset in JSON form. I am trying to do multiple training runs in parallel. The first training run runs with no issue. However, when I start another run on another GPU, the following code throws this error. If there is a workaround to ignore the cache I think that would solve my problem too. I am using datasets version 2.8.0. ### Steps to reproduce the bug 1. Start training run of GPU 0 loading dataset from ``` load_dataset( "json", data_files=tr_dataset_path, split=f"train", download_mode="force_redownload", ) ``` 2. While GPU 0 is training, start an identical run on GPU 1. GPU 1 will produce the following error: ``` Traceback (most recent call last): File "/local-scratch1/data/mt/code/qq/train.py", line 198, in <module> main() File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/username/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/local-scratch1/data/mt/code/qq/train.py", line 113, in main load_dataset( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1734, in load_dataset builder_instance = load_dataset_builder( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/load.py", line 1518, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/builder.py", line 366, in __init__ self.info = DatasetInfo.from_directory(self._cache_dir) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/datasets/info.py", line 313, in from_directory with fs.open(path_join(dataset_info_dir, config.DATASET_INFO_FILENAME), "r", encoding="utf-8") as f: File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1094, in open self.open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open f = self._open( File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open return LocalFileOpener(path, mode, fs=self, **kwargs) File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__ self._open() File "/home/username/miniconda3/envs/qq3/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open self.f = open(self.path, mode=self.mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/username/.cache/huggingface/datasets/json/default-43d06a4aedb25e6d/0.0.0/0f7e3662623656454fcd2b650f34e886a7db4b9104504885bd462096cc7a9f51/dataset_info.json' ``` ### Expected behavior Expected behavior: 2nd GPU training run should run the same as 1st GPU training run. ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.8.0 - Platform: Linux-5.4.0-120-generic-x86_64-with-glibc2.10 - Python version: 3.8.15 - PyArrow version: 9.0.0 - Pandas version: 1.5.2
17
load_dataset() cannot find dataset_info.json with multiple training runs in parallel
[ -0.45626404881477356, 0.1598930060863495, -0.18178649246692657, 0.37631669640541077, 0.19635573029518127, 0.13453294336795807, 0.41071993112564087, 0.34542590379714966, -0.03330771252512932, 0.05051781237125397, 0.11889174580574036, 0.3173251152038574, 0.11299068480730057, 0.09797313064336777, -0.09743411839008331, -0.08001500368118286, -0.01484317984431982, 0.142511248588562, -0.05079507827758789, -0.022663544863462448, 0.0009652735316194594, 0.18564100563526154, -0.06442122161388397, -0.03687281161546707, -0.3621998131275177, -0.13420163094997406, 0.004733345005661249, 0.2779025435447693, 0.03767196834087372, -0.26248738169670105, 0.10377738624811172, 0.16725295782089233, 0.12026440352201462, 0.40881070494651794, -0.00010416052100481465, 0.316168874502182, 0.1937483549118042, -0.12091106921434402, -0.47235846519470215, 0.11950051784515381, -0.3978196680545807, -0.16267062723636627, 0.18076837062835693, -0.3331298530101776, -0.22299940884113312, -0.321971595287323, 0.15591426193714142, -0.32701805233955383, 0.2545017600059509, 0.07855108380317688, 0.25659501552581787, 0.3439159095287323, -0.17164109647274017, -0.29684096574783325, -0.1040564775466919, 0.00522987823933363, 0.13062448799610138, 0.08241505175828934, 0.01194099709391594, -0.2522156834602356, -0.24142958223819733, 0.43923890590667725, 0.12326699495315552, 0.14018812775611877, -0.11703535914421082, -0.04793372005224228, -0.04330972582101822, 0.11733011901378632, 0.07773515582084656, -0.2010570466518402, 0.41083237528800964, -0.21943752467632294, -0.1362641155719757, -0.2929810881614685, 0.08419913798570633, -0.1386544108390808, 0.05714256316423416, 0.07567395269870758, -0.07402421534061432, -0.029983825981616974, -0.2482743263244629, -0.02757161296904087, -0.06440819799900055, -0.04687059298157692, 0.1950800120830536, 0.09580685198307037, -0.03860420361161232, 0.20955631136894226, 0.17429476976394653, 0.20574210584163666, 0.16411280632019043, -0.015804089605808258, 0.07869283854961395, -0.16769097745418549, -0.3405458331108093, -0.09361565113067627, 0.08018622547388077, -0.4915391504764557, 0.10729558765888214, 0.10098668932914734, 0.3385576605796814, 0.09835568815469742, 0.1820213496685028, 0.12243099510669708, 0.28407353162765503, -0.047600600868463516, -0.05437545105814934, 0.07771831750869751, 0.03143785893917084, 0.12419924139976501, -0.2964343726634979, 0.059658996760845184, -0.23169909417629242, -0.08789127320051193, -0.2578463554382324, 0.08108864724636078, -0.1670726090669632, 0.07613999396562576, -0.27250581979751587, -0.020428434014320374, -0.30943989753723145, -0.20219269394874573, 0.09498836100101471, 0.46053802967071533, 0.018773430958390236, 0.2144961655139923, 0.08984582871198654, 0.01900791935622692, -0.16424019634723663, -0.22442278265953064, -0.3781847655773163, 0.1604102998971939, -0.09615073353052139, -0.06975547969341278, 0.29714271426200867, 0.2321709841489792, 0.6210660338401794, -0.14198236167430878, -0.09369847178459167, -0.10737860202789307, 0.4119514524936676, -0.1696624606847763, -0.037220750004053116, 0.25315991044044495, 0.13463467359542847, -0.06424248218536377, 0.11139699816703796, 0.2404850423336029, 0.0009328765445388854, -0.01888839527964592, -0.27389422059059143, -0.19813266396522522, 0.3486476540565491, 0.23447129130363464, 0.10650388896465302, 0.04945044219493866, -0.22100453078746796, 0.26236283779144287, 0.1559593826532364, -0.21914450824260712, -0.12023100256919861, -0.09007271379232407, -0.16212742030620575, -0.13008753955364227, 0.19550618529319763, 0.27242374420166016, -0.22461971640586853, -0.017534499987959862, 0.17045378684997559, -0.15963727235794067, -0.14173710346221924, 0.12858623266220093, -0.42412328720092773, 0.46242839097976685, -0.09560373425483704, 0.2542265057563782, 0.3176499009132385, -0.4530825614929199, -0.12383569777011871, 0.23789480328559875, -0.20926034450531006, -0.0849718227982521, 0.15302880108356476, 0.03636603429913521, -0.034126244485378265, 0.15583741664886475, 0.4249001145362854, 0.300218403339386, -0.0042821732349693775, 0.05219167470932007, -0.03845591843128204, -0.1937129944562912, -0.0887620821595192, 0.5365886092185974, 0.0437149852514267, -0.2006899118423462, -0.005562271922826767, 0.020389968529343605, 0.41339096426963806, -0.12533284723758698, -0.000178095608134754, 0.26652291417121887, -0.4568031132221222, 0.03190585970878601, -0.04723963141441345, 0.2577916383743286, -0.4281242787837982, 0.020670568570494652, 0.25084319710731506, -0.06718800216913223, -0.08725591003894806, 0.12128355354070663, -0.06851588189601898, 0.05871528759598732, -0.27975994348526, -0.09448514878749847, 0.2394811511039734, 0.4405581057071686, 0.000798544439021498, 0.04802021011710167, -0.21356524527072906, 0.512752890586853, -0.3583436608314514, 0.0035098735243082047, -0.611510694026947, 0.16231873631477356, 0.14053258299827576, -0.035267289727926254, 0.21922029554843903, -0.013149047270417213, -0.007273631636053324, -0.19663885235786438, -0.009678316302597523, 0.2770852744579315, -0.02123970352113247, -0.058838751167058945, 0.3232947587966919, -0.06499182432889938, -0.07842638343572617, 0.09415028244256973, -0.002425422426313162, 0.04188914597034454, 0.16481438279151917, -0.08412008732557297, -0.1634436845779419, 0.33542871475219727, 0.13098064064979553, -0.04836287349462509, 0.252908855676651, -0.24816879630088806, 0.24625219404697418, -0.033686667680740356, -0.11767493188381195, 0.08387618511915207, 0.11067422479391098, 0.18204021453857422, 0.18171624839305878, -0.06835491955280304, -0.5206676721572876, 0.08414778858423233, 0.6187365055084229, 0.01575862430036068, 0.08020633459091187, -0.1845749020576477, 0.07657350599765778, 0.06656765192747116, 0.14778339862823486, 0.32123154401779175, 0.5344426035881042, 0.20967796444892883, 0.15711531043052673, -0.08577627688646317, -0.06535360962152481, -0.14472033083438873, -0.04294467717409134, -0.10795218497514725, 0.3745338022708893, 0.18985366821289062, 0.234375, -0.3606826066970825, -0.46672213077545166, -0.3905530869960785, 0.40427374839782715, 0.14572568237781525, -0.03311620652675629, 0.2179567515850067, -0.07454831153154373, 0.27324870228767395, -0.22327937185764313, 0.043071649968624115, 0.29233890771865845, -0.029383251443505287, 0.08175652474164963, 0.24147896468639374, -0.10493569076061249, 0.2917158901691437, -0.20329783856868744, 0.13287371397018433, 0.22370055317878723, -0.22658278048038483, 0.19006307423114777, -0.04563511908054352, -0.2770851254463196, 0.10439648479223251, 0.11631058901548386, 0.08955328911542892, 0.11072190850973129, -0.2236926108598709, -0.2102842628955841, 0.056040577590465546, 0.10959593206644058, 0.07975618541240692, -0.1034926027059555, -0.25355103611946106, -0.02143046259880066, 0.23591893911361694, -0.11243296414613724, -0.28290215134620667, 0.30860334634780884, -0.051689263433218, -0.18576817214488983, -0.22637486457824707, 0.18817590177059174, 0.008970801718533039, -0.017860449850559235, -0.7673947811126709, -0.2632763385772705, -0.2867491543292999, 0.2377098947763443, -0.09423115104436874, 0.021880626678466797, -0.03872409462928772, 0.3949354290962219, 0.05815395340323448, 0.036218006163835526, 0.06811662018299103, -0.27929356694221497, -0.4816545844078064, 0.14717315137386322, -0.24622386693954468, -0.07712273299694061, -0.06350035220384598, -0.007810138165950775, 0.2486465722322464, 0.15836100280284882, -0.5461559891700745, 0.08846229314804077, 0.19654545187950134, 0.013190166093409061, -0.2745968699455261, 0.023736238479614258, 0.3310632109642029, -0.0658688098192215, -0.14993831515312195, -0.19881172478199005, -0.12284201383590698, 0.34166499972343445, -0.24148684740066528, 0.10377708822488785, -0.24086390435695648, 0.3342761993408203, -0.039199694991111755, 0.5288744568824768, 0.09533777832984924, -0.16487906873226166, -0.037252284586429596, -0.11155849695205688, 0.173318013548851, -0.1080930083990097, -0.17893747985363007, -0.09847712516784668, -0.07114425301551819, -0.15595301985740662, 0.25720861554145813, -0.140699565410614, -0.33683276176452637, -0.1907845288515091, -0.02847725711762905, -0.18609683215618134, -0.08279252052307129, 0.20710252225399017, -0.0190616175532341, 0.09891882538795471, 0.0332883782684803, 0.4236782193183899, -0.1794859915971756, 0.30926913022994995, -0.13938455283641815, -0.07320213317871094, -0.09161394089460373, -0.03770850598812103, -0.39776384830474854, -0.026532188057899475, -0.22052718698978424, 0.13106173276901245, -0.15856501460075378, 0.4102172553539276, -0.13165105879306793, -0.050515394657850266, 0.10592538118362427, -0.17556652426719666, 0.6099921464920044, -0.18635901808738708, 0.07528543472290039, 0.11797258257865906, -0.2007681280374527, -0.06079517677426338, -0.1064949482679367, -0.10428496450185776, 0.23216670751571655, 0.17750121653079987, 0.3291718661785126, -0.26518794894218445, -0.14217327535152435, 0.38196060061454773, -0.09182168543338776, 0.0032964551355689764, -0.08337735384702682, -0.20737263560295105, -0.3486119210720062, -0.2249954491853714, 0.17581740021705627, 0.05513448268175125, 0.18448346853256226, -0.1336347460746765, -0.11767837405204773, -0.04374043270945549, 0.06509154289960861, 0.1119355857372284, 0.28477880358695984, 0.07768553495407104, 0.23322470486164093, 0.15444062650203705, 0.37751010060310364, 0.20402339100837708, 0.5071033239364624, 0.38024914264678955, 0.06808676570653915, -0.2011273354291916, 0.3132205307483673, 0.07748907059431076, 0.2998301684856415, 0.4130437970161438, 0.0383329875767231, -0.05830547958612442, 0.18040640652179718, -0.08239202946424484, -0.14888471364974976, 0.30309200286865234, 0.3036433756351471, -0.11662326008081436, -0.181401327252388, -0.5397744178771973, 0.32807713747024536, -0.05737217888236046, 0.09704515337944031, 0.21609029173851013, -0.6515226364135742, -0.21445956826210022, 0.0785825327038765, -0.24247299134731293, 0.3195216655731201, 0.08988282084465027, 0.26525700092315674, 0.4841023087501526, 0.01632693037390709, 0.15236744284629822, -0.7743749022483826, 0.48950469493865967, -0.2681422829627991, -0.062415845692157745, 0.11843045055866241, -0.10630318522453308, -0.04835866764187813, 0.5179651975631714, 0.12469852715730667, 0.052401475608348846, 0.23463155329227448, 0.1174369752407074, -0.1713201403617859, 0.31597110629081726, 0.1352735310792923, -0.21825993061065674, -0.5791332125663757, 0.1740436553955078, 0.01721830852329731, -0.043168798089027405, -0.12583228945732117, -0.3115445375442505, -0.03209322690963745, -0.14234764873981476, 0.16138234734535217, 0.18553680181503296, -0.16148561239242554, 0.4925242066383362, -0.10201199352741241, -0.31552237272262573, -0.20762984454631805, -0.045482032001018524, 0.1655578315258026, -0.0606706440448761, -0.10410746932029724, 0.3031597137451172, -0.24667862057685852, -0.008960848674178123, -0.28391727805137634, -0.1609160602092743, 0.06867974251508713, 0.01736179180443287, -0.2786684036254883, 0.170790433883667, -0.2112622708082199, -0.5086578726768494, 0.03484756126999855, 0.1831747144460678, -0.1996052861213684, -0.16065284609794617, -0.055864159017801285, 0.42089515924453735, 0.10978583246469498, -0.24010129272937775, 0.18832148611545563, 0.009464665316045284, -0.3435862362384796, 0.1774878203868866, 0.07279060781002045, -0.11742520332336426, -0.21275141835212708, 0.4644439220428467, 0.14915847778320312, 0.09483811259269714, 0.5984646677970886, 0.25051388144493103, 0.0026970021426677704, -0.40541741251945496, -0.003516464726999402, 0.5642431378364563, 0.13917109370231628, 0.10525399446487427, 0.03996903449296951, -0.0734710767865181, 0.15196840465068817, -0.0059171440079808235, -0.11485937982797623, -0.10968254506587982, 0.1502874493598938, -0.2663021683692932, -0.5207412838935852, 0.2869183421134949, -0.025955930352211, 0.1840500831604004, 0.34572485089302063, 0.17196214199066162, -0.1137697696685791, 0.01611105166375637, -0.37902674078941345, 0.20755137503147125, -0.23801454901695251, 0.015261336229741573, 0.06038098409771919, -0.17555642127990723, 0.3759225010871887, 0.2898412048816681, 0.21408578753471375, 0.0331948883831501, -0.22823190689086914, -0.23152905702590942, 0.13206085562705994, 0.04075220972299576, -0.12285991758108139, 0.47256770730018616, -0.007922815158963203, -0.2898012697696686, -0.34076693654060364, 0.009272389113903046, 0.2703309953212738, -0.0031949381809681654, 0.056695736944675446, 0.14120231568813324, -0.16718819737434387, 0.04219375178217888, 0.09157509356737137, -0.009027525782585144, -0.0038587229792028666, 0.07011260092258453, 0.018610892817378044, -0.01806819811463356, -0.09350737184286118, 0.03912604972720146, -0.17214198410511017, -0.014384530484676361, 0.03511418029665947, 0.14805881679058075, 0.056364063173532486, -0.4784240424633026, -0.14881156384944916, -0.092691570520401, 0.23762862384319305, 0.40512463450431824, -0.25012901425361633, -0.1587529480457306, -0.11245505511760712, 0.25243183970451355, -0.1933019459247589, -0.14899714291095734, 0.391153484582901, -0.07555264979600906, 0.11079073697328568, 0.2734520733356476, 0.06024406477808952, -0.05751126632094383, -0.09006476402282715, 0.3082033395767212, 0.2186656892299652, -0.08858653157949448, 0.11509974300861359, 0.10210059583187103, -0.069743812084198, -0.0850340723991394, 0.06993264704942703, 0.23404665291309357, 0.30923837423324585, 0.4753246605396271, -0.06624288111925125, 0.42680397629737854, 0.05411047115921974, -0.1793549507856369, -0.3722577691078186, -0.4034786522388458, -0.01355290599167347, 0.27468523383140564, 0.030276484787464142, 0.003154065925627947, -0.2583683133125305, 0.27974745631217957, -0.16328755021095276, -0.12110311537981033, -0.511189341545105, 0.06621115654706955, -0.35419806838035583, -0.14511236548423767, -0.21457427740097046, -0.2732461094856262, 0.10474089533090591, 0.20420478284358978, 0.02694733254611492, 0.13132070004940033, 0.3947701156139374, -0.2524853050708771, -0.1895761787891388, -0.16941793262958527, 0.18416465818881989, 0.35495084524154663, -0.056152064353227615, -0.2015514373779297, 0.19080938398838043, 0.044144172221422195, -0.33542773127555847, -0.00017563739675097167, 0.16328288614749908, 0.2824857234954834, 0.11869843304157257, 0.16714437305927277, -0.244338259100914, 0.07269265502691269, -0.07945474982261658, -0.20434463024139404, 0.24214324355125427, 0.24017511308193207, -0.27027377486228943, 0.35207968950271606, 0.19343753159046173, -0.16698405146598816, 0.2281632423400879, 0.3878518044948578, -0.05266594886779785, -0.17533105611801147, -0.1976456493139267, -0.0789974108338356, 0.13706962764263153, -0.026859106495976448, -0.03810393065214157, -0.3931657671928406, -0.19249078631401062, 0.3502611517906189, 0.0776500329375267, 0.17738907039165497, -0.07375738769769669, 0.1270056515932083, -0.3955896198749542, 0.6006048917770386, -0.1680826097726822, -0.221482053399086, -0.27507153153419495, -0.18260112404823303, -0.4449683129787445, 0.06653939187526703, -0.35474327206611633, 0.05311782658100128, -0.06497317552566528, 0.4004480540752411, 0.44279807806015015, -0.05354726314544678, -0.031818583607673645, -0.311303973197937, 0.20871129631996155, 0.2548162043094635, -0.4169965088367462, -0.1376151144504547, -0.13858066499233246, 0.11448578536510468, 0.24802812933921814, -0.22445407509803772, 0.054495468735694885, -0.12034547328948975, 0.10765629261732101, -0.061504509299993515, 0.013851198367774487, 0.08708292990922928, -0.11091706156730652, 0.29657307267189026, -0.1700412482023239, 0.41989248991012573, -0.07581939548254013, -0.09666062146425247, -0.2475915402173996, -0.22361847758293152, 0.024525858461856842, 0.33405518531799316, 0.21460480988025665, 0.49526217579841614, -0.22813798487186432, 0.3416171967983246, -0.07664171606302261, -0.0826425850391388, 0.0958096832036972, -0.05187394469976425, 0.0168424304574728, 0.09607426077127457, 0.04572838172316551, 0.2561379373073578, 0.022475389763712883, 0.2787264287471771, -0.02945825830101967, -0.008949835784733295, -0.3364945352077484, -0.0982675850391388, 0.3796485960483551, -0.29179951548576355, -0.4726312756538391, -0.2096146196126938, 0.05776270478963852, -0.05060253664851189, 0.20655867457389832, -0.5184623599052429, 0.2700488567352295, 0.13247811794281006, -0.03999278321862221, -0.3767392635345459, 0.3621032238006592, -0.07292839884757996, -0.10919204354286194, 0.08400152623653412, 0.04056835174560547, -0.11414919793605804, -0.3539161682128906, -0.12934903800487518, -0.24576716125011444 ]
https://github.com/huggingface/datasets/issues/5408
dataset map function could not be hash properly
Hi ! On macos I tried with - py 3.9.11 - datasets 2.8.0 - transformers 4.25.1 - dill 0.3.4 and I was able to hash `prepare_dataset` correctly: ```python from datasets.fingerprint import Hasher Hasher.hash(prepare_dataset) ``` What version of transformers do you have ? Can you try to call `Hasher.hash` on the the tokenizer and the feature extractor to see which one can't be hashed ?
### Describe the bug I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model. When using map function to prepare dataset, following warning pop out: `common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=1)` > Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue. ### Steps to reproduce the bug ```python from datasets import load_dataset, DatasetDict common_voice = DatasetDict() common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK", split="train+validation") common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK", split="test") common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"]) from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small") tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe") processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe") from datasets import Audio common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000)) def prepare_dataset(batch): # load and resample audio data from 48 to 16kHz audio = batch["audio"] # compute log-Mel input features from input audio array batch["input_features"] = feature_extractor(audio["array"], sampling_rate=audio["sampling_rate"]).input_features[0] # encode target text to label ids batch["labels"] = tokenizer(batch["sentence"]).input_ids return batch common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=1) ``` ### Expected behavior Should be no warning shown. ### Environment info - `datasets` version: 2.7.0 - Platform: Windows-10-10.0.19045-SP0 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Pandas version: 1.3.5 - dill version: 0.3.4 - multiprocess version: 0.70.12.2
64
dataset map function could not be hash properly
[ -0.32853734493255615, -0.10013347864151001, -0.2505730390548706, 0.11325374990701675, 0.2834652364253998, 0.013844821602106094, 0.21750544011592865, 0.30322274565696716, 0.27834558486938477, 0.011375954374670982, 0.08622635155916214, 0.4415920078754425, -0.04466094821691513, 0.19594097137451172, -0.0697014108300209, 0.18937870860099792, 0.005504289176315069, 0.1447448581457138, -0.4657175540924072, -0.21357212960720062, -0.24346382915973663, 0.01896790601313114, -0.2404799610376358, -0.09304293990135193, -0.13300977647304535, -0.18536244332790375, 0.20501187443733215, 0.014025071635842323, -0.27309170365333557, -0.059810470789670944, 0.010271216742694378, -0.050162628293037415, -0.1862112432718277, 0.218490332365036, -0.00010083764209412038, 0.01899951696395874, 0.1713274121284485, -0.03524771332740784, 0.13105173408985138, -0.10149780660867691, -0.583091139793396, -0.1358882337808609, -0.3057081997394562, -0.3026356101036072, -0.0580059215426445, -0.13283070921897888, -0.023445772007107735, -0.3738679885864258, 0.24794283509254456, 0.26249486207962036, 0.36108118295669556, -0.1613195836544037, 0.12438680976629257, 0.08662056177854538, 0.25330469012260437, 0.015346248634159565, -0.07144266366958618, 0.22751609981060028, 0.06235687807202339, -0.12374565750360489, -0.04898902401328087, 0.3811456263065338, 0.08854390680789948, -0.01455678977072239, 0.20479129254817963, -0.024719078093767166, 0.1270245611667633, -0.1257771998643875, 0.27164340019226074, -0.1247975155711174, 0.2922782301902771, -0.2652403712272644, -0.016358397901058197, 0.34273460507392883, -0.24457809329032898, 0.032941535115242004, 0.4167667329311371, -0.17794664204120636, 0.2347732037305832, 0.12834060192108154, -0.45062243938446045, -0.028568493202328682, 0.08314299583435059, 0.16246117651462555, 0.18833991885185242, -0.02957056276500225, -0.20387360453605652, 0.17953304946422577, 0.06906083971261978, -0.2500717341899872, -0.023976795375347137, -0.1053820550441742, 0.002037421567365527, 0.09241148829460144, 0.009688991121947765, -0.10065610706806183, 0.17748408019542694, 0.15672071278095245, 0.245270237326622, -0.08685135096311569, -0.005834941752254963, 0.2510368227958679, 0.09991377592086792, 0.11655213683843613, 0.10425040870904922, -0.15093663334846497, 0.2536624073982239, 0.28025850653648376, 0.0706329420208931, -0.28335610032081604, -0.5362242460250854, 0.007401226554065943, 0.19770772755146027, -0.17915424704551697, 0.31465062499046326, 0.052603356540203094, 0.07930896431207657, -0.10842753946781158, 0.11422105878591537, 0.061017248779535294, -0.16230584681034088, -0.10414691269397736, 0.10106530040502548, 0.3361527621746063, 0.02050316333770752, -0.29653117060661316, -0.21967124938964844, 0.004985221661627293, -0.03902166336774826, 0.11190522462129593, -0.38034918904304504, 0.061431873589754105, -0.2545444071292877, -0.15404526889324188, -0.005256304983049631, -0.11662350594997406, 0.2690618932247162, -0.08612485975027084, -0.06257136166095734, -0.08458828926086426, 0.01345762424170971, -0.15487563610076904, 0.38676440715789795, 0.03780149668455124, 0.008133943192660809, 0.18359896540641785, -0.006696957163512707, 0.04741084203124046, 0.05703921616077423, 0.07691571116447449, -0.35593053698539734, -0.1180395632982254, 0.07581345736980438, 0.29352858662605286, 0.05407228320837021, 0.26164570450782776, 0.09898260980844498, 0.07980874925851822, 0.2826964855194092, -0.3352150022983551, -0.015154446475207806, 0.03821730241179466, -0.29427260160446167, -0.32695138454437256, -0.020846005529165268, 0.1403702199459076, -0.193210631608963, 0.12236200273036957, 0.005168413743376732, -0.12755811214447021, 0.19217044115066528, 0.09604976326227188, -0.0935169905424118, 0.024158606305718422, -0.2784665822982788, 0.34147071838378906, 0.5155171751976013, -0.2694985270500183, -0.7853057980537415, 0.3657670021057129, -0.01742071658372879, -0.27686354517936707, -0.08862709999084473, 0.024069491773843765, 0.18994249403476715, -0.1191403940320015, 0.062101222574710846, -0.11875137686729431, -0.0002262654306832701, 0.1808740198612213, -0.15378595888614655, -0.05618571117520332, 0.20397242903709412, -0.07104966044425964, 0.07059825211763382, 0.24835294485092163, 0.5546318888664246, 0.01709836535155773, 0.07447978854179382, 0.0519840233027935, 0.17718400061130524, 0.1800927221775055, 0.1526625007390976, -0.3266575038433075, -0.041650816798210144, -0.18509551882743835, -0.3533301055431366, -0.16266582906246185, -0.009506620466709137, -0.007691817358136177, -0.3572428822517395, 0.1096174418926239, -0.2720922529697418, -0.05143149942159653, -0.04032774269580841, 0.19641698896884918, 0.27025777101516724, 0.03512699156999588, -0.05298298969864845, 0.0037991167046129704, 0.005125794559717178, -0.028152715414762497, -0.0708855465054512, -0.2621628940105438, -0.13596317172050476, 0.0923650711774826, -0.17734915018081665, -0.17857395112514496, 0.1300431787967682, 0.03032771125435829, 0.35692673921585083, -0.13218802213668823, -0.24900752305984497, 0.16654589772224426, -0.06082877889275551, -0.17769905924797058, 0.06440410017967224, 0.2919609546661377, 0.025047654286026955, -0.40865442156791687, 0.07976002991199493, -0.0008012237958610058, 0.20882131159305573, -0.16402991116046906, -0.073515884578228, 0.1108119934797287, -0.10705133527517319, -0.1695275753736496, -0.12150932103395462, 0.08460459858179092, 0.22753286361694336, -0.07860905677080154, -0.0019222816918045282, -0.4441400468349457, -0.22676591575145721, -0.04729282855987549, 0.2607228457927704, 0.2433292716741562, 0.22314898669719696, -0.021870365366339684, 0.8230414390563965, 0.09052518755197525, 0.24228057265281677, -0.1513613611459732, -0.08984233438968658, -0.17094486951828003, 0.047104302793741226, 0.09997182339429855, 0.3552839457988739, 0.18855591118335724, 0.08194513618946075, 0.17268401384353638, 0.10046238452196121, -0.021985482424497604, 0.06913544237613678, -0.24051924049854279, 0.1973208338022232, 0.13550394773483276, 0.1051868200302124, -0.21240025758743286, -0.2760881185531616, 0.12009847909212112, 0.3830382823944092, 0.3225969970226288, -0.2557484805583954, -0.27010849118232727, -0.37172311544418335, 0.18074683845043182, 0.24618932604789734, 0.16857804358005524, 0.00793964322656393, -0.26475340127944946, -0.03739653527736664, 0.06189640238881111, -0.05131308361887932, 0.3976840078830719, 0.1684553623199463, -0.22974854707717896, 0.2772200107574463, -0.2724062204360962, -0.10761857777833939, -0.24541082978248596, -0.02784901298582554, 0.15427397191524506, 0.026773149147629738, 0.09998832643032074, 0.14650960266590118, -0.13223306834697723, -0.0811532735824585, -0.45458462834358215, -0.20306281745433807, 0.12229402363300323, -0.07734693586826324, 0.022423017770051956, 0.28231412172317505, 0.08376231789588928, -0.42936375737190247, -0.028900694102048874, 0.21603159606456757, -0.3720928132534027, -0.23245304822921753, 0.031254857778549194, -0.1318451166152954, -0.20186932384967804, -0.09770024567842484, -0.3251114785671234, -0.03028077632188797, -0.2466340810060501, 0.11594702303409576, 0.012795581482350826, 0.17063778638839722, 0.008418476209044456, 0.1967420130968094, -0.0645035058259964, -0.2677208483219147, -0.10881064832210541, -0.5678693652153015, -0.5078080892562866, 0.46214574575424194, -0.2572955787181854, -0.44772958755493164, 0.07406532764434814, 0.11046555638313293, 0.0927947536110878, 0.43725571036338806, -0.1529577523469925, -0.2020624577999115, 0.073871910572052, 0.16134394705295563, 0.021887073293328285, 0.20640896260738373, 0.16959933936595917, 0.10863377153873444, -0.171573668718338, -0.4291706085205078, -0.3122597336769104, 0.3023373782634735, 0.11285877227783203, 0.22725586593151093, 0.29143768548965454, 0.46686863899230957, -0.015482565388083458, 0.4731200933456421, 0.23942899703979492, -0.3660908639431, 0.26350027322769165, -0.26654544472694397, 0.15691734850406647, 0.014001728035509586, -0.3538861572742462, 0.1733536273241043, 0.11586838960647583, 0.25730523467063904, -0.0007893069996498525, -0.16436901688575745, -0.08142692595720291, -0.005849315319210291, -0.09971926361322403, -0.557855486869812, -0.2040492743253708, 0.015081229619681835, -0.2892701029777527, 0.07581283897161484, 0.20598100125789642, 0.1160428524017334, -0.32970988750457764, -0.011311418376863003, 0.35515156388282776, -0.26107293367385864, 0.0930846557021141, -0.06909409165382385, -0.24902571737766266, 0.24729789793491364, -0.11129525303840637, 0.34538963437080383, 0.09467555582523346, 0.22812144458293915, -0.2873913049697876, -0.0003369196492712945, -0.15353848040103912, 0.08625630289316177, 0.7082227468490601, -0.7404680848121643, 0.38746923208236694, -0.205671027302742, -0.05468092858791351, 0.13577152788639069, 0.3211069405078888, -0.04412196949124336, 0.5036959052085876, -0.0074959141202270985, 0.2775588929653168, -0.32041850686073303, 0.17457513511180878, 0.16656897962093353, -0.27597492933273315, -0.00048120366409420967, -0.16096670925617218, 0.007583776023238897, -0.12256775051355362, -0.23004809021949768, -0.12012423574924469, 0.017293106764554977, 0.01558653824031353, 0.34593111276626587, -0.255379319190979, -0.17555628716945648, -0.08663225173950195, 0.03777896612882614, 0.14643405377864838, 0.3266473710536957, 0.08541272580623627, 0.18851050734519958, 0.03412248194217682, 0.12427732348442078, 0.017359385266900063, 0.32062530517578125, -0.09129063040018082, -0.15019842982292175, 0.20666922628879547, -0.2952960729598999, 0.11381570994853973, 0.054868072271347046, -0.16802792251110077, -0.1576477289199829, 0.09295029193162918, 0.09393966197967529, 0.08922301232814789, -0.005274973344057798, 0.28201672434806824, 0.09794075042009354, -0.2602212131023407, -0.30294251441955566, 0.05236645042896271, 0.07852590084075928, -0.15619097650051117, 0.4314844012260437, 0.02128879725933075, -0.2039937973022461, 0.24127870798110962, -0.016628295183181763, 0.8018211126327515, -0.1331818848848343, -0.39117610454559326, -0.024055233225226402, 0.17768467962741852, 0.19543501734733582, -0.10972972959280014, -0.10708300769329071, -0.35256025195121765, -0.3985130190849304, -0.007085855584591627, -0.10431333631277084, 0.06071964651346207, 0.43138420581817627, -0.04494713619351387, 0.13935212790966034, 0.23200012743473053, 0.5387334227561951, -0.079298235476017, 0.04844691976904869, 0.14996246993541718, 0.01130619179457426, -0.22576701641082764, 0.30391111969947815, 0.1706794649362564, -0.02066960372030735, -0.03107355907559395, -0.2922828793525696, -0.011376932263374329, -0.31875523924827576, 0.06668074429035187, 0.1239500567317009, -0.3936336636543274, 0.3430420160293579, 0.14595317840576172, -0.0009361232514493167, 0.021391000598669052, 0.11518209427595139, 0.03378002345561981, 0.19346162676811218, -0.055906329303979874, 0.1287321001291275, 0.24259832501411438, 0.19390583038330078, -0.05806255340576172, 0.008998192846775055, 0.11138372868299484, 0.0022963627707213163, -0.17489677667617798, -0.08466720581054688, 0.0469144769012928, -0.3318796455860138, -0.13919107615947723, 0.08747269958257675, -0.3349660038948059, -0.32313022017478943, -0.17594324052333832, -0.16053403913974762, -0.14432121813297272, -0.1236373782157898, 0.22388985753059387, -0.04204632714390755, -0.04803811013698578, 0.5066041946411133, 0.2689307928085327, -0.20132172107696533, 0.06059320643544197, 0.537010133266449, -0.06643096357584, 0.09215614199638367, 0.18063773214817047, -0.17862775921821594, -0.2375052273273468, -0.3727874457836151, -0.16959281265735626, 0.2266635000705719, -0.14544777572155, 0.15005916357040405, -0.2560618817806244, 0.03567049652338028, 0.018738221377134323, 0.15565983951091766, -0.07779597491025925, 0.4319857060909271, 0.13626495003700256, -0.27675196528434753, -0.39091822504997253, 0.24230115115642548, 0.012567935511469841, -0.07681594043970108, 0.051482684910297394, 0.18150179088115692, 0.02986944280564785, 0.2185884416103363, -0.47401314973831177, 0.09695959091186523, -0.06634645164012909, 0.10268797725439072, 0.049243390560150146, 0.0504654124379158, 0.1618378609418869, -0.12810038030147552, 0.28717684745788574, 0.3637498915195465, -0.32595354318618774, -0.3347247242927551, 0.09690689295530319, 0.06740618497133255, 0.1008194088935852, -0.023704390972852707, -0.17362694442272186, -0.2836019992828369, -0.33060139417648315, 0.0160418301820755, -0.026821879670023918, 0.19379392266273499, 0.040412601083517075, 0.09203861653804779, 0.25005844235420227, -0.21715018153190613, 0.04601746425032616, -0.16475431621074677, -0.18487296998500824, 0.06800445169210434, -0.20515601336956024, -0.031075557693839073, 0.09912136197090149, -0.08636272698640823, 0.1562996655702591, -0.04164079576730728, 0.19719073176383972, 0.07928125560283661, 0.4496459364891052, -0.11076982319355011, -0.09216932207345963, 0.4262583553791046, 0.34229061007499695, -0.004537525121122599, -0.3996880352497101, -0.1710330843925476, -0.0017405004473403096, 0.3403284549713135, -0.35637766122817993, -0.1234196200966835, 0.49984753131866455, 0.13078457117080688, 0.1937553882598877, -0.0005425465642474592, 0.07418067008256912, -0.034741755574941635, -0.06183864548802376, -0.020453868433833122, 0.28045666217803955, -0.5787030458450317, -0.09414569288492203, 0.37541118264198303, -0.06300368160009384, 0.003553783753886819, 0.469730406999588, 0.2601282298564911, -0.04271501302719116, 0.6891652345657349, -0.05264129117131233, 0.17944061756134033, 0.1024932786822319, 0.17186087369918823, -0.0503973662853241, -0.24181026220321655, 0.29844069480895996, 0.42165607213974, -0.2670828104019165, 0.08094536513090134, 0.2159641534090042, -0.11429787427186966, 0.14785122871398926, 0.003693450940772891, -0.013064327649772167, 0.14003369212150574, -0.12732501327991486, 0.030280720442533493, -0.18864478170871735, -0.20267128944396973, -0.19950878620147705, 0.0026916628703475, -0.14891250431537628, 0.12524491548538208, 0.8345440030097961, 0.09198269993066788, 0.07322949171066284, -0.0853174552321434, -0.032741982489824295, -0.03720594570040703, 0.16143178939819336, -0.16972586512565613, 0.12578697502613068, -0.15451978147029877, 0.07916468381881714, 0.09650692343711853, 0.1859746128320694, 0.2430475801229477, 0.12140384316444397, 0.10363322496414185, 0.07827048748731613, 0.15670563280582428, -0.2944304049015045, -0.23907598853111267, 0.521252453327179, 0.16901512444019318, 0.17411206662654877, 0.10199893265962601, 0.27540045976638794, -0.21000763773918152, 0.04437774047255516, 0.19498004019260406, 0.1779705286026001, 0.2582239508628845, 0.031692005693912506, -0.010930974036455154, -0.20732788741588593, -0.10357381403446198, -0.045947007834911346, -0.07127958536148071, -0.3819301724433899, 0.39767661690711975, -0.09127341955900192, 0.4235881268978119, -0.24251310527324677, 0.16698285937309265, 0.09677840769290924, 0.38344112038612366, 0.08606098592281342, -0.0721082091331482, -0.34600064158439636, -0.14372976124286652, -0.5134775638580322, 0.16526378691196442, 0.17549659311771393, 0.08542324602603912, -0.17589300870895386, 0.17743940651416779, 0.2889156937599182, -0.07950387895107269, 0.10554224252700806, -0.03887723386287689, 0.03624908998608589, 0.10440494865179062, -0.07200784236192703, -0.06706360727548599, -0.2762126624584198, 0.10146184265613556, 0.18635986745357513, -0.35705459117889404, 0.36340951919555664, 0.07947050034999847, 0.28569719195365906, -0.3423292636871338, -0.07100711762905121, -0.21441805362701416, -0.20400646328926086, 0.5546542406082153, 0.20981289446353912, 0.288752943277359, -0.38379141688346863, 0.17588171362876892, -0.04422597214579582, -0.11621002107858658, 0.06271576881408691, 0.43281352519989014, 0.04946308210492134, 0.12022655457258224, 0.040122952312231064, 0.06445541977882385, -0.1124698743224144, -0.19919458031654358, -0.22870245575904846, 0.17281848192214966, -0.23695355653762817, 0.17316819727420807, 0.06683804839849472, -0.12204114347696304, -0.14089393615722656, 0.12319780886173248, -0.17279686033725739, 0.13707472383975983, -0.04435642063617706, -0.31110256910324097, 0.2585304081439972, -0.2268063873052597, -0.2733989357948303, -0.012658252380788326, 0.09197015315294266, -0.05765185132622719, -0.2654784321784973, -0.4169229567050934, -0.06806883960962296, 0.28988075256347656, -0.16712607443332672, -0.06668822467327118, 0.059611137956380844, -0.164948970079422, 0.2907524108886719, 0.026981979608535767, 0.09275621175765991, 0.0849515050649643, -0.19949884712696075, -0.0063733612187206745, -0.16604012250900269 ]
https://github.com/huggingface/datasets/issues/5408
dataset map function could not be hash properly
Thanks for your prompt reply. I update datasets version to 2.8.0 and the warning is gong.
### Describe the bug I follow the [blog post](https://huggingface.co/blog/fine-tune-whisper#building-a-demo) to finetune a Cantonese transcribe model. When using map function to prepare dataset, following warning pop out: `common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=1)` > Parameter 'function'=<function prepare_dataset at 0x000001D1D9D79A60> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed. I read https://github.com/huggingface/datasets/issues/4521 and https://github.com/huggingface/datasets/issues/3178 but cannot solve the issue. ### Steps to reproduce the bug ```python from datasets import load_dataset, DatasetDict common_voice = DatasetDict() common_voice["train"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK", split="train+validation") common_voice["test"] = load_dataset("mozilla-foundation/common_voice_11_0", "zh-HK", split="test") common_voice = common_voice.remove_columns(["accent", "age", "client_id", "down_votes", "gender", "locale", "path", "segment", "up_votes"]) from transformers import WhisperFeatureExtractor, WhisperTokenizer, WhisperProcessor feature_extractor = WhisperFeatureExtractor.from_pretrained("openai/whisper-small") tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", language="chinese", task="transcribe") processor = WhisperProcessor.from_pretrained("openai/whisper-small", language="chinese", task="transcribe") from datasets import Audio common_voice = common_voice.cast_column("audio", Audio(sampling_rate=16000)) def prepare_dataset(batch): # load and resample audio data from 48 to 16kHz audio = batch["audio"] # compute log-Mel input features from input audio array batch["input_features"] = feature_extractor(audio["array"], sampling_rate=audio["sampling_rate"]).input_features[0] # encode target text to label ids batch["labels"] = tokenizer(batch["sentence"]).input_ids return batch common_voice = common_voice.map(prepare_dataset, remove_columns=common_voice.column_names["train"], num_proc=1) ``` ### Expected behavior Should be no warning shown. ### Environment info - `datasets` version: 2.7.0 - Platform: Windows-10-10.0.19045-SP0 - Python version: 3.9.12 - PyArrow version: 8.0.0 - Pandas version: 1.3.5 - dill version: 0.3.4 - multiprocess version: 0.70.12.2
16
dataset map function could not be hash properly
[ -0.32853734493255615, -0.10013347864151001, -0.2505730390548706, 0.11325374990701675, 0.2834652364253998, 0.013844821602106094, 0.21750544011592865, 0.30322274565696716, 0.27834558486938477, 0.011375954374670982, 0.08622635155916214, 0.4415920078754425, -0.04466094821691513, 0.19594097137451172, -0.0697014108300209, 0.18937870860099792, 0.005504289176315069, 0.1447448581457138, -0.4657175540924072, -0.21357212960720062, -0.24346382915973663, 0.01896790601313114, -0.2404799610376358, -0.09304293990135193, -0.13300977647304535, -0.18536244332790375, 0.20501187443733215, 0.014025071635842323, -0.27309170365333557, -0.059810470789670944, 0.010271216742694378, -0.050162628293037415, -0.1862112432718277, 0.218490332365036, -0.00010083764209412038, 0.01899951696395874, 0.1713274121284485, -0.03524771332740784, 0.13105173408985138, -0.10149780660867691, -0.583091139793396, -0.1358882337808609, -0.3057081997394562, -0.3026356101036072, -0.0580059215426445, -0.13283070921897888, -0.023445772007107735, -0.3738679885864258, 0.24794283509254456, 0.26249486207962036, 0.36108118295669556, -0.1613195836544037, 0.12438680976629257, 0.08662056177854538, 0.25330469012260437, 0.015346248634159565, -0.07144266366958618, 0.22751609981060028, 0.06235687807202339, -0.12374565750360489, -0.04898902401328087, 0.3811456263065338, 0.08854390680789948, -0.01455678977072239, 0.20479129254817963, -0.024719078093767166, 0.1270245611667633, -0.1257771998643875, 0.27164340019226074, -0.1247975155711174, 0.2922782301902771, -0.2652403712272644, -0.016358397901058197, 0.34273460507392883, -0.24457809329032898, 0.032941535115242004, 0.4167667329311371, -0.17794664204120636, 0.2347732037305832, 0.12834060192108154, -0.45062243938446045, -0.028568493202328682, 0.08314299583435059, 0.16246117651462555, 0.18833991885185242, -0.02957056276500225, -0.20387360453605652, 0.17953304946422577, 0.06906083971261978, -0.2500717341899872, -0.023976795375347137, -0.1053820550441742, 0.002037421567365527, 0.09241148829460144, 0.009688991121947765, -0.10065610706806183, 0.17748408019542694, 0.15672071278095245, 0.245270237326622, -0.08685135096311569, -0.005834941752254963, 0.2510368227958679, 0.09991377592086792, 0.11655213683843613, 0.10425040870904922, -0.15093663334846497, 0.2536624073982239, 0.28025850653648376, 0.0706329420208931, -0.28335610032081604, -0.5362242460250854, 0.007401226554065943, 0.19770772755146027, -0.17915424704551697, 0.31465062499046326, 0.052603356540203094, 0.07930896431207657, -0.10842753946781158, 0.11422105878591537, 0.061017248779535294, -0.16230584681034088, -0.10414691269397736, 0.10106530040502548, 0.3361527621746063, 0.02050316333770752, -0.29653117060661316, -0.21967124938964844, 0.004985221661627293, -0.03902166336774826, 0.11190522462129593, -0.38034918904304504, 0.061431873589754105, -0.2545444071292877, -0.15404526889324188, -0.005256304983049631, -0.11662350594997406, 0.2690618932247162, -0.08612485975027084, -0.06257136166095734, -0.08458828926086426, 0.01345762424170971, -0.15487563610076904, 0.38676440715789795, 0.03780149668455124, 0.008133943192660809, 0.18359896540641785, -0.006696957163512707, 0.04741084203124046, 0.05703921616077423, 0.07691571116447449, -0.35593053698539734, -0.1180395632982254, 0.07581345736980438, 0.29352858662605286, 0.05407228320837021, 0.26164570450782776, 0.09898260980844498, 0.07980874925851822, 0.2826964855194092, -0.3352150022983551, -0.015154446475207806, 0.03821730241179466, -0.29427260160446167, -0.32695138454437256, -0.020846005529165268, 0.1403702199459076, -0.193210631608963, 0.12236200273036957, 0.005168413743376732, -0.12755811214447021, 0.19217044115066528, 0.09604976326227188, -0.0935169905424118, 0.024158606305718422, -0.2784665822982788, 0.34147071838378906, 0.5155171751976013, -0.2694985270500183, -0.7853057980537415, 0.3657670021057129, -0.01742071658372879, -0.27686354517936707, -0.08862709999084473, 0.024069491773843765, 0.18994249403476715, -0.1191403940320015, 0.062101222574710846, -0.11875137686729431, -0.0002262654306832701, 0.1808740198612213, -0.15378595888614655, -0.05618571117520332, 0.20397242903709412, -0.07104966044425964, 0.07059825211763382, 0.24835294485092163, 0.5546318888664246, 0.01709836535155773, 0.07447978854179382, 0.0519840233027935, 0.17718400061130524, 0.1800927221775055, 0.1526625007390976, -0.3266575038433075, -0.041650816798210144, -0.18509551882743835, -0.3533301055431366, -0.16266582906246185, -0.009506620466709137, -0.007691817358136177, -0.3572428822517395, 0.1096174418926239, -0.2720922529697418, -0.05143149942159653, -0.04032774269580841, 0.19641698896884918, 0.27025777101516724, 0.03512699156999588, -0.05298298969864845, 0.0037991167046129704, 0.005125794559717178, -0.028152715414762497, -0.0708855465054512, -0.2621628940105438, -0.13596317172050476, 0.0923650711774826, -0.17734915018081665, -0.17857395112514496, 0.1300431787967682, 0.03032771125435829, 0.35692673921585083, -0.13218802213668823, -0.24900752305984497, 0.16654589772224426, -0.06082877889275551, -0.17769905924797058, 0.06440410017967224, 0.2919609546661377, 0.025047654286026955, -0.40865442156791687, 0.07976002991199493, -0.0008012237958610058, 0.20882131159305573, -0.16402991116046906, -0.073515884578228, 0.1108119934797287, -0.10705133527517319, -0.1695275753736496, -0.12150932103395462, 0.08460459858179092, 0.22753286361694336, -0.07860905677080154, -0.0019222816918045282, -0.4441400468349457, -0.22676591575145721, -0.04729282855987549, 0.2607228457927704, 0.2433292716741562, 0.22314898669719696, -0.021870365366339684, 0.8230414390563965, 0.09052518755197525, 0.24228057265281677, -0.1513613611459732, -0.08984233438968658, -0.17094486951828003, 0.047104302793741226, 0.09997182339429855, 0.3552839457988739, 0.18855591118335724, 0.08194513618946075, 0.17268401384353638, 0.10046238452196121, -0.021985482424497604, 0.06913544237613678, -0.24051924049854279, 0.1973208338022232, 0.13550394773483276, 0.1051868200302124, -0.21240025758743286, -0.2760881185531616, 0.12009847909212112, 0.3830382823944092, 0.3225969970226288, -0.2557484805583954, -0.27010849118232727, -0.37172311544418335, 0.18074683845043182, 0.24618932604789734, 0.16857804358005524, 0.00793964322656393, -0.26475340127944946, -0.03739653527736664, 0.06189640238881111, -0.05131308361887932, 0.3976840078830719, 0.1684553623199463, -0.22974854707717896, 0.2772200107574463, -0.2724062204360962, -0.10761857777833939, -0.24541082978248596, -0.02784901298582554, 0.15427397191524506, 0.026773149147629738, 0.09998832643032074, 0.14650960266590118, -0.13223306834697723, -0.0811532735824585, -0.45458462834358215, -0.20306281745433807, 0.12229402363300323, -0.07734693586826324, 0.022423017770051956, 0.28231412172317505, 0.08376231789588928, -0.42936375737190247, -0.028900694102048874, 0.21603159606456757, -0.3720928132534027, -0.23245304822921753, 0.031254857778549194, -0.1318451166152954, -0.20186932384967804, -0.09770024567842484, -0.3251114785671234, -0.03028077632188797, -0.2466340810060501, 0.11594702303409576, 0.012795581482350826, 0.17063778638839722, 0.008418476209044456, 0.1967420130968094, -0.0645035058259964, -0.2677208483219147, -0.10881064832210541, -0.5678693652153015, -0.5078080892562866, 0.46214574575424194, -0.2572955787181854, -0.44772958755493164, 0.07406532764434814, 0.11046555638313293, 0.0927947536110878, 0.43725571036338806, -0.1529577523469925, -0.2020624577999115, 0.073871910572052, 0.16134394705295563, 0.021887073293328285, 0.20640896260738373, 0.16959933936595917, 0.10863377153873444, -0.171573668718338, -0.4291706085205078, -0.3122597336769104, 0.3023373782634735, 0.11285877227783203, 0.22725586593151093, 0.29143768548965454, 0.46686863899230957, -0.015482565388083458, 0.4731200933456421, 0.23942899703979492, -0.3660908639431, 0.26350027322769165, -0.26654544472694397, 0.15691734850406647, 0.014001728035509586, -0.3538861572742462, 0.1733536273241043, 0.11586838960647583, 0.25730523467063904, -0.0007893069996498525, -0.16436901688575745, -0.08142692595720291, -0.005849315319210291, -0.09971926361322403, -0.557855486869812, -0.2040492743253708, 0.015081229619681835, -0.2892701029777527, 0.07581283897161484, 0.20598100125789642, 0.1160428524017334, -0.32970988750457764, -0.011311418376863003, 0.35515156388282776, -0.26107293367385864, 0.0930846557021141, -0.06909409165382385, -0.24902571737766266, 0.24729789793491364, -0.11129525303840637, 0.34538963437080383, 0.09467555582523346, 0.22812144458293915, -0.2873913049697876, -0.0003369196492712945, -0.15353848040103912, 0.08625630289316177, 0.7082227468490601, -0.7404680848121643, 0.38746923208236694, -0.205671027302742, -0.05468092858791351, 0.13577152788639069, 0.3211069405078888, -0.04412196949124336, 0.5036959052085876, -0.0074959141202270985, 0.2775588929653168, -0.32041850686073303, 0.17457513511180878, 0.16656897962093353, -0.27597492933273315, -0.00048120366409420967, -0.16096670925617218, 0.007583776023238897, -0.12256775051355362, -0.23004809021949768, -0.12012423574924469, 0.017293106764554977, 0.01558653824031353, 0.34593111276626587, -0.255379319190979, -0.17555628716945648, -0.08663225173950195, 0.03777896612882614, 0.14643405377864838, 0.3266473710536957, 0.08541272580623627, 0.18851050734519958, 0.03412248194217682, 0.12427732348442078, 0.017359385266900063, 0.32062530517578125, -0.09129063040018082, -0.15019842982292175, 0.20666922628879547, -0.2952960729598999, 0.11381570994853973, 0.054868072271347046, -0.16802792251110077, -0.1576477289199829, 0.09295029193162918, 0.09393966197967529, 0.08922301232814789, -0.005274973344057798, 0.28201672434806824, 0.09794075042009354, -0.2602212131023407, -0.30294251441955566, 0.05236645042896271, 0.07852590084075928, -0.15619097650051117, 0.4314844012260437, 0.02128879725933075, -0.2039937973022461, 0.24127870798110962, -0.016628295183181763, 0.8018211126327515, -0.1331818848848343, -0.39117610454559326, -0.024055233225226402, 0.17768467962741852, 0.19543501734733582, -0.10972972959280014, -0.10708300769329071, -0.35256025195121765, -0.3985130190849304, -0.007085855584591627, -0.10431333631277084, 0.06071964651346207, 0.43138420581817627, -0.04494713619351387, 0.13935212790966034, 0.23200012743473053, 0.5387334227561951, -0.079298235476017, 0.04844691976904869, 0.14996246993541718, 0.01130619179457426, -0.22576701641082764, 0.30391111969947815, 0.1706794649362564, -0.02066960372030735, -0.03107355907559395, -0.2922828793525696, -0.011376932263374329, -0.31875523924827576, 0.06668074429035187, 0.1239500567317009, -0.3936336636543274, 0.3430420160293579, 0.14595317840576172, -0.0009361232514493167, 0.021391000598669052, 0.11518209427595139, 0.03378002345561981, 0.19346162676811218, -0.055906329303979874, 0.1287321001291275, 0.24259832501411438, 0.19390583038330078, -0.05806255340576172, 0.008998192846775055, 0.11138372868299484, 0.0022963627707213163, -0.17489677667617798, -0.08466720581054688, 0.0469144769012928, -0.3318796455860138, -0.13919107615947723, 0.08747269958257675, -0.3349660038948059, -0.32313022017478943, -0.17594324052333832, -0.16053403913974762, -0.14432121813297272, -0.1236373782157898, 0.22388985753059387, -0.04204632714390755, -0.04803811013698578, 0.5066041946411133, 0.2689307928085327, -0.20132172107696533, 0.06059320643544197, 0.537010133266449, -0.06643096357584, 0.09215614199638367, 0.18063773214817047, -0.17862775921821594, -0.2375052273273468, -0.3727874457836151, -0.16959281265735626, 0.2266635000705719, -0.14544777572155, 0.15005916357040405, -0.2560618817806244, 0.03567049652338028, 0.018738221377134323, 0.15565983951091766, -0.07779597491025925, 0.4319857060909271, 0.13626495003700256, -0.27675196528434753, -0.39091822504997253, 0.24230115115642548, 0.012567935511469841, -0.07681594043970108, 0.051482684910297394, 0.18150179088115692, 0.02986944280564785, 0.2185884416103363, -0.47401314973831177, 0.09695959091186523, -0.06634645164012909, 0.10268797725439072, 0.049243390560150146, 0.0504654124379158, 0.1618378609418869, -0.12810038030147552, 0.28717684745788574, 0.3637498915195465, -0.32595354318618774, -0.3347247242927551, 0.09690689295530319, 0.06740618497133255, 0.1008194088935852, -0.023704390972852707, -0.17362694442272186, -0.2836019992828369, -0.33060139417648315, 0.0160418301820755, -0.026821879670023918, 0.19379392266273499, 0.040412601083517075, 0.09203861653804779, 0.25005844235420227, -0.21715018153190613, 0.04601746425032616, -0.16475431621074677, -0.18487296998500824, 0.06800445169210434, -0.20515601336956024, -0.031075557693839073, 0.09912136197090149, -0.08636272698640823, 0.1562996655702591, -0.04164079576730728, 0.19719073176383972, 0.07928125560283661, 0.4496459364891052, -0.11076982319355011, -0.09216932207345963, 0.4262583553791046, 0.34229061007499695, -0.004537525121122599, -0.3996880352497101, -0.1710330843925476, -0.0017405004473403096, 0.3403284549713135, -0.35637766122817993, -0.1234196200966835, 0.49984753131866455, 0.13078457117080688, 0.1937553882598877, -0.0005425465642474592, 0.07418067008256912, -0.034741755574941635, -0.06183864548802376, -0.020453868433833122, 0.28045666217803955, -0.5787030458450317, -0.09414569288492203, 0.37541118264198303, -0.06300368160009384, 0.003553783753886819, 0.469730406999588, 0.2601282298564911, -0.04271501302719116, 0.6891652345657349, -0.05264129117131233, 0.17944061756134033, 0.1024932786822319, 0.17186087369918823, -0.0503973662853241, -0.24181026220321655, 0.29844069480895996, 0.42165607213974, -0.2670828104019165, 0.08094536513090134, 0.2159641534090042, -0.11429787427186966, 0.14785122871398926, 0.003693450940772891, -0.013064327649772167, 0.14003369212150574, -0.12732501327991486, 0.030280720442533493, -0.18864478170871735, -0.20267128944396973, -0.19950878620147705, 0.0026916628703475, -0.14891250431537628, 0.12524491548538208, 0.8345440030097961, 0.09198269993066788, 0.07322949171066284, -0.0853174552321434, -0.032741982489824295, -0.03720594570040703, 0.16143178939819336, -0.16972586512565613, 0.12578697502613068, -0.15451978147029877, 0.07916468381881714, 0.09650692343711853, 0.1859746128320694, 0.2430475801229477, 0.12140384316444397, 0.10363322496414185, 0.07827048748731613, 0.15670563280582428, -0.2944304049015045, -0.23907598853111267, 0.521252453327179, 0.16901512444019318, 0.17411206662654877, 0.10199893265962601, 0.27540045976638794, -0.21000763773918152, 0.04437774047255516, 0.19498004019260406, 0.1779705286026001, 0.2582239508628845, 0.031692005693912506, -0.010930974036455154, -0.20732788741588593, -0.10357381403446198, -0.045947007834911346, -0.07127958536148071, -0.3819301724433899, 0.39767661690711975, -0.09127341955900192, 0.4235881268978119, -0.24251310527324677, 0.16698285937309265, 0.09677840769290924, 0.38344112038612366, 0.08606098592281342, -0.0721082091331482, -0.34600064158439636, -0.14372976124286652, -0.5134775638580322, 0.16526378691196442, 0.17549659311771393, 0.08542324602603912, -0.17589300870895386, 0.17743940651416779, 0.2889156937599182, -0.07950387895107269, 0.10554224252700806, -0.03887723386287689, 0.03624908998608589, 0.10440494865179062, -0.07200784236192703, -0.06706360727548599, -0.2762126624584198, 0.10146184265613556, 0.18635986745357513, -0.35705459117889404, 0.36340951919555664, 0.07947050034999847, 0.28569719195365906, -0.3423292636871338, -0.07100711762905121, -0.21441805362701416, -0.20400646328926086, 0.5546542406082153, 0.20981289446353912, 0.288752943277359, -0.38379141688346863, 0.17588171362876892, -0.04422597214579582, -0.11621002107858658, 0.06271576881408691, 0.43281352519989014, 0.04946308210492134, 0.12022655457258224, 0.040122952312231064, 0.06445541977882385, -0.1124698743224144, -0.19919458031654358, -0.22870245575904846, 0.17281848192214966, -0.23695355653762817, 0.17316819727420807, 0.06683804839849472, -0.12204114347696304, -0.14089393615722656, 0.12319780886173248, -0.17279686033725739, 0.13707472383975983, -0.04435642063617706, -0.31110256910324097, 0.2585304081439972, -0.2268063873052597, -0.2733989357948303, -0.012658252380788326, 0.09197015315294266, -0.05765185132622719, -0.2654784321784973, -0.4169229567050934, -0.06806883960962296, 0.28988075256347656, -0.16712607443332672, -0.06668822467327118, 0.059611137956380844, -0.164948970079422, 0.2907524108886719, 0.026981979608535767, 0.09275621175765991, 0.0849515050649643, -0.19949884712696075, -0.0063733612187206745, -0.16604012250900269 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
Hi ! I just tested locally and or colab and it works fine for 2.9 on `sst2`. Also the code that is shown in your stack trace is not present in the 2.9 source code - so I'm wondering how you installed `datasets` that could cause this ? (you can check by searching for `[0:{label_ids[-1] + 1}]` in the [2.9 codebase](https://github.dev/huggingface/datasets/tree/b5672a956d5de864e6f5550e493527d962d6ae55) - it doesn't find anything) Anyway you can try uninstalling `datasets` and install it again
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
76
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
For what it's worth, I've also gotten this error on 2.9.0, and I've tried uninstalling an reinstalling ![Screenshot 2023-02-01 at 11 06 55 AM](https://user-images.githubusercontent.com/22944438/216126466-6934e8f8-0be4-41f4-9822-8436dfafd61c.png) I'm very new to this package (I was following this tutorial: https://huggingface.co/docs/transformers/training), so there's a good chance I was doing something wrong 😅 but thought I'd pass along the feedback
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
54
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
@ntrpnr @mtwichel Did you install `datasets` with conda ? I suspect that `datasets` 2.9 on conda still have this issue for some reason. When I install `datasets` with `pip` I don't have this error.
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
34
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
> @ntrpnr @mtwichel Did you install datasets with conda ? I did yeah, I wonder if that's the issue
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
19
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
I just checked on conda at https://anaconda.org/HuggingFace/datasets/files and everything looks fine, I got ```python f"ClassLabel expected a value for all label ids [0:{int(label_ids[-1]) + 1}] but some ids are missing." ``` as expected in features.py line 1760 (notice the "int()") to not have the TypeError. From where on conda did you install `datasets` ? You should use the `HuggingFace` official channel edit: the conda-forge one [here](https://anaconda.org/conda-forge/datasets/files) seems ok as well
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
70
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
Could you also try this in your notebook ? In case your python kernel doesn't match the `pip` environment in your shell ```python import datasets; datasets.__version__ ``` and ``` !which python ``` ```python import sys; sys.executable ```
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
37
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
Mmmm, just a potential clue: Where are you running your Python code? Is it the Spyder IDE? I have recently seen some users reporting conflicting Python environments while using Spyder... Maybe related: - #5487
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
34
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
Other potential clue: - Had you already imported `datasets` before pip-updating it? You should first update datasets, before importing it. Otherwise, you need to restart the kernel after updating it.
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
30
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5406
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
I installed `datasets` with Conda using `conda install datasets` and got this issue. Then I tried to reinstall using ` conda install -c huggingface -c conda-forge datasets ` The issue is now fixed.
`datasets` 2.6.1 and 2.7.0 started to stop supporting datasets like IMDB, ConLL or MNIST datasets. When loading a dataset using 2.6.1 or 2.7.0, you may this error when loading certain datasets: ```python TypeError: can only concatenate str (not "int") to str ``` This is because we started to update the metadata of those datasets to a format that is not supported in 2.6.1 and 2.7.0 This change is required or those datasets won't be supported by the Hugging Face Hub. Therefore if you encounter this error or if you're using `datasets` 2.6.1 or 2.7.0, we encourage you to update to a newer version. For example, versions 2.6.2 and 2.7.1 patch this issue. ```python pip install -U datasets ``` All the datasets affected are the ones with a ClassLabel feature type and YAML "dataset_info" metadata. More info [here](https://github.com/huggingface/datasets/issues/5275). We apologize for the inconvenience.
33
[2.6.1][2.7.0] Upgrade `datasets` to fix `TypeError: can only concatenate str (not "int") to str`
[ -0.44116002321243286, 0.3014155924320221, -0.201211616396904, -0.003388197161257267, 0.2234145998954773, 0.10039915889501572, -0.06829655170440674, 0.5512927770614624, -0.07237734645605087, 0.2429852932691574, -0.10493464022874832, 0.31848782300949097, -0.024602646008133888, 0.245287224650383, -0.38031309843063354, -0.08882313221693039, 0.10351187735795975, 0.09588152915239334, -0.4293232262134552, 0.12254929542541504, -0.32626214623451233, 0.3006514608860016, -0.24020060896873474, 0.1114201471209526, -0.11883541941642761, -0.06919939815998077, 0.1124391108751297, 0.25101298093795776, -0.3600281774997711, -0.32520556449890137, 0.024477476254105568, 0.11322711408138275, 0.08944795280694962, 0.3141477704048157, -0.00010371973621658981, -0.07014185935258865, 0.26003775000572205, 0.10418937355279922, -0.4651740789413452, -0.20324495434761047, -0.2160884588956833, -0.09305546432733536, 0.022332364693284035, -0.02594987116754055, 0.17572785913944244, -0.25148096680641174, 0.21786701679229736, -0.4454113245010376, 0.043068453669548035, 0.40945106744766235, 0.35478898882865906, 0.0487547367811203, 0.24452723562717438, -0.5054948925971985, 0.04732470214366913, 0.15272128582000732, 0.01559562049806118, -0.13728466629981995, 0.010999207384884357, 0.061334796249866486, -0.14837193489074707, 0.41116613149642944, 0.056103456765413284, 0.0015186283271759748, -0.06954372674226761, -0.025315798819065094, -0.20097126066684723, -0.2179262936115265, 0.3848003149032593, -0.0482584685087204, 0.48829686641693115, -0.17926287651062012, -0.24566903710365295, 0.18086928129196167, -0.004551876336336136, -0.10373662412166595, 0.2947344481945038, 0.010633571073412895, -0.0637359619140625, 0.12795564532279968, -0.2788950204849243, -0.23539364337921143, -0.09169556200504303, 0.03986581414937973, -0.1443854570388794, 0.07463338971138, -0.13975192606449127, -0.04141264408826828, 0.1188918799161911, -0.41290342807769775, 0.17762772738933563, 0.007598833180963993, -0.3430054783821106, -0.13452167809009552, -0.07987038791179657, 0.007852553389966488, -0.0931733176112175, -0.1531868278980255, 0.11716611683368683, -0.14372628927230835, -0.11827047169208527, 0.11152368783950806, -0.017915701493620872, -0.07364819943904877, 0.18376845121383667, -0.09723874181509018, 0.27963128685951233, 0.2591105103492737, 0.2758012115955353, -0.02420475333929062, 0.05610493943095207, -0.021107276901602745, 0.044218309223651886, -0.23518340289592743, -0.0698486715555191, -0.02012251317501068, 0.23679304122924805, -0.11643043160438538, -0.2004615217447281, 0.12290073186159134, 0.14920228719711304, -0.11749692261219025, -0.08286089450120926, 0.2605198919773102, -0.14073191583156586, 0.035521041601896286, 0.037724319845438004, 0.24011261761188507, 0.06461413949728012, -0.21617236733436584, -0.3271324336528778, 0.21482934057712555, 0.005855085793882608, -0.34626197814941406, 0.08113349229097366, -0.10809940844774246, -0.06305605918169022, 0.15365977585315704, -0.01616329699754715, 0.1299927830696106, -0.20109517872333527, -0.04384218156337738, -0.013628431595861912, 0.35006022453308105, 0.05372132733464241, 0.08127185702323914, 0.14883875846862793, -0.3021930456161499, -0.0041130948811769485, 0.2805998623371124, -0.255405992269516, -0.18901370465755463, -0.48123618960380554, 0.29480448365211487, 0.07982169836759567, -0.2431028038263321, 0.027138253673911095, 0.24559660255908966, 0.08510949462652206, -0.3771968185901642, -0.3402256369590759, -0.16125866770744324, 0.18660585582256317, -0.1686801314353943, 0.05864907428622246, 0.012913924641907215, -0.5090975165367126, 0.11733041703701019, -0.14844690263271332, -0.041432078927755356, 0.3804935812950134, 0.07556774467229843, 0.06707755476236343, -0.14982520043849945, -0.22437657415866852, 0.26814690232276917, 0.4506697654724121, -0.10793370753526688, -0.11837143450975418, 0.06439919024705887, 0.08630088716745377, -0.3601071238517761, 0.0813712626695633, -0.13744403421878815, 0.09141025692224503, 0.21334823966026306, 0.23506297171115875, 0.06958307325839996, -0.08582032471895218, 0.024864401668310165, -0.09112598747015, -0.18206919729709625, 0.34218332171440125, 0.14445897936820984, 0.17534133791923523, 0.19025768339633942, 0.2758081257343292, 0.03390440717339516, 0.10754415392875671, -0.09711368381977081, -0.01773046888411045, 0.05873838812112808, 0.1688433736562729, -0.16611114144325256, -0.15542377531528473, -0.23995180428028107, -0.18540461361408234, -0.18340247869491577, 0.10777349025011063, 0.1917664259672165, -0.1283935308456421, 0.03014436364173889, -0.19772402942180634, 0.0005353732849471271, 0.20662854611873627, 0.22383445501327515, 0.2810114920139313, 0.1533200889825821, -0.045065633952617645, -0.05146951600909233, -0.1785193532705307, 0.21177130937576294, -0.2254803478717804, 0.08692242205142975, -0.09999921917915344, 0.07738450914621353, -0.2687261700630188, -0.19557982683181763, 0.12029890716075897, -0.05436361953616142, 0.006919852923601866, 0.01719382219016552, -0.22532688081264496, 0.43801161646842957, -0.0010452428832650185, -0.04812036454677582, 0.2192787081003189, -0.06165052950382233, -0.1417841762304306, 0.09138505160808563, -0.08303970843553543, -0.06607215106487274, 0.003980803303420544, 0.08992377668619156, -0.39916476607322693, 0.10610415041446686, 0.03869533911347389, 0.14940422773361206, 0.2321910560131073, 0.294625848531723, 0.4796748459339142, 0.0930887758731842, 0.03924306109547615, -0.32444581389427185, 0.00031819671858102083, -0.16643136739730835, -0.12622448801994324, 0.030380120500922203, -0.47025424242019653, 0.17048874497413635, 0.5110344886779785, 0.11746716499328613, 0.13288675248622894, 0.3700171709060669, -0.03929638862609863, -0.12006419152021408, 0.09046325087547302, 0.36519357562065125, 0.3258463144302368, 0.36395353078842163, 0.17139102518558502, -0.045395564287900925, -0.060509923845529556, -0.11458544433116913, 0.31169119477272034, 0.17574700713157654, -0.04166833311319351, 0.25495707988739014, 0.22434890270233154, -0.04569791629910469, -0.30772262811660767, -0.1664411425590515, -0.06999927759170532, 0.24303829669952393, -0.2901860773563385, -0.1418505609035492, -0.44161614775657654, -0.23811542987823486, 0.14543375372886658, -0.18363921344280243, -0.13467556238174438, -0.4904913604259491, -0.08906948566436768, 0.23696067929267883, -0.16740913689136505, 0.25259941816329956, -0.01974671147763729, 0.17419828474521637, 0.18337097764015198, 0.06904634088277817, -0.06236730143427849, 0.17938266694545746, -0.08887472748756409, 0.2713642418384552, 0.12923911213874817, -0.025528790429234505, 0.25715911388397217, -0.3059430718421936, 0.21411579847335815, -0.33652201294898987, -0.44754964113235474, 0.013854274526238441, -0.07154438644647598, 0.0397188626229763, 0.5049630403518677, 0.014246414415538311, -0.18049649894237518, -0.35386770963668823, 0.18486130237579346, -0.11751755326986313, -0.22228701412677765, 0.18437862396240234, 0.004847421310842037, -0.19255021214485168, -0.22174356877803802, -0.5358790159225464, -0.26863235235214233, -0.49701812863349915, 0.06396830826997757, 0.02089996449649334, 0.19052064418792725, 0.21367238461971283, 0.32538703083992004, 0.04893802851438522, -0.0550406388938427, 0.05362202599644661, -0.24603433907032013, -0.2122107297182083, 0.35523614287376404, -0.15822267532348633, -0.29693102836608887, 0.07046807557344437, 0.1000494584441185, 0.10335498303174973, 0.03945785015821457, -0.2530735731124878, -0.025147579610347748, -0.2724899649620056, 0.332195520401001, -0.00039169733645394444, 0.14892148971557617, 0.2296164333820343, 0.23195712268352509, -0.36292919516563416, -0.06761378049850464, -0.20238912105560303, 0.15503501892089844, 0.10576742887496948, 0.18453755974769592, -0.07928524166345596, 0.2942619323730469, -0.00989576056599617, 0.12919126451015472, 0.0507722944021225, -0.04598986357450485, 0.15917325019836426, -0.021856212988495827, 0.595402181148529, -0.22370430827140808, -0.3285824656486511, 0.0022347141057252884, 0.017717160284519196, 0.06365261971950531, 0.022137075662612915, -0.03530225530266762, 0.053092002868652344, -0.08304750174283981, 0.014855360612273216, -0.10208650678396225, -0.1383378952741623, -0.010888079181313515, 0.04654225334525108, 0.03496995195746422, 0.06719159334897995, -0.027702001854777336, -0.21874192357063293, -0.04953845962882042, -0.07723318040370941, 0.10262130200862885, -0.06535811722278595, -0.08317504823207855, -0.3292554020881653, -0.11809592694044113, -0.4450210630893707, 0.4010467529296875, 0.06255979090929031, 0.48772165179252625, -0.1504296362400055, -0.12505050003528595, -0.18097417056560516, -0.06210916116833687, 0.3645256459712982, -0.2571100890636444, -0.30276480317115784, 0.28497421741485596, 0.0796666219830513, -0.10552463680505753, 0.0749114602804184, -0.20151114463806152, 0.40882688760757446, 0.35123777389526367, 0.2890132665634155, -0.00039442707202397287, -0.1629345417022705, 0.4545329511165619, 0.04068315401673317, -0.04965902864933014, 0.11672399938106537, 0.041317157447338104, -0.19692803919315338, -0.26623475551605225, -0.1987265944480896, 0.058543190360069275, 0.4165690243244171, -0.023924916982650757, -0.14310316741466522, -0.23211373388767242, -0.24665731191635132, 0.3135964870452881, -0.04432407021522522, 0.37936463952064514, 0.04719845950603485, 0.092385433614254, -0.19371244311332703, 0.15317705273628235, 0.34182435274124146, 0.3384828567504883, -0.030529525130987167, -0.3011339604854584, 0.357936829328537, -0.3301026225090027, 0.37542182207107544, 0.06464113295078278, -0.2338135987520218, 0.1386803388595581, -0.06559022516012192, 0.3554593026638031, -0.055177267640829086, 0.29854917526245117, 0.21910344064235687, 0.08753275126218796, -0.36420345306396484, -0.30370718240737915, 0.09795787930488586, 0.08721165359020233, -0.08865846693515778, 0.34419217705726624, 0.13297195732593536, -0.24109035730361938, 0.012471967376768589, 0.04767166078090668, 0.6678273677825928, 0.1947147697210312, 0.01722968928515911, -0.000769506674259901, -0.1895330548286438, 0.3223404288291931, 0.06860026717185974, 0.06881608814001083, -0.4192364811897278, -0.30050280690193176, -0.06464818120002747, -0.13479475677013397, 0.14548669755458832, -0.12181679159402847, -0.4688761532306671, 0.0721455067396164, -0.17887458205223083, -0.0048354193568229675, 0.06889104843139648, 0.18879039585590363, -0.1674194484949112, -0.2048736810684204, -0.10739105939865112, 0.28714117407798767, -0.165976420044899, -0.20395246148109436, 0.06452196836471558, 0.03408439829945564, 0.09284660220146179, -0.30087724328041077, -0.29292023181915283, 0.027732042595744133, 0.20762434601783752, 0.2197743058204651, 0.05246264860033989, -0.011880278587341309, 0.009139682166278362, 0.10817735642194748, 0.3817591071128845, 0.24338267743587494, 0.08578865975141525, -0.045246850699186325, -0.21377085149288177, 0.0744195356965065, 0.11315659433603287, 0.25420278310775757, 0.09069455415010452, -0.016756867989897728, -0.007147023919969797, 0.0499989315867424, 0.053772348910570145, -0.2705121636390686, -0.14237156510353088, -0.08784110844135284, 0.020869743078947067, -0.5253568887710571, 0.034487076103687286, -0.13722652196884155, -0.08083876967430115, -0.43337807059288025, 0.22017505764961243, 0.01600617542862892, 0.018878018483519554, 0.2471810132265091, 0.15981613099575043, -0.2827537953853607, -0.12172114104032516, 0.3680717945098877, 0.08247697353363037, -0.09865561872720718, 0.36846908926963806, 0.104885995388031, -0.27454814314842224, -0.3210476040840149, 0.2166428118944168, 0.044297534972429276, -0.11666801571846008, 0.5031187534332275, -0.11756224185228348, -0.22535130381584167, 0.0001954353356268257, 0.3331300914287567, 0.0836452767252922, 0.20744909346103668, -0.06449370831251144, -0.24353137612342834, -0.42658305168151855, 0.08524258434772491, -0.10747936367988586, 0.2225600630044937, -0.07324133813381195, -0.12449204921722412, -0.0389920249581337, -0.1661444455385208, -0.4661392867565155, -0.06680704653263092, -0.16496361792087555, -0.03442315012216568, -0.09001414477825165, -0.07440192252397537, 0.01753990352153778, -0.16852331161499023, 0.2747034430503845, -0.010019155219197273, -0.08025757968425751, -0.2871764004230499, -0.03814766928553581, 0.033902231603860855, -0.0960807278752327, 0.0599023811519146, 0.0598980151116848, -0.10019458830356598, -0.26353368163108826, 0.005377986002713442, -0.10712617635726929, 0.2807384729385376, -0.14028547704219818, 0.21037952601909637, -0.030285915359854698, -0.17338301241397858, 0.3960510790348053, 0.08485361188650131, 0.3044097125530243, 0.3138791024684906, -0.2277974784374237, 0.20283977687358856, -0.0518651008605957, -0.2205914855003357, 0.21700860559940338, 0.1103479340672493, 0.028502263128757477, -0.0869782418012619, 0.0787515714764595, -0.40393152832984924, -0.09018517285585403, 0.2633315324783325, 0.37031078338623047, 0.3631017506122589, -0.11464624106884003, -0.10947871953248978, 0.09057188034057617, 0.3594071567058563, -0.2997874915599823, -0.192399799823761, -0.020444655790925026, 0.04125545918941498, -0.009007424116134644, 0.03350745514035225, -0.10380753129720688, -0.0607064850628376, 0.09780673682689667, 0.24066972732543945, 0.2650686800479889, -0.06710360199213028, 0.19942834973335266, 0.4001063108444214, -0.12766100466251373, -0.07833713293075562, 0.4099471867084503, 0.17744271457195282, -0.0979720801115036, 0.5809726715087891, -0.2533930838108063, 0.3778523802757263, 0.30063948035240173, -0.13184374570846558, 0.08076959103345871, -0.26479318737983704, 0.4360450208187103, 0.2208721786737442, 0.022244324907660484, 0.04303666204214096, 0.3021412789821625, 0.2947602868080139, -0.35234883427619934, -0.14450646936893463, -0.2835191786289215, -0.07896900922060013, -0.24175070226192474, -0.11164048314094543, -0.09879892319440842, -0.21568563580513, -0.15024086833000183, -0.07656754553318024, 0.006919542793184519, 0.10580825805664062, 0.5065351128578186, -0.1248244196176529, 0.2305511236190796, -0.5434478521347046, 0.09151288866996765, -0.1096857562661171, -0.1785719394683838, -0.15948066115379333, 0.2123124748468399, 0.3785957098007202, 0.014989366754889488, 0.37593165040016174, 0.4023977220058441, 0.720634400844574, 0.3364216089248657, 0.10671298950910568, -0.06418783217668533, -0.15687021613121033, -0.22912538051605225, 0.011585960164666176, 0.3412424623966217, 0.04674738273024559, -0.013837105594575405, 0.3559461236000061, 0.3055059015750885, -0.19667157530784607, 0.3304172456264496, 0.028419161215424538, 0.13027846813201904, 0.022362079471349716, 0.27266043424606323, 0.2520561218261719, -0.06098027899861336, 0.23354870080947876, -0.16962619125843048, -0.25512340664863586, -0.33301031589508057, 0.37148910760879517, -0.15843097865581512, 0.12480118870735168, -0.22241230309009552, 0.1901795119047165, 0.16376237571239471, 0.4301261901855469, 0.21786335110664368, 0.054420553147792816, -0.11737533658742905, -0.30012571811676025, -0.4051777422428131, -0.011829781346023083, 0.2413930743932724, 0.07992824167013168, -0.08541237562894821, 0.16549232602119446, 0.19951097667217255, 0.06548745930194855, 0.35441917181015015, -0.1061541736125946, -0.14072364568710327, 0.006048185750842094, -0.348266065120697, 0.03859992325305939, 0.4606608748435974, -0.04228374734520912, -0.051664162427186966, -0.13164375722408295, 0.35823389887809753, -0.08868533372879028, 0.18577231466770172, -0.21992813050746918, 0.11199798434972763, 0.048302244395017624, -0.24239547550678253, 0.13561981916427612, 0.3030267357826233, 0.3586238622665405, -0.3248286247253418, -0.10724414885044098, -0.10873736441135406, -0.4685240387916565, -0.25269269943237305, 0.23215894401073456, 0.12590546905994415, 0.5630006194114685, -0.13482703268527985, -0.02645949088037014, -0.036967065185308456, 0.06922116130590439, -0.09886962920427322, 0.19861401617527008, -0.21948488056659698, 0.42385628819465637, 0.14456693828105927, 0.05257062986493111, -0.07392536103725433, -0.04594561085104942, 0.13322460651397705, 0.35274538397789, -0.17138998210430145, -0.7317178249359131, 0.34578174352645874, -0.006514986976981163, -0.5045144557952881, -0.2946043014526367, -0.05351460725069046, 0.30123189091682434, -0.1078706607222557, -0.5782148838043213, 0.01255256962031126, 0.1992681324481964, -0.060324255377054214, -0.06857912242412567, 0.2779986262321472, -0.27782192826271057, 0.14356915652751923, -0.09276796877384186, 0.444495290517807, 0.11157427728176117, -0.31108057498931885, -0.043766167014837265, -0.17740654945373535 ]
https://github.com/huggingface/datasets/issues/5405
size_in_bytes the same for all splits
Hi @Breakend, Indeed, the attribute `size_in_bytes` refers to the size of the entire dataset configuration, for all splits (size of downloaded files + Arrow files), not the specific split. This is also the case for `download_size` (downloaded files) and `dataset_size` (Arrow files). The size of the Arrow files for a specific split can be accessed: e.g. size of the "test" split only ```python ds["train"].info.splits["test"].num_bytes ``` I agree this is confusing and maybe we should improve it.
### Describe the bug Hi, it looks like whenever you pull a dataset and get size_in_bytes, it returns the same size for all splits (and that size is the combined size of all splits). It seems like this shouldn't be the intended behavior since it is misleading. Here's an example: ``` >>> from datasets import load_dataset >>> x = load_dataset("glue", "wnli") Found cached dataset glue (/Users/breakend/.cache/huggingface/datasets/glue/wnli/1.0.0/dacbe3125aa31d7f70367a07a8a9e72a5a0bfeb5fc42e75c9db75b96da6053ad) 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 1097.70it/s] >>> x["train"].size_in_bytes 186159 >>> x["validation"].size_in_bytes 186159 >>> x["test"].size_in_bytes 186159 >>> ``` ### Steps to reproduce the bug ``` >>> from datasets import load_dataset >>> x = load_dataset("glue", "wnli") >>> x["train"].size_in_bytes 186159 >>> x["validation"].size_in_bytes 186159 >>> x["test"].size_in_bytes 186159 ``` ### Expected behavior The expected behavior is that it should return the separate sizes for all splits. ### Environment info - `datasets` version: 2.7.1 - Platform: macOS-12.5-arm64-arm-64bit - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
76
size_in_bytes the same for all splits
[ -0.31290963292121887, -0.8257210850715637, -0.2829350233078003, 0.1880130022764206, 0.17036791145801544, -0.2574252188205719, 0.16895809769630432, 0.2532501816749573, -0.04838138818740845, 0.44710904359817505, 0.04921010881662369, -0.022293172776699066, -0.08661346882581711, 0.43355095386505127, -0.21415318548679352, 0.17066991329193115, -0.1990000307559967, 0.3236883580684662, -0.15425336360931396, -0.3337080776691437, -0.08472127467393875, 0.3019500970840454, -0.08227367699146271, -0.411678284406662, -0.17893363535404205, 0.21020136773586273, -0.1732202172279358, 0.07363775372505188, -0.2998678982257843, 0.14676126837730408, -0.05042348429560661, -0.23025460541248322, 0.012520321644842625, 0.15707924962043762, -0.00010508659761399031, 0.055092886090278625, 0.2536182701587677, -0.2627740800380707, -0.13347339630126953, 0.4996669292449951, -0.17692354321479797, -0.22460110485553741, -0.3081151843070984, -0.10613220185041428, 0.1696932464838028, 0.3378031849861145, -0.09379296749830246, -0.16645891964435577, 0.18230555951595306, -0.10050599277019501, 0.23805978894233704, -0.10843260586261749, -0.1851852685213089, -0.10908827930688858, 0.27881160378456116, 0.5496999621391296, 0.1352435052394867, -0.02096114121377468, -0.2683034837245941, 0.21583880484104156, -0.13562925159931183, 0.0533454567193985, 0.16866232454776764, 0.3902077376842499, -0.1930115520954132, -0.12714079022407532, 0.1449698954820633, 0.29576417803764343, 0.07808611541986465, 0.06837017834186554, -0.12364808470010757, -0.074482262134552, -0.08795099705457687, -0.10335927456617355, -0.3100803792476654, -0.3658624291419983, -0.09304800629615784, 0.3655756115913391, 0.06883582472801208, -0.02090160734951496, -0.2676256000995636, 0.31543445587158203, 0.021740147843956947, -0.15648892521858215, -0.4282495081424713, 0.374056875705719, -0.14727593958377838, -0.004358167760074139, 0.05389326065778732, 0.05676421895623207, -0.051654692739248276, 0.20603345334529877, -0.45226195454597473, -0.19990509748458862, -0.01818423718214035, -0.18475396931171417, -0.17369207739830017, 0.14672347903251648, 0.3179948031902313, -0.1958121359348297, -0.22542007267475128, 0.11411720514297485, 0.21684417128562927, 0.039814457297325134, -0.012914523482322693, 0.06430168449878693, 0.10694794356822968, 0.44916772842407227, -0.0845266729593277, 0.1239195466041565, -0.2303752601146698, 0.1781817525625229, 0.2219371795654297, 0.03431243821978569, -0.01714562065899372, -0.212851420044899, -0.19422973692417145, -0.026530006900429726, -0.21539969742298126, -0.02847309038043022, 0.04977815970778465, -0.2508448362350464, -0.11046823114156723, 0.07061905413866043, 0.33309853076934814, 0.19249311089515686, -0.2096550017595291, 0.03472751006484032, -0.3042258322238922, -0.1301279217004776, -0.39449095726013184, -0.09705600887537003, -0.12474370747804642, -0.1088133230805397, 0.27885717153549194, 0.35667097568511963, 0.06845901906490326, 0.14114350080490112, 0.18012750148773193, -0.09289155900478363, -0.11005163937807083, -0.10761788487434387, 0.2740168273448944, 0.03985434025526047, 0.08993536978960037, 0.002925414126366377, -0.17404305934906006, 0.33423465490341187, -0.16499342024326324, 0.2618207633495331, -0.1525326818227768, -0.04199180006980896, 0.1957767754793167, 0.33783048391342163, -0.0845697894692421, 0.10837414860725403, 0.3487178385257721, 0.1395825892686844, 0.2955051362514496, -0.19004113972187042, 0.16373999416828156, -0.3575880825519562, -0.3435520529747009, -0.049334391951560974, 0.08693157881498337, 0.06853502243757248, -0.23534822463989258, -0.23931452631950378, -0.1313159018754959, 0.013523868285119534, 0.5038749575614929, 0.25481927394866943, 0.11292292922735214, -0.44681593775749207, -0.42552638053894043, 0.43016672134399414, 0.18079183995723724, 0.21759285032749176, -0.3578547537326813, 0.3497745990753174, 0.13751205801963806, -0.46484339237213135, 0.3568548560142517, -0.05906987562775612, 0.6399114727973938, 0.22330914437770844, -0.09146120399236679, 0.22067588567733765, -0.01151991356164217, 0.2649650573730469, -0.35737481713294983, -0.176317498087883, -0.18552498519420624, -0.0028851525858044624, 0.20003286004066467, -0.31878960132598877, 0.26955026388168335, 0.1994437724351883, 0.12333554774522781, -0.05761339142918587, 0.1416866034269333, -0.03978462144732475, 0.01437940914183855, -0.10288627445697784, 0.22828251123428345, -0.18333634734153748, 0.0261356420814991, -0.08446181565523148, -0.29716333746910095, -0.1918567419052124, 0.1727791726589203, -0.3382633328437805, -0.23489513993263245, -0.05163136497139931, 0.37632447481155396, 0.011896207928657532, 0.22061343491077423, 0.2618265748023987, 0.3395538926124573, 0.12086322158575058, 0.05285896360874176, -0.27058807015419006, 0.15360236167907715, -0.12325440347194672, 0.41291046142578125, 0.08906617760658264, 0.08513227850198746, -0.2710452675819397, 0.17529718577861786, 0.27662524580955505, 0.08404307067394257, 0.08916880190372467, 0.020031524822115898, -0.059917349368333817, 0.34603431820869446, 0.21791423857212067, 0.06794463843107224, -0.25385740399360657, 0.3370205760002136, -0.025006312876939774, 0.24596112966537476, -0.06991315633058548, -0.02134106494486332, -0.16411833465099335, 0.09289971739053726, 0.013815701007843018, 0.0305028073489666, -0.05025339126586914, 0.05437598004937172, -0.3555433452129364, -0.21106550097465515, 0.03190131112933159, 0.2535628378391266, -0.3752073645591736, 0.04909714311361313, -0.022110192105174065, 0.12629283964633942, 0.30336663126945496, 0.38190963864326477, -0.01496574841439724, 0.8301241993904114, -0.09657759964466095, -0.14484433829784393, 0.26141607761383057, -0.03583404794335365, -0.03046354651451111, -0.1085498034954071, 0.2208733707666397, 0.23642009496688843, 0.2413025051355362, 0.4316018521785736, -0.12458480894565582, 0.22720617055892944, -0.26305389404296875, 0.3296803832054138, -0.05133730545639992, -0.2731430232524872, 0.3489930033683777, 0.007017913274466991, -0.4879845976829529, -0.3002048432826996, 0.29982098937034607, 0.0472855418920517, -0.16360704600811005, -0.004376026801764965, -0.18488547205924988, -0.3254437744617462, -0.04074683412909508, -0.33201122283935547, -0.15376494824886322, -0.17356589436531067, -0.20227986574172974, -0.037085406482219696, -0.22622361779212952, 0.04207238554954529, -0.2694163918495178, 0.08906029909849167, 0.2425677329301834, 0.1723698377609253, 0.3259982168674469, -0.025471117347478867, -0.11002953350543976, -0.2465112954378128, 0.18744049966335297, 0.050181902945041656, 0.0741710364818573, 0.0441044457256794, -0.4317895174026489, -0.2452547401189804, 0.25210702419281006, -0.17241744697093964, 0.09679056704044342, -0.12123297899961472, -0.18665236234664917, 0.17142419517040253, 0.14179275929927826, 0.0801752433180809, 0.036637306213378906, 0.1390077918767929, -0.30147409439086914, -0.07981202006340027, 0.043195415288209915, 0.057041142135858536, 0.16942675411701202, -0.5840137004852295, 0.03646145388484001, -0.02694195881485939, -0.3020341098308563, 0.4084705114364624, 0.1382606029510498, 0.10434993356466293, -0.45953530073165894, -0.09710502624511719, -0.1979077160358429, 0.19492831826210022, -0.02517571672797203, -0.40026408433914185, 0.01617346704006195, 0.035410862416028976, -0.05867219343781471, 0.08157572895288467, 0.02660388872027397, -0.07503770291805267, -0.1221512109041214, 0.04598827660083771, -0.15390096604824066, 0.19171971082687378, -0.38800889253616333, -0.24319250881671906, -0.00618361821398139, 0.3695698380470276, -0.11473696678876877, -0.14799967408180237, -0.20318695902824402, -0.11475282162427902, -0.13215234875679016, 0.18328164517879486, -0.16451334953308105, 0.0025477581657469273, -0.039640676230192184, -0.05163927003741264, 0.23890477418899536, 0.2731955647468567, 0.29004383087158203, -0.07853710651397705, -0.051567960530519485, 0.1289086937904358, 0.17437075078487396, -0.06480889022350311, 0.38600173592567444, 0.6601351499557495, 0.2683837413787842, -0.3733642101287842, 0.3297460675239563, -0.09810203313827515, -0.0409604012966156, 0.2996782958507538, -0.006422225385904312, 0.17965884506702423, -0.13961263000965118, 0.02132161520421505, 0.34278836846351624, -0.07202113419771194, 0.012211035937070847, 0.17840658128261566, 0.1680503636598587, 0.044601112604141235, 0.10964667797088623, -0.06008168309926987, -0.1849794089794159, 0.03548530116677284, -0.0174252912402153, -0.0056092883460223675, -0.004720329772680998, 0.36594274640083313, 0.29656466841697693, 0.027685506269335747, 0.010979630053043365, -0.6538122892379761, 0.1059844046831131, 0.12330186367034912, 0.5118840932846069, 0.3031211495399475, 0.005297825206071138, -0.19813363254070282, -0.015440825372934341, 0.2276046872138977, -0.18589472770690918, -0.15067073702812195, 0.03981691971421242, 0.13238021731376648, -0.1499132215976715, -0.32165390253067017, 0.15389136970043182, 0.25892069935798645, 0.15213225781917572, 0.00647256663069129, -0.3487367033958435, -0.19152583181858063, 0.13697288930416107, -0.018006963655352592, -0.0038840239867568016, -0.09147995710372925, 0.1057967022061348, -0.3584236800670624, -0.08965332061052322, -0.09907186031341553, -0.6311478614807129, 0.07945466786623001, 0.019815582782030106, 0.4530917704105377, -0.429729700088501, -0.19544051587581635, -0.11325804889202118, 0.08541383594274521, 0.16907358169555664, 0.23870953917503357, -0.262847900390625, 0.17114096879959106, 0.448426216840744, -0.2318287193775177, 0.05427396669983864, 0.20808804035186768, 0.2907852232456207, -0.1852613389492035, 0.10789405554533005, 0.24513839185237885, -0.49662554264068604, -0.16418179869651794, -0.03896272927522659, -0.08420756459236145, 0.06208265200257301, -0.011691097170114517, 0.048557426780462265, 0.12410396337509155, 0.19652928411960602, 0.06833912432193756, 0.06864485144615173, -0.07319772243499756, 0.07586422562599182, -0.1173805445432663, 0.6936463117599487, 0.11956765502691269, 0.08152661472558975, 0.22082343697547913, -0.07512331008911133, -0.3098616600036621, -0.0939202606678009, 0.17999713122844696, -0.25802475214004517, 0.14534032344818115, 0.05709821358323097, -0.18259403109550476, -0.070560984313488, -0.1323607861995697, -0.14610058069229126, -0.04947635531425476, -0.034438587725162506, 0.20468668639659882, -0.18039187788963318, -0.2573765516281128, -0.5215011239051819, 0.22162629663944244, 0.3393711447715759, 0.20742136240005493, -0.06062852218747139, 0.08797940611839294, 0.047197405248880386, -0.1683540642261505, -0.11696022748947144, -0.15593700110912323, -0.2760937213897705, -0.24445702135562897, -0.09004268050193787, 0.20305444300174713, -0.49627354741096497, 0.007521043065935373, -0.3814074993133545, -0.267543226480484, 0.14982792735099792, 0.22405721247196198, 0.10418003052473068, 0.148762509226799, 0.1105583980679512, 0.18704558908939362, -0.08713479340076447, 0.058020174503326416, -0.17479197680950165, 0.23801226913928986, -0.0715290829539299, -0.08842584490776062, 0.10913503915071487, 0.17434214055538177, -0.2910665273666382, 0.04878995940089226, -0.33773815631866455, -0.4783243238925934, -0.20513364672660828, -0.16345210373401642, -0.0551346093416214, 0.18169395625591278, 0.23916859924793243, -0.18215776979923248, -0.12333881855010986, 0.08657033741474152, 0.22214043140411377, -0.4400521218776703, -0.3290988802909851, 0.015758316963911057, 0.10403761267662048, 0.33785295486450195, 0.017379097640514374, -0.38891148567199707, -0.19499029219150543, -0.26715728640556335, 0.1864149421453476, -0.32991689443588257, -0.06813608109951019, 0.25896838307380676, -0.24985216557979584, -0.08640801161527634, 0.13196665048599243, -0.11639174818992615, 0.06693382561206818, 0.5077322721481323, -0.03566472604870796, 0.008610916323959827, 0.013591175898909569, 0.04728177562355995, -0.5119805932044983, 0.5211653113365173, 0.15024131536483765, 0.20908106863498688, -0.23867544531822205, 0.1210765466094017, -0.3428272306919098, 0.1332254409790039, 0.23738440871238708, -0.22732479870319366, -0.33329418301582336, -0.28290510177612305, -0.18395671248435974, 0.043628349900245667, 0.1910296529531479, 0.45613017678260803, -0.1568414270877838, -0.228336900472641, 0.09646020829677582, 0.019968148320913315, -0.18511585891246796, 0.284553200006485, -0.16323012113571167, 0.13917309045791626, 0.1310499757528305, -0.0012646655086427927, 0.1889784038066864, -0.38987356424331665, -0.08166182041168213, 0.29421359300613403, 0.5372651219367981, 0.08999913930892944, -0.09144549071788788, 0.02140866406261921, 0.07671579718589783, 0.48392120003700256, -0.15170711278915405, 0.18354538083076477, -0.20470952987670898, 0.11990441381931305, 0.12916913628578186, 0.01383892446756363, 0.2174772471189499, -0.07265699654817581, 0.12882503867149353, 0.08175045996904373, -0.022155117243528366, -0.05261490121483803, 0.4163186550140381, 0.308721125125885, 0.0865282267332077, -0.1837456375360489, -0.37647050619125366, 0.34406647086143494, 0.19127051532268524, 0.13385459780693054, 0.17140577733516693, 0.008410338312387466, 0.04853854700922966, 0.39094677567481995, 0.32954713702201843, 0.00026503915432840586, -0.2630831003189087, 0.17371219396591187, 0.08486100286245346, -0.03588258847594261, 0.22326616942882538, 0.6036428213119507, -0.1119086742401123, 0.22581739723682404, -0.07335949689149857, -0.06900930404663086, 0.351834237575531, 0.3895949125289917, -0.15034639835357666, 0.6267019510269165, -0.20285220444202423, -0.01112330611795187, 0.18026186525821686, -0.24250662326812744, -0.05603458732366562, 0.0690467581152916, -0.10353079438209534, 0.12284412235021591, 0.21639737486839294, 0.31910187005996704, -0.2763139307498932, -0.27958381175994873, -0.12530836462974548, -0.1413094401359558, -0.2510707974433899, 0.0049918415024876595, 0.16925382614135742, -0.16591134667396545, -0.5189444422721863, 0.015216445550322533, -0.005445321090519428, 0.418250173330307, 0.3926337957382202, 0.19635583460330963, 0.19176551699638367, 0.04981835186481476, -0.31740114092826843, 0.00024342273536603898, 0.14965592324733734, -0.341261625289917, 0.11644084006547928, 0.2390369325876236, -0.12199167162179947, 0.2543875575065613, 0.025398749858140945, 0.49369072914123535, -0.05975145474076271, -0.013727749697864056, -0.300769180059433, 0.1369856745004654, 0.03327680751681328, -0.22669316828250885, 0.09216613322496414, 0.18708613514900208, 0.11500091850757599, 0.04265657067298889, 0.28680163621902466, -0.22186024487018585, -0.08329866826534271, 0.11452469229698181, -0.22474771738052368, -0.06854406744241714, 0.1798821985721588, 0.23535700142383575, 0.29602155089378357, -0.1412748545408249, -0.20482087135314941, -0.5416997671127319, 0.12023816257715225, -0.18266096711158752, -0.03523647040128708, 0.24107447266578674, 0.11020521819591522, 0.10289686173200607, 0.2100176066160202, 0.05238639935851097, -0.20088467001914978, -0.15838997066020966, 0.08097042888402939, -0.1541166603565216, -0.09372906386852264, 0.02821001410484314, -0.07246600836515427, -0.00959053821861744, -0.3097445070743561, 0.17788848280906677, -0.034624189138412476, -0.3786458671092987, 0.3141593337059021, 0.0837031900882721, 0.29489409923553467, -0.013194927014410496, -0.11357198655605316, 0.08885297179222107, -0.06149398162961006, -0.3734724819660187, 0.009598755277693272, -0.3788451552391052, 0.2344999760389328, -0.14259454607963562, 0.20811708271503448, 0.0350503996014595, 0.12725520133972168, 0.1864999532699585, -0.07587449252605438, -0.26117274165153503, 0.2683141827583313, 0.19767266511917114, -0.26244741678237915, -0.015252727083861828, -0.1279786378145218, 0.02524610050022602, 0.05944568291306496, -0.0290458295494318, -0.017584312707185745, 0.09703509509563446, -0.3422134220600128, -0.33955296874046326, -0.040082916617393494, 0.190224751830101, -0.05271036922931671, 0.0029598288238048553, 0.1542142629623413, 0.010652715340256691, -0.28111135959625244, -0.1570861041545868, 0.2583671510219574, 0.36804965138435364, 0.0912196934223175, -0.3187541365623474, 0.1521465927362442, -0.27624890208244324, 0.013760081492364407, 0.21112456917762756, -0.1527978926897049, -0.1668647676706314, 0.07303274422883987, 0.4144623875617981, 0.11718140542507172, -0.34245049953460693, 0.22507478296756744, 0.3059842586517334, -0.17801536619663239, 0.1714194118976593, 0.3769209384918213, 0.442912220954895, -0.14282293617725372, -0.1501970887184143, 0.14118003845214844, 0.23018530011177063, -0.34233272075653076, 0.24797473847866058, -0.15466496348381042 ]
https://github.com/huggingface/datasets/issues/5402
Missing state.json when creating a cloud dataset using a dataset_builder
`load_from_disk` must be used on datasets saved using `save_to_disk`: they correspond to fully serialized datasets including their state. On the other hand, `download_and_prepare` just downloads the raw data and convert them to arrow (or parquet if you want). We are working on allowing you to reload a dataset saved on S3 with `download_and_prepare` using `load_dataset` in #5281 For now I'd encourage you to keep using `save_to_disk`
### Describe the bug Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example: ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_datase, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" builder = load_dataset_builder("imdb") builder.download_and_prepare(output_dir, storage_options=storage_options) load_from_disk(output_dir, fs=fs) # ERROR # [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json' ``` As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example: ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_dataset, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" dataset = load_dataset("imdb",) dataset.save_to_disk(output_dir, fs=fs) load_from_disk(output_dir, fs=fs) # WORKS ``` You still want the 1st option for the laziness and the parquet conversion. Thanks! ### Steps to reproduce the bug ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_datase, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" builder = load_dataset_builder("imdb") builder.download_and_prepare(output_dir, storage_options=storage_options) load_from_disk(output_dir, fs=fs) # ERROR # [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json' ``` BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385. ### Expected behavior Expected to be able to load the dataset from S3. ### Environment info ``` s3fs 2022.11.0 s3transfer 0.6.0 datasets 2.8.0 aiobotocore 2.4.2 boto3 1.24.59 botocore 1.27.59 ``` python 3.7.15.
66
Missing state.json when creating a cloud dataset using a dataset_builder
[ -0.3881467282772064, 0.559360146522522, -0.2176225185394287, 0.08682386577129364, 0.0036453339271247387, 0.05348636582493782, 0.22309108078479767, 0.42030543088912964, -0.016498686745762825, 0.2694668173789978, 0.5077084302902222, 0.38523203134536743, 0.08744324743747711, 0.4503062963485718, 0.10527800023555756, 0.08927697688341141, 0.21647828817367554, 0.4350416362285614, -0.19995544850826263, -0.04492219537496567, -0.038006365299224854, 0.13763892650604248, -0.036535438150167465, -0.17377100884914398, -0.36371493339538574, -0.008444747887551785, -0.1828848272562027, 0.30053043365478516, -0.2982860505580902, -0.2340727597475052, 0.05386308208107948, 0.0528700016438961, -0.25283610820770264, 0.04360333830118179, -0.00010663305874913931, 0.3244519531726837, 0.2780221998691559, -0.014716149307787418, -0.44453924894332886, -0.19111812114715576, -0.5073650479316711, -0.23284155130386353, 0.10083141922950745, -0.041213713586330414, -0.13219666481018066, -0.213888481259346, 0.0465061254799366, -0.3643271028995514, 0.19743022322654724, 0.359292596578598, 0.1826341450214386, 0.4176095426082611, 0.026502611115574837, -0.16404326260089874, -0.24358993768692017, 0.26746317744255066, -0.05892966315150261, 0.002913080621510744, 0.0943843349814415, 0.11494067311286926, -0.3429132103919983, 0.07527444511651993, 0.12941285967826843, 0.08119859546422958, 0.06495200842618942, 0.08761699497699738, 0.18302758038043976, 0.10508302599191666, 0.25210270285606384, 0.10351871699094772, 0.813683032989502, 0.06212497875094414, -0.13646520674228668, 0.012575136497616768, -0.056333258748054504, 0.27837732434272766, 0.24161003530025482, 0.07786466181278229, -0.17673365771770477, 0.07759074866771698, -0.21488098800182343, -0.14539432525634766, -0.19300584495067596, 0.06513455510139465, -0.16499100625514984, 0.3413890302181244, -0.038452036678791046, -0.020062951371073723, -0.3221145272254944, -0.065285824239254, 0.4349198043346405, -0.44783294200897217, -0.06709497421979904, 0.07191202044487, 0.01223145704716444, 0.044999778270721436, 0.22238101065158844, -0.18257878720760345, 0.13444463908672333, 0.27279171347618103, 0.18430733680725098, 0.05120928958058357, 0.05997273325920105, 0.11324650049209595, 0.3847719132900238, 0.00497386185452342, 0.11702029407024384, -0.03604894131422043, 0.2985978424549103, -0.1910780370235443, -0.04910185560584068, 0.02546936273574829, -0.024717682972550392, -0.16094185411930084, 0.1349748820066452, 0.038883596658706665, 0.04151185601949692, -0.09885948896408081, -0.06168906390666962, 0.15925092995166779, 0.012216722592711449, 0.1147477999329567, -0.14150969684123993, 0.12428802251815796, 0.0010079315397888422, -0.20945079624652863, 0.044244177639484406, 0.23363761603832245, -0.21283215284347534, -0.007501225918531418, -0.45880478620529175, -0.12482750415802002, 0.1728745847940445, -0.10989522933959961, 0.26615971326828003, -0.169424906373024, 0.5107455849647522, -0.10194449871778488, -0.016336673870682716, 0.05192611739039421, 0.33154696226119995, 0.258085161447525, 0.030314724892377853, 0.43520495295524597, 0.2757353186607361, -0.12755334377288818, 0.12474105507135391, -0.3893192410469055, -0.03499077260494232, 0.16572079062461853, -0.06635947525501251, -0.5327973961830139, -0.4805094599723816, 0.23320701718330383, -0.28099706768989563, 0.026189133524894714, -0.21160262823104858, 0.22897526621818542, 0.13963353633880615, -0.25968992710113525, -0.2482127547264099, 0.0440237782895565, 0.21680083870887756, -0.15099288523197174, 0.10276614129543304, 0.35803771018981934, -0.491325706243515, -0.13404738903045654, -0.26296305656433105, -0.33847200870513916, 0.07710008323192596, -0.2500004470348358, -0.25511130690574646, 0.4161442518234253, -0.23862600326538086, 0.2146759033203125, 0.3569798171520233, -0.003897718619555235, -0.19715993106365204, 0.3292385935783386, -0.1983955055475235, -0.27437862753868103, 0.15348578989505768, -0.01590944267809391, 0.021592454984784126, 0.06199764460325241, 0.27043935656547546, 0.0443098321557045, -0.018597593531012535, 0.14938652515411377, -0.01739983819425106, -0.19181500375270844, 0.030687490478157997, 0.25983673334121704, 0.10260546207427979, 0.28380462527275085, 0.2724941372871399, -0.12418151646852493, -0.04992319270968437, -0.09538593143224716, 0.17491304874420166, 0.22402791678905487, 0.08518975973129272, -0.3023177981376648, -0.20605814456939697, 0.04592107608914375, -0.7047407031059265, 0.14844876527786255, 0.22264662384986877, 0.21278221905231476, -0.15013043582439423, -0.013504061847925186, -0.07421918213367462, 0.10452891141176224, -0.2672977149486542, 0.011405451223254204, 0.2633502185344696, 0.1191013976931572, 0.18146821856498718, 0.144528329372406, -0.05612819269299507, -0.18775764107704163, 0.096227265894413, 0.08030175417661667, -0.2736349403858185, 0.2765350043773651, -0.15017689764499664, -0.27719253301620483, 0.4475517272949219, -0.08757133036851883, -0.05923885852098465, -0.01450924389064312, -0.11727292090654373, 0.21896101534366608, -0.03424762934446335, 0.0035743701737374067, 0.07639922201633453, 0.14272016286849976, -0.013077874667942524, 0.3687169849872589, 0.18603886663913727, 0.005164561327546835, -0.01792650856077671, -0.2030133157968521, -0.3928046226501465, 0.3101486265659332, 0.13059106469154358, 0.19169096648693085, 0.02932898886501789, 0.03956299647688866, 0.3194279074668884, 0.1390495002269745, -0.015648216009140015, -0.3859734535217285, -0.28515833616256714, -0.18701374530792236, 0.31882235407829285, -0.04029681906104088, -0.10604148358106613, 0.3414244055747986, 0.29356569051742554, -0.17712442576885223, 0.0891491025686264, -0.19560731947422028, -0.13404260575771332, -0.2248239368200302, 0.23821184039115906, 0.21524791419506073, 0.48820722103118896, 0.1706087738275528, 0.11612863838672638, -0.02681180089712143, 0.03561720624566078, -0.3257894515991211, 0.13835108280181885, 0.04009578749537468, 0.2116960734128952, 0.4650898277759552, 0.25999999046325684, -0.5479187965393066, -0.4315154552459717, -0.26518604159355164, 0.20809732377529144, 0.1710452437400818, -0.16342045366764069, -0.1564083695411682, -0.43317025899887085, -0.0692492425441742, 0.09739941358566284, 0.17198051512241364, -0.1092950850725174, -0.4331359267234802, 0.08014508336782455, 0.19051922857761383, -0.2858463227748871, 0.11311453580856323, -0.10592971742153168, 0.11298584938049316, 0.20377908647060394, -0.04293721541762352, -0.10348034650087357, -0.20579633116722107, -0.21520847082138062, 0.1994508057832718, -0.05238249897956848, 0.26103246212005615, 0.10170245170593262, -0.09767226874828339, 0.27801206707954407, -0.22438548505306244, -0.12845388054847717, 0.3178500533103943, -0.05371277779340744, 0.5063143372535706, 0.2712360918521881, 0.29272720217704773, 0.12739244103431702, -0.060343191027641296, 0.20031008124351501, 0.2032875269651413, -0.34329554438591003, -0.029406195506453514, -0.11424324661493301, -0.35170096158981323, -0.11080686748027802, -0.3110617697238922, -0.12871423363685608, -0.13745388388633728, 0.1095254197716713, 0.17357398569583893, 0.18823523819446564, -0.0929589793086052, 0.35056328773498535, 0.14476774632930756, 0.19242867827415466, -0.10120212286710739, -0.2830125391483307, -0.6130734086036682, 0.28360503911972046, -0.34603551030158997, -0.20049342513084412, 0.026886653155088425, -0.19650352001190186, 0.46577250957489014, -0.2180768996477127, -0.4517063498497009, 0.06752590835094452, -0.04335420951247215, 0.37174543738365173, -0.00007389175880234689, -0.022649044170975685, 0.6073030829429626, 0.08432101458311081, -0.10351430624723434, -0.21040941774845123, -0.12015023082494736, 0.2100970298051834, 0.14260970056056976, 0.09307841956615448, -0.2529561519622803, 0.2677854597568512, -0.16035299003124237, 0.7371307611465454, 0.08361257612705231, -0.1410525143146515, -0.047866739332675934, -0.31556448340415955, 0.17929767072200775, -0.329042911529541, 0.13030467927455902, 0.2259032279253006, 0.07303264737129211, -0.20026883482933044, 0.04319288954138756, 0.05032630264759064, -0.0619637556374073, 0.06502361595630646, 0.10395678132772446, -0.3610341548919678, -0.17047607898712158, 0.016434866935014725, -0.07143232226371765, 0.09245838224887848, 0.2745416760444641, 0.08916352689266205, -0.32685166597366333, 0.17109082639217377, -0.16369253396987915, 0.18340690433979034, 0.23867753148078918, 0.02898813597857952, -0.1344924122095108, -0.10831136256456375, -0.40688371658325195, 0.10363735258579254, 0.08649025112390518, -0.029078079387545586, -0.10056860744953156, -0.02887210249900818, -0.05813399329781532, -0.0330858938395977, 0.5024261474609375, -0.5061020255088806, -0.012280415743589401, 0.23912827670574188, -0.022056087851524353, 0.15690068900585175, 0.13088931143283844, -0.005174658261239529, 0.38275280594825745, 0.03386599197983742, 0.4552832543849945, -0.09607920795679092, -0.051306985318660736, 0.003486277535557747, -0.04093340039253235, -0.08031197637319565, -0.13665542006492615, -0.2172626554965973, -0.2013574242591858, -0.30362915992736816, 0.07158969342708588, -0.1882103681564331, 0.010761131532490253, 0.07891225814819336, -0.23829245567321777, -0.16038267314434052, 0.12789484858512878, -0.30781516432762146, 0.18069790303707123, 0.07912693917751312, -0.1507473737001419, 0.19907912611961365, 0.06138778477907181, 0.01563987322151661, 0.4872530996799469, 0.3814876675605774, 0.5923136472702026, 0.20450958609580994, 0.36954864859580994, -0.4032312333583832, 0.2041747272014618, 0.11133335530757904, -0.0621427483856678, -0.14593878388404846, 0.3970295190811157, 0.0706540197134018, -0.09998109191656113, 0.15463654696941376, -0.09708775579929352, -0.2325187772512436, 0.026909666135907173, -0.4609734117984772, 0.2311355322599411, -0.05816640332341194, -0.03720768541097641, -0.05565423145890236, 0.05037061497569084, -0.1807398945093155, 0.42582768201828003, 0.06748711317777634, 0.31417399644851685, 0.20665282011032104, 0.15874193608760834, 0.3038078844547272, 0.09210558980703354, 0.30188825726509094, -0.38328149914741516, 0.12792542576789856, -0.14536678791046143, -0.08768865466117859, -0.05316382274031639, -0.15850816667079926, 0.2842895984649658, 0.4385463297367096, 0.04135599359869957, 0.16018636524677277, 0.15386979281902313, 0.3850215971469879, -0.11794830113649368, 0.12496842443943024, -0.17595753073692322, -0.3293055295944214, 0.2026563435792923, 0.3033532202243805, -0.20297150313854218, -0.07554329931735992, -0.06933898478746414, -0.06869819015264511, -0.14618751406669617, -0.0465688519179821, -0.02320897951722145, 0.018222251906991005, -0.007073856890201569, 0.3551636338233948, 0.13008999824523926, -0.12983626127243042, -0.05807770788669586, 0.04321679845452309, 0.09038148075342178, 0.1960020661354065, -0.2634848654270172, 0.29638636112213135, 0.25498226284980774, 0.1369684338569641, -0.09614454209804535, -0.13489587604999542, 0.2969524562358856, -0.13955095410346985, -0.16582904756069183, -0.211261585354805, -0.32138338685035706, -0.16257788240909576, -0.2511484622955322, -0.13011126220226288, -0.3894422948360443, -0.16724570095539093, -0.022275427356362343, 0.3295787274837494, 0.07720489054918289, -0.2504367530345917, 0.19145089387893677, 0.14372536540031433, -0.002116405637934804, -0.15684877336025238, 0.21317365765571594, 0.04422368109226227, -0.15518605709075928, 0.5105170607566833, 0.34217527508735657, 0.18432293832302094, 0.5128410458564758, -0.04914135858416557, -0.04078397527337074, -0.31886324286460876, 0.0643228217959404, 0.09041113406419754, -0.016598664224147797, 0.1115461066365242, -0.12433139979839325, -0.23446603119373322, 0.07700049132108688, 0.36975541710853577, -0.10764798521995544, 0.1420236974954605, 0.012341391295194626, -0.17534463107585907, -0.510436475276947, 0.02305210754275322, 0.02028418518602848, 0.15347875654697418, -0.08161147683858871, 0.18242426216602325, -0.1866971105337143, -0.13880334794521332, -0.34741657972335815, -0.27742934226989746, -0.21587055921554565, 0.1410701423883438, -0.29627302289009094, 0.19160352647304535, 0.0305564496666193, -0.31584835052490234, 0.20227865874767303, -0.011330310255289078, -0.17729192972183228, -0.2959888279438019, -0.0776272565126419, 0.09358063340187073, 0.32250547409057617, 0.06435046344995499, -0.05675061047077179, 0.01907940022647381, -0.37991446256637573, 0.06295309215784073, 0.41276732087135315, -0.2688634991645813, -0.04535416141152382, -0.0031253467313945293, -0.19311651587486267, -0.029779186472296715, 0.23124518990516663, -0.2750166654586792, 0.12364845722913742, 0.18980875611305237, -0.23016811907291412, -0.0024322064127773046, -0.1002478152513504, 0.09600040316581726, 0.2518860995769501, 0.1701159030199051, -0.36758264899253845, 0.6409192085266113, 0.3923916518688202, -0.41322195529937744, -0.13131549954414368, -0.24051117897033691, 0.35542675852775574, -0.056243233382701874, -0.10637105256319046, 0.10638462752103806, 0.10074583441019058, 0.30500686168670654, -0.13628922402858734, -0.22057491540908813, -0.005070468410849571, -0.01691625826060772, 0.19944223761558533, 0.03485311195254326, -0.016952598467469215, -0.08390846848487854, -0.17475315928459167, 0.09744513779878616, 0.28258824348449707, -0.25275662541389465, -0.009740515612065792, 0.2050757110118866, -0.23045781254768372, 0.25064173340797424, 0.258547306060791, 0.30970248579978943, -0.04721240699291229, 0.5375255942344666, 0.4225504994392395, 0.009155201725661755, 0.46153023838996887, 0.2575613260269165, -0.25934821367263794, -0.2788788378238678, 0.2734013497829437, 0.0836135670542717, -0.20861664414405823, 0.22606100142002106, 0.24117891490459442, -0.13547758758068085, -0.16652630269527435, -0.11079838126897812, -0.5405146479606628, 0.0412246435880661, -0.24478796124458313, -0.15443871915340424, -0.6414138078689575, -0.11167176812887192, 0.16435004770755768, 0.17881397902965546, 0.05060766264796257, 0.005024774465709925, -0.17276529967784882, -0.24792903661727905, 0.09046304225921631, -0.34005972743034363, 0.24340678751468658, 0.02330351620912552, -0.1408061981201172, -0.058307770639657974, -0.004655204713344574, 0.2587263882160187, -0.23747266829013824, -0.1011555939912796, 0.17868460714817047, 0.3511481285095215, -0.24098092317581177, -0.03320731967687607, -0.07716591656208038, -0.09287770837545395, -0.3441638648509979, -0.2729465663433075, 0.27830934524536133, 0.0789027214050293, 0.05609837919473648, 0.2737342119216919, 0.2609100043773651, -0.17573188245296478, 0.22519779205322266, 0.2965432405471802, 0.1447649598121643, -0.007345773279666901, -0.044912125915288925, -0.11604683101177216, -0.11967070400714874, 0.07299719005823135, -0.07585074752569199, -0.36218196153640747, -0.4664040803909302, 0.003734895493835211, -0.04267898201942444, 0.30309537053108215, -0.14526808261871338, 0.11410915851593018, -0.3051358163356781, 0.564168393611908, -0.06230859458446503, -0.2647201120853424, -0.02111707627773285, -0.17609839141368866, -0.3023907244205475, -0.1539606899023056, -0.17914073169231415, -0.09773511439561844, -0.20302714407444, 0.25973454117774963, 0.286628395318985, -0.031280383467674255, -0.3092968761920929, 0.2300219088792801, -0.12056563794612885, 0.09807732701301575, -0.10553975403308868, -0.2696893513202667, -0.20779387652873993, -0.013218562118709087, 0.018445612862706184, -0.12212112545967102, 0.12547577917575836, 0.26102492213249207, 0.16251985728740692, -0.04964563995599747, 0.16580912470817566, 0.10362040251493454, -0.35422974824905396, 0.22701184451580048, 0.14904950559139252, 0.12318867444992065, -0.1518259048461914, 0.06605391949415207, -0.2494007796049118, -0.028143471106886864, -0.15648315846920013, 0.36532148718833923, -0.031123820692300797, 0.6184064149856567, 0.10326661169528961, 0.2576194703578949, -0.04774976521730423, -0.11256419122219086, 0.13241064548492432, -0.045305583626031876, -0.4510791599750519, 0.3567594885826111, -0.3958040177822113, 0.10821328312158585, 0.08951235562562943, 0.13120903074741364, -0.05402742698788643, -0.007713956758379936, 0.04966391995549202, -0.22604674100875854, 0.13592875003814697, -0.30515703558921814, -0.3227665424346924, -0.030431125313043594, 0.025207027792930603, 0.31188297271728516, -0.028642309829592705, -0.006276653613895178, 0.03776901215314865, 0.15899983048439026, -0.3697390854358673, -0.16355954110622406, 0.20270054042339325, -0.1531824916601181, -0.017707044258713722, -0.017617864534258842, 0.18607792258262634, -0.01647537387907505, -0.2951425313949585, -0.1621677577495575, -0.14565891027450562 ]
https://github.com/huggingface/datasets/issues/5402
Missing state.json when creating a cloud dataset using a dataset_builder
Thanks, I'll follow that issue. I was following the [cloud storage](https://huggingface.co/docs/datasets/filesystems) docs section and perhaps I'm missing some part of the flow; start with `load_dataset_builder` + `download_and_prepare`. You say I need an explicit `save_to_disk` but what object needs to be saved? the builder? is that related to the other issue?
### Describe the bug Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example: ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_datase, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" builder = load_dataset_builder("imdb") builder.download_and_prepare(output_dir, storage_options=storage_options) load_from_disk(output_dir, fs=fs) # ERROR # [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json' ``` As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example: ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_dataset, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" dataset = load_dataset("imdb",) dataset.save_to_disk(output_dir, fs=fs) load_from_disk(output_dir, fs=fs) # WORKS ``` You still want the 1st option for the laziness and the parquet conversion. Thanks! ### Steps to reproduce the bug ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_datase, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" builder = load_dataset_builder("imdb") builder.download_and_prepare(output_dir, storage_options=storage_options) load_from_disk(output_dir, fs=fs) # ERROR # [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json' ``` BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385. ### Expected behavior Expected to be able to load the dataset from S3. ### Environment info ``` s3fs 2022.11.0 s3transfer 0.6.0 datasets 2.8.0 aiobotocore 2.4.2 boto3 1.24.59 botocore 1.27.59 ``` python 3.7.15.
50
Missing state.json when creating a cloud dataset using a dataset_builder
[ -0.3881467282772064, 0.559360146522522, -0.2176225185394287, 0.08682386577129364, 0.0036453339271247387, 0.05348636582493782, 0.22309108078479767, 0.42030543088912964, -0.016498686745762825, 0.2694668173789978, 0.5077084302902222, 0.38523203134536743, 0.08744324743747711, 0.4503062963485718, 0.10527800023555756, 0.08927697688341141, 0.21647828817367554, 0.4350416362285614, -0.19995544850826263, -0.04492219537496567, -0.038006365299224854, 0.13763892650604248, -0.036535438150167465, -0.17377100884914398, -0.36371493339538574, -0.008444747887551785, -0.1828848272562027, 0.30053043365478516, -0.2982860505580902, -0.2340727597475052, 0.05386308208107948, 0.0528700016438961, -0.25283610820770264, 0.04360333830118179, -0.00010663305874913931, 0.3244519531726837, 0.2780221998691559, -0.014716149307787418, -0.44453924894332886, -0.19111812114715576, -0.5073650479316711, -0.23284155130386353, 0.10083141922950745, -0.041213713586330414, -0.13219666481018066, -0.213888481259346, 0.0465061254799366, -0.3643271028995514, 0.19743022322654724, 0.359292596578598, 0.1826341450214386, 0.4176095426082611, 0.026502611115574837, -0.16404326260089874, -0.24358993768692017, 0.26746317744255066, -0.05892966315150261, 0.002913080621510744, 0.0943843349814415, 0.11494067311286926, -0.3429132103919983, 0.07527444511651993, 0.12941285967826843, 0.08119859546422958, 0.06495200842618942, 0.08761699497699738, 0.18302758038043976, 0.10508302599191666, 0.25210270285606384, 0.10351871699094772, 0.813683032989502, 0.06212497875094414, -0.13646520674228668, 0.012575136497616768, -0.056333258748054504, 0.27837732434272766, 0.24161003530025482, 0.07786466181278229, -0.17673365771770477, 0.07759074866771698, -0.21488098800182343, -0.14539432525634766, -0.19300584495067596, 0.06513455510139465, -0.16499100625514984, 0.3413890302181244, -0.038452036678791046, -0.020062951371073723, -0.3221145272254944, -0.065285824239254, 0.4349198043346405, -0.44783294200897217, -0.06709497421979904, 0.07191202044487, 0.01223145704716444, 0.044999778270721436, 0.22238101065158844, -0.18257878720760345, 0.13444463908672333, 0.27279171347618103, 0.18430733680725098, 0.05120928958058357, 0.05997273325920105, 0.11324650049209595, 0.3847719132900238, 0.00497386185452342, 0.11702029407024384, -0.03604894131422043, 0.2985978424549103, -0.1910780370235443, -0.04910185560584068, 0.02546936273574829, -0.024717682972550392, -0.16094185411930084, 0.1349748820066452, 0.038883596658706665, 0.04151185601949692, -0.09885948896408081, -0.06168906390666962, 0.15925092995166779, 0.012216722592711449, 0.1147477999329567, -0.14150969684123993, 0.12428802251815796, 0.0010079315397888422, -0.20945079624652863, 0.044244177639484406, 0.23363761603832245, -0.21283215284347534, -0.007501225918531418, -0.45880478620529175, -0.12482750415802002, 0.1728745847940445, -0.10989522933959961, 0.26615971326828003, -0.169424906373024, 0.5107455849647522, -0.10194449871778488, -0.016336673870682716, 0.05192611739039421, 0.33154696226119995, 0.258085161447525, 0.030314724892377853, 0.43520495295524597, 0.2757353186607361, -0.12755334377288818, 0.12474105507135391, -0.3893192410469055, -0.03499077260494232, 0.16572079062461853, -0.06635947525501251, -0.5327973961830139, -0.4805094599723816, 0.23320701718330383, -0.28099706768989563, 0.026189133524894714, -0.21160262823104858, 0.22897526621818542, 0.13963353633880615, -0.25968992710113525, -0.2482127547264099, 0.0440237782895565, 0.21680083870887756, -0.15099288523197174, 0.10276614129543304, 0.35803771018981934, -0.491325706243515, -0.13404738903045654, -0.26296305656433105, -0.33847200870513916, 0.07710008323192596, -0.2500004470348358, -0.25511130690574646, 0.4161442518234253, -0.23862600326538086, 0.2146759033203125, 0.3569798171520233, -0.003897718619555235, -0.19715993106365204, 0.3292385935783386, -0.1983955055475235, -0.27437862753868103, 0.15348578989505768, -0.01590944267809391, 0.021592454984784126, 0.06199764460325241, 0.27043935656547546, 0.0443098321557045, -0.018597593531012535, 0.14938652515411377, -0.01739983819425106, -0.19181500375270844, 0.030687490478157997, 0.25983673334121704, 0.10260546207427979, 0.28380462527275085, 0.2724941372871399, -0.12418151646852493, -0.04992319270968437, -0.09538593143224716, 0.17491304874420166, 0.22402791678905487, 0.08518975973129272, -0.3023177981376648, -0.20605814456939697, 0.04592107608914375, -0.7047407031059265, 0.14844876527786255, 0.22264662384986877, 0.21278221905231476, -0.15013043582439423, -0.013504061847925186, -0.07421918213367462, 0.10452891141176224, -0.2672977149486542, 0.011405451223254204, 0.2633502185344696, 0.1191013976931572, 0.18146821856498718, 0.144528329372406, -0.05612819269299507, -0.18775764107704163, 0.096227265894413, 0.08030175417661667, -0.2736349403858185, 0.2765350043773651, -0.15017689764499664, -0.27719253301620483, 0.4475517272949219, -0.08757133036851883, -0.05923885852098465, -0.01450924389064312, -0.11727292090654373, 0.21896101534366608, -0.03424762934446335, 0.0035743701737374067, 0.07639922201633453, 0.14272016286849976, -0.013077874667942524, 0.3687169849872589, 0.18603886663913727, 0.005164561327546835, -0.01792650856077671, -0.2030133157968521, -0.3928046226501465, 0.3101486265659332, 0.13059106469154358, 0.19169096648693085, 0.02932898886501789, 0.03956299647688866, 0.3194279074668884, 0.1390495002269745, -0.015648216009140015, -0.3859734535217285, -0.28515833616256714, -0.18701374530792236, 0.31882235407829285, -0.04029681906104088, -0.10604148358106613, 0.3414244055747986, 0.29356569051742554, -0.17712442576885223, 0.0891491025686264, -0.19560731947422028, -0.13404260575771332, -0.2248239368200302, 0.23821184039115906, 0.21524791419506073, 0.48820722103118896, 0.1706087738275528, 0.11612863838672638, -0.02681180089712143, 0.03561720624566078, -0.3257894515991211, 0.13835108280181885, 0.04009578749537468, 0.2116960734128952, 0.4650898277759552, 0.25999999046325684, -0.5479187965393066, -0.4315154552459717, -0.26518604159355164, 0.20809732377529144, 0.1710452437400818, -0.16342045366764069, -0.1564083695411682, -0.43317025899887085, -0.0692492425441742, 0.09739941358566284, 0.17198051512241364, -0.1092950850725174, -0.4331359267234802, 0.08014508336782455, 0.19051922857761383, -0.2858463227748871, 0.11311453580856323, -0.10592971742153168, 0.11298584938049316, 0.20377908647060394, -0.04293721541762352, -0.10348034650087357, -0.20579633116722107, -0.21520847082138062, 0.1994508057832718, -0.05238249897956848, 0.26103246212005615, 0.10170245170593262, -0.09767226874828339, 0.27801206707954407, -0.22438548505306244, -0.12845388054847717, 0.3178500533103943, -0.05371277779340744, 0.5063143372535706, 0.2712360918521881, 0.29272720217704773, 0.12739244103431702, -0.060343191027641296, 0.20031008124351501, 0.2032875269651413, -0.34329554438591003, -0.029406195506453514, -0.11424324661493301, -0.35170096158981323, -0.11080686748027802, -0.3110617697238922, -0.12871423363685608, -0.13745388388633728, 0.1095254197716713, 0.17357398569583893, 0.18823523819446564, -0.0929589793086052, 0.35056328773498535, 0.14476774632930756, 0.19242867827415466, -0.10120212286710739, -0.2830125391483307, -0.6130734086036682, 0.28360503911972046, -0.34603551030158997, -0.20049342513084412, 0.026886653155088425, -0.19650352001190186, 0.46577250957489014, -0.2180768996477127, -0.4517063498497009, 0.06752590835094452, -0.04335420951247215, 0.37174543738365173, -0.00007389175880234689, -0.022649044170975685, 0.6073030829429626, 0.08432101458311081, -0.10351430624723434, -0.21040941774845123, -0.12015023082494736, 0.2100970298051834, 0.14260970056056976, 0.09307841956615448, -0.2529561519622803, 0.2677854597568512, -0.16035299003124237, 0.7371307611465454, 0.08361257612705231, -0.1410525143146515, -0.047866739332675934, -0.31556448340415955, 0.17929767072200775, -0.329042911529541, 0.13030467927455902, 0.2259032279253006, 0.07303264737129211, -0.20026883482933044, 0.04319288954138756, 0.05032630264759064, -0.0619637556374073, 0.06502361595630646, 0.10395678132772446, -0.3610341548919678, -0.17047607898712158, 0.016434866935014725, -0.07143232226371765, 0.09245838224887848, 0.2745416760444641, 0.08916352689266205, -0.32685166597366333, 0.17109082639217377, -0.16369253396987915, 0.18340690433979034, 0.23867753148078918, 0.02898813597857952, -0.1344924122095108, -0.10831136256456375, -0.40688371658325195, 0.10363735258579254, 0.08649025112390518, -0.029078079387545586, -0.10056860744953156, -0.02887210249900818, -0.05813399329781532, -0.0330858938395977, 0.5024261474609375, -0.5061020255088806, -0.012280415743589401, 0.23912827670574188, -0.022056087851524353, 0.15690068900585175, 0.13088931143283844, -0.005174658261239529, 0.38275280594825745, 0.03386599197983742, 0.4552832543849945, -0.09607920795679092, -0.051306985318660736, 0.003486277535557747, -0.04093340039253235, -0.08031197637319565, -0.13665542006492615, -0.2172626554965973, -0.2013574242591858, -0.30362915992736816, 0.07158969342708588, -0.1882103681564331, 0.010761131532490253, 0.07891225814819336, -0.23829245567321777, -0.16038267314434052, 0.12789484858512878, -0.30781516432762146, 0.18069790303707123, 0.07912693917751312, -0.1507473737001419, 0.19907912611961365, 0.06138778477907181, 0.01563987322151661, 0.4872530996799469, 0.3814876675605774, 0.5923136472702026, 0.20450958609580994, 0.36954864859580994, -0.4032312333583832, 0.2041747272014618, 0.11133335530757904, -0.0621427483856678, -0.14593878388404846, 0.3970295190811157, 0.0706540197134018, -0.09998109191656113, 0.15463654696941376, -0.09708775579929352, -0.2325187772512436, 0.026909666135907173, -0.4609734117984772, 0.2311355322599411, -0.05816640332341194, -0.03720768541097641, -0.05565423145890236, 0.05037061497569084, -0.1807398945093155, 0.42582768201828003, 0.06748711317777634, 0.31417399644851685, 0.20665282011032104, 0.15874193608760834, 0.3038078844547272, 0.09210558980703354, 0.30188825726509094, -0.38328149914741516, 0.12792542576789856, -0.14536678791046143, -0.08768865466117859, -0.05316382274031639, -0.15850816667079926, 0.2842895984649658, 0.4385463297367096, 0.04135599359869957, 0.16018636524677277, 0.15386979281902313, 0.3850215971469879, -0.11794830113649368, 0.12496842443943024, -0.17595753073692322, -0.3293055295944214, 0.2026563435792923, 0.3033532202243805, -0.20297150313854218, -0.07554329931735992, -0.06933898478746414, -0.06869819015264511, -0.14618751406669617, -0.0465688519179821, -0.02320897951722145, 0.018222251906991005, -0.007073856890201569, 0.3551636338233948, 0.13008999824523926, -0.12983626127243042, -0.05807770788669586, 0.04321679845452309, 0.09038148075342178, 0.1960020661354065, -0.2634848654270172, 0.29638636112213135, 0.25498226284980774, 0.1369684338569641, -0.09614454209804535, -0.13489587604999542, 0.2969524562358856, -0.13955095410346985, -0.16582904756069183, -0.211261585354805, -0.32138338685035706, -0.16257788240909576, -0.2511484622955322, -0.13011126220226288, -0.3894422948360443, -0.16724570095539093, -0.022275427356362343, 0.3295787274837494, 0.07720489054918289, -0.2504367530345917, 0.19145089387893677, 0.14372536540031433, -0.002116405637934804, -0.15684877336025238, 0.21317365765571594, 0.04422368109226227, -0.15518605709075928, 0.5105170607566833, 0.34217527508735657, 0.18432293832302094, 0.5128410458564758, -0.04914135858416557, -0.04078397527337074, -0.31886324286460876, 0.0643228217959404, 0.09041113406419754, -0.016598664224147797, 0.1115461066365242, -0.12433139979839325, -0.23446603119373322, 0.07700049132108688, 0.36975541710853577, -0.10764798521995544, 0.1420236974954605, 0.012341391295194626, -0.17534463107585907, -0.510436475276947, 0.02305210754275322, 0.02028418518602848, 0.15347875654697418, -0.08161147683858871, 0.18242426216602325, -0.1866971105337143, -0.13880334794521332, -0.34741657972335815, -0.27742934226989746, -0.21587055921554565, 0.1410701423883438, -0.29627302289009094, 0.19160352647304535, 0.0305564496666193, -0.31584835052490234, 0.20227865874767303, -0.011330310255289078, -0.17729192972183228, -0.2959888279438019, -0.0776272565126419, 0.09358063340187073, 0.32250547409057617, 0.06435046344995499, -0.05675061047077179, 0.01907940022647381, -0.37991446256637573, 0.06295309215784073, 0.41276732087135315, -0.2688634991645813, -0.04535416141152382, -0.0031253467313945293, -0.19311651587486267, -0.029779186472296715, 0.23124518990516663, -0.2750166654586792, 0.12364845722913742, 0.18980875611305237, -0.23016811907291412, -0.0024322064127773046, -0.1002478152513504, 0.09600040316581726, 0.2518860995769501, 0.1701159030199051, -0.36758264899253845, 0.6409192085266113, 0.3923916518688202, -0.41322195529937744, -0.13131549954414368, -0.24051117897033691, 0.35542675852775574, -0.056243233382701874, -0.10637105256319046, 0.10638462752103806, 0.10074583441019058, 0.30500686168670654, -0.13628922402858734, -0.22057491540908813, -0.005070468410849571, -0.01691625826060772, 0.19944223761558533, 0.03485311195254326, -0.016952598467469215, -0.08390846848487854, -0.17475315928459167, 0.09744513779878616, 0.28258824348449707, -0.25275662541389465, -0.009740515612065792, 0.2050757110118866, -0.23045781254768372, 0.25064173340797424, 0.258547306060791, 0.30970248579978943, -0.04721240699291229, 0.5375255942344666, 0.4225504994392395, 0.009155201725661755, 0.46153023838996887, 0.2575613260269165, -0.25934821367263794, -0.2788788378238678, 0.2734013497829437, 0.0836135670542717, -0.20861664414405823, 0.22606100142002106, 0.24117891490459442, -0.13547758758068085, -0.16652630269527435, -0.11079838126897812, -0.5405146479606628, 0.0412246435880661, -0.24478796124458313, -0.15443871915340424, -0.6414138078689575, -0.11167176812887192, 0.16435004770755768, 0.17881397902965546, 0.05060766264796257, 0.005024774465709925, -0.17276529967784882, -0.24792903661727905, 0.09046304225921631, -0.34005972743034363, 0.24340678751468658, 0.02330351620912552, -0.1408061981201172, -0.058307770639657974, -0.004655204713344574, 0.2587263882160187, -0.23747266829013824, -0.1011555939912796, 0.17868460714817047, 0.3511481285095215, -0.24098092317581177, -0.03320731967687607, -0.07716591656208038, -0.09287770837545395, -0.3441638648509979, -0.2729465663433075, 0.27830934524536133, 0.0789027214050293, 0.05609837919473648, 0.2737342119216919, 0.2609100043773651, -0.17573188245296478, 0.22519779205322266, 0.2965432405471802, 0.1447649598121643, -0.007345773279666901, -0.044912125915288925, -0.11604683101177216, -0.11967070400714874, 0.07299719005823135, -0.07585074752569199, -0.36218196153640747, -0.4664040803909302, 0.003734895493835211, -0.04267898201942444, 0.30309537053108215, -0.14526808261871338, 0.11410915851593018, -0.3051358163356781, 0.564168393611908, -0.06230859458446503, -0.2647201120853424, -0.02111707627773285, -0.17609839141368866, -0.3023907244205475, -0.1539606899023056, -0.17914073169231415, -0.09773511439561844, -0.20302714407444, 0.25973454117774963, 0.286628395318985, -0.031280383467674255, -0.3092968761920929, 0.2300219088792801, -0.12056563794612885, 0.09807732701301575, -0.10553975403308868, -0.2696893513202667, -0.20779387652873993, -0.013218562118709087, 0.018445612862706184, -0.12212112545967102, 0.12547577917575836, 0.26102492213249207, 0.16251985728740692, -0.04964563995599747, 0.16580912470817566, 0.10362040251493454, -0.35422974824905396, 0.22701184451580048, 0.14904950559139252, 0.12318867444992065, -0.1518259048461914, 0.06605391949415207, -0.2494007796049118, -0.028143471106886864, -0.15648315846920013, 0.36532148718833923, -0.031123820692300797, 0.6184064149856567, 0.10326661169528961, 0.2576194703578949, -0.04774976521730423, -0.11256419122219086, 0.13241064548492432, -0.045305583626031876, -0.4510791599750519, 0.3567594885826111, -0.3958040177822113, 0.10821328312158585, 0.08951235562562943, 0.13120903074741364, -0.05402742698788643, -0.007713956758379936, 0.04966391995549202, -0.22604674100875854, 0.13592875003814697, -0.30515703558921814, -0.3227665424346924, -0.030431125313043594, 0.025207027792930603, 0.31188297271728516, -0.028642309829592705, -0.006276653613895178, 0.03776901215314865, 0.15899983048439026, -0.3697390854358673, -0.16355954110622406, 0.20270054042339325, -0.1531824916601181, -0.017707044258713722, -0.017617864534258842, 0.18607792258262634, -0.01647537387907505, -0.2951425313949585, -0.1621677577495575, -0.14565891027450562 ]
https://github.com/huggingface/datasets/issues/5402
Missing state.json when creating a cloud dataset using a dataset_builder
Right now `load_dataset_builder` + `download_and_prepare` is to be used with tools like dask or spark, but `load_dataset` will support private cloud storage soon as well so you'll be able to reload the dataset with `datasets`. Right now the only function that can load a dataset from a cloud storage is `load_from_disk`, that must be used with a dataset serialized with `save_to_disk`.
### Describe the bug Using `load_dataset_builder` to create a builder, run `download_and_prepare` do upload it to S3. However when trying to load it, there are missing `state.json` files. Complete example: ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_datase, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" builder = load_dataset_builder("imdb") builder.download_and_prepare(output_dir, storage_options=storage_options) load_from_disk(output_dir, fs=fs) # ERROR # [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json' ``` As a comparison, if you use the non lazy `load_dataset`, it works and the S3 folder has different structure + state.json files. Example: ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_dataset, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" dataset = load_dataset("imdb",) dataset.save_to_disk(output_dir, fs=fs) load_from_disk(output_dir, fs=fs) # WORKS ``` You still want the 1st option for the laziness and the parquet conversion. Thanks! ### Steps to reproduce the bug ```python from aiobotocore.session import AioSession as Session from datasets import load_from_disk, load_datase, load_dataset_builder import s3fs storage_options = {"session": Session()} fs = s3fs.S3FileSystem(**storage_options) output_dir = "s3://bucket/imdb" builder = load_dataset_builder("imdb") builder.download_and_prepare(output_dir, storage_options=storage_options) load_from_disk(output_dir, fs=fs) # ERROR # [Errno 2] No such file or directory: '/tmp/tmpy22yys8o/bucket/imdb/state.json' ``` BTW, you need the AioSession as s3fs is now based on aiobotocore, see https://github.com/fsspec/s3fs/issues/385. ### Expected behavior Expected to be able to load the dataset from S3. ### Environment info ``` s3fs 2022.11.0 s3transfer 0.6.0 datasets 2.8.0 aiobotocore 2.4.2 boto3 1.24.59 botocore 1.27.59 ``` python 3.7.15.
61
Missing state.json when creating a cloud dataset using a dataset_builder
[ -0.3881467282772064, 0.559360146522522, -0.2176225185394287, 0.08682386577129364, 0.0036453339271247387, 0.05348636582493782, 0.22309108078479767, 0.42030543088912964, -0.016498686745762825, 0.2694668173789978, 0.5077084302902222, 0.38523203134536743, 0.08744324743747711, 0.4503062963485718, 0.10527800023555756, 0.08927697688341141, 0.21647828817367554, 0.4350416362285614, -0.19995544850826263, -0.04492219537496567, -0.038006365299224854, 0.13763892650604248, -0.036535438150167465, -0.17377100884914398, -0.36371493339538574, -0.008444747887551785, -0.1828848272562027, 0.30053043365478516, -0.2982860505580902, -0.2340727597475052, 0.05386308208107948, 0.0528700016438961, -0.25283610820770264, 0.04360333830118179, -0.00010663305874913931, 0.3244519531726837, 0.2780221998691559, -0.014716149307787418, -0.44453924894332886, -0.19111812114715576, -0.5073650479316711, -0.23284155130386353, 0.10083141922950745, -0.041213713586330414, -0.13219666481018066, -0.213888481259346, 0.0465061254799366, -0.3643271028995514, 0.19743022322654724, 0.359292596578598, 0.1826341450214386, 0.4176095426082611, 0.026502611115574837, -0.16404326260089874, -0.24358993768692017, 0.26746317744255066, -0.05892966315150261, 0.002913080621510744, 0.0943843349814415, 0.11494067311286926, -0.3429132103919983, 0.07527444511651993, 0.12941285967826843, 0.08119859546422958, 0.06495200842618942, 0.08761699497699738, 0.18302758038043976, 0.10508302599191666, 0.25210270285606384, 0.10351871699094772, 0.813683032989502, 0.06212497875094414, -0.13646520674228668, 0.012575136497616768, -0.056333258748054504, 0.27837732434272766, 0.24161003530025482, 0.07786466181278229, -0.17673365771770477, 0.07759074866771698, -0.21488098800182343, -0.14539432525634766, -0.19300584495067596, 0.06513455510139465, -0.16499100625514984, 0.3413890302181244, -0.038452036678791046, -0.020062951371073723, -0.3221145272254944, -0.065285824239254, 0.4349198043346405, -0.44783294200897217, -0.06709497421979904, 0.07191202044487, 0.01223145704716444, 0.044999778270721436, 0.22238101065158844, -0.18257878720760345, 0.13444463908672333, 0.27279171347618103, 0.18430733680725098, 0.05120928958058357, 0.05997273325920105, 0.11324650049209595, 0.3847719132900238, 0.00497386185452342, 0.11702029407024384, -0.03604894131422043, 0.2985978424549103, -0.1910780370235443, -0.04910185560584068, 0.02546936273574829, -0.024717682972550392, -0.16094185411930084, 0.1349748820066452, 0.038883596658706665, 0.04151185601949692, -0.09885948896408081, -0.06168906390666962, 0.15925092995166779, 0.012216722592711449, 0.1147477999329567, -0.14150969684123993, 0.12428802251815796, 0.0010079315397888422, -0.20945079624652863, 0.044244177639484406, 0.23363761603832245, -0.21283215284347534, -0.007501225918531418, -0.45880478620529175, -0.12482750415802002, 0.1728745847940445, -0.10989522933959961, 0.26615971326828003, -0.169424906373024, 0.5107455849647522, -0.10194449871778488, -0.016336673870682716, 0.05192611739039421, 0.33154696226119995, 0.258085161447525, 0.030314724892377853, 0.43520495295524597, 0.2757353186607361, -0.12755334377288818, 0.12474105507135391, -0.3893192410469055, -0.03499077260494232, 0.16572079062461853, -0.06635947525501251, -0.5327973961830139, -0.4805094599723816, 0.23320701718330383, -0.28099706768989563, 0.026189133524894714, -0.21160262823104858, 0.22897526621818542, 0.13963353633880615, -0.25968992710113525, -0.2482127547264099, 0.0440237782895565, 0.21680083870887756, -0.15099288523197174, 0.10276614129543304, 0.35803771018981934, -0.491325706243515, -0.13404738903045654, -0.26296305656433105, -0.33847200870513916, 0.07710008323192596, -0.2500004470348358, -0.25511130690574646, 0.4161442518234253, -0.23862600326538086, 0.2146759033203125, 0.3569798171520233, -0.003897718619555235, -0.19715993106365204, 0.3292385935783386, -0.1983955055475235, -0.27437862753868103, 0.15348578989505768, -0.01590944267809391, 0.021592454984784126, 0.06199764460325241, 0.27043935656547546, 0.0443098321557045, -0.018597593531012535, 0.14938652515411377, -0.01739983819425106, -0.19181500375270844, 0.030687490478157997, 0.25983673334121704, 0.10260546207427979, 0.28380462527275085, 0.2724941372871399, -0.12418151646852493, -0.04992319270968437, -0.09538593143224716, 0.17491304874420166, 0.22402791678905487, 0.08518975973129272, -0.3023177981376648, -0.20605814456939697, 0.04592107608914375, -0.7047407031059265, 0.14844876527786255, 0.22264662384986877, 0.21278221905231476, -0.15013043582439423, -0.013504061847925186, -0.07421918213367462, 0.10452891141176224, -0.2672977149486542, 0.011405451223254204, 0.2633502185344696, 0.1191013976931572, 0.18146821856498718, 0.144528329372406, -0.05612819269299507, -0.18775764107704163, 0.096227265894413, 0.08030175417661667, -0.2736349403858185, 0.2765350043773651, -0.15017689764499664, -0.27719253301620483, 0.4475517272949219, -0.08757133036851883, -0.05923885852098465, -0.01450924389064312, -0.11727292090654373, 0.21896101534366608, -0.03424762934446335, 0.0035743701737374067, 0.07639922201633453, 0.14272016286849976, -0.013077874667942524, 0.3687169849872589, 0.18603886663913727, 0.005164561327546835, -0.01792650856077671, -0.2030133157968521, -0.3928046226501465, 0.3101486265659332, 0.13059106469154358, 0.19169096648693085, 0.02932898886501789, 0.03956299647688866, 0.3194279074668884, 0.1390495002269745, -0.015648216009140015, -0.3859734535217285, -0.28515833616256714, -0.18701374530792236, 0.31882235407829285, -0.04029681906104088, -0.10604148358106613, 0.3414244055747986, 0.29356569051742554, -0.17712442576885223, 0.0891491025686264, -0.19560731947422028, -0.13404260575771332, -0.2248239368200302, 0.23821184039115906, 0.21524791419506073, 0.48820722103118896, 0.1706087738275528, 0.11612863838672638, -0.02681180089712143, 0.03561720624566078, -0.3257894515991211, 0.13835108280181885, 0.04009578749537468, 0.2116960734128952, 0.4650898277759552, 0.25999999046325684, -0.5479187965393066, -0.4315154552459717, -0.26518604159355164, 0.20809732377529144, 0.1710452437400818, -0.16342045366764069, -0.1564083695411682, -0.43317025899887085, -0.0692492425441742, 0.09739941358566284, 0.17198051512241364, -0.1092950850725174, -0.4331359267234802, 0.08014508336782455, 0.19051922857761383, -0.2858463227748871, 0.11311453580856323, -0.10592971742153168, 0.11298584938049316, 0.20377908647060394, -0.04293721541762352, -0.10348034650087357, -0.20579633116722107, -0.21520847082138062, 0.1994508057832718, -0.05238249897956848, 0.26103246212005615, 0.10170245170593262, -0.09767226874828339, 0.27801206707954407, -0.22438548505306244, -0.12845388054847717, 0.3178500533103943, -0.05371277779340744, 0.5063143372535706, 0.2712360918521881, 0.29272720217704773, 0.12739244103431702, -0.060343191027641296, 0.20031008124351501, 0.2032875269651413, -0.34329554438591003, -0.029406195506453514, -0.11424324661493301, -0.35170096158981323, -0.11080686748027802, -0.3110617697238922, -0.12871423363685608, -0.13745388388633728, 0.1095254197716713, 0.17357398569583893, 0.18823523819446564, -0.0929589793086052, 0.35056328773498535, 0.14476774632930756, 0.19242867827415466, -0.10120212286710739, -0.2830125391483307, -0.6130734086036682, 0.28360503911972046, -0.34603551030158997, -0.20049342513084412, 0.026886653155088425, -0.19650352001190186, 0.46577250957489014, -0.2180768996477127, -0.4517063498497009, 0.06752590835094452, -0.04335420951247215, 0.37174543738365173, -0.00007389175880234689, -0.022649044170975685, 0.6073030829429626, 0.08432101458311081, -0.10351430624723434, -0.21040941774845123, -0.12015023082494736, 0.2100970298051834, 0.14260970056056976, 0.09307841956615448, -0.2529561519622803, 0.2677854597568512, -0.16035299003124237, 0.7371307611465454, 0.08361257612705231, -0.1410525143146515, -0.047866739332675934, -0.31556448340415955, 0.17929767072200775, -0.329042911529541, 0.13030467927455902, 0.2259032279253006, 0.07303264737129211, -0.20026883482933044, 0.04319288954138756, 0.05032630264759064, -0.0619637556374073, 0.06502361595630646, 0.10395678132772446, -0.3610341548919678, -0.17047607898712158, 0.016434866935014725, -0.07143232226371765, 0.09245838224887848, 0.2745416760444641, 0.08916352689266205, -0.32685166597366333, 0.17109082639217377, -0.16369253396987915, 0.18340690433979034, 0.23867753148078918, 0.02898813597857952, -0.1344924122095108, -0.10831136256456375, -0.40688371658325195, 0.10363735258579254, 0.08649025112390518, -0.029078079387545586, -0.10056860744953156, -0.02887210249900818, -0.05813399329781532, -0.0330858938395977, 0.5024261474609375, -0.5061020255088806, -0.012280415743589401, 0.23912827670574188, -0.022056087851524353, 0.15690068900585175, 0.13088931143283844, -0.005174658261239529, 0.38275280594825745, 0.03386599197983742, 0.4552832543849945, -0.09607920795679092, -0.051306985318660736, 0.003486277535557747, -0.04093340039253235, -0.08031197637319565, -0.13665542006492615, -0.2172626554965973, -0.2013574242591858, -0.30362915992736816, 0.07158969342708588, -0.1882103681564331, 0.010761131532490253, 0.07891225814819336, -0.23829245567321777, -0.16038267314434052, 0.12789484858512878, -0.30781516432762146, 0.18069790303707123, 0.07912693917751312, -0.1507473737001419, 0.19907912611961365, 0.06138778477907181, 0.01563987322151661, 0.4872530996799469, 0.3814876675605774, 0.5923136472702026, 0.20450958609580994, 0.36954864859580994, -0.4032312333583832, 0.2041747272014618, 0.11133335530757904, -0.0621427483856678, -0.14593878388404846, 0.3970295190811157, 0.0706540197134018, -0.09998109191656113, 0.15463654696941376, -0.09708775579929352, -0.2325187772512436, 0.026909666135907173, -0.4609734117984772, 0.2311355322599411, -0.05816640332341194, -0.03720768541097641, -0.05565423145890236, 0.05037061497569084, -0.1807398945093155, 0.42582768201828003, 0.06748711317777634, 0.31417399644851685, 0.20665282011032104, 0.15874193608760834, 0.3038078844547272, 0.09210558980703354, 0.30188825726509094, -0.38328149914741516, 0.12792542576789856, -0.14536678791046143, -0.08768865466117859, -0.05316382274031639, -0.15850816667079926, 0.2842895984649658, 0.4385463297367096, 0.04135599359869957, 0.16018636524677277, 0.15386979281902313, 0.3850215971469879, -0.11794830113649368, 0.12496842443943024, -0.17595753073692322, -0.3293055295944214, 0.2026563435792923, 0.3033532202243805, -0.20297150313854218, -0.07554329931735992, -0.06933898478746414, -0.06869819015264511, -0.14618751406669617, -0.0465688519179821, -0.02320897951722145, 0.018222251906991005, -0.007073856890201569, 0.3551636338233948, 0.13008999824523926, -0.12983626127243042, -0.05807770788669586, 0.04321679845452309, 0.09038148075342178, 0.1960020661354065, -0.2634848654270172, 0.29638636112213135, 0.25498226284980774, 0.1369684338569641, -0.09614454209804535, -0.13489587604999542, 0.2969524562358856, -0.13955095410346985, -0.16582904756069183, -0.211261585354805, -0.32138338685035706, -0.16257788240909576, -0.2511484622955322, -0.13011126220226288, -0.3894422948360443, -0.16724570095539093, -0.022275427356362343, 0.3295787274837494, 0.07720489054918289, -0.2504367530345917, 0.19145089387893677, 0.14372536540031433, -0.002116405637934804, -0.15684877336025238, 0.21317365765571594, 0.04422368109226227, -0.15518605709075928, 0.5105170607566833, 0.34217527508735657, 0.18432293832302094, 0.5128410458564758, -0.04914135858416557, -0.04078397527337074, -0.31886324286460876, 0.0643228217959404, 0.09041113406419754, -0.016598664224147797, 0.1115461066365242, -0.12433139979839325, -0.23446603119373322, 0.07700049132108688, 0.36975541710853577, -0.10764798521995544, 0.1420236974954605, 0.012341391295194626, -0.17534463107585907, -0.510436475276947, 0.02305210754275322, 0.02028418518602848, 0.15347875654697418, -0.08161147683858871, 0.18242426216602325, -0.1866971105337143, -0.13880334794521332, -0.34741657972335815, -0.27742934226989746, -0.21587055921554565, 0.1410701423883438, -0.29627302289009094, 0.19160352647304535, 0.0305564496666193, -0.31584835052490234, 0.20227865874767303, -0.011330310255289078, -0.17729192972183228, -0.2959888279438019, -0.0776272565126419, 0.09358063340187073, 0.32250547409057617, 0.06435046344995499, -0.05675061047077179, 0.01907940022647381, -0.37991446256637573, 0.06295309215784073, 0.41276732087135315, -0.2688634991645813, -0.04535416141152382, -0.0031253467313945293, -0.19311651587486267, -0.029779186472296715, 0.23124518990516663, -0.2750166654586792, 0.12364845722913742, 0.18980875611305237, -0.23016811907291412, -0.0024322064127773046, -0.1002478152513504, 0.09600040316581726, 0.2518860995769501, 0.1701159030199051, -0.36758264899253845, 0.6409192085266113, 0.3923916518688202, -0.41322195529937744, -0.13131549954414368, -0.24051117897033691, 0.35542675852775574, -0.056243233382701874, -0.10637105256319046, 0.10638462752103806, 0.10074583441019058, 0.30500686168670654, -0.13628922402858734, -0.22057491540908813, -0.005070468410849571, -0.01691625826060772, 0.19944223761558533, 0.03485311195254326, -0.016952598467469215, -0.08390846848487854, -0.17475315928459167, 0.09744513779878616, 0.28258824348449707, -0.25275662541389465, -0.009740515612065792, 0.2050757110118866, -0.23045781254768372, 0.25064173340797424, 0.258547306060791, 0.30970248579978943, -0.04721240699291229, 0.5375255942344666, 0.4225504994392395, 0.009155201725661755, 0.46153023838996887, 0.2575613260269165, -0.25934821367263794, -0.2788788378238678, 0.2734013497829437, 0.0836135670542717, -0.20861664414405823, 0.22606100142002106, 0.24117891490459442, -0.13547758758068085, -0.16652630269527435, -0.11079838126897812, -0.5405146479606628, 0.0412246435880661, -0.24478796124458313, -0.15443871915340424, -0.6414138078689575, -0.11167176812887192, 0.16435004770755768, 0.17881397902965546, 0.05060766264796257, 0.005024774465709925, -0.17276529967784882, -0.24792903661727905, 0.09046304225921631, -0.34005972743034363, 0.24340678751468658, 0.02330351620912552, -0.1408061981201172, -0.058307770639657974, -0.004655204713344574, 0.2587263882160187, -0.23747266829013824, -0.1011555939912796, 0.17868460714817047, 0.3511481285095215, -0.24098092317581177, -0.03320731967687607, -0.07716591656208038, -0.09287770837545395, -0.3441638648509979, -0.2729465663433075, 0.27830934524536133, 0.0789027214050293, 0.05609837919473648, 0.2737342119216919, 0.2609100043773651, -0.17573188245296478, 0.22519779205322266, 0.2965432405471802, 0.1447649598121643, -0.007345773279666901, -0.044912125915288925, -0.11604683101177216, -0.11967070400714874, 0.07299719005823135, -0.07585074752569199, -0.36218196153640747, -0.4664040803909302, 0.003734895493835211, -0.04267898201942444, 0.30309537053108215, -0.14526808261871338, 0.11410915851593018, -0.3051358163356781, 0.564168393611908, -0.06230859458446503, -0.2647201120853424, -0.02111707627773285, -0.17609839141368866, -0.3023907244205475, -0.1539606899023056, -0.17914073169231415, -0.09773511439561844, -0.20302714407444, 0.25973454117774963, 0.286628395318985, -0.031280383467674255, -0.3092968761920929, 0.2300219088792801, -0.12056563794612885, 0.09807732701301575, -0.10553975403308868, -0.2696893513202667, -0.20779387652873993, -0.013218562118709087, 0.018445612862706184, -0.12212112545967102, 0.12547577917575836, 0.26102492213249207, 0.16251985728740692, -0.04964563995599747, 0.16580912470817566, 0.10362040251493454, -0.35422974824905396, 0.22701184451580048, 0.14904950559139252, 0.12318867444992065, -0.1518259048461914, 0.06605391949415207, -0.2494007796049118, -0.028143471106886864, -0.15648315846920013, 0.36532148718833923, -0.031123820692300797, 0.6184064149856567, 0.10326661169528961, 0.2576194703578949, -0.04774976521730423, -0.11256419122219086, 0.13241064548492432, -0.045305583626031876, -0.4510791599750519, 0.3567594885826111, -0.3958040177822113, 0.10821328312158585, 0.08951235562562943, 0.13120903074741364, -0.05402742698788643, -0.007713956758379936, 0.04966391995549202, -0.22604674100875854, 0.13592875003814697, -0.30515703558921814, -0.3227665424346924, -0.030431125313043594, 0.025207027792930603, 0.31188297271728516, -0.028642309829592705, -0.006276653613895178, 0.03776901215314865, 0.15899983048439026, -0.3697390854358673, -0.16355954110622406, 0.20270054042339325, -0.1531824916601181, -0.017707044258713722, -0.017617864534258842, 0.18607792258262634, -0.01647537387907505, -0.2951425313949585, -0.1621677577495575, -0.14565891027450562 ]
https://github.com/huggingface/datasets/issues/5394
CI error: TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
@MFatnassi, this issue and the corresponding fix only affect our Continuous Integration testing environment. Note that `datasets` does not depend on `spacy`.
### Describe the bug While installing the dependencies, the CI raises a TypeError: ``` Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 142, in _get_module_details return _get_module_details(pkg_main_name, error) File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/runpy.py", line 109, in _get_module_details __import__(pkg_name) File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/__init__.py", line 6, in <module> from .errors import setup_default_warnings File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/errors.py", line 2, in <module> from .compat import Literal File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/spacy/compat.py", line 3, in <module> from thinc.util import copy_array File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/__init__.py", line 5, in <module> from .config import registry File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/thinc/config.py", line 2, in <module> import confection File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/confection/__init__.py", line 10, in <module> from pydantic import BaseModel, create_model, ValidationError, Extra File "pydantic/__init__.py", line 2, in init pydantic.__init__ File "pydantic/dataclasses.py", line 46, in init pydantic.dataclasses # | None | Attribute is set to None. | File "pydantic/main.py", line 121, in init pydantic.main TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers' ``` See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565 ### Steps to reproduce the bug ```shell pip install .[tests,metrics-tests] python -m spacy download en_core_web_sm ``` ### Expected behavior No error. ### Environment info See: https://github.com/huggingface/datasets/actions/runs/3793736481/jobs/6466356565
22
CI error: TypeError: dataclass_transform() got an unexpected keyword argument 'field_specifiers'
[ -0.23501433432102203, 0.21755246818065643, -0.16375289857387543, 0.06422282755374908, 0.35557928681373596, -0.1730913519859314, 0.30620062351226807, 0.34955498576164246, -0.4189312160015106, 0.20132818818092346, 0.29578134417533875, 0.24502067267894745, 0.021459262818098068, 0.6208927035331726, -0.2641867995262146, -0.2521790564060211, -0.026184644550085068, 0.05403381958603859, -0.36562877893447876, -0.011091538704931736, -0.17225190997123718, 0.1914852261543274, -0.1004910096526146, 0.15448355674743652, -0.12353672832250595, -0.11766394227743149, 0.09938325732946396, -0.06781662255525589, -0.36728236079216003, 0.08294312655925751, 0.1027069091796875, -0.00006702752580167726, -0.10615913569927216, 0.1340559720993042, -0.00010138715879293159, 0.08469371497631073, 0.11060449481010437, -0.05884794145822525, -0.09548620134592056, 0.04141615331172943, 0.20750679075717926, 0.2056678682565689, -0.04791899770498276, -0.30887582898139954, -0.27951204776763916, 0.02107716165482998, -0.3310113549232483, -0.29268452525138855, 0.2335640788078308, 0.40116775035858154, 0.346657395362854, 0.1345682293176651, -0.04597204551100731, -0.24325628578662872, 0.22227171063423157, 0.06443381309509277, -0.22615176439285278, -0.11399736255407333, 0.020275797694921494, 0.08888920396566391, 0.04436232149600983, 0.4687253534793854, -0.10086618363857269, -0.2953489124774933, 0.33052730560302734, -0.11413203924894333, 0.22243139147758484, -0.2631954252719879, 0.3946908712387085, -0.19603680074214935, 0.1830970197916031, -0.056241802871227264, -0.12483114749193192, 0.3236527144908905, 0.06365148723125458, -0.09884917736053467, 0.16686715185642242, -0.22196899354457855, 0.022028576582670212, -0.0721307024359703, -0.12425072491168976, 0.04483361542224884, -0.06737278401851654, -0.03925839066505432, -0.1264582872390747, 0.16256774961948395, -0.13842999935150146, 0.015770677477121353, 0.19272571802139282, -0.2265094369649887, 0.1469423770904541, 0.1507539451122284, -0.03729093819856644, -0.05534264072775841, 0.11082945764064789, -0.2737313210964203, 0.11423920094966888, 0.0724007710814476, -0.23987464606761932, 0.2127695381641388, 0.11333871632814407, 0.07337479293346405, 0.2862146496772766, 0.03791661560535431, 0.07016165554523468, 0.20584914088249207, 0.07504409551620483, 0.2903069257736206, 0.05034952983260155, -0.09745056927204132, -0.10005001723766327, -0.04886589199304581, 0.20695197582244873, -0.18413110077381134, -0.14481127262115479, 0.037952519953250885, 0.19850775599479675, -0.06259695440530777, -0.32964131236076355, 0.1499590128660202, 0.12385165691375732, 0.18067122995853424, 0.10979341715574265, 0.19547465443611145, 0.12974299490451813, 0.08790821582078934, 0.3929612338542938, 0.23103190958499908, 0.09321615099906921, -0.17123831808567047, -0.26976850628852844, 0.26810938119888306, -0.13470841944217682, -0.13936595618724823, 0.05656573548913002, 0.13592112064361572, 0.14751368761062622, 0.308870792388916, 0.3128140866756439, -0.06387107819318771, -0.11495271325111389, -0.06178789585828781, -0.07056616991758347, 0.3162514567375183, -0.22589832544326782, -0.07798775285482407, 0.4841078519821167, -0.29148244857788086, -0.045630134642124176, 0.12228551506996155, -0.25076237320899963, -0.07037228345870972, -0.265278160572052, 0.3604925572872162, 0.2118293046951294, -0.15381388366222382, -0.20312906801700592, 0.04001826420426369, 0.11953633278608322, -0.0729721337556839, 0.025481542572379112, -0.22320623695850372, 0.2636502683162689, -0.04268389195203781, 0.08454638719558716, 0.04525639861822128, -0.1546691656112671, -0.11185811460018158, 0.09321277588605881, 0.058197032660245895, 0.12501968443393707, 0.1269843429327011, -0.16317644715309143, 0.056751884520053864, 0.057740066200494766, 0.029849786311388016, 0.6310440897941589, -0.35890913009643555, 0.015803173184394836, 0.30807939171791077, -0.04045959189534187, -0.40733861923217773, -0.10260696709156036, -0.11195448786020279, 0.12320085614919662, 0.08848635107278824, -0.34970489144325256, 0.04572828486561775, -0.23046402633190155, 0.165860116481781, -0.25427383184432983, -0.0971594825387001, -0.030730092898011208, 0.011962596327066422, 0.27357974648475647, 0.3241732716560364, 0.09091772139072418, 0.07436951249837875, -0.08561533689498901, -0.23066875338554382, -0.032320134341716766, 0.06091436371207237, 0.00498109171167016, -0.03975340723991394, 0.011363066732883453, 0.025438353419303894, -0.1563442051410675, -0.26796069741249084, -0.12827832996845245, 0.2622109055519104, 0.10269848257303238, -0.08645645529031754, -0.3164694905281067, 0.047287020832300186, 0.11697981506586075, -0.08170507848262787, 0.3570428490638733, -0.06611460447311401, -0.31495338678359985, -0.29948189854621887, -0.05881786718964577, -0.12651483714580536, -0.10562890768051147, 0.01700032316148281, 0.032290708273649216, 0.023125911131501198, -0.45167651772499084, -0.24702875316143036, -0.1850820630788803, -0.1720309555530548, 0.3631420433521271, -0.16087254881858826, -0.31337442994117737, 0.2466525286436081, -0.05270030349493027, -0.1092354878783226, 0.049129001796245575, 0.47722649574279785, 0.01584681309759617, -0.1591275930404663, 0.023916129022836685, 0.09394652396440506, -0.01926019787788391, -0.07141432166099548, 0.0859006866812706, 0.37478873133659363, -0.2539914548397064, 0.12398948520421982, 0.23756025731563568, 0.1198340654373169, 0.4298194944858551, -0.07074768096208572, -0.17495690286159515, -0.31010833382606506, 0.04144241660833359, 0.04258335381746292, -0.05865927040576935, 0.08876176923513412, -0.10773347318172455, 0.13221125304698944, 0.2629740238189697, 0.24935148656368256, -0.01306641474366188, -0.0031250345055013895, 0.11051566153764725, 0.06524526327848434, -0.172138974070549, 0.1903519630432129, 0.35546624660491943, 0.08726804703474045, -0.15168683230876923, 0.27302086353302, -0.053893133997917175, -0.020590413361787796, 0.4361098110675812, 0.03152027353644371, 0.22367340326309204, 0.0344729945063591, -0.029527047649025917, 0.2752322852611542, -0.040792256593704224, -0.2055985927581787, 0.156652569770813, 0.08162059634923935, -0.27735501527786255, 0.4415126144886017, -0.3319910764694214, 0.00584410922601819, 0.025076286867260933, -0.12095083296298981, 0.1798914521932602, -0.2530692517757416, -0.06864170730113983, 0.09563282877206802, -0.32838010787963867, 0.16003455221652985, -0.09644822776317596, 0.25892794132232666, 0.3194437026977539, 0.05993332341313362, -0.21688634157180786, -0.11047447472810745, -0.06795110553503036, 0.1656450480222702, 0.056584227830171585, -0.30291905999183655, 0.24174746870994568, -0.16087953746318817, 0.3426376283168793, -0.1745617836713791, -0.6734533905982971, 0.12075939029455185, -0.07814353704452515, 0.20641757547855377, 0.21226024627685547, 0.14195941388607025, -0.21112309396266937, -0.5989448428153992, 0.4176500141620636, -0.2141880840063095, -0.07761050015687943, 0.31281355023384094, -0.20297163724899292, -0.18700957298278809, -0.3034617602825165, -0.33709394931793213, -0.043202128261327744, -0.2028527557849884, -0.25639891624450684, 0.12196088582277298, -0.052333004772663116, 0.6964762210845947, 0.20645387470722198, -0.153153657913208, 0.094106525182724, 0.17867299914360046, -0.37423965334892273, -0.2353212982416153, 0.16504007577896118, -0.1471882313489914, -0.36041128635406494, -0.06324043869972229, -0.07682601362466812, 0.4399785101413727, 0.2151758372783661, -0.047908928245306015, -0.10962475091218948, 0.05769035220146179, 0.1220887303352356, -0.14180991053581238, -0.17986685037612915, 0.3732006251811981, 0.12817473709583282, -0.24447597563266754, -0.1076110377907753, -0.17395846545696259, 0.05413580685853958, -0.2195149064064026, 0.3233160078525543, -0.6155372262001038, 0.49276602268218994, 0.03365440294146538, 0.22101958096027374, -0.1946212351322174, -0.35332733392715454, 0.08748310059309006, -0.164385125041008, 0.22555096447467804, -0.17692038416862488, -0.42089852690696716, 0.045225951820611954, -0.14490598440170288, -0.06504831463098526, 0.0658535361289978, -0.4165646731853485, -0.252510130405426, -0.12222201377153397, 0.26659512519836426, 0.05012136697769165, -0.2456304430961609, 0.23069709539413452, -0.198555588722229, 0.3233342468738556, 0.11584451049566269, 0.20141513645648956, -0.2696499824523926, 0.07812391221523285, 0.0389542318880558, 0.2206239104270935, -0.2649414539337158, -0.052564121782779694, 0.008495737798511982, -0.34445270895957947, 0.10860921442508698, 0.23244450986385345, -0.10722822695970535, 0.13227048516273499, -0.2804020643234253, -0.1779441386461258, -0.09801852703094482, -0.06213003024458885, 0.20645080506801605, 0.029512492939829826, -0.13659469783306122, 0.4729498028755188, -0.3147338330745697, -0.15299247205257416, -0.35794901847839355, -0.2141326516866684, -0.010877925902605057, 0.3373619318008423, 0.5113257169723511, -0.11255258321762085, 0.0036660574842244387, 0.7260347604751587, -0.3088272213935852, -0.10556069016456604, 0.3136477768421173, -0.16918370127677917, -0.4460057318210602, -0.22549834847450256, 0.142716646194458, 0.00014472224575001746, 0.10462167859077454, -0.1449659913778305, 0.0650029256939888, 0.06772686541080475, -0.011777197010815144, -0.16784988343715668, 0.3525698184967041, -0.03937610611319542, -0.03576718270778656, -0.1129603311419487, -0.2099754363298416, 0.03809121996164322, 0.11802524328231812, 0.022408753633499146, 0.4336428642272949, -0.15965570509433746, 0.15377329289913177, -0.16273380815982819, 0.015255670994520187, 0.0620354525744915, -0.30024057626724243, 0.1574738472700119, -0.16818411648273468, 0.19327370822429657, 0.004205211531370878, 0.41973748803138733, 0.3008054494857788, -0.23361778259277344, 0.09692531824111938, -0.14019833505153656, 0.33796992897987366, -0.12164012342691422, -0.07526961714029312, -0.06922236829996109, 0.021787215024232864, -0.13865812122821808, 0.32376745343208313, 0.42834585905075073, 0.8324779868125916, 0.06349661946296692, -0.16045723855495453, 0.1485665887594223, 0.03319306671619415, 0.2926144003868103, -0.1616058200597763, -0.06490275263786316, -0.30623385310173035, -0.5148861408233643, 0.07017672061920166, -0.07034967094659805, 0.46060532331466675, 0.23541367053985596, -0.5565944314002991, -0.11810348182916641, -0.12204740941524506, 0.3083321452140808, 0.011418559588491917, -0.12584298849105835, 0.13823965191841125, -0.10834690928459167, -0.0853189080953598, 0.288097083568573, -0.24424830079078674, 0.10295376926660538, -0.19765877723693848, 0.019385019317269325, -0.15563958883285522, -0.2805674076080322, -0.10490238666534424, 0.2178458422422409, -0.36691123247146606, 0.4028243124485016, -0.10657133907079697, -0.21296322345733643, 0.1270848512649536, -0.02957960218191147, 0.4887657165527344, 0.13828368484973907, 0.04027717188000679, 0.21450963616371155, 0.021282248198986053, -0.03800836578011513, -0.013601205311715603, 0.024417545646429062, 0.2179848551750183, -0.21113330125808716, 0.0352797694504261, -0.043673306703567505, 0.050535898655653, -0.2073870450258255, 0.022555552423000336, -0.09945233166217804, -0.007830318994820118, -0.29457107186317444, 0.16021159291267395, -0.07313687354326248, -0.11059727519750595, -0.2999076247215271, 0.2502102255821228, -0.17156879603862762, 0.011940998956561089, 0.30395182967185974, 0.2177286595106125, -0.23417127132415771, 0.01148245483636856, 0.027363857254385948, -0.10220484435558319, -0.03546775504946709, 0.42237743735313416, -0.24499204754829407, -0.1519642025232315, -0.4098986089229584, 0.07834605127573013, -0.07416581362485886, -0.07741802930831909, 0.3948208689689636, 0.04240991920232773, -0.5193106532096863, 0.13935932517051697, 0.6037494540214539, 0.12630866467952728, 0.23431424796581268, -0.07634885609149933, -0.15398776531219482, -0.32785677909851074, 0.08920864015817642, -0.17177677154541016, 0.01083639357239008, 0.05706772953271866, 0.6352201700210571, 0.036219120025634766, 0.1159578338265419, -0.4429754912853241, -0.21405114233493805, -0.3135601282119751, 0.14912597835063934, 0.5117843151092529, -0.2707580029964447, -0.12668249011039734, 0.15828779339790344, 0.20006999373435974, -0.009881907142698765, 0.06222441792488098, -0.36720311641693115, -0.2571742534637451, 0.010010742582380772, 0.10450077056884766, 0.1015598401427269, 0.11413238197565079, 0.10442721098661423, -0.1979411393404007, -0.17377983033657074, 0.11353227496147156, -0.1375163495540619, 0.18816199898719788, 0.18953870236873627, -0.46508243680000305, 0.03157190605998039, 0.122336246073246, -0.23903176188468933, 0.13251370191574097, 0.18285362422466278, -0.04846668243408203, 0.23192648589611053, 0.022250639274716377, -0.22010299563407898, -0.09013582020998001, 0.19948710501194, 0.06143006309866905, 0.11589419841766357, 0.2355514019727707, -0.2292342185974121, 0.18163667619228363, 0.41867828369140625, -0.06883715093135834, 0.23682960867881775, -0.31055501103401184, -0.004013571422547102, -0.08510258793830872, 0.3406526744365692, -0.2595280110836029, -0.17710062861442566, 0.02453484758734703, -0.08214745670557022, 0.09461893141269684, 0.15886498987674713, 0.15450486540794373, -0.0018836697563529015, 0.3610999286174774, -0.07123621553182602, 0.3784039616584778, -0.30277517437934875, 0.39879173040390015, 0.4531668722629547, -0.17449559271335602, 0.03558017686009407, 0.392513632774353, 0.15993699431419373, 0.028057118877768517, 0.24975480139255524, -0.02516801841557026, 0.29317203164100647, -0.1370651125907898, -0.04671396315097809, 0.08833492547273636, -0.21389970183372498, 0.14004568755626678, 0.1219649687409401, -0.061327893286943436, 0.24801430106163025, 0.06662135571241379, -0.19219695031642914, -0.16178347170352936, -0.17026077210903168, -0.3849143087863922, 0.15544632077217102, -0.3049384355545044, 0.010202254168689251, -0.0152973011136055, -0.06049953028559685, -0.28838515281677246, -0.03303299844264984, -0.0564207024872303, 0.348576158285141, 0.22307758033275604, -0.0756937637925148, -0.13852225244045258, 0.052001673728227615, -0.0626235082745552, -0.029716856777668, -0.06893831491470337, -0.2812504768371582, 0.3308623135089874, 0.01846860721707344, -0.13972553610801697, -0.000011390025065338705, 0.28166523575782776, 0.439818412065506, 0.413010835647583, 0.077789306640625, -0.11618927866220474, -0.25531041622161865, -0.2562059462070465, 0.02992914244532585, -0.05857370048761368, 0.3085342347621918, 0.24684037268161774, -0.00910872220993042, 0.245225191116333, -0.25479716062545776, -0.03882566839456558, 0.05763046070933342, 0.24072186648845673, -0.03389032930135727, 0.04177122935652733, 0.12771394848823547, -0.06210774555802345, -0.12857842445373535, 0.13815806806087494, -0.04736767336726189, -0.14200884103775024, 0.11437467485666275, 0.07961288094520569, 0.16502255201339722, -0.012722519226372242, 0.17267607152462006, 0.4474620819091797, 0.49103906750679016, -0.12618069350719452, -0.11972735077142715, -0.1999685913324356, -0.24234917759895325, -0.19358833134174347, 0.0856265276670456, 0.5037714838981628, 0.10236317664384842, 0.15092293918132782, 0.32004377245903015, 0.2650831937789917, -0.058342475444078445, 0.18805718421936035, -0.4682683050632477, 0.3152160048484802, -0.18296854197978973, -0.14514529705047607, 0.0883667916059494, -0.07907477021217346, -0.0839308425784111, 0.14246797561645508, -0.09052106738090515, 0.06210887059569359, 0.3726031184196472, 0.2725028693675995, -0.2338762730360031, -0.295706570148468, 0.20854370296001434, -0.11871591955423355, 0.2425730675458908, 0.050030142068862915, 0.6338824033737183, -0.2049301266670227, 0.05476002022624016, -0.12173165380954742, -0.3850898742675781, -0.1594376266002655, 0.28815698623657227, 0.18143683671951294, 0.03818603977560997, 0.07351195067167282, -0.04602963849902153, -0.27334022521972656, 0.0010007929522544146, -0.0026250218506902456, -0.28625595569610596, -0.4313875734806061, 0.23706911504268646, 0.10693354159593582, -0.018927935510873795, -0.03541154786944389, 0.19035351276397705, -0.06319615989923477, 0.25324270129203796, -0.08537109196186066, -0.5478429198265076, 0.3781737685203552, 0.19889666140079498, -0.4593951106071472, 0.03457724675536156, -0.008583217859268188, -0.36035504937171936, 0.14106015861034393, -0.24903249740600586, 0.041960857808589935, -0.03948768228292465, -0.22529111802577972, -0.14214172959327698, 0.2588672637939453, -0.03293614089488983, -0.038152065128088, -0.055309150367975235, 0.3723318576812744, -0.009625437669456005, 0.140206977725029, -0.15128614008426666, 0.022416843101382256 ]
https://github.com/huggingface/datasets/issues/5391
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
Hey @catswithbats! Super sorry for the late reply! This is happening because there is data with label length (504) that exceeds the model's max length (448). There are two options here: 1. Increase the model's `max_length` parameter: ```python model.config.max_length = 512 ``` 2. Filter data with labels longer than max length: https://discuss.huggingface.co/t/open-to-the-community-whisper-fine-tuning-event/26681/21?u=sanchit-gandhi Note that the datasets repo is reserved for issues directly related to the HF datasets library. Issues related to custom fine-tuning implementations are more applicable to the HF Forum: https://discuss.huggingface.co. You're more likely to get a response by posting your issue in the most applicable place and boost the chance of someone sharing a working solution!
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions. Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__. Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet). The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2). # ---> Initial Training Output /usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning warnings.warn( [INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training ***** [INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446 [INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72 [INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16 [INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32 [INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2 [INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000 [INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912 # ---> Error 14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig { "begin_suppress_tokens": [ 220, 50257 ], "bos_token_id": 50257, "decoder_start_token_id": 50258, "eos_token_id": 50257, "max_length": 448, "pad_token_id": 50257, "transformers_version": "4.26.0.dev0", "use_cache": false } Traceback (most recent call last): File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module> main() File "run_speech_recognition_seq2seq_streaming.py", line 578, in main train_result = trainer.train(resume_from_checkpoint=checkpoint) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train return inner_training_loop( File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate metrics = self.evaluate(ignore_keys=ignore_keys_for_eval) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate output = eval_loop( File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step outputs = model(**inputs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward outputs = self.model( File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward decoder_outputs = self.decoder( File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward hidden_states = inputs_embeds + positions RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
108
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
[ -0.3815672993659973, -0.36830028891563416, -0.06952671706676483, 0.29501873254776, -0.020332198590040207, -0.16802042722702026, 0.2704761326313019, 0.4630269706249237, 0.08095726370811462, 0.518137514591217, 0.12811797857284546, -0.025134187191724777, -0.3214200735092163, 0.3049856722354889, -0.021352315321564674, -0.23700901865959167, -0.2424672693014145, 0.19965912401676178, -0.1145160123705864, 0.044584356248378754, -0.06799551844596863, 0.1819007247686386, -0.20985639095306396, 0.004195448476821184, -0.11309680342674255, -0.25317350029945374, 0.17065472900867462, 0.03600224107503891, -0.43506672978401184, 0.1134633868932724, 0.2459365874528885, -0.30552056431770325, -0.054262496531009674, 0.49854692816734314, -0.00010370004019932821, 0.10906177014112473, 0.3868134617805481, -0.035090479999780655, 0.14009979367256165, 0.13503551483154297, -0.16278356313705444, 0.3993336856365204, -0.1313028484582901, -0.027829492464661598, -0.2615402638912201, 0.32979798316955566, -0.25078630447387695, -0.1444840282201767, 0.4534500539302826, 0.20653469860553741, 0.19242949783802032, 0.616921067237854, 0.28131282329559326, -0.2913491129875183, 0.32243862748146057, -0.29574015736579895, 0.07386085391044617, 0.05019337311387062, -0.06374085694551468, 0.013584406115114689, 0.26530617475509644, 0.3753567934036255, -0.05279729887843132, 0.04888005554676056, 0.1460437923669815, -0.19418378174304962, 0.0992111787199974, -0.46973130106925964, -0.0673527717590332, 0.3006734848022461, 0.14658351242542267, -0.10280552506446838, 0.1662750542163849, 0.03494199737906456, -0.08475062996149063, -0.382081001996994, 0.1169566810131073, -0.1545342206954956, 0.018368249759078026, -0.1496199369430542, -0.008419775404036045, 0.1731499880552292, -0.006909142713993788, -0.06584879010915756, 0.06200338155031204, 0.2191954255104065, -0.007460373919457197, 0.14930278062820435, -0.09235435724258423, -0.20773696899414062, 0.07085642963647842, -0.09993564337491989, -0.18198087811470032, 0.14355269074440002, -0.35145652294158936, -0.3689635097980499, -0.033088479191064835, -0.4188986122608185, -0.023302162066102028, -0.3240087330341339, 0.23140457272529602, 0.0835670530796051, 0.07957536727190018, 0.3442259132862091, 0.21800795197486877, 0.3530004322528839, -0.13529987633228302, 0.008163775317370892, 0.0932551920413971, 0.18735715746879578, 0.3950542211532593, 0.19168102741241455, 0.13731642067432404, -0.4292122721672058, -0.4997687339782715, -0.033601634204387665, 0.15362195670604706, 0.060099922120571136, -0.17512096464633942, 0.1725415140390396, -0.3878834843635559, -0.060891974717378616, 0.18777094781398773, -0.09328889101743698, -0.05308598652482033, 0.15856477618217468, 0.25952741503715515, -0.04549529403448105, -0.2143380492925644, -0.07426780462265015, -0.3160817623138428, 0.16425177454948425, 0.03312348946928978, -0.049009956419467926, -0.1300259232521057, 0.3733117878437042, 0.11736976355314255, 0.1039404347538948, 0.2453778237104416, 0.15691447257995605, 0.23547624051570892, -0.020047569647431374, -0.25561368465423584, 0.35200387239456177, 0.237127885222435, -0.1647341400384903, -0.0017547733150422573, -0.32206180691719055, -0.019413623958826065, 0.04994501546025276, -0.3483659327030182, -0.22455856204032898, 0.11763015389442444, 0.29003652930259705, 0.04946460202336311, 0.2727920114994049, -0.04409923776984215, 0.12902379035949707, 0.2987786829471588, 0.10237114131450653, 0.10387424379587173, -0.10370336472988129, -0.24655477702617645, -0.028678763657808304, 0.3562985062599182, 0.09043815732002258, -0.045695118606090546, -0.19530071318149567, 0.2626875340938568, -0.11566826701164246, 0.3358599543571472, 0.29851993918418884, -0.12839818000793457, -0.2948918640613556, -0.03985915333032608, 0.3576926589012146, 0.32105347514152527, -0.09647135436534882, -0.24030373990535736, 0.15748196840286255, -0.634463369846344, -0.07436894625425339, -0.10108733177185059, -0.029480967670679092, 0.004497367888689041, 0.15875399112701416, 0.6804624795913696, -0.07513188570737839, -0.2611349821090698, 0.0843658372759819, -0.3331246078014374, -0.14302586019039154, 0.022814957424998283, 0.07544048130512238, 0.2662670612335205, -0.26691725850105286, -0.28088894486427307, 0.42319455742836, 0.3075709640979767, -0.042418960481882095, 0.22531995177268982, -0.0917934700846672, 0.33446529507637024, -0.2032075822353363, -0.02497537061572075, -0.01887613907456398, 0.15947195887565613, 0.10322953015565872, -0.20934373140335083, 0.27789074182510376, 0.5071497559547424, 0.051362089812755585, -0.08070147037506104, -0.15953010320663452, 0.008008835837244987, -0.16036857664585114, 0.2228856384754181, -0.21984077990055084, -0.03518237918615341, 0.01427940372377634, -0.14714857935905457, -0.06255610287189484, -0.3252619504928589, 0.04759593680500984, -0.37189701199531555, -0.002854461781680584, -0.3319788873195648, -0.2981593608856201, 0.15808363258838654, 0.07343225926160812, 0.21329589188098907, 0.018752440810203552, -0.05593755096197128, 0.3209950625896454, -0.20592162013053894, -0.00026887370040640235, -0.267301082611084, 0.178464874625206, 0.28947052359580994, 0.10044796764850616, 0.09631459414958954, -0.28007909655570984, -0.05189146474003792, 0.09723672270774841, 0.16363780200481415, 0.19791758060455322, 0.20487070083618164, 0.07681029289960861, -0.05527589097619057, -0.2036614716053009, -0.2164539247751236, 0.0014301532646641135, 0.06310314685106277, 0.08412680774927139, 0.2043498158454895, -0.4758621156215668, 0.05489159747958183, -0.062298521399497986, -0.2749333083629608, -0.1634553074836731, 0.3164351284503937, 0.24172955751419067, 0.19211311638355255, 0.07991982251405716, -0.2532881200313568, -0.10056307911872864, -0.222455233335495, 0.04125760495662689, 0.23602895438671112, 0.08253142237663269, 0.08309082686901093, 0.0843772441148758, 0.06569678336381912, -0.3193706274032593, 0.17400561273097992, -0.1246492937207222, 0.17858970165252686, 0.1672154664993286, 0.1600634753704071, -0.08841421455144882, -0.1946612149477005, 0.11455731838941574, -0.024541351944208145, 0.14375269412994385, -0.20104922354221344, -0.2383459210395813, 0.009405496530234814, 0.2939329147338867, -0.1556955873966217, 0.2693755328655243, 0.03263948857784271, 0.0007581901154480875, 0.21381951868534088, 0.10489612817764282, -0.08524977415800095, -0.03648742660880089, 0.459595263004303, 0.22375266253948212, 0.3807487487792969, 0.36392825841903687, -0.021182531490921974, -0.0604504719376564, -0.09732934087514877, 0.22078964114189148, -0.2811708450317383, -0.256523072719574, 0.11622770875692368, 0.05645989626646042, -0.21317028999328613, 0.422189861536026, -0.5583967566490173, 0.0960087701678276, -0.0978003740310669, 0.13595271110534668, 0.07328370958566666, 0.16981740295886993, 0.001584359328262508, -0.4809902012348175, 0.22032013535499573, 0.23823191225528717, -0.31200769543647766, 0.11378077417612076, -0.21945148706436157, -0.22330424189567566, -0.25283658504486084, -0.42076125741004944, -0.1088871881365776, -0.31926652789115906, 0.31333592534065247, -0.1398632526397705, 0.0028454260900616646, -0.03794211521744728, 0.3327491879463196, -0.008694913238286972, -0.12035033106803894, 0.07019703090190887, -0.24347959458827972, -0.5950492024421692, 0.15691262483596802, -0.266937255859375, -0.1438387930393219, -0.10088416934013367, 0.12687750160694122, 0.17669223248958588, 0.025639113038778305, -0.4781096577644348, -0.3240218162536621, -0.19113673269748688, -0.393545538187027, 0.18639880418777466, -0.36276501417160034, 0.2885301411151886, -0.06426902115345001, -0.16941267251968384, -0.02362767979502678, -0.022509219124913216, 0.015984870493412018, 0.039389751851558685, 0.17125651240348816, 0.010920898988842964, 0.4743017852306366, 0.2803056538105011, 0.6388616561889648, 0.15163931250572205, -0.31554940342903137, 0.022273827344179153, -0.05208759009838104, -0.03474247828125954, 0.01599879004061222, 0.09664885699748993, 0.6050480604171753, 0.3087608814239502, -0.13312269747257233, 0.14549681544303894, -0.41826361417770386, -0.08370400965213776, -0.09379807114601135, -0.24734044075012207, 0.09899840503931046, -0.1984792947769165, -0.029919197782874107, 0.2748645842075348, 0.2961392402648926, -0.09016518294811249, 0.08722903579473495, 0.15374283492565155, -0.02631405182182789, 0.1782531440258026, 0.269758015871048, -0.035725682973861694, 0.04083835706114769, -0.09350260347127914, -0.15876023471355438, -0.3716405928134918, 0.17838838696479797, -0.17568109929561615, 0.5431615114212036, -0.29791709780693054, -0.16382281482219696, -0.24497954547405243, -0.11256107687950134, 0.6651808023452759, -0.03674575313925743, 0.0852818638086319, -0.10384342819452286, 0.005540141835808754, -0.19912321865558624, -0.08876797556877136, 0.04452688619494438, 0.01517275720834732, 0.05736619979143143, 0.5739696621894836, -0.18447627127170563, 0.11836498975753784, 0.1746666580438614, -0.23311130702495575, -0.1455351710319519, 0.08122769743204117, -0.0944167748093605, -0.054551441222429276, -0.39022573828697205, 0.15973378717899323, 0.022881867364048958, 0.1989908367395401, -0.031847551465034485, -0.278451144695282, 0.20535671710968018, -0.1157633513212204, 0.114127017557621, 0.1296502947807312, 0.14733192324638367, 0.25802648067474365, 0.23956260085105896, 0.20964258909225464, 0.0758795291185379, 0.2559666037559509, -0.09870606660842896, 0.28076308965682983, -0.08836956322193146, 0.09807553887367249, 0.014898554421961308, 0.12399259209632874, 0.2894485294818878, -0.11132768541574478, 0.2103288471698761, 0.19917745888233185, 0.3173094093799591, -0.14249245822429657, 0.2140423059463501, 0.3454703688621521, -0.041496772319078445, 0.15212219953536987, -0.0370626375079155, 0.22432748973369598, 0.310320645570755, 0.022635871544480324, 0.1482761800289154, -0.4240584373474121, -0.09765496850013733, 0.1597309112548828, 0.040773581713438034, 0.5674748420715332, 0.04324896261096001, -0.16292300820350647, 0.25992029905319214, -0.02756139449775219, 0.0015874210512265563, -0.8175495266914368, 0.12313703447580338, -0.08423343300819397, -0.035997774451971054, 0.10291525721549988, -0.086179219186306, -0.02896723710000515, -0.2085057944059372, -0.10800866037607193, -0.10844829678535461, -0.0035545204300433397, -0.05567222461104393, -0.23919738829135895, 0.06648522615432739, -0.07319674640893936, -0.05148560553789139, 0.326932430267334, 0.2013501524925232, -0.1021282747387886, 0.15945464372634888, 0.023597851395606995, -0.12178575992584229, -0.09995544701814651, -0.3412303924560547, -0.13787619769573212, 0.12730038166046143, -0.43263301253318787, -0.06347370147705078, -0.17587384581565857, -0.4228534996509552, 0.2128000110387802, 0.15322814881801605, 0.045361701399087906, 0.3462149202823639, -0.11126545071601868, 0.4310876131057739, 0.31010642647743225, -0.2594064176082611, -0.1991058886051178, 0.02859392575919628, -0.182795450091362, -0.11747933179140091, -0.17140546441078186, 0.07363452017307281, -0.0692705363035202, 0.17769476771354675, -0.24733412265777588, -0.02153550088405609, 0.34048908948898315, -0.0007350098458118737, 0.07599934935569763, 0.14900155365467072, -0.12731295824050903, -0.16062943637371063, 0.2556776702404022, -0.1273152381181717, -0.18189097940921783, 0.07676424831151962, 0.1443425416946411, -0.26302599906921387, 0.0700252577662468, 0.45598655939102173, 0.22243423759937286, 0.29580608010292053, 0.47804930806159973, 0.20449544489383698, -0.06476670503616333, -0.21971888840198517, -0.13090340793132782, 0.23807086050510406, 0.07378967106342316, 0.21910402178764343, 0.01736564375460148, -0.23199723660945892, 0.0023561175912618637, 0.32810452580451965, 0.04277367144823074, -0.0015449324855580926, 0.07937108725309372, -0.01675974763929844, -0.157670259475708, 0.29037904739379883, -0.06347707659006119, 0.4606720805168152, -0.12559634447097778, 0.632945716381073, -0.19087180495262146, 0.13167960941791534, -0.4169033467769623, -0.02234274335205555, -0.32424411177635193, 0.27770179510116577, 0.1149892657995224, -0.10923860967159271, 0.16543743014335632, 0.011816397309303284, 0.13202376663684845, 0.3283640444278717, -0.24765878915786743, -0.2910962998867035, 0.04155588895082474, 0.040264762938022614, -0.1604008674621582, -0.11476311087608337, 0.14743980765342712, -0.012124946340918541, -0.24216292798519135, 0.15155284106731415, 0.23874719440937042, -0.0931742861866951, -0.0559503436088562, -0.10906697809696198, -0.018037188798189163, 0.041049640625715256, -0.025708651170134544, 0.032491885125637054, -0.1546434909105301, 0.25424686074256897, -0.18382231891155243, -0.22092898190021515, -0.08803001046180725, -0.2152964025735855, 0.09640280902385712, -0.152801513671875, 0.081252820789814, 0.037888359278440475, 0.016038928180933, -0.2341761440038681, -0.3376360237598419, 0.015548150055110455, 0.04415968060493469, -0.0379885658621788, -0.18456010520458221, -0.07333681732416153, -0.14519788324832916, 0.2914803922176361, -0.09800244867801666, 0.15948015451431274, -0.11490581929683685, 0.11181282997131348, 0.08553668856620789, -0.10279510915279388, 0.0887126475572586, 0.2617552578449249, -0.4906477928161621, 0.43955981731414795, -0.048515819013118744, -0.39377284049987793, 0.18171273171901703, 0.1856304556131363, -0.22102876007556915, -0.1471753716468811, -0.019077379256486893, -0.25421348214149475, 0.40656840801239014, 0.23393514752388, -0.05143763870000839, 0.1768503189086914, 0.160964235663414, 0.018134549260139465, 0.14567607641220093, -0.15508219599723816, -0.2589341402053833, 0.16209033131599426, 0.13842155039310455, 0.154586061835289, 0.18334133923053741, 0.49813181161880493, 0.09314708411693573, 0.0733644887804985, -0.07857748866081238, 0.010144779458642006, -0.2332080602645874, 0.014474249444901943, -0.29191169142723083, -0.23175741732120514, -0.35297664999961853, -0.10722838342189789, 0.17381227016448975, 0.38088223338127136, 0.2661000192165375, -0.009764987044036388, -0.23454780876636505, 0.05200381204485893, -0.4145146608352661, 0.4092700183391571, -0.10642499476671219, -0.3516825735569, 0.28643515706062317, 0.5191981792449951, -0.3346220552921295, -0.06928158551454544, 0.2574537992477417, 0.38841333985328674, 0.18816576898097992, -0.3739863634109497, 0.19925574958324432, 0.2690351903438568, -0.20900854468345642, -0.03692800551652908, -0.11590106785297394, 0.46751442551612854, -0.24486181139945984, 0.08945991843938828, 0.24330174922943115, -0.29470720887184143, 0.005472103133797646, -0.1397390365600586, 0.24950842559337616, -0.09275037050247192, 0.10897304117679596, -0.12810923159122467, 0.20428919792175293, -0.4547411799430847, -0.13481231033802032, -0.683925986289978, 0.13400347530841827, 0.1924707442522049, 0.10776868462562561, 0.02750902809202671, -0.1511351615190506, 0.12786759436130524, -0.24714131653308868, 0.48986807465553284, -0.1512744426727295, -0.07431486248970032, -0.15750843286514282, -0.1796269565820694, -0.020462308079004288, 0.3705812394618988, -0.27581220865249634, 0.2322988659143448, -0.2896217107772827, 0.550953209400177, 0.13185198605060577, -0.00657803937792778, 0.002095548203215003, -0.4073680341243744, -0.22126492857933044, -0.002734323963522911, -0.3236980736255646, 0.20727556943893433, -0.20149201154708862, -0.2088150680065155, 0.5976335406303406, -0.05053061619400978, 0.14827515184879303, -0.005312960594892502, 0.1276758462190628, -0.23947258293628693, -0.14992262423038483, 0.2695550322532654, -0.07220199704170227, 0.6122918128967285, -0.011621681042015553, 0.3661263883113861, -0.35009247064590454, -0.13726314902305603, 0.04972565174102783, -0.16653212904930115, -0.30262109637260437, -0.07366260886192322, 0.012101517990231514, 0.3826078176498413, -0.041364602744579315, -0.17664776742458344, -0.3266616761684418, 0.20515021681785583, -0.16751974821090698, -0.14796188473701477, -0.22833439707756042, 0.18359173834323883, -0.07158942520618439, 0.055519409477710724, -0.0004933172021992505, 0.24853560328483582, 0.04746534302830696, -0.11167152225971222, -0.15067526698112488, -0.48651155829429626, 0.6787881255149841, 0.045698560774326324, 0.030988596379756927, -0.20457080006599426, -0.22552646696567535, 0.10774116218090057, 0.0634499117732048, -0.4176275134086609, 0.05014793574810028, 0.1580573171377182, 0.02480456419289112, -0.061214715242385864, 0.010515517555177212, 0.3099912106990814, -0.20454183220863342, -0.034954629838466644, 0.25965315103530884, 0.10811857879161835, -0.20655493438243866, 0.07081262022256851, -0.21371771395206451 ]
https://github.com/huggingface/datasets/issues/5391
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
@sanchit-gandhi Thank you for all your work on this topic. I'm finding that changing the `max_length` value does not make this error go away.
Done in a VM with a GPU (Ubuntu) following the [Whisper Event - PYTHON](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#python-script) instructions. Attempted using [RuntimeError: he size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 - WEB](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010/10 ) - another person experiencing the same issue. But could not resolve the issue with the google/fleurs data. __Not clear what can be modified in the PY code to resolve the input data size mismatch, as the training data is already very small__. Tried posting on Discord, @sanchit-gandhi and @vaibhavs10. Was hoping that the event is over and some input/help is now available. [Hugging Face - whisper-small-amet](https://huggingface.co/drmeeseeks/whisper-small-amet). The paper [Robust Speech Recognition via Large-Scale Weak Supervision](https://arxiv.org/abs/2212.04356) am_et is a low resource language (Table E), with the WER results ranging from 120-229, based on model size. (Whisper small WER=120.2). # ---> Initial Training Output /usr/local/lib/python3.8/dist-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use the PyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning warnings.warn( [INFO|trainer.py:1641] 2022-12-18 05:23:28,799 >> ***** Running training ***** [INFO|trainer.py:1642] 2022-12-18 05:23:28,799 >> Num examples = 446 [INFO|trainer.py:1643] 2022-12-18 05:23:28,799 >> Num Epochs = 72 [INFO|trainer.py:1644] 2022-12-18 05:23:28,799 >> Instantaneous batch size per device = 16 [INFO|trainer.py:1645] 2022-12-18 05:23:28,799 >> Total train batch size (w. parallel, distributed & accumulation) = 32 [INFO|trainer.py:1646] 2022-12-18 05:23:28,799 >> Gradient Accumulation steps = 2 [INFO|trainer.py:1647] 2022-12-18 05:23:28,800 >> Total optimization steps = 1000 [INFO|trainer.py:1648] 2022-12-18 05:23:28,801 >> Number of trainable parameters = 241734912 # ---> Error 14% 9/65 [07:07<48:34, 52.04s/it][INFO|configuration_utils.py:523] 2022-12-18 05:03:07,941 >> Generate config GenerationConfig { "begin_suppress_tokens": [ 220, 50257 ], "bos_token_id": 50257, "decoder_start_token_id": 50258, "eos_token_id": 50257, "max_length": 448, "pad_token_id": 50257, "transformers_version": "4.26.0.dev0", "use_cache": false } Traceback (most recent call last): File "run_speech_recognition_seq2seq_streaming.py", line 629, in <module> main() File "run_speech_recognition_seq2seq_streaming.py", line 578, in main train_result = trainer.train(resume_from_checkpoint=checkpoint) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1534, in train return inner_training_loop( File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 1859, in _inner_training_loop self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2122, in _maybe_log_save_evaluate metrics = self.evaluate(ignore_keys=ignore_keys_for_eval) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 78, in evaluate return super().evaluate(eval_dataset, ignore_keys=ignore_keys, metric_key_prefix=metric_key_prefix) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 2818, in evaluate output = eval_loop( File "/usr/local/lib/python3.8/dist-packages/transformers/trainer.py", line 3000, in evaluation_loop loss, logits, labels = self.prediction_step(model, inputs, prediction_loss_only, ignore_keys=ignore_keys) File "/usr/local/lib/python3.8/dist-packages/transformers/trainer_seq2seq.py", line 213, in prediction_step outputs = model(**inputs) File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1197, in forward outputs = self.model( File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 1066, in forward decoder_outputs = self.decoder( File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1190, in _call_impl return forward_call(*input, **kwargs) File "/usr/local/lib/python3.8/dist-packages/transformers/models/whisper/modeling_whisper.py", line 873, in forward hidden_states = inputs_embeds + positions RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
24
Whisper Event - RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1 100% 1000/1000 [2:52:21<00:00, 10.34s/it]
[ -0.3815672993659973, -0.36830028891563416, -0.06952671706676483, 0.29501873254776, -0.020332198590040207, -0.16802042722702026, 0.2704761326313019, 0.4630269706249237, 0.08095726370811462, 0.518137514591217, 0.12811797857284546, -0.025134187191724777, -0.3214200735092163, 0.3049856722354889, -0.021352315321564674, -0.23700901865959167, -0.2424672693014145, 0.19965912401676178, -0.1145160123705864, 0.044584356248378754, -0.06799551844596863, 0.1819007247686386, -0.20985639095306396, 0.004195448476821184, -0.11309680342674255, -0.25317350029945374, 0.17065472900867462, 0.03600224107503891, -0.43506672978401184, 0.1134633868932724, 0.2459365874528885, -0.30552056431770325, -0.054262496531009674, 0.49854692816734314, -0.00010370004019932821, 0.10906177014112473, 0.3868134617805481, -0.035090479999780655, 0.14009979367256165, 0.13503551483154297, -0.16278356313705444, 0.3993336856365204, -0.1313028484582901, -0.027829492464661598, -0.2615402638912201, 0.32979798316955566, -0.25078630447387695, -0.1444840282201767, 0.4534500539302826, 0.20653469860553741, 0.19242949783802032, 0.616921067237854, 0.28131282329559326, -0.2913491129875183, 0.32243862748146057, -0.29574015736579895, 0.07386085391044617, 0.05019337311387062, -0.06374085694551468, 0.013584406115114689, 0.26530617475509644, 0.3753567934036255, -0.05279729887843132, 0.04888005554676056, 0.1460437923669815, -0.19418378174304962, 0.0992111787199974, -0.46973130106925964, -0.0673527717590332, 0.3006734848022461, 0.14658351242542267, -0.10280552506446838, 0.1662750542163849, 0.03494199737906456, -0.08475062996149063, -0.382081001996994, 0.1169566810131073, -0.1545342206954956, 0.018368249759078026, -0.1496199369430542, -0.008419775404036045, 0.1731499880552292, -0.006909142713993788, -0.06584879010915756, 0.06200338155031204, 0.2191954255104065, -0.007460373919457197, 0.14930278062820435, -0.09235435724258423, -0.20773696899414062, 0.07085642963647842, -0.09993564337491989, -0.18198087811470032, 0.14355269074440002, -0.35145652294158936, -0.3689635097980499, -0.033088479191064835, -0.4188986122608185, -0.023302162066102028, -0.3240087330341339, 0.23140457272529602, 0.0835670530796051, 0.07957536727190018, 0.3442259132862091, 0.21800795197486877, 0.3530004322528839, -0.13529987633228302, 0.008163775317370892, 0.0932551920413971, 0.18735715746879578, 0.3950542211532593, 0.19168102741241455, 0.13731642067432404, -0.4292122721672058, -0.4997687339782715, -0.033601634204387665, 0.15362195670604706, 0.060099922120571136, -0.17512096464633942, 0.1725415140390396, -0.3878834843635559, -0.060891974717378616, 0.18777094781398773, -0.09328889101743698, -0.05308598652482033, 0.15856477618217468, 0.25952741503715515, -0.04549529403448105, -0.2143380492925644, -0.07426780462265015, -0.3160817623138428, 0.16425177454948425, 0.03312348946928978, -0.049009956419467926, -0.1300259232521057, 0.3733117878437042, 0.11736976355314255, 0.1039404347538948, 0.2453778237104416, 0.15691447257995605, 0.23547624051570892, -0.020047569647431374, -0.25561368465423584, 0.35200387239456177, 0.237127885222435, -0.1647341400384903, -0.0017547733150422573, -0.32206180691719055, -0.019413623958826065, 0.04994501546025276, -0.3483659327030182, -0.22455856204032898, 0.11763015389442444, 0.29003652930259705, 0.04946460202336311, 0.2727920114994049, -0.04409923776984215, 0.12902379035949707, 0.2987786829471588, 0.10237114131450653, 0.10387424379587173, -0.10370336472988129, -0.24655477702617645, -0.028678763657808304, 0.3562985062599182, 0.09043815732002258, -0.045695118606090546, -0.19530071318149567, 0.2626875340938568, -0.11566826701164246, 0.3358599543571472, 0.29851993918418884, -0.12839818000793457, -0.2948918640613556, -0.03985915333032608, 0.3576926589012146, 0.32105347514152527, -0.09647135436534882, -0.24030373990535736, 0.15748196840286255, -0.634463369846344, -0.07436894625425339, -0.10108733177185059, -0.029480967670679092, 0.004497367888689041, 0.15875399112701416, 0.6804624795913696, -0.07513188570737839, -0.2611349821090698, 0.0843658372759819, -0.3331246078014374, -0.14302586019039154, 0.022814957424998283, 0.07544048130512238, 0.2662670612335205, -0.26691725850105286, -0.28088894486427307, 0.42319455742836, 0.3075709640979767, -0.042418960481882095, 0.22531995177268982, -0.0917934700846672, 0.33446529507637024, -0.2032075822353363, -0.02497537061572075, -0.01887613907456398, 0.15947195887565613, 0.10322953015565872, -0.20934373140335083, 0.27789074182510376, 0.5071497559547424, 0.051362089812755585, -0.08070147037506104, -0.15953010320663452, 0.008008835837244987, -0.16036857664585114, 0.2228856384754181, -0.21984077990055084, -0.03518237918615341, 0.01427940372377634, -0.14714857935905457, -0.06255610287189484, -0.3252619504928589, 0.04759593680500984, -0.37189701199531555, -0.002854461781680584, -0.3319788873195648, -0.2981593608856201, 0.15808363258838654, 0.07343225926160812, 0.21329589188098907, 0.018752440810203552, -0.05593755096197128, 0.3209950625896454, -0.20592162013053894, -0.00026887370040640235, -0.267301082611084, 0.178464874625206, 0.28947052359580994, 0.10044796764850616, 0.09631459414958954, -0.28007909655570984, -0.05189146474003792, 0.09723672270774841, 0.16363780200481415, 0.19791758060455322, 0.20487070083618164, 0.07681029289960861, -0.05527589097619057, -0.2036614716053009, -0.2164539247751236, 0.0014301532646641135, 0.06310314685106277, 0.08412680774927139, 0.2043498158454895, -0.4758621156215668, 0.05489159747958183, -0.062298521399497986, -0.2749333083629608, -0.1634553074836731, 0.3164351284503937, 0.24172955751419067, 0.19211311638355255, 0.07991982251405716, -0.2532881200313568, -0.10056307911872864, -0.222455233335495, 0.04125760495662689, 0.23602895438671112, 0.08253142237663269, 0.08309082686901093, 0.0843772441148758, 0.06569678336381912, -0.3193706274032593, 0.17400561273097992, -0.1246492937207222, 0.17858970165252686, 0.1672154664993286, 0.1600634753704071, -0.08841421455144882, -0.1946612149477005, 0.11455731838941574, -0.024541351944208145, 0.14375269412994385, -0.20104922354221344, -0.2383459210395813, 0.009405496530234814, 0.2939329147338867, -0.1556955873966217, 0.2693755328655243, 0.03263948857784271, 0.0007581901154480875, 0.21381951868534088, 0.10489612817764282, -0.08524977415800095, -0.03648742660880089, 0.459595263004303, 0.22375266253948212, 0.3807487487792969, 0.36392825841903687, -0.021182531490921974, -0.0604504719376564, -0.09732934087514877, 0.22078964114189148, -0.2811708450317383, -0.256523072719574, 0.11622770875692368, 0.05645989626646042, -0.21317028999328613, 0.422189861536026, -0.5583967566490173, 0.0960087701678276, -0.0978003740310669, 0.13595271110534668, 0.07328370958566666, 0.16981740295886993, 0.001584359328262508, -0.4809902012348175, 0.22032013535499573, 0.23823191225528717, -0.31200769543647766, 0.11378077417612076, -0.21945148706436157, -0.22330424189567566, -0.25283658504486084, -0.42076125741004944, -0.1088871881365776, -0.31926652789115906, 0.31333592534065247, -0.1398632526397705, 0.0028454260900616646, -0.03794211521744728, 0.3327491879463196, -0.008694913238286972, -0.12035033106803894, 0.07019703090190887, -0.24347959458827972, -0.5950492024421692, 0.15691262483596802, -0.266937255859375, -0.1438387930393219, -0.10088416934013367, 0.12687750160694122, 0.17669223248958588, 0.025639113038778305, -0.4781096577644348, -0.3240218162536621, -0.19113673269748688, -0.393545538187027, 0.18639880418777466, -0.36276501417160034, 0.2885301411151886, -0.06426902115345001, -0.16941267251968384, -0.02362767979502678, -0.022509219124913216, 0.015984870493412018, 0.039389751851558685, 0.17125651240348816, 0.010920898988842964, 0.4743017852306366, 0.2803056538105011, 0.6388616561889648, 0.15163931250572205, -0.31554940342903137, 0.022273827344179153, -0.05208759009838104, -0.03474247828125954, 0.01599879004061222, 0.09664885699748993, 0.6050480604171753, 0.3087608814239502, -0.13312269747257233, 0.14549681544303894, -0.41826361417770386, -0.08370400965213776, -0.09379807114601135, -0.24734044075012207, 0.09899840503931046, -0.1984792947769165, -0.029919197782874107, 0.2748645842075348, 0.2961392402648926, -0.09016518294811249, 0.08722903579473495, 0.15374283492565155, -0.02631405182182789, 0.1782531440258026, 0.269758015871048, -0.035725682973861694, 0.04083835706114769, -0.09350260347127914, -0.15876023471355438, -0.3716405928134918, 0.17838838696479797, -0.17568109929561615, 0.5431615114212036, -0.29791709780693054, -0.16382281482219696, -0.24497954547405243, -0.11256107687950134, 0.6651808023452759, -0.03674575313925743, 0.0852818638086319, -0.10384342819452286, 0.005540141835808754, -0.19912321865558624, -0.08876797556877136, 0.04452688619494438, 0.01517275720834732, 0.05736619979143143, 0.5739696621894836, -0.18447627127170563, 0.11836498975753784, 0.1746666580438614, -0.23311130702495575, -0.1455351710319519, 0.08122769743204117, -0.0944167748093605, -0.054551441222429276, -0.39022573828697205, 0.15973378717899323, 0.022881867364048958, 0.1989908367395401, -0.031847551465034485, -0.278451144695282, 0.20535671710968018, -0.1157633513212204, 0.114127017557621, 0.1296502947807312, 0.14733192324638367, 0.25802648067474365, 0.23956260085105896, 0.20964258909225464, 0.0758795291185379, 0.2559666037559509, -0.09870606660842896, 0.28076308965682983, -0.08836956322193146, 0.09807553887367249, 0.014898554421961308, 0.12399259209632874, 0.2894485294818878, -0.11132768541574478, 0.2103288471698761, 0.19917745888233185, 0.3173094093799591, -0.14249245822429657, 0.2140423059463501, 0.3454703688621521, -0.041496772319078445, 0.15212219953536987, -0.0370626375079155, 0.22432748973369598, 0.310320645570755, 0.022635871544480324, 0.1482761800289154, -0.4240584373474121, -0.09765496850013733, 0.1597309112548828, 0.040773581713438034, 0.5674748420715332, 0.04324896261096001, -0.16292300820350647, 0.25992029905319214, -0.02756139449775219, 0.0015874210512265563, -0.8175495266914368, 0.12313703447580338, -0.08423343300819397, -0.035997774451971054, 0.10291525721549988, -0.086179219186306, -0.02896723710000515, -0.2085057944059372, -0.10800866037607193, -0.10844829678535461, -0.0035545204300433397, -0.05567222461104393, -0.23919738829135895, 0.06648522615432739, -0.07319674640893936, -0.05148560553789139, 0.326932430267334, 0.2013501524925232, -0.1021282747387886, 0.15945464372634888, 0.023597851395606995, -0.12178575992584229, -0.09995544701814651, -0.3412303924560547, -0.13787619769573212, 0.12730038166046143, -0.43263301253318787, -0.06347370147705078, -0.17587384581565857, -0.4228534996509552, 0.2128000110387802, 0.15322814881801605, 0.045361701399087906, 0.3462149202823639, -0.11126545071601868, 0.4310876131057739, 0.31010642647743225, -0.2594064176082611, -0.1991058886051178, 0.02859392575919628, -0.182795450091362, -0.11747933179140091, -0.17140546441078186, 0.07363452017307281, -0.0692705363035202, 0.17769476771354675, -0.24733412265777588, -0.02153550088405609, 0.34048908948898315, -0.0007350098458118737, 0.07599934935569763, 0.14900155365467072, -0.12731295824050903, -0.16062943637371063, 0.2556776702404022, -0.1273152381181717, -0.18189097940921783, 0.07676424831151962, 0.1443425416946411, -0.26302599906921387, 0.0700252577662468, 0.45598655939102173, 0.22243423759937286, 0.29580608010292053, 0.47804930806159973, 0.20449544489383698, -0.06476670503616333, -0.21971888840198517, -0.13090340793132782, 0.23807086050510406, 0.07378967106342316, 0.21910402178764343, 0.01736564375460148, -0.23199723660945892, 0.0023561175912618637, 0.32810452580451965, 0.04277367144823074, -0.0015449324855580926, 0.07937108725309372, -0.01675974763929844, -0.157670259475708, 0.29037904739379883, -0.06347707659006119, 0.4606720805168152, -0.12559634447097778, 0.632945716381073, -0.19087180495262146, 0.13167960941791534, -0.4169033467769623, -0.02234274335205555, -0.32424411177635193, 0.27770179510116577, 0.1149892657995224, -0.10923860967159271, 0.16543743014335632, 0.011816397309303284, 0.13202376663684845, 0.3283640444278717, -0.24765878915786743, -0.2910962998867035, 0.04155588895082474, 0.040264762938022614, -0.1604008674621582, -0.11476311087608337, 0.14743980765342712, -0.012124946340918541, -0.24216292798519135, 0.15155284106731415, 0.23874719440937042, -0.0931742861866951, -0.0559503436088562, -0.10906697809696198, -0.018037188798189163, 0.041049640625715256, -0.025708651170134544, 0.032491885125637054, -0.1546434909105301, 0.25424686074256897, -0.18382231891155243, -0.22092898190021515, -0.08803001046180725, -0.2152964025735855, 0.09640280902385712, -0.152801513671875, 0.081252820789814, 0.037888359278440475, 0.016038928180933, -0.2341761440038681, -0.3376360237598419, 0.015548150055110455, 0.04415968060493469, -0.0379885658621788, -0.18456010520458221, -0.07333681732416153, -0.14519788324832916, 0.2914803922176361, -0.09800244867801666, 0.15948015451431274, -0.11490581929683685, 0.11181282997131348, 0.08553668856620789, -0.10279510915279388, 0.0887126475572586, 0.2617552578449249, -0.4906477928161621, 0.43955981731414795, -0.048515819013118744, -0.39377284049987793, 0.18171273171901703, 0.1856304556131363, -0.22102876007556915, -0.1471753716468811, -0.019077379256486893, -0.25421348214149475, 0.40656840801239014, 0.23393514752388, -0.05143763870000839, 0.1768503189086914, 0.160964235663414, 0.018134549260139465, 0.14567607641220093, -0.15508219599723816, -0.2589341402053833, 0.16209033131599426, 0.13842155039310455, 0.154586061835289, 0.18334133923053741, 0.49813181161880493, 0.09314708411693573, 0.0733644887804985, -0.07857748866081238, 0.010144779458642006, -0.2332080602645874, 0.014474249444901943, -0.29191169142723083, -0.23175741732120514, -0.35297664999961853, -0.10722838342189789, 0.17381227016448975, 0.38088223338127136, 0.2661000192165375, -0.009764987044036388, -0.23454780876636505, 0.05200381204485893, -0.4145146608352661, 0.4092700183391571, -0.10642499476671219, -0.3516825735569, 0.28643515706062317, 0.5191981792449951, -0.3346220552921295, -0.06928158551454544, 0.2574537992477417, 0.38841333985328674, 0.18816576898097992, -0.3739863634109497, 0.19925574958324432, 0.2690351903438568, -0.20900854468345642, -0.03692800551652908, -0.11590106785297394, 0.46751442551612854, -0.24486181139945984, 0.08945991843938828, 0.24330174922943115, -0.29470720887184143, 0.005472103133797646, -0.1397390365600586, 0.24950842559337616, -0.09275037050247192, 0.10897304117679596, -0.12810923159122467, 0.20428919792175293, -0.4547411799430847, -0.13481231033802032, -0.683925986289978, 0.13400347530841827, 0.1924707442522049, 0.10776868462562561, 0.02750902809202671, -0.1511351615190506, 0.12786759436130524, -0.24714131653308868, 0.48986807465553284, -0.1512744426727295, -0.07431486248970032, -0.15750843286514282, -0.1796269565820694, -0.020462308079004288, 0.3705812394618988, -0.27581220865249634, 0.2322988659143448, -0.2896217107772827, 0.550953209400177, 0.13185198605060577, -0.00657803937792778, 0.002095548203215003, -0.4073680341243744, -0.22126492857933044, -0.002734323963522911, -0.3236980736255646, 0.20727556943893433, -0.20149201154708862, -0.2088150680065155, 0.5976335406303406, -0.05053061619400978, 0.14827515184879303, -0.005312960594892502, 0.1276758462190628, -0.23947258293628693, -0.14992262423038483, 0.2695550322532654, -0.07220199704170227, 0.6122918128967285, -0.011621681042015553, 0.3661263883113861, -0.35009247064590454, -0.13726314902305603, 0.04972565174102783, -0.16653212904930115, -0.30262109637260437, -0.07366260886192322, 0.012101517990231514, 0.3826078176498413, -0.041364602744579315, -0.17664776742458344, -0.3266616761684418, 0.20515021681785583, -0.16751974821090698, -0.14796188473701477, -0.22833439707756042, 0.18359173834323883, -0.07158942520618439, 0.055519409477710724, -0.0004933172021992505, 0.24853560328483582, 0.04746534302830696, -0.11167152225971222, -0.15067526698112488, -0.48651155829429626, 0.6787881255149841, 0.045698560774326324, 0.030988596379756927, -0.20457080006599426, -0.22552646696567535, 0.10774116218090057, 0.0634499117732048, -0.4176275134086609, 0.05014793574810028, 0.1580573171377182, 0.02480456419289112, -0.061214715242385864, 0.010515517555177212, 0.3099912106990814, -0.20454183220863342, -0.034954629838466644, 0.25965315103530884, 0.10811857879161835, -0.20655493438243866, 0.07081262022256851, -0.21371771395206451 ]
https://github.com/huggingface/datasets/issues/5390
Error when pushing to the CI hub
Hmmm, git bisect tells me that the behavior is the same since https://github.com/huggingface/datasets/commit/67e65c90e9490810b89ee140da11fdd13c356c9c (3 Oct), i.e. https://github.com/huggingface/datasets/pull/4926
### Describe the bug Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co). The call to `dataset.push_to_hub(` fails: ``` Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it] Traceback (most recent call last): File "reproduce_hubci.py", line 16, in <module> dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True) File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub HfApi(endpoint=config.HF_ENDPOINT).upload_file( File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file raise err File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file r.raise_for_status() File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md ``` ### Steps to reproduce the bug ```python # reproduce.py from datasets import Dataset import time USER = "__DUMMY_DATASETS_SERVER_USER__" USER_TOKEN = "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" dataset = Dataset.from_dict({"a": [1, 2, 3]}) repo_id = f"{USER}/bug-{int(time.time() * 10e3)}" dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True) ``` ```bash $ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py ``` ### Expected behavior No error and the dataset should be uploaded to the Hub with the README file (which generates the error). ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35 - Python version: 3.9.15 - PyArrow version: 7.0.0 - Pandas version: 1.5.2
17
Error when pushing to the CI hub
[ -0.23129931092262268, -0.6825999021530151, -0.11836319416761398, 0.007597961463034153, 0.094972163438797, 0.037151072174310684, 0.20016303658485413, 0.04725421592593193, 0.08518174290657043, 0.3130382001399994, 0.0692608430981636, -0.06999601423740387, 0.0659545511007309, 0.5104987025260925, -0.23519203066825867, 0.34630173444747925, 0.07537112385034561, 0.009887892752885818, 0.2453576922416687, -0.031386058777570724, -0.15422751009464264, 0.1983562558889389, -0.03721185401082039, 0.31811222434043884, -0.4183986186981201, -0.32260647416114807, 0.16140341758728027, 0.38524553179740906, -0.19003142416477203, 0.07618413865566254, 0.2175976186990738, 0.08456022292375565, -0.11584348976612091, 0.3757898807525635, -0.00010365486377850175, -0.009299672208726406, 0.45242372155189514, 0.011179709807038307, -0.3030925393104553, -0.04651954770088196, -0.09220264852046967, 0.22936412692070007, -0.14083653688430786, -0.12430586665868759, -0.08233258128166199, 0.45148158073425293, 0.00040630169678479433, 0.26276102662086487, 0.13312533497810364, 0.21777977049350739, 0.3553696870803833, 0.16390512883663177, 0.0458185151219368, -0.3477303087711334, 0.13180990517139435, 0.17069536447525024, -0.10677231848239899, -0.01734292507171631, 0.1659357249736786, 0.35465148091316223, 0.18386735022068024, 0.03481818735599518, -0.016590965911746025, -0.26994797587394714, 0.0623362734913826, -0.19460567831993103, 0.18905635178089142, -0.08213917165994644, 0.2824534773826599, -0.47643837332725525, 0.035510867834091187, -0.0014832968590781093, 0.04557669535279274, 0.26762855052948, -0.08578585833311081, -0.027549350634217262, 0.3501667380332947, -0.17416022717952728, -0.1435914933681488, -0.08922049403190613, -0.185798779129982, -0.5127294063568115, -0.06799373030662537, -0.09718140214681625, 0.06121392175555229, 0.12014083564281464, -0.10174163430929184, 0.021977677941322327, 0.03978649526834488, -0.037825487554073334, 0.3784659206867218, 0.0630406066775322, -0.14309479296207428, -0.2670988142490387, 0.1699107587337494, -0.11753992736339569, 0.21638192236423492, 0.49260401725769043, -0.24160678684711456, 0.05809101089835167, 0.05897745490074158, -0.013637438416481018, 0.1487155705690384, 0.09976674616336823, 0.2777247726917267, 0.2124026119709015, 0.0029904390685260296, 0.22359643876552582, 0.19761160016059875, 0.28030481934547424, 0.04698622226715088, 0.019773315638303757, -0.16724812984466553, -0.15388274192810059, -0.05211113393306732, 0.18815569579601288, 0.1276545524597168, -0.05668559670448303, -0.33928465843200684, 0.07111012935638428, 0.31937894225120544, 0.4016210436820984, 0.2001390904188156, 0.04342588409781456, 0.23822352290153503, 0.03967584669589996, 0.11988040059804916, 0.17878961563110352, -0.2944917678833008, 0.2410871386528015, -0.2772226631641388, 0.1053779348731041, -0.05922577157616615, -0.18568256497383118, 0.10581240057945251, -0.3567032217979431, 0.049019526690244675, -0.033651843667030334, 0.41015464067459106, -0.4174599349498749, -0.3358272612094879, 0.2729730010032654, 0.0726296603679657, 0.25455060601234436, 0.24514584243297577, 0.05284756422042847, 0.26565495133399963, -0.3263449966907501, -0.06610607355833054, -0.07545609772205353, -0.6072421073913574, -0.38345199823379517, -0.06778869777917862, 0.31808921694755554, 0.05398700386285782, 0.20217670500278473, -0.12385112792253494, -0.3699592053890228, -0.15526920557022095, 0.001712785684503615, 0.020328791812062263, 0.10077374428510666, 0.12541118264198303, -0.09435255825519562, -0.11913655698299408, 0.05311158671975136, 0.15512098371982574, 0.02222636342048645, 0.06158937141299248, 0.03267441317439079, -0.19547326862812042, 0.03880114480853081, -0.16641195118427277, 0.17856764793395996, -0.1786036491394043, 0.18294629454612732, 0.1557815819978714, -0.8598304986953735, -0.18651069700717926, -0.037050649523735046, -0.44655534625053406, -0.45633402466773987, -0.1978798657655716, -0.010481903329491615, 0.3440324366092682, 0.060867734253406525, 0.3313259780406952, 0.026988428086042404, -0.15609467029571533, 0.17587634921073914, -0.28129681944847107, -0.06091491878032684, -0.43237102031707764, -0.012784072197973728, 0.1947607398033142, 0.2629120945930481, 0.3407822549343109, 0.28040602803230286, 0.06458733975887299, 0.10327322781085968, 0.15226195752620697, -0.016087468713521957, 0.34364211559295654, -0.29818254709243774, 0.0006904293550178409, 0.1256972849369049, -0.17877139151096344, -0.12821117043495178, 0.019077394157648087, 0.2235732227563858, 0.2614145874977112, 0.18046945333480835, -0.5406469106674194, 0.1250990480184555, -0.13603857159614563, 0.42141956090927124, 0.31131288409233093, -0.06839148700237274, -0.23709340393543243, -0.1492416262626648, 0.15280379354953766, 0.1643882542848587, -0.263231486082077, 0.07835067063570023, 0.04282049462199211, 0.21279147267341614, -0.397257000207901, -0.3579615652561188, 0.09841042757034302, -0.05176137387752533, 0.3885658383369446, -0.1807667762041092, -0.24218745529651642, 0.1498410403728485, -0.014690779149532318, 0.2510357201099396, 0.04033735767006874, 0.0415588840842247, 0.14393754303455353, -0.05772341042757034, 0.004095978569239378, 0.15852105617523193, 0.05345616489648819, -0.03389408439397812, 0.06593199074268341, 0.16275475919246674, -0.3702569007873535, -0.096772700548172, -0.09543997794389725, 0.30956369638442993, 0.05286644771695137, 0.028482375666499138, -0.03667456656694412, -0.20503775775432587, 0.19263547658920288, 0.19164356589317322, -0.33929017186164856, -0.28802669048309326, 0.34106165170669556, -0.026230616495013237, 0.1680329293012619, 0.3047122359275818, -0.010978690348565578, -0.07923552393913269, 0.05180252343416214, 0.09343670308589935, 0.22195996344089508, 0.16442418098449707, 0.048560965806245804, 0.001613991684280336, -0.3814975619316101, 0.11816426366567612, -0.03761911019682884, -0.22204241156578064, 0.24719618260860443, 0.02272496372461319, 0.20523297786712646, 0.05318969115614891, -0.030912645161151886, -0.019425708800554276, -0.18009361624717712, 0.04190386086702347, 0.1758095920085907, 0.22859618067741394, -0.22684116661548615, -0.19870637357234955, 0.06931395828723907, 0.03213676065206528, 0.3475950360298157, -0.15805597603321075, -0.03317524492740631, -0.2545575201511383, 0.17668747901916504, 0.46520692110061646, -0.1799488067626953, 0.13179923593997955, 0.07457374036312103, 0.3401105999946594, 0.06261477619409561, 0.1258326768875122, 0.004466724582016468, 0.062161367386579514, -0.22640812397003174, 0.11803027987480164, -0.013596253469586372, 0.038130782544612885, 0.12156753987073898, -0.14579208195209503, 0.4420354664325714, -0.1379963904619217, 0.026640770956873894, 0.23707623779773712, 0.06372421234846115, 0.07474949210882187, -0.008312650956213474, 0.1795205920934677, -0.07674704492092133, -0.5214834213256836, 0.3113870620727539, -0.3275243639945984, -0.20401383936405182, -0.044924378395080566, -0.05015969276428223, -0.40758442878723145, -0.2261975109577179, -0.03924340382218361, 0.09757661074399948, -0.3557874262332916, -0.2182057797908783, -0.002334112301468849, 0.0376061275601387, 0.38659802079200745, 0.04535629600286484, -0.1960180401802063, 0.3513050675392151, -0.359576553106308, -0.20167167484760284, -0.47303685545921326, 0.03133336827158928, -0.2511974573135376, -0.20030637085437775, 0.38167330622673035, 0.24737712740898132, 0.14170785248279572, 0.15435075759887695, -0.08409453928470612, -0.17924514412879944, 0.1900167018175125, 0.15289166569709778, 0.1559981256723404, -0.12627440690994263, 0.3862646818161011, -0.0012954204576089978, -0.1939552128314972, -0.043554797768592834, -0.47763746976852417, 0.1825430542230606, 0.5931242108345032, -0.06462197005748749, -0.2219509482383728, 0.0579664409160614, -0.13297751545906067, 0.22214342653751373, 0.01741407997906208, -0.12551967799663544, 0.37890300154685974, 0.05121218413114548, 0.22793002426624298, -0.0714796856045723, -0.29965049028396606, 0.29177847504615784, 0.11281692981719971, -0.29665786027908325, 0.3792029619216919, 0.11595455557107925, -0.20134122669696808, -0.18050186336040497, -0.351473867893219, -0.14716778695583344, -0.3336242735385895, -0.2677263021469116, -0.08894676715135574, 0.012295587919652462, 0.07699193805456161, -0.00622983556240797, -0.3891071677207947, -0.29237520694732666, 0.19294270873069763, 0.15621106326580048, -0.024656305089592934, -0.05667881295084953, -0.04309166967868805, -0.32640236616134644, -0.08496218174695969, 0.12205785512924194, 0.033492155373096466, 0.14312894642353058, -0.39111459255218506, -0.09547723829746246, 0.1282912939786911, -0.08005379140377045, 0.24383333325386047, -0.49880722165107727, -0.05337970703840256, -0.018561137840151787, 0.11019500344991684, -0.14833369851112366, -0.26768696308135986, 0.1002035140991211, 0.6284502744674683, 0.09915997087955475, 0.5256101489067078, 0.1396033763885498, 0.042234405875205994, 0.04630030319094658, -0.3702124357223511, -0.21545010805130005, -0.03398415073752403, -0.22355666756629944, -0.35170257091522217, -0.3714793622493744, 0.3789774477481842, 0.0899384543299675, 0.20258021354675293, -0.0719081237912178, -0.08987291157245636, 0.2708698511123657, 0.09687068313360214, -0.19243597984313965, -0.024212747812271118, 0.16866421699523926, 0.23645178973674774, -0.1712522655725479, -0.06851319968700409, 0.4547005891799927, -0.0018989037489518523, 0.11554005742073059, 0.5085263252258301, 0.15233562886714935, 0.298801988363266, -0.17107287049293518, -0.22420166432857513, 0.4405301511287689, 0.15095162391662598, 0.13095127046108246, -0.09911971539258957, 0.18001408874988556, -0.1169140487909317, -0.041338738054037094, 0.016220785677433014, -0.16320174932479858, -0.1264248490333557, 0.6962247490882874, -0.2037447988986969, -0.2655591666698456, 0.030628332868218422, 0.31714361906051636, 0.40866154432296753, -0.2196120023727417, -0.00201822048984468, 0.06710895895957947, 0.9243988394737244, 0.036023352295160294, -0.1558907926082611, -0.018021583557128906, 0.04276658594608307, 0.09044487029314041, -0.1431252658367157, 0.0610349178314209, -0.08595879375934601, -0.22460904717445374, -0.015305348671972752, 0.06868456304073334, -0.0602789930999279, -0.15312981605529785, -0.4415784180164337, 0.07256288826465607, -0.4273080825805664, 0.5790203213691711, -0.14024430513381958, -0.04815306141972542, -0.2575967311859131, -0.12589368224143982, 0.17070372402668, 0.3056122958660126, 0.07487542182207108, 0.3811475336551666, -0.14232130348682404, 0.03545501083135605, -0.19164051115512848, -0.2815522849559784, -0.3739066421985626, 0.18037083745002747, 0.08412943035364151, 0.032005488872528076, -0.32519903779029846, -0.009718848392367363, 0.061533790081739426, -0.33261311054229736, 0.695674479007721, 0.08460202813148499, -0.2376965582370758, 0.08239232003688812, 0.10685716569423676, -0.20240753889083862, -0.3912065327167511, -0.119608074426651, 0.05922093242406845, -0.17269423604011536, -0.31432560086250305, 0.0993761196732521, 0.09263019263744354, -0.3746122121810913, -0.10177560895681381, 0.11827773600816727, 0.1095486655831337, -0.2564367651939392, 0.12970496714115143, -0.17379459738731384, -0.05505558103322983, -0.17199839651584625, 0.24171045422554016, -0.32984134554862976, 0.016370542347431183, 0.07417036592960358, 0.2664894163608551, -0.053485769778490067, 0.070326067507267, 0.013393963687121868, 0.19479307532310486, -0.4775261878967285, 0.190861776471138, -0.25226643681526184, -0.2244035303592682, -0.3352345824241638, -0.08473435044288635, 0.04615432396531105, -0.08752568811178207, 0.12205762416124344, -0.15603840351104736, -0.3124091625213623, 0.03154800087213516, 0.563571572303772, 0.17251770198345184, 0.5177541971206665, -0.13138315081596375, 0.010028460994362831, -0.22720587253570557, 0.09713903069496155, -0.12607458233833313, 0.1060323640704155, -0.21063143014907837, 0.013687632977962494, 0.5002200603485107, -0.018234943971037865, -0.43445885181427, 0.009296145290136337, -0.45678651332855225, 0.02166346274316311, -0.11268432438373566, -0.22066976130008698, -0.12806294858455658, -0.18004344403743744, 0.20847007632255554, -0.08130090683698654, -0.10779287666082382, -0.3058469593524933, 0.004484063480049372, 0.06606413424015045, 0.15841667354106903, -0.09761983901262283, 0.06062690541148186, 0.05315762013196945, -0.11509378254413605, -0.045062873512506485, 0.04832637310028076, 0.11578073352575302, 0.06905492395162582, -0.40232959389686584, 0.4526742398738861, 0.19912344217300415, -0.0961039587855339, 0.27353549003601074, 0.3716146647930145, 0.49298226833343506, -0.25972050428390503, 0.010466059669852257, -0.09970013052225113, -0.13193246722221375, -0.10907571017742157, 0.4192759692668915, 0.3782222867012024, 0.33638495206832886, -0.12658639252185822, -0.21677884459495544, -0.02188972570002079, 0.10629989951848984, 0.0681171640753746, -0.09417929500341415, -0.043294236063957214, -0.1705823838710785, 0.10155811905860901, 0.30871111154556274, 0.13205891847610474, -0.12341097742319107, 0.22961050271987915, -0.1267722100019455, -0.11050379276275635, 0.05913124233484268, 0.19906431436538696, -0.29430341720581055, 0.25673770904541016, 0.12083751708269119, 0.3926355242729187, -0.30729949474334717, 0.14395257830619812, -0.3171660006046295, -0.15691423416137695, 0.06054249405860901, 0.023728400468826294, -0.27972134947776794, -0.07382839918136597, 0.09366132318973541, 0.005553166847676039, 0.11520782858133316, 0.3612458109855652, 0.0404781736433506, 0.11953332275152206, -0.2546592056751251, 0.0019466831581667066, -0.24824568629264832, 0.05502307415008545, -0.049398500472307205, 0.34027746319770813, 0.02359588071703911, -0.25227802991867065, -0.1560652107000351, -0.6935367584228516, -0.1338885873556137, -0.43453726172447205, 0.21211256086826324, -0.3371434807777405, -0.1295638233423233, -0.2694137990474701, 0.050935208797454834, 0.08014707267284393, 0.2649593651294708, 0.16379040479660034, -0.04570269212126732, -0.07438915967941284, 0.22221630811691284, -0.14153680205345154, 0.24779632687568665, -0.007318638265132904, -0.1964050531387329, 0.3813342750072479, -0.131146639585495, -0.016012191772460938, -0.032875195145606995, 0.26941367983818054, 0.3044668436050415, 0.08348724991083145, 0.09165404736995697, 0.09140843152999878, 0.25039973855018616, -0.11264678835868835, 0.12349626421928406, -0.04946691170334816, 0.2523144781589508, 0.21108777821063995, 0.03241568058729172, 0.34208381175994873, -0.17492304742336273, 0.00681926729157567, 0.010852314531803131, -0.04851778224110603, 0.41051751375198364, -0.03394818305969238, -0.04964590445160866, -0.04237092286348343, -0.2995656132698059, 0.17620070278644562, -0.059531450271606445, 0.11637193709611893, 0.023193256929516792, -0.1847495585680008, 0.18540635704994202, -0.13325516879558563, 0.16516326367855072, -0.2067747265100479, 0.29768916964530945, 0.19649513065814972, -0.05843520164489746, -0.08543844521045685, -0.45701417326927185, 0.03756717965006828, 0.4983896315097809, 0.1473693698644638, 0.16087642312049866, 0.036226220428943634, 0.1482280045747757, 0.08496107161045074, -0.13456130027770996, 0.010426171123981476, -0.031925249844789505, -0.0076672094874084, -0.0005224420456215739, -0.04681709036231041, 0.23126442730426788, 0.4604761004447937, -0.3303896486759186, 0.038075901567935944, -0.226119264960289, 0.20554043352603912, 0.14986413717269897, 0.2556041181087494, -0.1181032806634903, 0.003384471172466874, -0.06628964096307755, -0.3075839579105377, 0.13246886432170868, -0.13858117163181305, 0.2718118131160736, -0.24693022668361664, 0.06952665746212006, -0.35058900713920593, -0.26129499077796936, -0.19707810878753662, -0.22408165037631989, 0.1721968799829483, 0.02835903689265251, -0.03439808636903763, 0.08064346760511398, -0.21256029605865479, -0.1533968150615692, 0.05376310646533966, 0.4095255136489868, 0.09291262924671173, 0.12990711629390717, -0.37276318669319153, 0.16170743107795715, 0.33368945121765137, -0.10277915745973587, 0.15242169797420502, 0.02949425019323826, -0.13130295276641846, -0.19867759943008423, 0.2532307207584381, 0.3307932913303375, -0.2864343822002411, -0.0866180956363678, 0.38733893632888794, -0.19455088675022125, -0.03612644597887993, 0.2166655957698822, -0.05947338417172432, -0.006907070986926556, -0.14604394137859344, -0.19260556995868683, 0.22926156222820282, -0.0523369163274765, -0.22642375528812408, 0.08803407102823257, 0.13921545445919037, 0.20974676311016083, -0.16645129024982452, 0.07851649820804596, 0.09046006202697754 ]
https://github.com/huggingface/datasets/issues/5390
Error when pushing to the CI hub
Maybe the current version of moonlanding in Hub CI is the issue. I relaunched tests that were working two days ago: now they are failing. https://github.com/huggingface/datasets-server/commit/746414449cae4b311733f8a76e5b3b4ca73b38a9 for example cc @huggingface/moon-landing
### Describe the bug Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co). The call to `dataset.push_to_hub(` fails: ``` Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it] Traceback (most recent call last): File "reproduce_hubci.py", line 16, in <module> dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True) File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub HfApi(endpoint=config.HF_ENDPOINT).upload_file( File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file raise err File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file r.raise_for_status() File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md ``` ### Steps to reproduce the bug ```python # reproduce.py from datasets import Dataset import time USER = "__DUMMY_DATASETS_SERVER_USER__" USER_TOKEN = "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" dataset = Dataset.from_dict({"a": [1, 2, 3]}) repo_id = f"{USER}/bug-{int(time.time() * 10e3)}" dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True) ``` ```bash $ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py ``` ### Expected behavior No error and the dataset should be uploaded to the Hub with the README file (which generates the error). ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35 - Python version: 3.9.15 - PyArrow version: 7.0.0 - Pandas version: 1.5.2
30
Error when pushing to the CI hub
[ -0.23129931092262268, -0.6825999021530151, -0.11836319416761398, 0.007597961463034153, 0.094972163438797, 0.037151072174310684, 0.20016303658485413, 0.04725421592593193, 0.08518174290657043, 0.3130382001399994, 0.0692608430981636, -0.06999601423740387, 0.0659545511007309, 0.5104987025260925, -0.23519203066825867, 0.34630173444747925, 0.07537112385034561, 0.009887892752885818, 0.2453576922416687, -0.031386058777570724, -0.15422751009464264, 0.1983562558889389, -0.03721185401082039, 0.31811222434043884, -0.4183986186981201, -0.32260647416114807, 0.16140341758728027, 0.38524553179740906, -0.19003142416477203, 0.07618413865566254, 0.2175976186990738, 0.08456022292375565, -0.11584348976612091, 0.3757898807525635, -0.00010365486377850175, -0.009299672208726406, 0.45242372155189514, 0.011179709807038307, -0.3030925393104553, -0.04651954770088196, -0.09220264852046967, 0.22936412692070007, -0.14083653688430786, -0.12430586665868759, -0.08233258128166199, 0.45148158073425293, 0.00040630169678479433, 0.26276102662086487, 0.13312533497810364, 0.21777977049350739, 0.3553696870803833, 0.16390512883663177, 0.0458185151219368, -0.3477303087711334, 0.13180990517139435, 0.17069536447525024, -0.10677231848239899, -0.01734292507171631, 0.1659357249736786, 0.35465148091316223, 0.18386735022068024, 0.03481818735599518, -0.016590965911746025, -0.26994797587394714, 0.0623362734913826, -0.19460567831993103, 0.18905635178089142, -0.08213917165994644, 0.2824534773826599, -0.47643837332725525, 0.035510867834091187, -0.0014832968590781093, 0.04557669535279274, 0.26762855052948, -0.08578585833311081, -0.027549350634217262, 0.3501667380332947, -0.17416022717952728, -0.1435914933681488, -0.08922049403190613, -0.185798779129982, -0.5127294063568115, -0.06799373030662537, -0.09718140214681625, 0.06121392175555229, 0.12014083564281464, -0.10174163430929184, 0.021977677941322327, 0.03978649526834488, -0.037825487554073334, 0.3784659206867218, 0.0630406066775322, -0.14309479296207428, -0.2670988142490387, 0.1699107587337494, -0.11753992736339569, 0.21638192236423492, 0.49260401725769043, -0.24160678684711456, 0.05809101089835167, 0.05897745490074158, -0.013637438416481018, 0.1487155705690384, 0.09976674616336823, 0.2777247726917267, 0.2124026119709015, 0.0029904390685260296, 0.22359643876552582, 0.19761160016059875, 0.28030481934547424, 0.04698622226715088, 0.019773315638303757, -0.16724812984466553, -0.15388274192810059, -0.05211113393306732, 0.18815569579601288, 0.1276545524597168, -0.05668559670448303, -0.33928465843200684, 0.07111012935638428, 0.31937894225120544, 0.4016210436820984, 0.2001390904188156, 0.04342588409781456, 0.23822352290153503, 0.03967584669589996, 0.11988040059804916, 0.17878961563110352, -0.2944917678833008, 0.2410871386528015, -0.2772226631641388, 0.1053779348731041, -0.05922577157616615, -0.18568256497383118, 0.10581240057945251, -0.3567032217979431, 0.049019526690244675, -0.033651843667030334, 0.41015464067459106, -0.4174599349498749, -0.3358272612094879, 0.2729730010032654, 0.0726296603679657, 0.25455060601234436, 0.24514584243297577, 0.05284756422042847, 0.26565495133399963, -0.3263449966907501, -0.06610607355833054, -0.07545609772205353, -0.6072421073913574, -0.38345199823379517, -0.06778869777917862, 0.31808921694755554, 0.05398700386285782, 0.20217670500278473, -0.12385112792253494, -0.3699592053890228, -0.15526920557022095, 0.001712785684503615, 0.020328791812062263, 0.10077374428510666, 0.12541118264198303, -0.09435255825519562, -0.11913655698299408, 0.05311158671975136, 0.15512098371982574, 0.02222636342048645, 0.06158937141299248, 0.03267441317439079, -0.19547326862812042, 0.03880114480853081, -0.16641195118427277, 0.17856764793395996, -0.1786036491394043, 0.18294629454612732, 0.1557815819978714, -0.8598304986953735, -0.18651069700717926, -0.037050649523735046, -0.44655534625053406, -0.45633402466773987, -0.1978798657655716, -0.010481903329491615, 0.3440324366092682, 0.060867734253406525, 0.3313259780406952, 0.026988428086042404, -0.15609467029571533, 0.17587634921073914, -0.28129681944847107, -0.06091491878032684, -0.43237102031707764, -0.012784072197973728, 0.1947607398033142, 0.2629120945930481, 0.3407822549343109, 0.28040602803230286, 0.06458733975887299, 0.10327322781085968, 0.15226195752620697, -0.016087468713521957, 0.34364211559295654, -0.29818254709243774, 0.0006904293550178409, 0.1256972849369049, -0.17877139151096344, -0.12821117043495178, 0.019077394157648087, 0.2235732227563858, 0.2614145874977112, 0.18046945333480835, -0.5406469106674194, 0.1250990480184555, -0.13603857159614563, 0.42141956090927124, 0.31131288409233093, -0.06839148700237274, -0.23709340393543243, -0.1492416262626648, 0.15280379354953766, 0.1643882542848587, -0.263231486082077, 0.07835067063570023, 0.04282049462199211, 0.21279147267341614, -0.397257000207901, -0.3579615652561188, 0.09841042757034302, -0.05176137387752533, 0.3885658383369446, -0.1807667762041092, -0.24218745529651642, 0.1498410403728485, -0.014690779149532318, 0.2510357201099396, 0.04033735767006874, 0.0415588840842247, 0.14393754303455353, -0.05772341042757034, 0.004095978569239378, 0.15852105617523193, 0.05345616489648819, -0.03389408439397812, 0.06593199074268341, 0.16275475919246674, -0.3702569007873535, -0.096772700548172, -0.09543997794389725, 0.30956369638442993, 0.05286644771695137, 0.028482375666499138, -0.03667456656694412, -0.20503775775432587, 0.19263547658920288, 0.19164356589317322, -0.33929017186164856, -0.28802669048309326, 0.34106165170669556, -0.026230616495013237, 0.1680329293012619, 0.3047122359275818, -0.010978690348565578, -0.07923552393913269, 0.05180252343416214, 0.09343670308589935, 0.22195996344089508, 0.16442418098449707, 0.048560965806245804, 0.001613991684280336, -0.3814975619316101, 0.11816426366567612, -0.03761911019682884, -0.22204241156578064, 0.24719618260860443, 0.02272496372461319, 0.20523297786712646, 0.05318969115614891, -0.030912645161151886, -0.019425708800554276, -0.18009361624717712, 0.04190386086702347, 0.1758095920085907, 0.22859618067741394, -0.22684116661548615, -0.19870637357234955, 0.06931395828723907, 0.03213676065206528, 0.3475950360298157, -0.15805597603321075, -0.03317524492740631, -0.2545575201511383, 0.17668747901916504, 0.46520692110061646, -0.1799488067626953, 0.13179923593997955, 0.07457374036312103, 0.3401105999946594, 0.06261477619409561, 0.1258326768875122, 0.004466724582016468, 0.062161367386579514, -0.22640812397003174, 0.11803027987480164, -0.013596253469586372, 0.038130782544612885, 0.12156753987073898, -0.14579208195209503, 0.4420354664325714, -0.1379963904619217, 0.026640770956873894, 0.23707623779773712, 0.06372421234846115, 0.07474949210882187, -0.008312650956213474, 0.1795205920934677, -0.07674704492092133, -0.5214834213256836, 0.3113870620727539, -0.3275243639945984, -0.20401383936405182, -0.044924378395080566, -0.05015969276428223, -0.40758442878723145, -0.2261975109577179, -0.03924340382218361, 0.09757661074399948, -0.3557874262332916, -0.2182057797908783, -0.002334112301468849, 0.0376061275601387, 0.38659802079200745, 0.04535629600286484, -0.1960180401802063, 0.3513050675392151, -0.359576553106308, -0.20167167484760284, -0.47303685545921326, 0.03133336827158928, -0.2511974573135376, -0.20030637085437775, 0.38167330622673035, 0.24737712740898132, 0.14170785248279572, 0.15435075759887695, -0.08409453928470612, -0.17924514412879944, 0.1900167018175125, 0.15289166569709778, 0.1559981256723404, -0.12627440690994263, 0.3862646818161011, -0.0012954204576089978, -0.1939552128314972, -0.043554797768592834, -0.47763746976852417, 0.1825430542230606, 0.5931242108345032, -0.06462197005748749, -0.2219509482383728, 0.0579664409160614, -0.13297751545906067, 0.22214342653751373, 0.01741407997906208, -0.12551967799663544, 0.37890300154685974, 0.05121218413114548, 0.22793002426624298, -0.0714796856045723, -0.29965049028396606, 0.29177847504615784, 0.11281692981719971, -0.29665786027908325, 0.3792029619216919, 0.11595455557107925, -0.20134122669696808, -0.18050186336040497, -0.351473867893219, -0.14716778695583344, -0.3336242735385895, -0.2677263021469116, -0.08894676715135574, 0.012295587919652462, 0.07699193805456161, -0.00622983556240797, -0.3891071677207947, -0.29237520694732666, 0.19294270873069763, 0.15621106326580048, -0.024656305089592934, -0.05667881295084953, -0.04309166967868805, -0.32640236616134644, -0.08496218174695969, 0.12205785512924194, 0.033492155373096466, 0.14312894642353058, -0.39111459255218506, -0.09547723829746246, 0.1282912939786911, -0.08005379140377045, 0.24383333325386047, -0.49880722165107727, -0.05337970703840256, -0.018561137840151787, 0.11019500344991684, -0.14833369851112366, -0.26768696308135986, 0.1002035140991211, 0.6284502744674683, 0.09915997087955475, 0.5256101489067078, 0.1396033763885498, 0.042234405875205994, 0.04630030319094658, -0.3702124357223511, -0.21545010805130005, -0.03398415073752403, -0.22355666756629944, -0.35170257091522217, -0.3714793622493744, 0.3789774477481842, 0.0899384543299675, 0.20258021354675293, -0.0719081237912178, -0.08987291157245636, 0.2708698511123657, 0.09687068313360214, -0.19243597984313965, -0.024212747812271118, 0.16866421699523926, 0.23645178973674774, -0.1712522655725479, -0.06851319968700409, 0.4547005891799927, -0.0018989037489518523, 0.11554005742073059, 0.5085263252258301, 0.15233562886714935, 0.298801988363266, -0.17107287049293518, -0.22420166432857513, 0.4405301511287689, 0.15095162391662598, 0.13095127046108246, -0.09911971539258957, 0.18001408874988556, -0.1169140487909317, -0.041338738054037094, 0.016220785677433014, -0.16320174932479858, -0.1264248490333557, 0.6962247490882874, -0.2037447988986969, -0.2655591666698456, 0.030628332868218422, 0.31714361906051636, 0.40866154432296753, -0.2196120023727417, -0.00201822048984468, 0.06710895895957947, 0.9243988394737244, 0.036023352295160294, -0.1558907926082611, -0.018021583557128906, 0.04276658594608307, 0.09044487029314041, -0.1431252658367157, 0.0610349178314209, -0.08595879375934601, -0.22460904717445374, -0.015305348671972752, 0.06868456304073334, -0.0602789930999279, -0.15312981605529785, -0.4415784180164337, 0.07256288826465607, -0.4273080825805664, 0.5790203213691711, -0.14024430513381958, -0.04815306141972542, -0.2575967311859131, -0.12589368224143982, 0.17070372402668, 0.3056122958660126, 0.07487542182207108, 0.3811475336551666, -0.14232130348682404, 0.03545501083135605, -0.19164051115512848, -0.2815522849559784, -0.3739066421985626, 0.18037083745002747, 0.08412943035364151, 0.032005488872528076, -0.32519903779029846, -0.009718848392367363, 0.061533790081739426, -0.33261311054229736, 0.695674479007721, 0.08460202813148499, -0.2376965582370758, 0.08239232003688812, 0.10685716569423676, -0.20240753889083862, -0.3912065327167511, -0.119608074426651, 0.05922093242406845, -0.17269423604011536, -0.31432560086250305, 0.0993761196732521, 0.09263019263744354, -0.3746122121810913, -0.10177560895681381, 0.11827773600816727, 0.1095486655831337, -0.2564367651939392, 0.12970496714115143, -0.17379459738731384, -0.05505558103322983, -0.17199839651584625, 0.24171045422554016, -0.32984134554862976, 0.016370542347431183, 0.07417036592960358, 0.2664894163608551, -0.053485769778490067, 0.070326067507267, 0.013393963687121868, 0.19479307532310486, -0.4775261878967285, 0.190861776471138, -0.25226643681526184, -0.2244035303592682, -0.3352345824241638, -0.08473435044288635, 0.04615432396531105, -0.08752568811178207, 0.12205762416124344, -0.15603840351104736, -0.3124091625213623, 0.03154800087213516, 0.563571572303772, 0.17251770198345184, 0.5177541971206665, -0.13138315081596375, 0.010028460994362831, -0.22720587253570557, 0.09713903069496155, -0.12607458233833313, 0.1060323640704155, -0.21063143014907837, 0.013687632977962494, 0.5002200603485107, -0.018234943971037865, -0.43445885181427, 0.009296145290136337, -0.45678651332855225, 0.02166346274316311, -0.11268432438373566, -0.22066976130008698, -0.12806294858455658, -0.18004344403743744, 0.20847007632255554, -0.08130090683698654, -0.10779287666082382, -0.3058469593524933, 0.004484063480049372, 0.06606413424015045, 0.15841667354106903, -0.09761983901262283, 0.06062690541148186, 0.05315762013196945, -0.11509378254413605, -0.045062873512506485, 0.04832637310028076, 0.11578073352575302, 0.06905492395162582, -0.40232959389686584, 0.4526742398738861, 0.19912344217300415, -0.0961039587855339, 0.27353549003601074, 0.3716146647930145, 0.49298226833343506, -0.25972050428390503, 0.010466059669852257, -0.09970013052225113, -0.13193246722221375, -0.10907571017742157, 0.4192759692668915, 0.3782222867012024, 0.33638495206832886, -0.12658639252185822, -0.21677884459495544, -0.02188972570002079, 0.10629989951848984, 0.0681171640753746, -0.09417929500341415, -0.043294236063957214, -0.1705823838710785, 0.10155811905860901, 0.30871111154556274, 0.13205891847610474, -0.12341097742319107, 0.22961050271987915, -0.1267722100019455, -0.11050379276275635, 0.05913124233484268, 0.19906431436538696, -0.29430341720581055, 0.25673770904541016, 0.12083751708269119, 0.3926355242729187, -0.30729949474334717, 0.14395257830619812, -0.3171660006046295, -0.15691423416137695, 0.06054249405860901, 0.023728400468826294, -0.27972134947776794, -0.07382839918136597, 0.09366132318973541, 0.005553166847676039, 0.11520782858133316, 0.3612458109855652, 0.0404781736433506, 0.11953332275152206, -0.2546592056751251, 0.0019466831581667066, -0.24824568629264832, 0.05502307415008545, -0.049398500472307205, 0.34027746319770813, 0.02359588071703911, -0.25227802991867065, -0.1560652107000351, -0.6935367584228516, -0.1338885873556137, -0.43453726172447205, 0.21211256086826324, -0.3371434807777405, -0.1295638233423233, -0.2694137990474701, 0.050935208797454834, 0.08014707267284393, 0.2649593651294708, 0.16379040479660034, -0.04570269212126732, -0.07438915967941284, 0.22221630811691284, -0.14153680205345154, 0.24779632687568665, -0.007318638265132904, -0.1964050531387329, 0.3813342750072479, -0.131146639585495, -0.016012191772460938, -0.032875195145606995, 0.26941367983818054, 0.3044668436050415, 0.08348724991083145, 0.09165404736995697, 0.09140843152999878, 0.25039973855018616, -0.11264678835868835, 0.12349626421928406, -0.04946691170334816, 0.2523144781589508, 0.21108777821063995, 0.03241568058729172, 0.34208381175994873, -0.17492304742336273, 0.00681926729157567, 0.010852314531803131, -0.04851778224110603, 0.41051751375198364, -0.03394818305969238, -0.04964590445160866, -0.04237092286348343, -0.2995656132698059, 0.17620070278644562, -0.059531450271606445, 0.11637193709611893, 0.023193256929516792, -0.1847495585680008, 0.18540635704994202, -0.13325516879558563, 0.16516326367855072, -0.2067747265100479, 0.29768916964530945, 0.19649513065814972, -0.05843520164489746, -0.08543844521045685, -0.45701417326927185, 0.03756717965006828, 0.4983896315097809, 0.1473693698644638, 0.16087642312049866, 0.036226220428943634, 0.1482280045747757, 0.08496107161045074, -0.13456130027770996, 0.010426171123981476, -0.031925249844789505, -0.0076672094874084, -0.0005224420456215739, -0.04681709036231041, 0.23126442730426788, 0.4604761004447937, -0.3303896486759186, 0.038075901567935944, -0.226119264960289, 0.20554043352603912, 0.14986413717269897, 0.2556041181087494, -0.1181032806634903, 0.003384471172466874, -0.06628964096307755, -0.3075839579105377, 0.13246886432170868, -0.13858117163181305, 0.2718118131160736, -0.24693022668361664, 0.06952665746212006, -0.35058900713920593, -0.26129499077796936, -0.19707810878753662, -0.22408165037631989, 0.1721968799829483, 0.02835903689265251, -0.03439808636903763, 0.08064346760511398, -0.21256029605865479, -0.1533968150615692, 0.05376310646533966, 0.4095255136489868, 0.09291262924671173, 0.12990711629390717, -0.37276318669319153, 0.16170743107795715, 0.33368945121765137, -0.10277915745973587, 0.15242169797420502, 0.02949425019323826, -0.13130295276641846, -0.19867759943008423, 0.2532307207584381, 0.3307932913303375, -0.2864343822002411, -0.0866180956363678, 0.38733893632888794, -0.19455088675022125, -0.03612644597887993, 0.2166655957698822, -0.05947338417172432, -0.006907070986926556, -0.14604394137859344, -0.19260556995868683, 0.22926156222820282, -0.0523369163274765, -0.22642375528812408, 0.08803407102823257, 0.13921545445919037, 0.20974676311016083, -0.16645129024982452, 0.07851649820804596, 0.09046006202697754 ]
https://github.com/huggingface/datasets/issues/5390
Error when pushing to the CI hub
Hi! I don't think this has anything to do with `datasets`. Hub CI seems to be the culprit - the identical failure can be found in [this](https://github.com/huggingface/datasets/pull/5389) PR (with unrelated changes) opened today.
### Describe the bug Note that it's a special case where the Hub URL is "https://hub-ci.huggingface.co", which does not appear if we do the same on the Hub (https://huggingface.co). The call to `dataset.push_to_hub(` fails: ``` Pushing dataset shards to the dataset hub: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.93s/it] Traceback (most recent call last): File "reproduce_hubci.py", line 16, in <module> dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True) File "/home/slesage/hf/datasets/src/datasets/arrow_dataset.py", line 5025, in push_to_hub HfApi(endpoint=config.HF_ENDPOINT).upload_file( File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1346, in upload_file raise err File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 1337, in upload_file r.raise_for_status() File "/home/slesage/.pyenv/versions/datasets/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://hub-ci.huggingface.co/api/datasets/__DUMMY_DATASETS_SERVER_USER__/bug-16718047265472/upload/main/README.md ``` ### Steps to reproduce the bug ```python # reproduce.py from datasets import Dataset import time USER = "__DUMMY_DATASETS_SERVER_USER__" USER_TOKEN = "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" dataset = Dataset.from_dict({"a": [1, 2, 3]}) repo_id = f"{USER}/bug-{int(time.time() * 10e3)}" dataset.push_to_hub(repo_id=repo_id, private=False, token=USER_TOKEN, embed_external_files=True) ``` ```bash $ HF_ENDPOINT="https://hub-ci.huggingface.co" python reproduce.py ``` ### Expected behavior No error and the dataset should be uploaded to the Hub with the README file (which generates the error). ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.15.0-1026-aws-x86_64-with-glibc2.35 - Python version: 3.9.15 - PyArrow version: 7.0.0 - Pandas version: 1.5.2
33
Error when pushing to the CI hub
[ -0.23129931092262268, -0.6825999021530151, -0.11836319416761398, 0.007597961463034153, 0.094972163438797, 0.037151072174310684, 0.20016303658485413, 0.04725421592593193, 0.08518174290657043, 0.3130382001399994, 0.0692608430981636, -0.06999601423740387, 0.0659545511007309, 0.5104987025260925, -0.23519203066825867, 0.34630173444747925, 0.07537112385034561, 0.009887892752885818, 0.2453576922416687, -0.031386058777570724, -0.15422751009464264, 0.1983562558889389, -0.03721185401082039, 0.31811222434043884, -0.4183986186981201, -0.32260647416114807, 0.16140341758728027, 0.38524553179740906, -0.19003142416477203, 0.07618413865566254, 0.2175976186990738, 0.08456022292375565, -0.11584348976612091, 0.3757898807525635, -0.00010365486377850175, -0.009299672208726406, 0.45242372155189514, 0.011179709807038307, -0.3030925393104553, -0.04651954770088196, -0.09220264852046967, 0.22936412692070007, -0.14083653688430786, -0.12430586665868759, -0.08233258128166199, 0.45148158073425293, 0.00040630169678479433, 0.26276102662086487, 0.13312533497810364, 0.21777977049350739, 0.3553696870803833, 0.16390512883663177, 0.0458185151219368, -0.3477303087711334, 0.13180990517139435, 0.17069536447525024, -0.10677231848239899, -0.01734292507171631, 0.1659357249736786, 0.35465148091316223, 0.18386735022068024, 0.03481818735599518, -0.016590965911746025, -0.26994797587394714, 0.0623362734913826, -0.19460567831993103, 0.18905635178089142, -0.08213917165994644, 0.2824534773826599, -0.47643837332725525, 0.035510867834091187, -0.0014832968590781093, 0.04557669535279274, 0.26762855052948, -0.08578585833311081, -0.027549350634217262, 0.3501667380332947, -0.17416022717952728, -0.1435914933681488, -0.08922049403190613, -0.185798779129982, -0.5127294063568115, -0.06799373030662537, -0.09718140214681625, 0.06121392175555229, 0.12014083564281464, -0.10174163430929184, 0.021977677941322327, 0.03978649526834488, -0.037825487554073334, 0.3784659206867218, 0.0630406066775322, -0.14309479296207428, -0.2670988142490387, 0.1699107587337494, -0.11753992736339569, 0.21638192236423492, 0.49260401725769043, -0.24160678684711456, 0.05809101089835167, 0.05897745490074158, -0.013637438416481018, 0.1487155705690384, 0.09976674616336823, 0.2777247726917267, 0.2124026119709015, 0.0029904390685260296, 0.22359643876552582, 0.19761160016059875, 0.28030481934547424, 0.04698622226715088, 0.019773315638303757, -0.16724812984466553, -0.15388274192810059, -0.05211113393306732, 0.18815569579601288, 0.1276545524597168, -0.05668559670448303, -0.33928465843200684, 0.07111012935638428, 0.31937894225120544, 0.4016210436820984, 0.2001390904188156, 0.04342588409781456, 0.23822352290153503, 0.03967584669589996, 0.11988040059804916, 0.17878961563110352, -0.2944917678833008, 0.2410871386528015, -0.2772226631641388, 0.1053779348731041, -0.05922577157616615, -0.18568256497383118, 0.10581240057945251, -0.3567032217979431, 0.049019526690244675, -0.033651843667030334, 0.41015464067459106, -0.4174599349498749, -0.3358272612094879, 0.2729730010032654, 0.0726296603679657, 0.25455060601234436, 0.24514584243297577, 0.05284756422042847, 0.26565495133399963, -0.3263449966907501, -0.06610607355833054, -0.07545609772205353, -0.6072421073913574, -0.38345199823379517, -0.06778869777917862, 0.31808921694755554, 0.05398700386285782, 0.20217670500278473, -0.12385112792253494, -0.3699592053890228, -0.15526920557022095, 0.001712785684503615, 0.020328791812062263, 0.10077374428510666, 0.12541118264198303, -0.09435255825519562, -0.11913655698299408, 0.05311158671975136, 0.15512098371982574, 0.02222636342048645, 0.06158937141299248, 0.03267441317439079, -0.19547326862812042, 0.03880114480853081, -0.16641195118427277, 0.17856764793395996, -0.1786036491394043, 0.18294629454612732, 0.1557815819978714, -0.8598304986953735, -0.18651069700717926, -0.037050649523735046, -0.44655534625053406, -0.45633402466773987, -0.1978798657655716, -0.010481903329491615, 0.3440324366092682, 0.060867734253406525, 0.3313259780406952, 0.026988428086042404, -0.15609467029571533, 0.17587634921073914, -0.28129681944847107, -0.06091491878032684, -0.43237102031707764, -0.012784072197973728, 0.1947607398033142, 0.2629120945930481, 0.3407822549343109, 0.28040602803230286, 0.06458733975887299, 0.10327322781085968, 0.15226195752620697, -0.016087468713521957, 0.34364211559295654, -0.29818254709243774, 0.0006904293550178409, 0.1256972849369049, -0.17877139151096344, -0.12821117043495178, 0.019077394157648087, 0.2235732227563858, 0.2614145874977112, 0.18046945333480835, -0.5406469106674194, 0.1250990480184555, -0.13603857159614563, 0.42141956090927124, 0.31131288409233093, -0.06839148700237274, -0.23709340393543243, -0.1492416262626648, 0.15280379354953766, 0.1643882542848587, -0.263231486082077, 0.07835067063570023, 0.04282049462199211, 0.21279147267341614, -0.397257000207901, -0.3579615652561188, 0.09841042757034302, -0.05176137387752533, 0.3885658383369446, -0.1807667762041092, -0.24218745529651642, 0.1498410403728485, -0.014690779149532318, 0.2510357201099396, 0.04033735767006874, 0.0415588840842247, 0.14393754303455353, -0.05772341042757034, 0.004095978569239378, 0.15852105617523193, 0.05345616489648819, -0.03389408439397812, 0.06593199074268341, 0.16275475919246674, -0.3702569007873535, -0.096772700548172, -0.09543997794389725, 0.30956369638442993, 0.05286644771695137, 0.028482375666499138, -0.03667456656694412, -0.20503775775432587, 0.19263547658920288, 0.19164356589317322, -0.33929017186164856, -0.28802669048309326, 0.34106165170669556, -0.026230616495013237, 0.1680329293012619, 0.3047122359275818, -0.010978690348565578, -0.07923552393913269, 0.05180252343416214, 0.09343670308589935, 0.22195996344089508, 0.16442418098449707, 0.048560965806245804, 0.001613991684280336, -0.3814975619316101, 0.11816426366567612, -0.03761911019682884, -0.22204241156578064, 0.24719618260860443, 0.02272496372461319, 0.20523297786712646, 0.05318969115614891, -0.030912645161151886, -0.019425708800554276, -0.18009361624717712, 0.04190386086702347, 0.1758095920085907, 0.22859618067741394, -0.22684116661548615, -0.19870637357234955, 0.06931395828723907, 0.03213676065206528, 0.3475950360298157, -0.15805597603321075, -0.03317524492740631, -0.2545575201511383, 0.17668747901916504, 0.46520692110061646, -0.1799488067626953, 0.13179923593997955, 0.07457374036312103, 0.3401105999946594, 0.06261477619409561, 0.1258326768875122, 0.004466724582016468, 0.062161367386579514, -0.22640812397003174, 0.11803027987480164, -0.013596253469586372, 0.038130782544612885, 0.12156753987073898, -0.14579208195209503, 0.4420354664325714, -0.1379963904619217, 0.026640770956873894, 0.23707623779773712, 0.06372421234846115, 0.07474949210882187, -0.008312650956213474, 0.1795205920934677, -0.07674704492092133, -0.5214834213256836, 0.3113870620727539, -0.3275243639945984, -0.20401383936405182, -0.044924378395080566, -0.05015969276428223, -0.40758442878723145, -0.2261975109577179, -0.03924340382218361, 0.09757661074399948, -0.3557874262332916, -0.2182057797908783, -0.002334112301468849, 0.0376061275601387, 0.38659802079200745, 0.04535629600286484, -0.1960180401802063, 0.3513050675392151, -0.359576553106308, -0.20167167484760284, -0.47303685545921326, 0.03133336827158928, -0.2511974573135376, -0.20030637085437775, 0.38167330622673035, 0.24737712740898132, 0.14170785248279572, 0.15435075759887695, -0.08409453928470612, -0.17924514412879944, 0.1900167018175125, 0.15289166569709778, 0.1559981256723404, -0.12627440690994263, 0.3862646818161011, -0.0012954204576089978, -0.1939552128314972, -0.043554797768592834, -0.47763746976852417, 0.1825430542230606, 0.5931242108345032, -0.06462197005748749, -0.2219509482383728, 0.0579664409160614, -0.13297751545906067, 0.22214342653751373, 0.01741407997906208, -0.12551967799663544, 0.37890300154685974, 0.05121218413114548, 0.22793002426624298, -0.0714796856045723, -0.29965049028396606, 0.29177847504615784, 0.11281692981719971, -0.29665786027908325, 0.3792029619216919, 0.11595455557107925, -0.20134122669696808, -0.18050186336040497, -0.351473867893219, -0.14716778695583344, -0.3336242735385895, -0.2677263021469116, -0.08894676715135574, 0.012295587919652462, 0.07699193805456161, -0.00622983556240797, -0.3891071677207947, -0.29237520694732666, 0.19294270873069763, 0.15621106326580048, -0.024656305089592934, -0.05667881295084953, -0.04309166967868805, -0.32640236616134644, -0.08496218174695969, 0.12205785512924194, 0.033492155373096466, 0.14312894642353058, -0.39111459255218506, -0.09547723829746246, 0.1282912939786911, -0.08005379140377045, 0.24383333325386047, -0.49880722165107727, -0.05337970703840256, -0.018561137840151787, 0.11019500344991684, -0.14833369851112366, -0.26768696308135986, 0.1002035140991211, 0.6284502744674683, 0.09915997087955475, 0.5256101489067078, 0.1396033763885498, 0.042234405875205994, 0.04630030319094658, -0.3702124357223511, -0.21545010805130005, -0.03398415073752403, -0.22355666756629944, -0.35170257091522217, -0.3714793622493744, 0.3789774477481842, 0.0899384543299675, 0.20258021354675293, -0.0719081237912178, -0.08987291157245636, 0.2708698511123657, 0.09687068313360214, -0.19243597984313965, -0.024212747812271118, 0.16866421699523926, 0.23645178973674774, -0.1712522655725479, -0.06851319968700409, 0.4547005891799927, -0.0018989037489518523, 0.11554005742073059, 0.5085263252258301, 0.15233562886714935, 0.298801988363266, -0.17107287049293518, -0.22420166432857513, 0.4405301511287689, 0.15095162391662598, 0.13095127046108246, -0.09911971539258957, 0.18001408874988556, -0.1169140487909317, -0.041338738054037094, 0.016220785677433014, -0.16320174932479858, -0.1264248490333557, 0.6962247490882874, -0.2037447988986969, -0.2655591666698456, 0.030628332868218422, 0.31714361906051636, 0.40866154432296753, -0.2196120023727417, -0.00201822048984468, 0.06710895895957947, 0.9243988394737244, 0.036023352295160294, -0.1558907926082611, -0.018021583557128906, 0.04276658594608307, 0.09044487029314041, -0.1431252658367157, 0.0610349178314209, -0.08595879375934601, -0.22460904717445374, -0.015305348671972752, 0.06868456304073334, -0.0602789930999279, -0.15312981605529785, -0.4415784180164337, 0.07256288826465607, -0.4273080825805664, 0.5790203213691711, -0.14024430513381958, -0.04815306141972542, -0.2575967311859131, -0.12589368224143982, 0.17070372402668, 0.3056122958660126, 0.07487542182207108, 0.3811475336551666, -0.14232130348682404, 0.03545501083135605, -0.19164051115512848, -0.2815522849559784, -0.3739066421985626, 0.18037083745002747, 0.08412943035364151, 0.032005488872528076, -0.32519903779029846, -0.009718848392367363, 0.061533790081739426, -0.33261311054229736, 0.695674479007721, 0.08460202813148499, -0.2376965582370758, 0.08239232003688812, 0.10685716569423676, -0.20240753889083862, -0.3912065327167511, -0.119608074426651, 0.05922093242406845, -0.17269423604011536, -0.31432560086250305, 0.0993761196732521, 0.09263019263744354, -0.3746122121810913, -0.10177560895681381, 0.11827773600816727, 0.1095486655831337, -0.2564367651939392, 0.12970496714115143, -0.17379459738731384, -0.05505558103322983, -0.17199839651584625, 0.24171045422554016, -0.32984134554862976, 0.016370542347431183, 0.07417036592960358, 0.2664894163608551, -0.053485769778490067, 0.070326067507267, 0.013393963687121868, 0.19479307532310486, -0.4775261878967285, 0.190861776471138, -0.25226643681526184, -0.2244035303592682, -0.3352345824241638, -0.08473435044288635, 0.04615432396531105, -0.08752568811178207, 0.12205762416124344, -0.15603840351104736, -0.3124091625213623, 0.03154800087213516, 0.563571572303772, 0.17251770198345184, 0.5177541971206665, -0.13138315081596375, 0.010028460994362831, -0.22720587253570557, 0.09713903069496155, -0.12607458233833313, 0.1060323640704155, -0.21063143014907837, 0.013687632977962494, 0.5002200603485107, -0.018234943971037865, -0.43445885181427, 0.009296145290136337, -0.45678651332855225, 0.02166346274316311, -0.11268432438373566, -0.22066976130008698, -0.12806294858455658, -0.18004344403743744, 0.20847007632255554, -0.08130090683698654, -0.10779287666082382, -0.3058469593524933, 0.004484063480049372, 0.06606413424015045, 0.15841667354106903, -0.09761983901262283, 0.06062690541148186, 0.05315762013196945, -0.11509378254413605, -0.045062873512506485, 0.04832637310028076, 0.11578073352575302, 0.06905492395162582, -0.40232959389686584, 0.4526742398738861, 0.19912344217300415, -0.0961039587855339, 0.27353549003601074, 0.3716146647930145, 0.49298226833343506, -0.25972050428390503, 0.010466059669852257, -0.09970013052225113, -0.13193246722221375, -0.10907571017742157, 0.4192759692668915, 0.3782222867012024, 0.33638495206832886, -0.12658639252185822, -0.21677884459495544, -0.02188972570002079, 0.10629989951848984, 0.0681171640753746, -0.09417929500341415, -0.043294236063957214, -0.1705823838710785, 0.10155811905860901, 0.30871111154556274, 0.13205891847610474, -0.12341097742319107, 0.22961050271987915, -0.1267722100019455, -0.11050379276275635, 0.05913124233484268, 0.19906431436538696, -0.29430341720581055, 0.25673770904541016, 0.12083751708269119, 0.3926355242729187, -0.30729949474334717, 0.14395257830619812, -0.3171660006046295, -0.15691423416137695, 0.06054249405860901, 0.023728400468826294, -0.27972134947776794, -0.07382839918136597, 0.09366132318973541, 0.005553166847676039, 0.11520782858133316, 0.3612458109855652, 0.0404781736433506, 0.11953332275152206, -0.2546592056751251, 0.0019466831581667066, -0.24824568629264832, 0.05502307415008545, -0.049398500472307205, 0.34027746319770813, 0.02359588071703911, -0.25227802991867065, -0.1560652107000351, -0.6935367584228516, -0.1338885873556137, -0.43453726172447205, 0.21211256086826324, -0.3371434807777405, -0.1295638233423233, -0.2694137990474701, 0.050935208797454834, 0.08014707267284393, 0.2649593651294708, 0.16379040479660034, -0.04570269212126732, -0.07438915967941284, 0.22221630811691284, -0.14153680205345154, 0.24779632687568665, -0.007318638265132904, -0.1964050531387329, 0.3813342750072479, -0.131146639585495, -0.016012191772460938, -0.032875195145606995, 0.26941367983818054, 0.3044668436050415, 0.08348724991083145, 0.09165404736995697, 0.09140843152999878, 0.25039973855018616, -0.11264678835868835, 0.12349626421928406, -0.04946691170334816, 0.2523144781589508, 0.21108777821063995, 0.03241568058729172, 0.34208381175994873, -0.17492304742336273, 0.00681926729157567, 0.010852314531803131, -0.04851778224110603, 0.41051751375198364, -0.03394818305969238, -0.04964590445160866, -0.04237092286348343, -0.2995656132698059, 0.17620070278644562, -0.059531450271606445, 0.11637193709611893, 0.023193256929516792, -0.1847495585680008, 0.18540635704994202, -0.13325516879558563, 0.16516326367855072, -0.2067747265100479, 0.29768916964530945, 0.19649513065814972, -0.05843520164489746, -0.08543844521045685, -0.45701417326927185, 0.03756717965006828, 0.4983896315097809, 0.1473693698644638, 0.16087642312049866, 0.036226220428943634, 0.1482280045747757, 0.08496107161045074, -0.13456130027770996, 0.010426171123981476, -0.031925249844789505, -0.0076672094874084, -0.0005224420456215739, -0.04681709036231041, 0.23126442730426788, 0.4604761004447937, -0.3303896486759186, 0.038075901567935944, -0.226119264960289, 0.20554043352603912, 0.14986413717269897, 0.2556041181087494, -0.1181032806634903, 0.003384471172466874, -0.06628964096307755, -0.3075839579105377, 0.13246886432170868, -0.13858117163181305, 0.2718118131160736, -0.24693022668361664, 0.06952665746212006, -0.35058900713920593, -0.26129499077796936, -0.19707810878753662, -0.22408165037631989, 0.1721968799829483, 0.02835903689265251, -0.03439808636903763, 0.08064346760511398, -0.21256029605865479, -0.1533968150615692, 0.05376310646533966, 0.4095255136489868, 0.09291262924671173, 0.12990711629390717, -0.37276318669319153, 0.16170743107795715, 0.33368945121765137, -0.10277915745973587, 0.15242169797420502, 0.02949425019323826, -0.13130295276641846, -0.19867759943008423, 0.2532307207584381, 0.3307932913303375, -0.2864343822002411, -0.0866180956363678, 0.38733893632888794, -0.19455088675022125, -0.03612644597887993, 0.2166655957698822, -0.05947338417172432, -0.006907070986926556, -0.14604394137859344, -0.19260556995868683, 0.22926156222820282, -0.0523369163274765, -0.22642375528812408, 0.08803407102823257, 0.13921545445919037, 0.20974676311016083, -0.16645129024982452, 0.07851649820804596, 0.09046006202697754 ]
https://github.com/huggingface/datasets/issues/5388
Getting Value Error while loading a dataset..
Hi! I can't reproduce this error locally (Mac) or in Colab. What version of `datasets` are you using?
### Describe the bug I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook. ``` WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module> 6 ) 7 ----> 8 next(iter(law_dataset_streamed)) 17 frames [/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression) 485 compression = infer_compression(urlpath) 486 if compression is not None and compression not in compr: --> 487 raise ValueError("Compression type %s not supported" % compression) 488 return compression 489 ValueError: Compression type zstd not supported ``` ### Steps to reproduce the bug ``` !pip install zstandard from datasets import load_dataset lds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) ``` ### Expected behavior I expect an iterable object as the output 'lds' to be created. ### Environment info Windows laptop with Google Colab notebook
18
Getting Value Error while loading a dataset..
[ -0.38456305861473083, -0.19576339423656464, -0.2570847272872925, 0.40704256296157837, 0.33023571968078613, 0.01684950664639473, 0.19810250401496887, 0.266683429479599, 0.15509603917598724, 0.3449268937110901, -0.052366308867931366, 0.32243192195892334, -0.004396338481456041, 0.27496808767318726, -0.4670313894748688, 0.023242268711328506, -0.11688071489334106, 0.2781883180141449, 0.04005762189626694, 0.07088600099086761, -0.18141818046569824, 0.17756548523902893, -0.23530712723731995, 0.24324911832809448, -0.2748315632343292, -0.15582357347011566, 0.06801203638315201, 0.28647714853286743, -0.02217792719602585, -0.24585461616516113, 0.03284236043691635, -0.05287151411175728, 0.2572430670261383, 0.33273187279701233, -0.00009355726797366515, 0.0018120483728125691, 0.301460862159729, -0.014719893224537373, -0.2666448950767517, -0.047215234488248825, -0.33906838297843933, 0.019338689744472504, -0.004182230215519667, -0.30079391598701477, -0.15846583247184753, -0.1668376624584198, -0.27978625893592834, -0.3704090714454651, 0.18557554483413696, 0.24556276202201843, 0.42389973998069763, 0.13123303651809692, 0.026314251124858856, -0.2810450494289398, 0.20612648129463196, -0.2014346718788147, 0.21698077023029327, 0.38490793108940125, 0.1345541626214981, 0.04045428708195686, 0.111717090010643, 0.09950082004070282, -0.06061604246497154, 0.061795465648174286, 0.07561736553907394, 0.017211105674505234, 0.2574961185455322, 0.07286711782217026, 0.31902816891670227, 0.029127540066838264, 0.5542587041854858, 0.015606708824634552, -0.03714366257190704, 0.17038390040397644, 0.17549104988574982, -0.2742319107055664, 0.22175350785255432, 0.039243753999471664, -0.06069602072238922, 0.19260801374912262, 0.06226150691509247, 0.0665973648428917, -0.24474474787712097, 0.19657839834690094, -0.147974893450737, 0.08414766937494278, -0.3347519636154175, 0.10556023567914963, 0.09305880218744278, -0.2003292739391327, 0.03303747624158859, -0.056683868169784546, -0.06589248031377792, 0.047411367297172546, -0.1613920032978058, 0.034842412918806076, -0.1197214424610138, 0.088261678814888, -0.011872907169163227, -0.11143181473016739, 0.0866200402379036, 0.07000886648893356, 0.10763727128505707, 0.24729353189468384, 0.35285934805870056, -0.14691409468650818, 0.13274815678596497, -0.07554861903190613, 0.0887254923582077, 0.02544284425675869, -0.09901219606399536, -0.07440917193889618, -0.15185455977916718, -0.31489938497543335, 0.2759760320186615, 0.09225944429636002, 0.17620891332626343, -0.2859446108341217, -0.46288833022117615, 0.13147412240505219, 0.05315309017896652, -0.02831730619072914, 0.09432075172662735, 0.5245619416236877, 0.050874218344688416, 0.02304864302277565, 0.15218719840049744, 0.216297447681427, -0.06007671728730202, -0.3757207691669464, -0.34215185046195984, 0.043546564877033234, -0.1285926252603531, -0.21122859418392181, 0.12351145595312119, -0.05392550677061081, 0.10158431529998779, -0.06313668191432953, -0.15561439096927643, -0.38499322533607483, 0.11104477196931839, -0.2913457751274109, -0.12599840760231018, 0.23824390769004822, 0.0063897049985826015, -0.03959835693240166, 0.21506057679653168, -0.10631611198186874, 0.10118483752012253, 0.35387828946113586, -0.2432580292224884, -0.2724260687828064, -0.09339427947998047, 0.3953929841518402, 0.17080797255039215, 0.062398478388786316, -0.13474033772945404, 0.13677489757537842, 0.15644414722919464, -0.1827770620584488, -0.31172075867652893, 0.05327681824564934, -0.20598003268241882, -0.23430480062961578, 0.18035359680652618, 0.22341173887252808, -0.46355316042900085, -0.004725013859570026, -0.19343499839305878, -0.28757014870643616, -0.04297477379441261, -0.03180772811174393, -0.31454551219940186, 0.3602273464202881, -0.041097983717918396, 0.1643805205821991, 0.33944687247276306, -0.1908629685640335, -0.19458895921707153, 0.24959823489189148, -0.16372893750667572, -0.45817670226097107, -0.17222072184085846, 0.2118857055902481, 0.042724866420030594, -0.11436719447374344, 0.21040458977222443, 0.03877473622560501, 0.05923805013298988, -0.027201397344470024, -0.1438830941915512, -0.11848203837871552, 0.23079510033130646, 0.26301252841949463, -0.1548546850681305, 0.21662123501300812, 0.2537757456302643, -0.11728116124868393, -0.06935980170965195, -0.0791940838098526, -0.09856631606817245, 0.333592027425766, 0.14793021976947784, 0.07527587562799454, -0.17191843688488007, -0.12176883220672607, -0.42059096693992615, -0.06855862587690353, -0.006051670294255018, -0.2503397762775421, 0.0427742563188076, 0.004062519874423742, -0.4744282066822052, 0.24088016152381897, 0.025953384116292, 0.2634580135345459, 0.3029908239841461, 0.11611205339431763, -0.2384473979473114, -0.181662917137146, -0.04669307544827461, 0.18416400253772736, -0.18398690223693848, -0.13241362571716309, -0.18572573363780975, 0.14664334058761597, -0.2505294680595398, -0.1341487020254135, 0.19546332955360413, -0.015603882260620594, 0.31979092955589294, 0.02385520190000534, -0.21564839780330658, 0.4575131833553314, -0.007752072531729937, 0.07911209762096405, 0.006077987141907215, -0.2160833328962326, -0.10747826844453812, -0.2574376165866852, 0.09240911900997162, -0.1294933706521988, 0.33341658115386963, 0.015021875500679016, 0.04241330549120903, 0.261113703250885, -0.33340319991111755, -0.16781161725521088, -0.13626576960086823, -0.0627678856253624, 0.36539626121520996, -0.10872456431388855, 0.1531609445810318, -0.25779685378074646, 0.010223358869552612, 0.04534083604812622, 0.0878133699297905, -0.004951120354235172, -0.3146171271800995, -0.1822884976863861, 0.05632203072309494, -0.08797747641801834, 0.1925910860300064, 0.03561731055378914, 0.06258715689182281, -0.09153833985328674, 0.03999403119087219, 0.17317433655261993, 0.4971867501735687, 0.28380087018013, -0.2332017868757248, 0.01476157084107399, 0.07557491213083267, -0.10442081838846207, 0.19025206565856934, -0.055313192307949066, 0.19655795395374298, 0.25493109226226807, 0.01358911395072937, 0.04133442044258118, -0.10704897344112396, 0.0012607027310878038, 0.2189953625202179, 0.28486892580986023, -0.4300149977207184, -0.07252222299575806, -0.22441807389259338, -0.06432778388261795, 0.01826680824160576, 0.059874966740608215, 0.095296211540699, -0.21232658624649048, -0.1566009223461151, 0.11667191237211227, -0.1587018370628357, 0.10572387278079987, -0.19729739427566528, 0.27562177181243896, 0.26638612151145935, 0.12114018201828003, -0.1098148375749588, -0.17437990009784698, -0.2608622610569, 0.17396125197410583, 0.02719051018357277, 0.21776075661182404, 0.38351625204086304, 0.05567322298884392, 0.1619391143321991, -0.1584063619375229, -0.06119295582175255, 0.049573902040719986, 0.023668428882956505, 0.1965404599905014, 0.02679913304746151, 0.26379141211509705, 0.02598225697875023, -0.2896542251110077, 0.39924123883247375, -0.16773106157779694, -0.03410416096448898, 0.20592211186885834, 0.14712926745414734, -0.13554160296916962, 0.02593899518251419, -0.4572851359844208, -0.30417096614837646, -0.1577201783657074, -0.4095889925956726, 0.018013954162597656, 0.0922478437423706, 0.08082488179206848, 0.17569294571876526, 0.16116786003112793, 0.21118028461933136, 0.03884980082511902, -0.49155792593955994, -0.09302189946174622, 0.10622557997703552, -0.15784268081188202, -0.38315436244010925, 0.1739857792854309, 0.096207395195961, 0.12025772035121918, 0.155766099691391, -0.26590678095817566, -0.08929690718650818, -0.030204985290765762, -0.005133566912263632, -0.23354578018188477, -0.09131547808647156, 0.1245889887213707, 0.07429620623588562, -0.24560317397117615, -0.1856689602136612, -0.32739436626434326, 0.1810552030801773, -0.16298681497573853, 0.11866631358861923, -0.090008445084095, 0.5250429511070251, -0.3160625696182251, 0.3086574673652649, -0.015496086329221725, -0.35529154539108276, 0.2934380769729614, -0.15382952988147736, 0.3047374486923218, -0.1379091888666153, -0.30795422196388245, -0.2125263214111328, 0.13456276059150696, 0.03651224076747894, 0.15878134965896606, -0.21221087872982025, -0.1884462833404541, -0.1859591007232666, -0.10913629084825516, -0.37596917152404785, -0.08337745815515518, -0.15888255834579468, 0.037386901676654816, 0.13202664256095886, -0.008291729725897312, 0.02381470613181591, -0.2189188450574875, -0.07851855456829071, -0.07212189584970474, -0.005474117584526539, -0.16606201231479645, -0.0968325287103653, -0.1899578720331192, 0.13606159389019012, -0.023145046085119247, 0.42729291319847107, -0.08465371280908585, 0.3160558044910431, -0.19408756494522095, 0.058010250329971313, 0.18133525550365448, -0.09726814180612564, 0.5312526226043701, -0.19358205795288086, 0.36058783531188965, 0.0752997025847435, -0.06903819739818573, -0.16291214525699615, 0.1475307196378708, -0.3223447799682617, 0.3334798514842987, -0.02056039683520794, 0.25469303131103516, -0.30618593096733093, -0.095979705452919, 0.3690735101699829, -0.10425961017608643, -0.17169710993766785, -0.43734097480773926, -0.21395666897296906, -0.21469974517822266, -0.32500606775283813, -0.1538679301738739, -0.10868337005376816, 0.3747183084487915, 0.1292184591293335, -0.09484699368476868, -0.2853345274925232, 0.09274840354919434, 0.041380736976861954, 0.050065964460372925, 0.35137882828712463, 0.020079052075743675, 0.0529235415160656, 0.151258185505867, 0.21694530546665192, 0.15925902128219604, 0.48838797211647034, 0.008352631703019142, -0.1255219727754593, 0.17933157086372375, -0.21380753815174103, 0.1371583193540573, 0.21072058379650116, -0.22828276455402374, -0.11828702688217163, 0.06452839076519012, 0.12922164797782898, -0.12175775319337845, 0.21285006403923035, 0.2519800662994385, 0.11682586371898651, -0.29940879344940186, -0.08628188818693161, 0.335788756608963, -0.1321220099925995, -0.1323205530643463, 0.18303968012332916, 0.01641676388680935, -0.14753109216690063, 0.19820263981819153, 0.11703211814165115, 0.8349282145500183, -0.1414354294538498, -0.11107020825147629, 0.30416640639305115, -0.03332015872001648, 0.10730602592229843, -0.042393699288368225, -0.06507885456085205, -0.4002894163131714, -0.11654756963253021, 0.03476091846823692, -0.013030736707150936, 0.0991140604019165, 0.40243738889694214, -0.23152793943881989, 0.09576909244060516, -0.1495801955461502, 0.20081503689289093, -0.09556684643030167, 0.3369627296924591, 0.0697442889213562, -0.0413166806101799, -0.25948458909988403, 0.36256325244903564, -0.14252659678459167, 0.040197741240262985, -0.3142741024494171, 0.04337317496538162, 0.05444137379527092, -0.1505972445011139, -0.025968369096517563, 0.052966516464948654, -0.16793081164360046, 0.37705138325691223, 0.0004245935706421733, 0.004870832897722721, -0.04648418352007866, 0.1406756192445755, 0.1035490557551384, 0.2181822657585144, -0.07433012872934341, 0.02951195277273655, -0.21075986325740814, -0.07087194174528122, -0.18927375972270966, 0.14813321828842163, 0.15044380724430084, -0.11482763290405273, -0.3553989827632904, 0.19734631478786469, 0.00005423010588856414, -0.2562927007675171, 0.05180831626057625, 0.1291075497865677, -0.07927139848470688, -0.5663284659385681, -0.4583545923233032, -0.13428716361522675, 0.0517142117023468, 0.011712569743394852, 0.33762088418006897, 0.06781738251447678, -0.014402057975530624, -0.007927590981125832, 0.3786776065826416, -0.3800787925720215, -0.03177887573838234, 0.3616412878036499, -0.046929918229579926, 0.096266970038414, 0.6125103235244751, -0.006390782073140144, -0.08761405199766159, -0.4146157205104828, 0.06018860638141632, 0.14495627582073212, -0.2670140862464905, 0.12189153581857681, 0.08740229159593582, -0.0674884095788002, 0.18970827758312225, 0.24888835847377777, 0.21435391902923584, 0.10486064851284027, 0.13482041656970978, -0.45449092984199524, -0.2815389335155487, 0.010136773809790611, 0.10336647182703018, 0.16795344650745392, 0.22302520275115967, -0.15597131848335266, -0.027493271976709366, 0.049299344420433044, -0.5319186449050903, 0.01350363902747631, -0.2641611695289612, 0.07362307608127594, 0.15836277604103088, 0.034316420555114746, -0.036458421498537064, 0.03485266864299774, 0.36037978529930115, 0.043054237961769104, -0.07727042585611343, -0.420450896024704, 0.012509757652878761, 0.03541210666298866, -0.06967034190893173, -0.02271188423037529, -0.2729772627353668, -0.38286474347114563, -0.25157293677330017, 0.004868695046752691, -0.12439512461423874, 0.13733252882957458, 0.049104973673820496, 0.006659642793238163, 0.10093481093645096, 0.11219072341918945, -0.07774654775857925, 0.2663349211215973, 0.031758323311805725, 0.09222784638404846, -0.2536080777645111, -0.07312304526567459, 0.016392026096582413, -0.1486680507659912, -0.0841909646987915, 0.05887419730424881, 0.14549070596694946, 0.0014587356708943844, 0.1394331008195877, -0.3839673101902008, 0.1723925918340683, 0.16164739429950714, 0.2025856375694275, 0.10962057113647461, -0.2814158499240875, 0.014061498455703259, 0.0317375622689724, 0.3620636463165283, -0.24236255884170532, 0.023942509666085243, 0.10489245504140854, -0.15795424580574036, -0.05349412560462952, 0.027798239141702652, -0.04528314247727394, 0.00103305175434798, -0.04152337461709976, -0.05166706070303917, 0.334337443113327, -0.1703510731458664, -0.10273385047912598, 0.18356947600841522, -0.11950892210006714, 0.0717974528670311, 0.3154437839984894, 0.4460807144641876, 0.011938783340156078, 0.3961818516254425, 0.01856835186481476, 0.11104851961135864, -0.05670991539955139, 0.10047338157892227, -0.19859158992767334, -0.6472693085670471, 0.26546892523765564, 0.48775067925453186, -0.16235017776489258, 0.011601259931921959, 0.08719449490308762, 0.08227624744176865, -0.12062935531139374, -0.003698028391227126, -0.23495043814182281, 0.12710462510585785, -0.2560421824455261, -0.042332470417022705, -0.2812143564224243, -0.030836552381515503, -0.2260313332080841, -0.03283768519759178, -0.06971466541290283, 0.021382687613368034, 0.12241154164075851, 0.09333210438489914, -0.14053864777088165, -0.34794703125953674, 0.2601649761199951, 0.19771146774291992, -0.19968406856060028, -0.25857555866241455, 0.3645426630973816, 0.07636337727308273, 0.1366041600704193, 0.5958108305931091, 0.14281046390533447, 0.3709622919559479, 0.2861957252025604, -0.019779270514845848, -0.013416922651231289, -0.012650811113417149, -0.22610574960708618, 0.0049579935148358345, 0.18354268372058868, 0.16119103133678436, 0.30456891655921936, 0.4944479763507843, 0.36871904134750366, -0.23078112304210663, -0.005316856317222118, 0.3694717288017273, 0.24021056294441223, -0.14890165627002716, 0.15952163934707642, -0.013430426828563213, -0.12593215703964233, -0.3215126395225525, -0.056299109011888504, -0.3608112335205078, 0.0023645381443202496, 0.18288885056972504, -0.09978998452425003, 0.2863853871822357, 0.08378665149211884, 0.19176289439201355, -0.06563669443130493, 0.46374815702438354, 0.2172633409500122, 0.07372042536735535, -0.3218674063682556, -0.022214507684111595, -0.7895218729972839, 0.11684179306030273, 0.17360806465148926, -0.09522543102502823, 0.03802609071135521, -0.05407405272126198, 0.21748128533363342, 0.060891423374414444, 0.21876181662082672, 0.09565930813550949, 0.16860799491405487, -0.07097045332193375, -0.2351243644952774, -0.26110929250717163, -0.017580442130565643, 0.02416195347905159, -0.005409933626651764, -0.2506404519081116, 0.18542258441448212, 0.009058170020580292, 0.2636178135871887, -0.14414696395397186, -0.12595777213573456, -0.34591174125671387, 0.01790970005095005, 0.25599420070648193, -0.08029792457818985, 0.4752177596092224, -0.10045283287763596, 0.3354480266571045, 0.024465860798954964, -0.19163291156291962, 0.02155909687280655, 0.2983158230781555, 0.22293400764465332, 0.07770909368991852, -0.004797829780727625, 0.2431587278842926, -0.12146563082933426, -0.02963477373123169, -0.1619270294904709, 0.09178498387336731, -0.21707595884799957, 0.11369490623474121, 0.06789906322956085, -0.07685425132513046, 0.05729587376117706, 0.03224557638168335, 0.001634899410419166, 0.4782814383506775, -0.2190883606672287, -0.24489867687225342, 0.38312676548957825, -0.15555255115032196, -0.33523210883140564, 0.08511926233768463, 0.2331029176712036, 0.1488516479730606, 0.02317286841571331, -0.24009916186332703, 0.23371915519237518, 0.3922722339630127, -0.21562379598617554, -0.17359939217567444, 0.20162241160869598, -0.15935717523097992, 0.14121872186660767, 0.07253663241863251, 0.29643696546554565, 0.2535303831100464, 0.011796669103205204, -0.08905036002397537, -0.11034223437309265 ]
https://github.com/huggingface/datasets/issues/5388
Getting Value Error while loading a dataset..
@valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`. Please, restart your Colab runtime and execute the install commands before importing `datasets`: ```python !pip install datasets !pip install zstandard from datasets import load_dataset ds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) next(iter(ds)) ```
### Describe the bug I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook. ``` WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module> 6 ) 7 ----> 8 next(iter(law_dataset_streamed)) 17 frames [/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression) 485 compression = infer_compression(urlpath) 486 if compression is not None and compression not in compr: --> 487 raise ValueError("Compression type %s not supported" % compression) 488 return compression 489 ValueError: Compression type zstd not supported ``` ### Steps to reproduce the bug ``` !pip install zstandard from datasets import load_dataset lds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) ``` ### Expected behavior I expect an iterable object as the output 'lds' to be created. ### Environment info Windows laptop with Google Colab notebook
49
Getting Value Error while loading a dataset..
[ -0.38456305861473083, -0.19576339423656464, -0.2570847272872925, 0.40704256296157837, 0.33023571968078613, 0.01684950664639473, 0.19810250401496887, 0.266683429479599, 0.15509603917598724, 0.3449268937110901, -0.052366308867931366, 0.32243192195892334, -0.004396338481456041, 0.27496808767318726, -0.4670313894748688, 0.023242268711328506, -0.11688071489334106, 0.2781883180141449, 0.04005762189626694, 0.07088600099086761, -0.18141818046569824, 0.17756548523902893, -0.23530712723731995, 0.24324911832809448, -0.2748315632343292, -0.15582357347011566, 0.06801203638315201, 0.28647714853286743, -0.02217792719602585, -0.24585461616516113, 0.03284236043691635, -0.05287151411175728, 0.2572430670261383, 0.33273187279701233, -0.00009355726797366515, 0.0018120483728125691, 0.301460862159729, -0.014719893224537373, -0.2666448950767517, -0.047215234488248825, -0.33906838297843933, 0.019338689744472504, -0.004182230215519667, -0.30079391598701477, -0.15846583247184753, -0.1668376624584198, -0.27978625893592834, -0.3704090714454651, 0.18557554483413696, 0.24556276202201843, 0.42389973998069763, 0.13123303651809692, 0.026314251124858856, -0.2810450494289398, 0.20612648129463196, -0.2014346718788147, 0.21698077023029327, 0.38490793108940125, 0.1345541626214981, 0.04045428708195686, 0.111717090010643, 0.09950082004070282, -0.06061604246497154, 0.061795465648174286, 0.07561736553907394, 0.017211105674505234, 0.2574961185455322, 0.07286711782217026, 0.31902816891670227, 0.029127540066838264, 0.5542587041854858, 0.015606708824634552, -0.03714366257190704, 0.17038390040397644, 0.17549104988574982, -0.2742319107055664, 0.22175350785255432, 0.039243753999471664, -0.06069602072238922, 0.19260801374912262, 0.06226150691509247, 0.0665973648428917, -0.24474474787712097, 0.19657839834690094, -0.147974893450737, 0.08414766937494278, -0.3347519636154175, 0.10556023567914963, 0.09305880218744278, -0.2003292739391327, 0.03303747624158859, -0.056683868169784546, -0.06589248031377792, 0.047411367297172546, -0.1613920032978058, 0.034842412918806076, -0.1197214424610138, 0.088261678814888, -0.011872907169163227, -0.11143181473016739, 0.0866200402379036, 0.07000886648893356, 0.10763727128505707, 0.24729353189468384, 0.35285934805870056, -0.14691409468650818, 0.13274815678596497, -0.07554861903190613, 0.0887254923582077, 0.02544284425675869, -0.09901219606399536, -0.07440917193889618, -0.15185455977916718, -0.31489938497543335, 0.2759760320186615, 0.09225944429636002, 0.17620891332626343, -0.2859446108341217, -0.46288833022117615, 0.13147412240505219, 0.05315309017896652, -0.02831730619072914, 0.09432075172662735, 0.5245619416236877, 0.050874218344688416, 0.02304864302277565, 0.15218719840049744, 0.216297447681427, -0.06007671728730202, -0.3757207691669464, -0.34215185046195984, 0.043546564877033234, -0.1285926252603531, -0.21122859418392181, 0.12351145595312119, -0.05392550677061081, 0.10158431529998779, -0.06313668191432953, -0.15561439096927643, -0.38499322533607483, 0.11104477196931839, -0.2913457751274109, -0.12599840760231018, 0.23824390769004822, 0.0063897049985826015, -0.03959835693240166, 0.21506057679653168, -0.10631611198186874, 0.10118483752012253, 0.35387828946113586, -0.2432580292224884, -0.2724260687828064, -0.09339427947998047, 0.3953929841518402, 0.17080797255039215, 0.062398478388786316, -0.13474033772945404, 0.13677489757537842, 0.15644414722919464, -0.1827770620584488, -0.31172075867652893, 0.05327681824564934, -0.20598003268241882, -0.23430480062961578, 0.18035359680652618, 0.22341173887252808, -0.46355316042900085, -0.004725013859570026, -0.19343499839305878, -0.28757014870643616, -0.04297477379441261, -0.03180772811174393, -0.31454551219940186, 0.3602273464202881, -0.041097983717918396, 0.1643805205821991, 0.33944687247276306, -0.1908629685640335, -0.19458895921707153, 0.24959823489189148, -0.16372893750667572, -0.45817670226097107, -0.17222072184085846, 0.2118857055902481, 0.042724866420030594, -0.11436719447374344, 0.21040458977222443, 0.03877473622560501, 0.05923805013298988, -0.027201397344470024, -0.1438830941915512, -0.11848203837871552, 0.23079510033130646, 0.26301252841949463, -0.1548546850681305, 0.21662123501300812, 0.2537757456302643, -0.11728116124868393, -0.06935980170965195, -0.0791940838098526, -0.09856631606817245, 0.333592027425766, 0.14793021976947784, 0.07527587562799454, -0.17191843688488007, -0.12176883220672607, -0.42059096693992615, -0.06855862587690353, -0.006051670294255018, -0.2503397762775421, 0.0427742563188076, 0.004062519874423742, -0.4744282066822052, 0.24088016152381897, 0.025953384116292, 0.2634580135345459, 0.3029908239841461, 0.11611205339431763, -0.2384473979473114, -0.181662917137146, -0.04669307544827461, 0.18416400253772736, -0.18398690223693848, -0.13241362571716309, -0.18572573363780975, 0.14664334058761597, -0.2505294680595398, -0.1341487020254135, 0.19546332955360413, -0.015603882260620594, 0.31979092955589294, 0.02385520190000534, -0.21564839780330658, 0.4575131833553314, -0.007752072531729937, 0.07911209762096405, 0.006077987141907215, -0.2160833328962326, -0.10747826844453812, -0.2574376165866852, 0.09240911900997162, -0.1294933706521988, 0.33341658115386963, 0.015021875500679016, 0.04241330549120903, 0.261113703250885, -0.33340319991111755, -0.16781161725521088, -0.13626576960086823, -0.0627678856253624, 0.36539626121520996, -0.10872456431388855, 0.1531609445810318, -0.25779685378074646, 0.010223358869552612, 0.04534083604812622, 0.0878133699297905, -0.004951120354235172, -0.3146171271800995, -0.1822884976863861, 0.05632203072309494, -0.08797747641801834, 0.1925910860300064, 0.03561731055378914, 0.06258715689182281, -0.09153833985328674, 0.03999403119087219, 0.17317433655261993, 0.4971867501735687, 0.28380087018013, -0.2332017868757248, 0.01476157084107399, 0.07557491213083267, -0.10442081838846207, 0.19025206565856934, -0.055313192307949066, 0.19655795395374298, 0.25493109226226807, 0.01358911395072937, 0.04133442044258118, -0.10704897344112396, 0.0012607027310878038, 0.2189953625202179, 0.28486892580986023, -0.4300149977207184, -0.07252222299575806, -0.22441807389259338, -0.06432778388261795, 0.01826680824160576, 0.059874966740608215, 0.095296211540699, -0.21232658624649048, -0.1566009223461151, 0.11667191237211227, -0.1587018370628357, 0.10572387278079987, -0.19729739427566528, 0.27562177181243896, 0.26638612151145935, 0.12114018201828003, -0.1098148375749588, -0.17437990009784698, -0.2608622610569, 0.17396125197410583, 0.02719051018357277, 0.21776075661182404, 0.38351625204086304, 0.05567322298884392, 0.1619391143321991, -0.1584063619375229, -0.06119295582175255, 0.049573902040719986, 0.023668428882956505, 0.1965404599905014, 0.02679913304746151, 0.26379141211509705, 0.02598225697875023, -0.2896542251110077, 0.39924123883247375, -0.16773106157779694, -0.03410416096448898, 0.20592211186885834, 0.14712926745414734, -0.13554160296916962, 0.02593899518251419, -0.4572851359844208, -0.30417096614837646, -0.1577201783657074, -0.4095889925956726, 0.018013954162597656, 0.0922478437423706, 0.08082488179206848, 0.17569294571876526, 0.16116786003112793, 0.21118028461933136, 0.03884980082511902, -0.49155792593955994, -0.09302189946174622, 0.10622557997703552, -0.15784268081188202, -0.38315436244010925, 0.1739857792854309, 0.096207395195961, 0.12025772035121918, 0.155766099691391, -0.26590678095817566, -0.08929690718650818, -0.030204985290765762, -0.005133566912263632, -0.23354578018188477, -0.09131547808647156, 0.1245889887213707, 0.07429620623588562, -0.24560317397117615, -0.1856689602136612, -0.32739436626434326, 0.1810552030801773, -0.16298681497573853, 0.11866631358861923, -0.090008445084095, 0.5250429511070251, -0.3160625696182251, 0.3086574673652649, -0.015496086329221725, -0.35529154539108276, 0.2934380769729614, -0.15382952988147736, 0.3047374486923218, -0.1379091888666153, -0.30795422196388245, -0.2125263214111328, 0.13456276059150696, 0.03651224076747894, 0.15878134965896606, -0.21221087872982025, -0.1884462833404541, -0.1859591007232666, -0.10913629084825516, -0.37596917152404785, -0.08337745815515518, -0.15888255834579468, 0.037386901676654816, 0.13202664256095886, -0.008291729725897312, 0.02381470613181591, -0.2189188450574875, -0.07851855456829071, -0.07212189584970474, -0.005474117584526539, -0.16606201231479645, -0.0968325287103653, -0.1899578720331192, 0.13606159389019012, -0.023145046085119247, 0.42729291319847107, -0.08465371280908585, 0.3160558044910431, -0.19408756494522095, 0.058010250329971313, 0.18133525550365448, -0.09726814180612564, 0.5312526226043701, -0.19358205795288086, 0.36058783531188965, 0.0752997025847435, -0.06903819739818573, -0.16291214525699615, 0.1475307196378708, -0.3223447799682617, 0.3334798514842987, -0.02056039683520794, 0.25469303131103516, -0.30618593096733093, -0.095979705452919, 0.3690735101699829, -0.10425961017608643, -0.17169710993766785, -0.43734097480773926, -0.21395666897296906, -0.21469974517822266, -0.32500606775283813, -0.1538679301738739, -0.10868337005376816, 0.3747183084487915, 0.1292184591293335, -0.09484699368476868, -0.2853345274925232, 0.09274840354919434, 0.041380736976861954, 0.050065964460372925, 0.35137882828712463, 0.020079052075743675, 0.0529235415160656, 0.151258185505867, 0.21694530546665192, 0.15925902128219604, 0.48838797211647034, 0.008352631703019142, -0.1255219727754593, 0.17933157086372375, -0.21380753815174103, 0.1371583193540573, 0.21072058379650116, -0.22828276455402374, -0.11828702688217163, 0.06452839076519012, 0.12922164797782898, -0.12175775319337845, 0.21285006403923035, 0.2519800662994385, 0.11682586371898651, -0.29940879344940186, -0.08628188818693161, 0.335788756608963, -0.1321220099925995, -0.1323205530643463, 0.18303968012332916, 0.01641676388680935, -0.14753109216690063, 0.19820263981819153, 0.11703211814165115, 0.8349282145500183, -0.1414354294538498, -0.11107020825147629, 0.30416640639305115, -0.03332015872001648, 0.10730602592229843, -0.042393699288368225, -0.06507885456085205, -0.4002894163131714, -0.11654756963253021, 0.03476091846823692, -0.013030736707150936, 0.0991140604019165, 0.40243738889694214, -0.23152793943881989, 0.09576909244060516, -0.1495801955461502, 0.20081503689289093, -0.09556684643030167, 0.3369627296924591, 0.0697442889213562, -0.0413166806101799, -0.25948458909988403, 0.36256325244903564, -0.14252659678459167, 0.040197741240262985, -0.3142741024494171, 0.04337317496538162, 0.05444137379527092, -0.1505972445011139, -0.025968369096517563, 0.052966516464948654, -0.16793081164360046, 0.37705138325691223, 0.0004245935706421733, 0.004870832897722721, -0.04648418352007866, 0.1406756192445755, 0.1035490557551384, 0.2181822657585144, -0.07433012872934341, 0.02951195277273655, -0.21075986325740814, -0.07087194174528122, -0.18927375972270966, 0.14813321828842163, 0.15044380724430084, -0.11482763290405273, -0.3553989827632904, 0.19734631478786469, 0.00005423010588856414, -0.2562927007675171, 0.05180831626057625, 0.1291075497865677, -0.07927139848470688, -0.5663284659385681, -0.4583545923233032, -0.13428716361522675, 0.0517142117023468, 0.011712569743394852, 0.33762088418006897, 0.06781738251447678, -0.014402057975530624, -0.007927590981125832, 0.3786776065826416, -0.3800787925720215, -0.03177887573838234, 0.3616412878036499, -0.046929918229579926, 0.096266970038414, 0.6125103235244751, -0.006390782073140144, -0.08761405199766159, -0.4146157205104828, 0.06018860638141632, 0.14495627582073212, -0.2670140862464905, 0.12189153581857681, 0.08740229159593582, -0.0674884095788002, 0.18970827758312225, 0.24888835847377777, 0.21435391902923584, 0.10486064851284027, 0.13482041656970978, -0.45449092984199524, -0.2815389335155487, 0.010136773809790611, 0.10336647182703018, 0.16795344650745392, 0.22302520275115967, -0.15597131848335266, -0.027493271976709366, 0.049299344420433044, -0.5319186449050903, 0.01350363902747631, -0.2641611695289612, 0.07362307608127594, 0.15836277604103088, 0.034316420555114746, -0.036458421498537064, 0.03485266864299774, 0.36037978529930115, 0.043054237961769104, -0.07727042585611343, -0.420450896024704, 0.012509757652878761, 0.03541210666298866, -0.06967034190893173, -0.02271188423037529, -0.2729772627353668, -0.38286474347114563, -0.25157293677330017, 0.004868695046752691, -0.12439512461423874, 0.13733252882957458, 0.049104973673820496, 0.006659642793238163, 0.10093481093645096, 0.11219072341918945, -0.07774654775857925, 0.2663349211215973, 0.031758323311805725, 0.09222784638404846, -0.2536080777645111, -0.07312304526567459, 0.016392026096582413, -0.1486680507659912, -0.0841909646987915, 0.05887419730424881, 0.14549070596694946, 0.0014587356708943844, 0.1394331008195877, -0.3839673101902008, 0.1723925918340683, 0.16164739429950714, 0.2025856375694275, 0.10962057113647461, -0.2814158499240875, 0.014061498455703259, 0.0317375622689724, 0.3620636463165283, -0.24236255884170532, 0.023942509666085243, 0.10489245504140854, -0.15795424580574036, -0.05349412560462952, 0.027798239141702652, -0.04528314247727394, 0.00103305175434798, -0.04152337461709976, -0.05166706070303917, 0.334337443113327, -0.1703510731458664, -0.10273385047912598, 0.18356947600841522, -0.11950892210006714, 0.0717974528670311, 0.3154437839984894, 0.4460807144641876, 0.011938783340156078, 0.3961818516254425, 0.01856835186481476, 0.11104851961135864, -0.05670991539955139, 0.10047338157892227, -0.19859158992767334, -0.6472693085670471, 0.26546892523765564, 0.48775067925453186, -0.16235017776489258, 0.011601259931921959, 0.08719449490308762, 0.08227624744176865, -0.12062935531139374, -0.003698028391227126, -0.23495043814182281, 0.12710462510585785, -0.2560421824455261, -0.042332470417022705, -0.2812143564224243, -0.030836552381515503, -0.2260313332080841, -0.03283768519759178, -0.06971466541290283, 0.021382687613368034, 0.12241154164075851, 0.09333210438489914, -0.14053864777088165, -0.34794703125953674, 0.2601649761199951, 0.19771146774291992, -0.19968406856060028, -0.25857555866241455, 0.3645426630973816, 0.07636337727308273, 0.1366041600704193, 0.5958108305931091, 0.14281046390533447, 0.3709622919559479, 0.2861957252025604, -0.019779270514845848, -0.013416922651231289, -0.012650811113417149, -0.22610574960708618, 0.0049579935148358345, 0.18354268372058868, 0.16119103133678436, 0.30456891655921936, 0.4944479763507843, 0.36871904134750366, -0.23078112304210663, -0.005316856317222118, 0.3694717288017273, 0.24021056294441223, -0.14890165627002716, 0.15952163934707642, -0.013430426828563213, -0.12593215703964233, -0.3215126395225525, -0.056299109011888504, -0.3608112335205078, 0.0023645381443202496, 0.18288885056972504, -0.09978998452425003, 0.2863853871822357, 0.08378665149211884, 0.19176289439201355, -0.06563669443130493, 0.46374815702438354, 0.2172633409500122, 0.07372042536735535, -0.3218674063682556, -0.022214507684111595, -0.7895218729972839, 0.11684179306030273, 0.17360806465148926, -0.09522543102502823, 0.03802609071135521, -0.05407405272126198, 0.21748128533363342, 0.060891423374414444, 0.21876181662082672, 0.09565930813550949, 0.16860799491405487, -0.07097045332193375, -0.2351243644952774, -0.26110929250717163, -0.017580442130565643, 0.02416195347905159, -0.005409933626651764, -0.2506404519081116, 0.18542258441448212, 0.009058170020580292, 0.2636178135871887, -0.14414696395397186, -0.12595777213573456, -0.34591174125671387, 0.01790970005095005, 0.25599420070648193, -0.08029792457818985, 0.4752177596092224, -0.10045283287763596, 0.3354480266571045, 0.024465860798954964, -0.19163291156291962, 0.02155909687280655, 0.2983158230781555, 0.22293400764465332, 0.07770909368991852, -0.004797829780727625, 0.2431587278842926, -0.12146563082933426, -0.02963477373123169, -0.1619270294904709, 0.09178498387336731, -0.21707595884799957, 0.11369490623474121, 0.06789906322956085, -0.07685425132513046, 0.05729587376117706, 0.03224557638168335, 0.001634899410419166, 0.4782814383506775, -0.2190883606672287, -0.24489867687225342, 0.38312676548957825, -0.15555255115032196, -0.33523210883140564, 0.08511926233768463, 0.2331029176712036, 0.1488516479730606, 0.02317286841571331, -0.24009916186332703, 0.23371915519237518, 0.3922722339630127, -0.21562379598617554, -0.17359939217567444, 0.20162241160869598, -0.15935717523097992, 0.14121872186660767, 0.07253663241863251, 0.29643696546554565, 0.2535303831100464, 0.011796669103205204, -0.08905036002397537, -0.11034223437309265 ]
https://github.com/huggingface/datasets/issues/5388
Getting Value Error while loading a dataset..
> @valmetisrinivas you get that error because you imported `datasets` (and thus `fsspec`) before installing `zstandard`. > > Please, restart your Colab runtime and execute the install commands before importing `datasets`: > > ```python > !pip install datasets > !pip install zstandard > > from datasets import load_dataset > > ds = load_dataset( > "json", > data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", > split="train", > streaming=True, > ) > next(iter(ds)) > ``` I guess that was the problem, importing datasets before the installation of zstandard. Thank you for the feedback.
### Describe the bug I am trying to load a dataset using Hugging Face Datasets load_dataset method. I am getting the value error as show below. Can someone help with this? I am using Windows laptop and Google Colab notebook. ``` WARNING:datasets.builder:Using custom data configuration default-a1d9e8eaedd958cd --------------------------------------------------------------------------- ValueError Traceback (most recent call last) [<ipython-input-12-5b4fdcb8e6d5>](https://localhost:8080/#) in <module> 6 ) 7 ----> 8 next(iter(law_dataset_streamed)) 17 frames [/usr/local/lib/python3.8/dist-packages/fsspec/core.py](https://localhost:8080/#) in get_compression(urlpath, compression) 485 compression = infer_compression(urlpath) 486 if compression is not None and compression not in compr: --> 487 raise ValueError("Compression type %s not supported" % compression) 488 return compression 489 ValueError: Compression type zstd not supported ``` ### Steps to reproduce the bug ``` !pip install zstandard from datasets import load_dataset lds = load_dataset( "json", data_files="https://the-eye.eu/public/AI/pile_preliminary_components/FreeLaw_Opinions.jsonl.zst", split="train", streaming=True, ) ``` ### Expected behavior I expect an iterable object as the output 'lds' to be created. ### Environment info Windows laptop with Google Colab notebook
85
Getting Value Error while loading a dataset..
[ -0.38456305861473083, -0.19576339423656464, -0.2570847272872925, 0.40704256296157837, 0.33023571968078613, 0.01684950664639473, 0.19810250401496887, 0.266683429479599, 0.15509603917598724, 0.3449268937110901, -0.052366308867931366, 0.32243192195892334, -0.004396338481456041, 0.27496808767318726, -0.4670313894748688, 0.023242268711328506, -0.11688071489334106, 0.2781883180141449, 0.04005762189626694, 0.07088600099086761, -0.18141818046569824, 0.17756548523902893, -0.23530712723731995, 0.24324911832809448, -0.2748315632343292, -0.15582357347011566, 0.06801203638315201, 0.28647714853286743, -0.02217792719602585, -0.24585461616516113, 0.03284236043691635, -0.05287151411175728, 0.2572430670261383, 0.33273187279701233, -0.00009355726797366515, 0.0018120483728125691, 0.301460862159729, -0.014719893224537373, -0.2666448950767517, -0.047215234488248825, -0.33906838297843933, 0.019338689744472504, -0.004182230215519667, -0.30079391598701477, -0.15846583247184753, -0.1668376624584198, -0.27978625893592834, -0.3704090714454651, 0.18557554483413696, 0.24556276202201843, 0.42389973998069763, 0.13123303651809692, 0.026314251124858856, -0.2810450494289398, 0.20612648129463196, -0.2014346718788147, 0.21698077023029327, 0.38490793108940125, 0.1345541626214981, 0.04045428708195686, 0.111717090010643, 0.09950082004070282, -0.06061604246497154, 0.061795465648174286, 0.07561736553907394, 0.017211105674505234, 0.2574961185455322, 0.07286711782217026, 0.31902816891670227, 0.029127540066838264, 0.5542587041854858, 0.015606708824634552, -0.03714366257190704, 0.17038390040397644, 0.17549104988574982, -0.2742319107055664, 0.22175350785255432, 0.039243753999471664, -0.06069602072238922, 0.19260801374912262, 0.06226150691509247, 0.0665973648428917, -0.24474474787712097, 0.19657839834690094, -0.147974893450737, 0.08414766937494278, -0.3347519636154175, 0.10556023567914963, 0.09305880218744278, -0.2003292739391327, 0.03303747624158859, -0.056683868169784546, -0.06589248031377792, 0.047411367297172546, -0.1613920032978058, 0.034842412918806076, -0.1197214424610138, 0.088261678814888, -0.011872907169163227, -0.11143181473016739, 0.0866200402379036, 0.07000886648893356, 0.10763727128505707, 0.24729353189468384, 0.35285934805870056, -0.14691409468650818, 0.13274815678596497, -0.07554861903190613, 0.0887254923582077, 0.02544284425675869, -0.09901219606399536, -0.07440917193889618, -0.15185455977916718, -0.31489938497543335, 0.2759760320186615, 0.09225944429636002, 0.17620891332626343, -0.2859446108341217, -0.46288833022117615, 0.13147412240505219, 0.05315309017896652, -0.02831730619072914, 0.09432075172662735, 0.5245619416236877, 0.050874218344688416, 0.02304864302277565, 0.15218719840049744, 0.216297447681427, -0.06007671728730202, -0.3757207691669464, -0.34215185046195984, 0.043546564877033234, -0.1285926252603531, -0.21122859418392181, 0.12351145595312119, -0.05392550677061081, 0.10158431529998779, -0.06313668191432953, -0.15561439096927643, -0.38499322533607483, 0.11104477196931839, -0.2913457751274109, -0.12599840760231018, 0.23824390769004822, 0.0063897049985826015, -0.03959835693240166, 0.21506057679653168, -0.10631611198186874, 0.10118483752012253, 0.35387828946113586, -0.2432580292224884, -0.2724260687828064, -0.09339427947998047, 0.3953929841518402, 0.17080797255039215, 0.062398478388786316, -0.13474033772945404, 0.13677489757537842, 0.15644414722919464, -0.1827770620584488, -0.31172075867652893, 0.05327681824564934, -0.20598003268241882, -0.23430480062961578, 0.18035359680652618, 0.22341173887252808, -0.46355316042900085, -0.004725013859570026, -0.19343499839305878, -0.28757014870643616, -0.04297477379441261, -0.03180772811174393, -0.31454551219940186, 0.3602273464202881, -0.041097983717918396, 0.1643805205821991, 0.33944687247276306, -0.1908629685640335, -0.19458895921707153, 0.24959823489189148, -0.16372893750667572, -0.45817670226097107, -0.17222072184085846, 0.2118857055902481, 0.042724866420030594, -0.11436719447374344, 0.21040458977222443, 0.03877473622560501, 0.05923805013298988, -0.027201397344470024, -0.1438830941915512, -0.11848203837871552, 0.23079510033130646, 0.26301252841949463, -0.1548546850681305, 0.21662123501300812, 0.2537757456302643, -0.11728116124868393, -0.06935980170965195, -0.0791940838098526, -0.09856631606817245, 0.333592027425766, 0.14793021976947784, 0.07527587562799454, -0.17191843688488007, -0.12176883220672607, -0.42059096693992615, -0.06855862587690353, -0.006051670294255018, -0.2503397762775421, 0.0427742563188076, 0.004062519874423742, -0.4744282066822052, 0.24088016152381897, 0.025953384116292, 0.2634580135345459, 0.3029908239841461, 0.11611205339431763, -0.2384473979473114, -0.181662917137146, -0.04669307544827461, 0.18416400253772736, -0.18398690223693848, -0.13241362571716309, -0.18572573363780975, 0.14664334058761597, -0.2505294680595398, -0.1341487020254135, 0.19546332955360413, -0.015603882260620594, 0.31979092955589294, 0.02385520190000534, -0.21564839780330658, 0.4575131833553314, -0.007752072531729937, 0.07911209762096405, 0.006077987141907215, -0.2160833328962326, -0.10747826844453812, -0.2574376165866852, 0.09240911900997162, -0.1294933706521988, 0.33341658115386963, 0.015021875500679016, 0.04241330549120903, 0.261113703250885, -0.33340319991111755, -0.16781161725521088, -0.13626576960086823, -0.0627678856253624, 0.36539626121520996, -0.10872456431388855, 0.1531609445810318, -0.25779685378074646, 0.010223358869552612, 0.04534083604812622, 0.0878133699297905, -0.004951120354235172, -0.3146171271800995, -0.1822884976863861, 0.05632203072309494, -0.08797747641801834, 0.1925910860300064, 0.03561731055378914, 0.06258715689182281, -0.09153833985328674, 0.03999403119087219, 0.17317433655261993, 0.4971867501735687, 0.28380087018013, -0.2332017868757248, 0.01476157084107399, 0.07557491213083267, -0.10442081838846207, 0.19025206565856934, -0.055313192307949066, 0.19655795395374298, 0.25493109226226807, 0.01358911395072937, 0.04133442044258118, -0.10704897344112396, 0.0012607027310878038, 0.2189953625202179, 0.28486892580986023, -0.4300149977207184, -0.07252222299575806, -0.22441807389259338, -0.06432778388261795, 0.01826680824160576, 0.059874966740608215, 0.095296211540699, -0.21232658624649048, -0.1566009223461151, 0.11667191237211227, -0.1587018370628357, 0.10572387278079987, -0.19729739427566528, 0.27562177181243896, 0.26638612151145935, 0.12114018201828003, -0.1098148375749588, -0.17437990009784698, -0.2608622610569, 0.17396125197410583, 0.02719051018357277, 0.21776075661182404, 0.38351625204086304, 0.05567322298884392, 0.1619391143321991, -0.1584063619375229, -0.06119295582175255, 0.049573902040719986, 0.023668428882956505, 0.1965404599905014, 0.02679913304746151, 0.26379141211509705, 0.02598225697875023, -0.2896542251110077, 0.39924123883247375, -0.16773106157779694, -0.03410416096448898, 0.20592211186885834, 0.14712926745414734, -0.13554160296916962, 0.02593899518251419, -0.4572851359844208, -0.30417096614837646, -0.1577201783657074, -0.4095889925956726, 0.018013954162597656, 0.0922478437423706, 0.08082488179206848, 0.17569294571876526, 0.16116786003112793, 0.21118028461933136, 0.03884980082511902, -0.49155792593955994, -0.09302189946174622, 0.10622557997703552, -0.15784268081188202, -0.38315436244010925, 0.1739857792854309, 0.096207395195961, 0.12025772035121918, 0.155766099691391, -0.26590678095817566, -0.08929690718650818, -0.030204985290765762, -0.005133566912263632, -0.23354578018188477, -0.09131547808647156, 0.1245889887213707, 0.07429620623588562, -0.24560317397117615, -0.1856689602136612, -0.32739436626434326, 0.1810552030801773, -0.16298681497573853, 0.11866631358861923, -0.090008445084095, 0.5250429511070251, -0.3160625696182251, 0.3086574673652649, -0.015496086329221725, -0.35529154539108276, 0.2934380769729614, -0.15382952988147736, 0.3047374486923218, -0.1379091888666153, -0.30795422196388245, -0.2125263214111328, 0.13456276059150696, 0.03651224076747894, 0.15878134965896606, -0.21221087872982025, -0.1884462833404541, -0.1859591007232666, -0.10913629084825516, -0.37596917152404785, -0.08337745815515518, -0.15888255834579468, 0.037386901676654816, 0.13202664256095886, -0.008291729725897312, 0.02381470613181591, -0.2189188450574875, -0.07851855456829071, -0.07212189584970474, -0.005474117584526539, -0.16606201231479645, -0.0968325287103653, -0.1899578720331192, 0.13606159389019012, -0.023145046085119247, 0.42729291319847107, -0.08465371280908585, 0.3160558044910431, -0.19408756494522095, 0.058010250329971313, 0.18133525550365448, -0.09726814180612564, 0.5312526226043701, -0.19358205795288086, 0.36058783531188965, 0.0752997025847435, -0.06903819739818573, -0.16291214525699615, 0.1475307196378708, -0.3223447799682617, 0.3334798514842987, -0.02056039683520794, 0.25469303131103516, -0.30618593096733093, -0.095979705452919, 0.3690735101699829, -0.10425961017608643, -0.17169710993766785, -0.43734097480773926, -0.21395666897296906, -0.21469974517822266, -0.32500606775283813, -0.1538679301738739, -0.10868337005376816, 0.3747183084487915, 0.1292184591293335, -0.09484699368476868, -0.2853345274925232, 0.09274840354919434, 0.041380736976861954, 0.050065964460372925, 0.35137882828712463, 0.020079052075743675, 0.0529235415160656, 0.151258185505867, 0.21694530546665192, 0.15925902128219604, 0.48838797211647034, 0.008352631703019142, -0.1255219727754593, 0.17933157086372375, -0.21380753815174103, 0.1371583193540573, 0.21072058379650116, -0.22828276455402374, -0.11828702688217163, 0.06452839076519012, 0.12922164797782898, -0.12175775319337845, 0.21285006403923035, 0.2519800662994385, 0.11682586371898651, -0.29940879344940186, -0.08628188818693161, 0.335788756608963, -0.1321220099925995, -0.1323205530643463, 0.18303968012332916, 0.01641676388680935, -0.14753109216690063, 0.19820263981819153, 0.11703211814165115, 0.8349282145500183, -0.1414354294538498, -0.11107020825147629, 0.30416640639305115, -0.03332015872001648, 0.10730602592229843, -0.042393699288368225, -0.06507885456085205, -0.4002894163131714, -0.11654756963253021, 0.03476091846823692, -0.013030736707150936, 0.0991140604019165, 0.40243738889694214, -0.23152793943881989, 0.09576909244060516, -0.1495801955461502, 0.20081503689289093, -0.09556684643030167, 0.3369627296924591, 0.0697442889213562, -0.0413166806101799, -0.25948458909988403, 0.36256325244903564, -0.14252659678459167, 0.040197741240262985, -0.3142741024494171, 0.04337317496538162, 0.05444137379527092, -0.1505972445011139, -0.025968369096517563, 0.052966516464948654, -0.16793081164360046, 0.37705138325691223, 0.0004245935706421733, 0.004870832897722721, -0.04648418352007866, 0.1406756192445755, 0.1035490557551384, 0.2181822657585144, -0.07433012872934341, 0.02951195277273655, -0.21075986325740814, -0.07087194174528122, -0.18927375972270966, 0.14813321828842163, 0.15044380724430084, -0.11482763290405273, -0.3553989827632904, 0.19734631478786469, 0.00005423010588856414, -0.2562927007675171, 0.05180831626057625, 0.1291075497865677, -0.07927139848470688, -0.5663284659385681, -0.4583545923233032, -0.13428716361522675, 0.0517142117023468, 0.011712569743394852, 0.33762088418006897, 0.06781738251447678, -0.014402057975530624, -0.007927590981125832, 0.3786776065826416, -0.3800787925720215, -0.03177887573838234, 0.3616412878036499, -0.046929918229579926, 0.096266970038414, 0.6125103235244751, -0.006390782073140144, -0.08761405199766159, -0.4146157205104828, 0.06018860638141632, 0.14495627582073212, -0.2670140862464905, 0.12189153581857681, 0.08740229159593582, -0.0674884095788002, 0.18970827758312225, 0.24888835847377777, 0.21435391902923584, 0.10486064851284027, 0.13482041656970978, -0.45449092984199524, -0.2815389335155487, 0.010136773809790611, 0.10336647182703018, 0.16795344650745392, 0.22302520275115967, -0.15597131848335266, -0.027493271976709366, 0.049299344420433044, -0.5319186449050903, 0.01350363902747631, -0.2641611695289612, 0.07362307608127594, 0.15836277604103088, 0.034316420555114746, -0.036458421498537064, 0.03485266864299774, 0.36037978529930115, 0.043054237961769104, -0.07727042585611343, -0.420450896024704, 0.012509757652878761, 0.03541210666298866, -0.06967034190893173, -0.02271188423037529, -0.2729772627353668, -0.38286474347114563, -0.25157293677330017, 0.004868695046752691, -0.12439512461423874, 0.13733252882957458, 0.049104973673820496, 0.006659642793238163, 0.10093481093645096, 0.11219072341918945, -0.07774654775857925, 0.2663349211215973, 0.031758323311805725, 0.09222784638404846, -0.2536080777645111, -0.07312304526567459, 0.016392026096582413, -0.1486680507659912, -0.0841909646987915, 0.05887419730424881, 0.14549070596694946, 0.0014587356708943844, 0.1394331008195877, -0.3839673101902008, 0.1723925918340683, 0.16164739429950714, 0.2025856375694275, 0.10962057113647461, -0.2814158499240875, 0.014061498455703259, 0.0317375622689724, 0.3620636463165283, -0.24236255884170532, 0.023942509666085243, 0.10489245504140854, -0.15795424580574036, -0.05349412560462952, 0.027798239141702652, -0.04528314247727394, 0.00103305175434798, -0.04152337461709976, -0.05166706070303917, 0.334337443113327, -0.1703510731458664, -0.10273385047912598, 0.18356947600841522, -0.11950892210006714, 0.0717974528670311, 0.3154437839984894, 0.4460807144641876, 0.011938783340156078, 0.3961818516254425, 0.01856835186481476, 0.11104851961135864, -0.05670991539955139, 0.10047338157892227, -0.19859158992767334, -0.6472693085670471, 0.26546892523765564, 0.48775067925453186, -0.16235017776489258, 0.011601259931921959, 0.08719449490308762, 0.08227624744176865, -0.12062935531139374, -0.003698028391227126, -0.23495043814182281, 0.12710462510585785, -0.2560421824455261, -0.042332470417022705, -0.2812143564224243, -0.030836552381515503, -0.2260313332080841, -0.03283768519759178, -0.06971466541290283, 0.021382687613368034, 0.12241154164075851, 0.09333210438489914, -0.14053864777088165, -0.34794703125953674, 0.2601649761199951, 0.19771146774291992, -0.19968406856060028, -0.25857555866241455, 0.3645426630973816, 0.07636337727308273, 0.1366041600704193, 0.5958108305931091, 0.14281046390533447, 0.3709622919559479, 0.2861957252025604, -0.019779270514845848, -0.013416922651231289, -0.012650811113417149, -0.22610574960708618, 0.0049579935148358345, 0.18354268372058868, 0.16119103133678436, 0.30456891655921936, 0.4944479763507843, 0.36871904134750366, -0.23078112304210663, -0.005316856317222118, 0.3694717288017273, 0.24021056294441223, -0.14890165627002716, 0.15952163934707642, -0.013430426828563213, -0.12593215703964233, -0.3215126395225525, -0.056299109011888504, -0.3608112335205078, 0.0023645381443202496, 0.18288885056972504, -0.09978998452425003, 0.2863853871822357, 0.08378665149211884, 0.19176289439201355, -0.06563669443130493, 0.46374815702438354, 0.2172633409500122, 0.07372042536735535, -0.3218674063682556, -0.022214507684111595, -0.7895218729972839, 0.11684179306030273, 0.17360806465148926, -0.09522543102502823, 0.03802609071135521, -0.05407405272126198, 0.21748128533363342, 0.060891423374414444, 0.21876181662082672, 0.09565930813550949, 0.16860799491405487, -0.07097045332193375, -0.2351243644952774, -0.26110929250717163, -0.017580442130565643, 0.02416195347905159, -0.005409933626651764, -0.2506404519081116, 0.18542258441448212, 0.009058170020580292, 0.2636178135871887, -0.14414696395397186, -0.12595777213573456, -0.34591174125671387, 0.01790970005095005, 0.25599420070648193, -0.08029792457818985, 0.4752177596092224, -0.10045283287763596, 0.3354480266571045, 0.024465860798954964, -0.19163291156291962, 0.02155909687280655, 0.2983158230781555, 0.22293400764465332, 0.07770909368991852, -0.004797829780727625, 0.2431587278842926, -0.12146563082933426, -0.02963477373123169, -0.1619270294904709, 0.09178498387336731, -0.21707595884799957, 0.11369490623474121, 0.06789906322956085, -0.07685425132513046, 0.05729587376117706, 0.03224557638168335, 0.001634899410419166, 0.4782814383506775, -0.2190883606672287, -0.24489867687225342, 0.38312676548957825, -0.15555255115032196, -0.33523210883140564, 0.08511926233768463, 0.2331029176712036, 0.1488516479730606, 0.02317286841571331, -0.24009916186332703, 0.23371915519237518, 0.3922722339630127, -0.21562379598617554, -0.17359939217567444, 0.20162241160869598, -0.15935717523097992, 0.14121872186660767, 0.07253663241863251, 0.29643696546554565, 0.2535303831100464, 0.011796669103205204, -0.08905036002397537, -0.11034223437309265 ]
https://github.com/huggingface/datasets/issues/5387
Missing documentation page : improve-performance
Hi! Our documentation builder does not support links to sections, hence the bug. This is the link it should point to https://huggingface.co/docs/datasets/v2.8.0/en/cache#improve-performance.
### Describe the bug Trying to access https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/cache#improve-performance, the page is missing. The link is in here : https://huggingface.co/docs/datasets/v2.8.0/en/package_reference/loading_methods#datasets.load_dataset.keep_in_memory ### Steps to reproduce the bug Access the page and see it's missing. ### Expected behavior Not missing page ### Environment info Doesn't matter
22
Missing documentation page : improve-performance
[ -0.001874464564025402, -0.19078195095062256, -0.3457591235637665, 0.16330008208751678, 0.02634354494512081, 0.2120659500360489, -0.18326497077941895, 0.2677517533302307, -0.19661380350589752, 0.25258123874664307, 0.13332995772361755, 0.2713157534599304, 0.287421852350235, -0.2231757491827011, 0.3891066908836365, -0.18692165613174438, 0.20878088474273682, 0.174639031291008, 0.1791389137506485, 0.12226211279630661, 0.02179555594921112, -0.0498979389667511, -0.43144163489341736, -0.15588857233524323, 0.09094124287366867, 0.06626532971858978, 0.020373675972223282, -0.1361650973558426, -0.13653340935707092, -0.5621963143348694, 0.048244550824165344, 0.07273782789707184, -0.1633760780096054, -0.046692557632923126, -0.00010044564260169864, -0.056687869131565094, 0.3031613230705261, 0.20914126932621002, -0.21682719886302948, 0.7190878987312317, -0.05940396338701248, -0.37043583393096924, 0.06304917484521866, -0.02826988883316517, 0.044746533036231995, -0.12915284931659698, -0.11354687809944153, 0.012070958502590656, -0.21643918752670288, 0.31609785556793213, 0.3282058537006378, 0.27958494424819946, -0.024266934022307396, -0.19334550201892853, 0.10701718926429749, 0.06940405815839767, -0.3401336669921875, 0.015005633234977722, 0.4374455213546753, -0.14659151434898376, -0.16478347778320312, 0.13166272640228271, -0.045173000544309616, -0.09777010977268219, 0.049863383173942566, -0.08318273723125458, 0.310771107673645, 0.008357386104762554, 0.30261868238449097, -0.023248493671417236, 0.3473551869392395, 0.2946152985095978, 0.015735706314444542, 0.05083451047539711, -0.13853971660137177, -0.002299924148246646, 0.19039981067180634, -0.16970409452915192, -0.007136237341910601, -0.11249659210443497, -0.013911538757383823, -0.2145739644765854, -0.12798209488391876, -0.0006190408603288233, 0.27019888162612915, 0.3603641092777252, 0.20543110370635986, -0.3204502761363983, 0.3415154218673706, 0.25323325395584106, 0.029131824150681496, 0.38722971081733704, -0.029085194692015648, 0.09701521694660187, 0.058084890246391296, -0.07305565476417542, 0.5668904781341553, -0.14165417850017548, 0.11164169013500214, -0.17451168596744537, 0.0037322365678846836, 0.16633179783821106, 0.23180624842643738, -0.2651723325252533, -0.27472245693206787, 0.15978598594665527, 0.007005750667303801, -0.2649337649345398, 0.21805590391159058, 0.4805789887905121, 0.20159105956554413, 0.2706400752067566, 0.012260186485946178, -0.14421261847019196, 0.023248862475156784, 0.24968321621418, -0.28756868839263916, -0.1823483258485794, -0.2679157853126526, 0.2693243622779846, 0.02052178420126438, -0.1325896680355072, 0.022935789078474045, 0.10511597245931625, 0.12369181215763092, -0.029713794589042664, 0.07915060222148895, -0.2789793312549591, -0.6774765253067017, -0.2464722990989685, -0.21305474638938904, 0.19010348618030548, -0.43968114256858826, 0.17826056480407715, -0.06397317349910736, 0.2614104449748993, 0.12984633445739746, -0.134560689330101, -0.04146016389131546, 0.11380153149366379, 0.06068209931254387, 0.132185161113739, -0.26105359196662903, 0.25568220019340515, -0.032130613923072815, -0.2650800049304962, 0.11817228049039841, 0.28639763593673706, -0.15686145424842834, 0.018981080502271652, -0.10955186933279037, -0.49115070700645447, -0.02219739742577076, 0.37471461296081543, 0.3457778990268707, 0.04907896742224693, 0.12119263410568237, 0.3528056740760803, -0.1765359491109848, -0.17768128216266632, 0.09768319875001907, 0.1966889500617981, -0.18042610585689545, -0.18899711966514587, 0.21135292947292328, 0.10707329958677292, 0.04095066711306572, -0.2219592183828354, -0.1705649495124817, 0.0058980174362659454, 0.10151781141757965, 0.16317929327487946, -0.33674681186676025, 0.3590483069419861, -0.3928895890712738, -0.10063640028238297, 0.3627566993236542, -0.6106634140014648, 0.02829637937247753, 0.18988846242427826, -0.24478985369205475, -0.09064465761184692, 0.031216362491250038, -0.08070195466279984, 0.022441379725933075, 0.018720394000411034, 0.10245639085769653, -0.11180043965578079, 0.07226879149675369, 0.043069224804639816, -0.34296634793281555, -0.09089689701795578, 0.04991404712200165, -0.1790945827960968, 0.3375827372074127, 0.16800421476364136, -0.09497609734535217, 0.09669079631567001, 0.4164571166038513, 0.11915425211191177, -0.0924251601099968, 0.45518580079078674, 0.18598540127277374, 0.10054577887058258, 0.12665298581123352, 0.009390972554683685, 0.027983717620372772, 0.08685105293989182, -0.1204029843211174, 0.3549162745475769, 0.5176477432250977, -0.11846023797988892, -0.10172969102859497, -0.024782827123999596, 0.14978916943073273, -0.2924213707447052, 0.3243914246559143, 0.12789741158485413, 0.21276192367076874, -0.03573304042220116, 0.0675068199634552, 0.003514519426971674, -0.4759460985660553, -0.05212174728512764, -0.007910151965916157, 0.06264033913612366, -0.06906775385141373, -0.24017195403575897, 0.15195952355861664, -0.21036939322948456, 0.18810667097568512, 0.04012805595993996, -0.2676663100719452, 0.1392769068479538, -0.05809789150953293, 0.055801816284656525, 0.3929479420185089, 0.43660667538642883, 0.07575121521949768, -0.21604573726654053, 0.05267706140875816, 0.40475982427597046, -0.1437370330095291, 0.136601984500885, -0.11280693113803864, -0.2960358262062073, 0.04610853269696236, 0.26914742588996887, 0.3969457447528839, 0.06563036888837814, 0.09523938596248627, 0.024649083614349365, 0.06764238327741623, -0.08763202279806137, 0.32099321484565735, 0.029818624258041382, 0.16949056088924408, -0.10479184985160828, -0.0902189388871193, 0.3346851170063019, 0.1922278106212616, -0.0648670420050621, -0.03041856177151203, 0.30065464973449707, 0.3237779140472412, -0.23273500800132751, 0.23883984982967377, -0.25416576862335205, 0.3239661157131195, 0.3691598176956177, 0.1905394196510315, -0.057851642370224, -0.18972371518611908, -0.06696274131536484, 0.34485095739364624, 0.03185238689184189, 0.04049387201666832, -0.06278247386217117, -0.04985136166214943, 0.10203661769628525, -0.27769359946250916, -0.3968460261821747, -0.1474701464176178, 0.16290612518787384, -0.14996252954006195, -0.2381877303123474, -0.20027533173561096, -0.10590467602014542, 0.14925017952919006, -0.010985293425619602, 0.1080629825592041, -0.2725955843925476, 0.12774208188056946, -0.060998279601335526, -0.08023195713758469, 0.17715995013713837, -0.3069290518760681, 0.2586907744407654, -0.09332964569330215, 0.1000206470489502, -0.16817393898963928, 0.05367163196206093, -0.4440600574016571, 0.2067117840051651, -0.09277785569429398, 0.17928072810173035, 0.1268826127052307, -0.3097160756587982, 0.13086964190006256, -0.3180273771286011, -0.4138367474079132, 0.15987063944339752, 0.11246898770332336, -0.06016232445836067, 0.13775917887687683, 0.09126277267932892, -0.22757862508296967, -0.0660838857293129, 0.27595654129981995, -0.35452714562416077, -0.09786073863506317, -0.30953460931777954, -0.05579288303852081, -0.05647444725036621, -0.06614293903112411, -0.4078048765659332, 0.362762987613678, -0.32921135425567627, -0.033739831298589706, -0.2607303261756897, 0.1649094820022583, -0.1343972086906433, -0.049435924738645554, 0.15678516030311584, 0.18141403794288635, 0.4280255138874054, -0.1890603005886078, -0.3182521164417267, 0.18533137440681458, -0.21287040412425995, -0.29418331384658813, -0.19084617495536804, 0.0424085296690464, 0.3229431211948395, 0.15152204036712646, -0.5343832969665527, 0.23947274684906006, -0.22067928314208984, -0.1387309730052948, -0.2640046179294586, -0.10414323955774307, 0.6608074307441711, 0.030514152720570564, -0.3529757559299469, -0.07128104567527771, -0.3510403633117676, -0.22053775191307068, 0.07656265050172806, 0.30906957387924194, -0.3467499315738678, 0.2490665167570114, 0.057366497814655304, 0.47982606291770935, -0.18098138272762299, 0.4005585014820099, 0.036998312920331955, 0.10923796892166138, 0.15658579766750336, -0.0951935276389122, -0.06428539752960205, -0.1400981843471527, 0.08954014629125595, -0.16452699899673462, 0.2565920948982239, 0.18691280484199524, -0.316974937915802, -0.08880327641963959, -0.34503114223480225, -0.03917872533202171, -0.08709440380334854, 0.08993816375732422, -0.04587714374065399, 0.5134087800979614, 0.02335546165704727, 0.2752814292907715, -0.2470700442790985, 0.31573858857154846, 0.28628140687942505, 0.4136902987957001, 0.2036914825439453, -0.16822387278079987, -0.18872804939746857, 0.13524235785007477, -0.16005344688892365, 0.07738355547189713, -0.1488783061504364, 0.2529106140136719, -0.2627614736557007, -0.14909785985946655, 0.2455352246761322, -0.24065269529819489, 0.08693939447402954, -0.23891203105449677, 0.06013868749141693, 0.3840440511703491, 0.009306713938713074, 0.03853527829051018, -0.2171190083026886, 0.11126428842544556, -0.008222456090152264, 0.33127474784851074, 0.01891866698861122, -0.09057807177305222, -0.31529438495635986, 0.5062354207038879, -0.34524062275886536, -0.029562408104538918, 0.09046835452318192, -0.3920576274394989, -0.34175705909729004, 0.1302291452884674, 0.23156286776065826, -0.13695916533470154, -0.12804368138313293, 0.1214418038725853, 0.002585550071671605, 0.10721906274557114, -0.10250009596347809, -0.06205907464027405, -0.05606129765510559, 0.1407768577337265, -0.0482763908803463, 0.1646120399236679, 0.08312298357486725, -0.049797482788562775, 0.16294890642166138, -0.22140291333198547, -0.1237480565905571, -0.14424046874046326, 0.2873634099960327, -0.12762929499149323, 0.23850105702877045, 0.3243481516838074, 0.11194135993719101, 0.23284050822257996, 0.1024692952632904, 0.08102747052907944, -0.2393035739660263, -0.21652550995349884, 0.31054794788360596, -0.05017933249473572, -0.06534118950366974, -0.221629798412323, 0.4427945613861084, 0.17022152245044708, -0.11093633621931076, 0.330554723739624, 0.27463415265083313, -0.2221219688653946, -0.034967392683029175, 0.3008958697319031, 0.8938779234886169, 0.2611660659313202, -0.08876938372850418, -0.014523708261549473, -0.6588236689567566, -0.10979032516479492, -0.4036593735218048, 0.4375106692314148, -0.07741328328847885, -0.24609088897705078, 0.0684262067079544, -0.1164766177535057, 0.333003431558609, -0.10108254849910736, -0.1218920573592186, -0.056934770196676254, -0.1786734014749527, -0.040796246379613876, 0.02608189731836319, 0.13405269384384155, 0.13404206931591034, -0.13292212784290314, -0.2104618102312088, 0.26634398102760315, 0.06507834792137146, 0.17893189191818237, -0.13024750351905823, 0.04724380373954773, -0.09852596372365952, -0.04400096833705902, -0.3518250584602356, -0.2813955247402191, 0.13870996236801147, 0.20842978358268738, -0.2371198982000351, -0.27570730447769165, -0.12016483396291733, -0.10805083811283112, -0.14193904399871826, 0.19034892320632935, -0.32811951637268066, 0.16005653142929077, 0.12792085111141205, -0.29889512062072754, 0.07443682849407196, -0.24054086208343506, 0.0028857130091637373, -0.19512559473514557, -0.29380667209625244, 0.14682763814926147, -0.37182316184043884, -0.27013328671455383, -0.38118743896484375, 0.015462644398212433, -0.13172759115695953, -0.045729730278253555, 0.021807294338941574, -0.0013371205423027277, -0.0012978550512343645, -0.22352276742458344, 0.3501143157482147, 0.06648501008749008, -0.04266395419836044, 0.237395241856575, 0.24395278096199036, 0.023928822949528694, -0.2687101364135742, 0.11162770539522171, 0.2804762125015259, -0.12185575813055038, -0.09182074666023254, -0.19086241722106934, -0.3774328827857971, -0.39323505759239197, -0.020102791488170624, 0.02901698462665081, 0.1147085577249527, -0.1809852570295334, -0.1394701600074768, -0.1874660849571228, 0.16616567969322205, -0.013491024263203144, 0.017610300332307816, 0.13361836969852448, -0.11008196324110031, 0.026778636500239372, -0.34061145782470703, 0.35315555334091187, -0.30476313829421997, 0.01889360509812832, -0.17730647325515747, -0.32130518555641174, 0.025173112750053406, 0.13198190927505493, -0.4989355504512787, -0.09507368505001068, -0.23906412720680237, -0.1041015163064003, -0.04648487642407417, 0.09517654031515121, 0.037405941635370255, 0.08630465716123581, 0.2687094807624817, 0.04143601283431053, 0.19601990282535553, -0.3194938600063324, 0.06989513337612152, 0.12164319306612015, -0.29446566104888916, 0.1300726979970932, 0.3051624596118927, 0.09669876843690872, -0.20655657351016998, 0.07567824423313141, 0.025026870891451836, -0.099077008664608, 0.22181712090969086, -0.22520603239536285, -0.3199562132358551, 0.018083160743117332, -0.07306970655918121, 0.23748454451560974, 0.20117078721523285, 0.42021602392196655, 0.13218437135219574, -0.11440766602754593, -0.14180965721607208, -0.16854824125766754, 0.16290077567100525, 0.24774602055549622, -0.07572753727436066, 0.0802917331457138, 0.05086866393685341, -0.03237061947584152, 0.010258159600198269, -0.2258245348930359, 0.034668855369091034, 0.16824357211589813, 0.028186088427901268, 0.0515536293387413, 0.09627706557512283, 0.28930333256721497, -0.11872929334640503, -0.3288821578025818, -0.021524546667933464, -0.3941322863101959, 0.1549425721168518, 0.1085791364312172, 0.364622563123703, -0.09747225791215897, 0.3077174723148346, 0.26151975989341736, 0.06419135630130768, -0.027441481128335, -0.17063432931900024, 0.03649616613984108, 0.13005630671977997, -0.05008178949356079, 0.15966106951236725, -0.12159214168787003, 0.008255922235548496, -0.1941274106502533, 0.3631526231765747, 0.4646337926387787, 0.14027713239192963, 0.536483883857727, -0.24490578472614288, 0.11303549259901047, -0.12340950965881348, 0.15484078228473663, -0.12102332711219788, 0.06480854004621506, 0.0687941461801529, 0.15336884558200836, 0.06719774007797241, -0.08203231543302536, -0.17881090939044952, -0.18188847601413727, -0.2978340685367584, -0.019017236307263374, 0.27129384875297546, -0.09069817513227463, -0.09719353914260864, 0.15199315547943115, 0.39345666766166687, 0.12198406457901001, -0.08608922362327576, -0.31864988803863525, 0.17175307869911194, 0.18432657420635223, 0.22212526202201843, 0.04398797079920769, 0.17727264761924744, -0.04019680991768837, -0.06970091909170151, -0.345235675573349, -0.21899762749671936, -0.3428177833557129, 0.41068264842033386, 0.17722909152507782, -0.13899341225624084, -0.12055826187133789, -0.4878210425376892, 0.1179022565484047, -0.12073883414268494, 0.03275890648365021, 0.041294462978839874, 0.17921140789985657, -0.14428186416625977, -0.1589900553226471, 0.2510000467300415, -0.3239149749279022, 0.33536940813064575, 0.07994361966848373, -0.3453117311000824, -0.026004623621702194, 0.06905849277973175, 0.21403850615024567, -0.11953376978635788, 0.10106940567493439, -0.037658825516700745, -0.013805737718939781, -0.017484284937381744, 0.25844606757164, 0.034113314002752304, -0.15115056931972504, 0.069739930331707, 0.1518719643354416, 0.04044226184487343, 0.47434088587760925, 0.011575497686862946, 0.12705394625663757, -0.0153798284009099, -0.5170688033103943, -0.281171053647995, 0.0724753886461258, -0.2424795925617218, -0.010917099192738533, 0.38234803080558777, 0.21349258720874786, -0.06367358565330505, 0.09430640190839767, 0.6946818828582764, -0.1658487617969513, 0.10803360491991043, 0.02015099488198757, -0.24177272617816925, 0.18278607726097107, 0.018754523247480392, 0.0924716591835022, -0.22469551861286163, -0.09621341526508331, 0.06459024548530579, 0.11833233386278152, 0.2714940011501312, -0.11581213772296906, -0.01724172756075859, 0.2761490046977997, 0.5979313254356384, 0.49041566252708435, -0.117717444896698, 0.32912778854370117, -0.15741518139839172, -0.5489227175712585, -0.21855124831199646, 0.1676224321126938, 0.339370459318161, 0.4273054897785187, 0.13097192347049713, -0.13935834169387817, -0.3062092661857605, -0.07177179306745529, -0.17100849747657776, 0.3958529531955719, 0.13466379046440125, -0.07844820618629456, -0.32320892810821533, 0.18415826559066772, -0.019258009269833565, 0.05472797155380249, 0.08287986367940903, 0.23634885251522064, 0.08521847426891327, -0.11672515422105789, -0.46883919835090637, -0.06334078311920166, 0.1314583271741867, -0.012744396924972534, -0.028119169175624847, -0.3246477544307709, 0.2883846163749695, 0.24994505941867828, 0.14349691569805145, -0.4887649714946747, -0.39123499393463135, 0.1891140341758728, 0.23611044883728027, -0.24688838422298431, 0.2535046935081482, -0.030288467183709145, 0.0010220959084108472, 0.14049604535102844, 0.15941457450389862, -0.021987589076161385, -0.05452021583914757, -0.02243971638381481, -0.03373594582080841 ]
https://github.com/huggingface/datasets/issues/5386
`max_shard_size` in `datasets.push_to_hub()` breaks with large files
Hi! This behavior stems from the fact that we don't always embed image bytes in the underlying arrow table, which can lead to bad size estimation (we use the first 1000 table rows to [estimate](https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L4627) the external file size). We plan to address this in the next major release by always embedding external bytes. In the meantime, you can either shuffle the dataset with `.shuffle().flatten_indices()` to make the estimation more precise or embed the bytes in the table like so: ```python from datasets.table import embed_table_storage format = ds.format ds = ds.with_format("arrow") ds = ds.map(embed_table_storage, batched=True) ds = ds.with_format(**format) ... ds.push_to_hub(...) ```
### Describe the bug `max_shard_size` parameter for `datasets.push_to_hub()` works unreliably with large files, generating shard files that are way past the specified limit. In my private dataset, which contains unprocessed images of all sizes (up to `~100MB` per file), I've encountered cases where `max_shard_size='100MB'` results in shard files that are `>2GB` in size. Setting `max_shard_size` to another value, such as `1GB` or `500MB` does not fix this problem. **The real problem is this:** When the shard file size grows too big, the entire dataset breaks because of #4721 and ultimately https://issues.apache.org/jira/browse/ARROW-5030. Since `max_shard_size` does not let one accurately control the size of the shard files, it becomes very easy to build a large dataset without any warnings that it will be broken -- even when you think you are mitigating this problem by setting `max_shard_size`. ``` File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/builder.py", line 1763, in _prepare_split_single for _, table in generator: File " /path/to/sd-test-suite-v1/venv/lib/site-packages/datasets/packaged_modules/parquet/parquet.py", line 69, in _generate_tables for batch_idx, record_batch in enumerate( File "pyarrow/_parquet.pyx", line 1323, in iter_batches File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Nested data conversions not implemented for chunked array outputs ``` ### Steps to reproduce the bug 1. Clone [example repo](https://github.com/salieri/hf-dataset-shard-size-bug) 2. Follow steps in [README.md](https://github.com/salieri/hf-dataset-shard-size-bug/blob/main/README.md) 3. After uploading the dataset, you will see that the shard file size varies between `30MB` and `200MB` -- way beyond the `max_shard_size='75MB'` limit (example: `train-00003-of-00131...` is `155MB` in [here](https://huggingface.co/datasets/slri/shard-size-test/tree/main/data)) (Note that this example repo does not generate shard files that are so large that they would trigger #4721) ### Expected behavior The shard file size should remain below or equal to `max_shard_size`. ### Environment info - `datasets` version: 2.8.0 - Platform: Linux-5.10.157-139.675.amzn2.aarch64-aarch64-with-glibc2.17 - Python version: 3.7.15 - PyArrow version: 10.0.1 - Pandas version: 1.3.5
101
`max_shard_size` in `datasets.push_to_hub()` breaks with large files
[ -0.5505040884017944, -0.30215778946876526, -0.08727565407752991, 0.15125514566898346, 0.10602625459432602, -0.16940388083457947, 0.22176578640937805, 0.3445521295070648, 0.014453064650297165, 0.32657590508461, 0.013627338223159313, -0.32249659299850464, -0.14357832074165344, 0.3473531901836395, -0.06695134937763214, 0.24145403504371643, 0.06375055015087128, 0.00624527083709836, -0.05708032846450806, -0.020659353584051132, -0.13990941643714905, 0.15577752888202667, 0.18525302410125732, -0.2167138010263443, -0.632573664188385, -0.024280648678541183, 0.03712296113371849, 0.46240466833114624, -0.16781197488307953, 0.0930485874414444, -0.07770365476608276, 0.09640149772167206, -0.014082892797887325, 0.3726251423358917, -0.00011237458966206759, -0.07599621266126633, 0.3195570409297943, -0.11487384140491486, -0.08351188898086548, 0.2800774574279785, -0.33172398805618286, -0.3001861572265625, -0.46632713079452515, -0.05520022660493851, 0.3236989378929138, 0.3712599277496338, -0.006359139457345009, 0.17270487546920776, -0.05057856813073158, 0.2919158339500427, 0.20160292088985443, 0.06725531071424484, 0.1671295166015625, -0.29007241129875183, 0.6247323155403137, -0.007776352111250162, -0.12625794112682343, -0.08320710062980652, 0.13285531103610992, 0.26057538390159607, -0.6038867831230164, 0.08527173846960068, 0.11760393530130386, -0.06900375336408615, 0.14745375514030457, -0.2153511494398117, -0.1986718326807022, 0.1650635004043579, 0.32312092185020447, 0.1771216094493866, -0.1430768519639969, -0.2571781277656555, -0.12485890835523605, -0.31910744309425354, -0.35089242458343506, -0.2270432710647583, 0.1563645601272583, 0.1995224505662918, -0.060482870787382126, -0.008442373014986515, -0.25758594274520874, -0.4455907940864563, -0.1325223594903946, 0.07338424772024155, -0.26324599981307983, -0.23790289461612701, -0.18993259966373444, -0.028457924723625183, 0.26764392852783203, -0.3659965693950653, -0.010328159667551517, 0.04379652068018913, -0.16182805597782135, -0.5114572644233704, -0.32270899415016174, -0.05116499215364456, 0.31378012895584106, 0.33572304248809814, 0.5539368391036987, 0.06157032027840614, 0.1324542760848999, 0.3426414430141449, 0.01928478479385376, 0.18582187592983246, 0.21698972582817078, 0.06337014585733414, -0.01935221068561077, -0.0888209417462349, 0.3307324945926666, 0.255526065826416, -0.18450230360031128, 0.055586688220500946, 0.23372596502304077, -0.4678415358066559, -0.22408942878246307, -0.17036226391792297, 0.009328321553766727, -0.06299024075269699, 0.17346683144569397, 0.3536548912525177, 0.521419107913971, 0.33708542585372925, 0.014030308462679386, 0.3016490042209625, 0.27292415499687195, -0.06798836588859558, -0.42520973086357117, -0.004689376801252365, -0.0567319393157959, -0.15289515256881714, -0.34443607926368713, 0.11250825971364975, 0.13282206654548645, 0.09247732162475586, 0.259926438331604, -0.1648431122303009, 0.016328558325767517, -0.24318985641002655, 0.48409131169319153, -0.01134723424911499, -0.1689116209745407, -0.2352299690246582, 0.3625897169113159, 0.3990073800086975, 0.1784018576145172, 0.06607507169246674, -0.1719554215669632, -0.03080378659069538, -0.14401011168956757, 0.09196435660123825, -0.3036758601665497, -0.3478401005268097, 0.059110596776008606, 0.21371378004550934, -0.28233999013900757, 0.28400829434394836, -0.5075805187225342, -0.043337754905223846, 0.03157120198011398, -0.11229806393384933, -0.13648822903633118, -0.2533659040927887, -0.09406217932701111, -0.10639263689517975, 0.053770363330841064, 0.09610901772975922, -0.14790616929531097, 0.3772342801094055, -0.04932279512286186, 0.14483250677585602, -0.09204380214214325, 0.37100914120674133, 0.002507900120690465, -0.26432153582572937, -0.22492584586143494, 0.5716732740402222, 0.18829293549060822, -0.20675227046012878, -0.6264682412147522, 0.27231907844543457, -0.024085532873868942, -0.1958615779876709, 0.15619049966335297, 0.024525849148631096, 0.32724466919898987, -0.1633744239807129, 0.029995372518897057, 0.3177236020565033, 0.08412270992994308, 0.057360127568244934, -0.3032037615776062, -0.08153153955936432, -0.4872848093509674, 0.2245929092168808, 0.2915133833885193, -0.05768362805247307, 0.421350359916687, 0.25905609130859375, -0.08890169113874435, 0.02518165111541748, 0.26018038392066956, 0.26894620060920715, 0.029130080714821815, -0.4421931803226471, 0.0100381039083004, -0.23664666712284088, -0.14549881219863892, 0.20252588391304016, 0.08216334879398346, -0.2202112078666687, -0.17812806367874146, -0.13739202916622162, -0.14863623678684235, -0.19589291512966156, -0.007479078136384487, 0.312546044588089, 0.17279331386089325, -0.1619509607553482, -0.0072625246830284595, 0.057261813431978226, 0.2453409880399704, -0.14141857624053955, -0.5125430822372437, -0.014814140275120735, -0.360103577375412, 0.16263000667095184, -0.09549899399280548, -0.39768534898757935, 0.09561396390199661, -0.08152365684509277, -0.06086970865726471, -0.17419610917568207, 0.04417625442147255, 0.17093539237976074, 0.027910906821489334, 0.09288878738880157, 0.0827561616897583, 0.22629784047603607, 0.10667606443166733, 0.27322205901145935, 0.1246076375246048, -0.10197073221206665, -0.13426125049591064, -0.056510549038648605, -0.3663279712200165, 0.20673367381095886, -0.10600593686103821, -0.03906034678220749, 0.2812023162841797, -0.15457701683044434, 0.039057351648807526, -0.03383029252290726, 0.11215817928314209, -0.21811099350452423, 0.10691768676042557, 0.20876865088939667, -0.0458926260471344, 0.05511295050382614, 0.2747095823287964, 0.040462978184223175, 0.952294647693634, -0.08740755915641785, 0.1346515268087387, 0.28376084566116333, 0.007747880183160305, -0.12837372720241547, 0.2786582410335541, 0.5133856534957886, 0.09039168804883957, 0.2554716467857361, 0.3978683352470398, -0.1736113429069519, -0.0563436783850193, -0.35326698422431946, -0.1358567476272583, 0.11466078460216522, -0.09575149416923523, 0.412930965423584, 0.23733066022396088, -0.24809123575687408, -0.5099548697471619, -0.15067999064922333, 0.08513309806585312, 0.17440541088581085, -0.1276327520608902, -0.09973690658807755, -0.02083306759595871, 0.1467524915933609, 0.020313076674938202, 0.2733728289604187, -0.317037433385849, -0.43874725699424744, 0.12972554564476013, 0.41809171438217163, -0.2715069055557251, 0.054422616958618164, 0.31874608993530273, 0.21089166402816772, 0.3559686541557312, 0.06368622183799744, 0.18657204508781433, 0.010106092318892479, 0.02019476145505905, 0.08748533576726913, 0.4870522916316986, 0.08251871168613434, 0.0022649532184004784, -0.1359548568725586, 0.2752644717693329, -0.3059748411178589, -0.03168883174657822, 0.07222357392311096, -0.06427984684705734, 0.08616777509450912, -0.05451895669102669, 0.10684241354465485, 0.050677213817834854, -0.005989693105220795, 0.09752219170331955, -0.09446118026971817, 0.03233545273542404, 0.33731821179389954, 0.07423713803291321, -0.08789068460464478, -0.1943851262331009, 0.06799935549497604, 0.20325814187526703, -0.5309552550315857, 0.29398250579833984, 0.0648486390709877, 0.04897794499993324, 0.028401143848896027, 0.42603349685668945, -0.0902860090136528, -0.08878328651189804, -0.19850537180900574, -0.025486843660473824, -0.4530249238014221, 0.3413359224796295, -0.23090776801109314, -0.4399701654911041, -0.13940030336380005, 0.2166810780763626, -0.06780986487865448, 0.48666098713874817, -0.3233902156352997, -0.01132885366678238, -0.2787471115589142, 0.14861427247524261, -0.0051556238904595375, 0.057284995913505554, 0.1652860790491104, -0.2539694309234619, -0.15202058851718903, 0.05635473132133484, 0.14295116066932678, 0.10786458849906921, 0.23620784282684326, -0.10355986654758453, -0.19021785259246826, 0.01686011254787445, 0.43602606654167175, 0.3800651729106903, -0.1323976367712021, -0.08124849200248718, 0.15942692756652832, 0.10721814632415771, 0.45821666717529297, -0.30209028720855713, -0.030072886496782303, 0.36883285641670227, -0.12689952552318573, -0.022344090044498444, 0.19269903004169464, 0.07071831077337265, 0.15448187291622162, 0.24387188255786896, -0.30664587020874023, 0.14865104854106903, -0.3791048228740692, 0.26596033573150635, 0.12889188528060913, -0.16409943997859955, 0.0216655433177948, -0.016328927129507065, 0.019822929054498672, -0.13386061787605286, 0.029422562569379807, -0.017085229977965355, -0.007328634150326252, 0.06464513391256332, -0.07112476974725723, 0.02693519927561283, -0.3696999251842499, 0.0714067742228508, 0.03398628532886505, 0.13898633420467377, -0.06813647598028183, -0.1354171335697174, -0.12713325023651123, -0.19345249235630035, 0.6787170767784119, -0.25198620557785034, 0.2336754947900772, 0.009357179515063763, 0.029215455055236816, -0.21283508837223053, 0.13813942670822144, -0.16360817849636078, 0.3769643306732178, 0.1352759152650833, 0.5150414705276489, -0.12827137112617493, 0.12964598834514618, -0.272203266620636, 0.10938019305467606, -0.024212174117565155, 0.036413513123989105, -0.11430439352989197, -0.04577530547976494, -0.46287813782691956, 0.05739757418632507, 0.27632585167884827, 0.008325359784066677, -0.3590456247329712, -0.28670039772987366, -0.04661339521408081, -0.22665497660636902, 0.014129304327070713, 0.0798361599445343, 0.10101963579654694, -0.12173493951559067, 0.03208082541823387, -0.3549153506755829, 0.06553608924150467, 0.3969179093837738, 0.30141863226890564, 0.16923284530639648, 0.08208116143941879, 0.13409382104873657, -0.19865712523460388, -0.12917986512184143, 0.3626938760280609, -0.042878810316324234, 0.017126748338341713, -0.16300846636295319, 0.17788349092006683, -0.19403082132339478, 0.3239644169807434, 0.16167838871479034, -0.06838978826999664, -0.19251137971878052, 0.24590462446212769, 0.43843531608581543, -0.1453934609889984, 0.24378839135169983, 0.0801146849989891, 0.31608209013938904, -0.06788194924592972, 0.19377757608890533, -0.24307847023010254, 0.5990296006202698, 0.0400090292096138, 0.3773931860923767, -0.182721808552742, 0.3202369809150696, 0.21582096815109253, -0.3427382707595825, -0.025675317272543907, -0.15219223499298096, -0.30132150650024414, 0.0390864759683609, 0.003312846878543496, 0.08517809212207794, 0.20546139776706696, -0.03262696787714958, 0.017575707286596298, 0.1120641827583313, 0.30126339197158813, -0.29405489563941956, 0.30128538608551025, -0.42648616433143616, -0.24511784315109253, -0.10712946951389313, 0.1751863956451416, 0.05279054492712021, -0.29523909091949463, -0.020680537447333336, 0.008782682940363884, -0.06092434749007225, -0.04904630035161972, -0.18596872687339783, -0.024379726499319077, 0.34496256709098816, 0.2434428483247757, -0.31165826320648193, -0.3837321102619171, -0.16013067960739136, -0.20979219675064087, 0.004340433515608311, 0.39281854033470154, -0.3373585641384125, 0.22109082341194153, -0.16117388010025024, -0.026322275400161743, -0.013973698019981384, -0.11453700810670853, 0.07187367230653763, 0.014240425080060959, -0.13629081845283508, -0.04346203804016113, 0.3017521798610687, -0.27433326840400696, -0.012216915376484394, 0.12730704247951508, -0.1193847730755806, -0.24212634563446045, -0.24284380674362183, -0.19214479625225067, -0.3613138496875763, -0.2210550755262375, 0.14930330216884613, 0.12901552021503448, 0.04954773560166359, 0.18558616936206818, 0.05143306404352188, -0.08680149167776108, -0.11614347994327545, 0.45100897550582886, -0.19172978401184082, 0.04193338751792908, -0.1589699387550354, -0.03092394396662712, -0.20548932254314423, -0.1777791678905487, 0.18186436593532562, 0.08538433909416199, -0.3080352246761322, 0.2712399661540985, -0.3681926429271698, -0.15952473878860474, -0.16720885038375854, -0.04708387330174446, 0.1458192765712738, 0.010500315576791763, -0.1815531849861145, -0.1929989457130432, -0.20628920197486877, 0.061567578464746475, -0.06775878369808197, 0.12174789607524872, 0.0030967884231358767, -0.22944128513336182, -0.1852865219116211, 0.3073359429836273, -0.28994888067245483, 0.44155415892601013, -0.19858762621879578, 0.03438784182071686, -0.2662654221057892, -0.1499602496623993, 0.10492794215679169, -0.25751566886901855, -0.040005363523960114, 0.19078713655471802, -0.23237508535385132, -0.27354514598846436, -0.05409226939082146, 0.02311226725578308, 0.23477929830551147, 0.3233737349510193, -0.0623900480568409, -0.07368507236242294, -0.09956322610378265, -0.27692708373069763, 0.4348188638687134, 0.09260601550340652, -0.032891228795051575, -0.08681068569421768, 0.6593643426895142, 0.028991909697651863, 0.11670872569084167, -0.030348047614097595, 0.24982555210590363, 0.30512988567352295, -0.10982663184404373, 0.31603291630744934, 0.0442228764295578, 0.042996447533369064, 0.03307388350367546, 0.3451560139656067, 0.17910875380039215, -0.04338805004954338, 0.3616299331188202, -0.2545570731163025, -0.16921468079090118, -0.025985389947891235, 0.5236238241195679, 0.3373299837112427, -0.1793319582939148, -0.32192644476890564, 0.13328741490840912, 0.22118081152439117, 0.022310294210910797, -0.4368307590484619, 0.511137068271637, -0.19468773901462555, 0.2116384655237198, 0.015840433537960052, 0.2875969409942627, -0.2779858708381653, -0.007414889521896839, 0.3107825815677643, 0.26117604970932007, -0.2204361855983734, -0.26286256313323975, 0.156086727976799, -0.037023235112428665, 0.025129318237304688, 0.2304576337337494, 0.20369502902030945, 0.38792645931243896, 1.0286877155303955, 0.145256906747818, 0.5484631061553955, -0.11824403703212738, -0.07324634492397308, -0.045230504125356674, -0.6174572706222534, 0.09794962406158447, 0.21476267278194427, 0.0342109240591526, 0.18246299028396606, -0.08503589034080505, 0.4032972455024719, 0.0013254344230517745, 0.07012531161308289, -0.31460756063461304, -0.2678433656692505, -0.31688156723976135, -0.01919923536479473, 0.1403089463710785, -0.14401765167713165, -0.1753469854593277, 0.24960879981517792, -0.13930685818195343, 0.15526162087917328, 0.4637800455093384, -0.17325283586978912, 0.01555672474205494, 0.20562908053398132, 0.24323582649230957, -0.1534213423728943, -0.07169529795646667, -0.27106747031211853, 0.23023036122322083, 0.26857054233551025, -0.042173899710178375, 0.2061295509338379, -0.05789130926132202, 0.40455469489097595, -0.021152470260858536, 0.06267956644296646, 0.09451170265674591, 0.1091834157705307, -0.15019802749156952, -0.44550642371177673, 0.16832822561264038, 0.11329522728919983, 0.23731936514377594, 0.4776030480861664, 0.15424638986587524, -0.24702169001102448, -0.030486075207591057, 0.1656477302312851, -0.09101811796426773, -0.026825957000255585, 0.004685141146183014, -0.1801159679889679, -0.26183342933654785, -0.13129498064517975, -0.11355531215667725, -0.42512860894203186, -0.19975176453590393, 0.4427686929702759, -0.2222846895456314, 0.21421010792255402, -0.1724662035703659, 0.08010242134332657, -0.14901421964168549, 0.5498788356781006, 0.1911846399307251, -0.05892002210021019, 0.007733274716883898, -0.12308580428361893, -0.3510618209838867, 0.38044455647468567, -0.3723081350326538, 0.3044092059135437, 0.0027450628113001585, 0.34425637125968933, 0.00031895036227069795, -0.04051373898983002, -0.2562969923019409, -0.09575647115707397, -0.1808032989501953, -0.09545551240444183, -0.12890222668647766, -0.10595197230577469, 0.06392651796340942, -0.3801708221435547, -0.04742981120944023, -0.3499290347099304, 0.429294615983963, -0.04126212000846863, 0.08540793508291245, 0.05255396291613579, 0.16799218952655792, 0.07110533863306046, -0.3003019392490387, 0.15666396915912628, 0.053746432065963745, 0.15382224321365356, -0.2697908282279968, -0.04654855281114578, -0.3842868506908417, 0.019092325121164322, -0.07905178517103195, -0.15316706895828247, 0.07835996150970459, 0.39226028323173523, -0.08111846446990967, -0.09890428185462952, 0.11493336409330368, 0.3719313144683838, -0.06011645495891571, 0.23835520446300507, 0.33800607919692993, 0.03349289298057556, -0.15456563234329224, 0.009991384111344814, 0.07740195095539093, 0.19059807062149048, -0.11797886341810226, -0.049034833908081055, 0.052668213844299316, -0.2657965123653412, 0.2826590836048126, 0.024218546226620674, -0.43194669485092163, -0.021285327151417732, 0.08618953824043274, 0.13168136775493622, -0.1804015338420868, -0.18735681474208832, 0.07709188014268875, 0.01547518651932478, 0.15881596505641937, -0.25374120473861694, 0.3317626118659973, -0.15297344326972961, -0.1924276053905487, 0.05798015743494034, 0.1424015313386917, 0.2823624610900879, -0.45501309633255005, 0.16824032366275787, -0.12645691633224487 ]
https://github.com/huggingface/datasets/issues/5385
Is `fs=` deprecated in `load_from_disk()` as well?
Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR?
### Describe the bug The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec: https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340 Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ? https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779 ### Steps to reproduce the bug n/a ### Expected behavior n/a ### Environment info n/a
17
Is `fs=` deprecated in `load_from_disk()` as well?
[ -0.21502220630645752, -0.6732359528541565, -0.26653432846069336, -0.10288771986961365, 0.36395934224128723, -0.3296699523925781, 0.2782036066055298, 0.0007635535439476371, 0.3935280740261078, 0.1810871660709381, -0.1642301231622696, 0.18184421956539154, 0.0003201330255251378, 0.14394697546958923, -0.17224223911762238, 0.4218766391277313, 0.35341373085975647, 0.3106412887573242, -0.24566440284252167, 0.05341382324695587, -0.2340409904718399, 0.5114245414733887, -0.16809986531734467, -0.005122789181768894, -0.041047658771276474, 0.26750290393829346, -0.1394306868314743, 0.023088671267032623, -0.10312973707914352, 0.05549655854701996, 0.015137769281864166, -0.03827492520213127, 0.22321216762065887, 0.1246446818113327, -0.00011544187873369083, -0.08637329936027527, 0.1385563760995865, -0.25155743956565857, -0.669704794883728, 0.3219093978404999, 0.32109206914901733, 0.14508698880672455, -0.03334858641028404, -0.18327271938323975, 0.09443458169698715, 0.0036852422636002302, 0.11642657965421677, -0.3342696726322174, -0.027572765946388245, 0.17302952706813812, 0.24234187602996826, 0.07484828680753708, -0.07067863643169403, -0.31787344813346863, 0.00987770315259695, 0.3127278983592987, -0.17675752937793732, 0.21007756888866425, 0.025601351633667946, -0.18876992166042328, -0.07322834432125092, -0.09129346162080765, -0.2159564048051834, -0.020229244604706764, 0.46202170848846436, -0.09690092504024506, 0.48859086632728577, 0.11497405171394348, -0.0919284000992775, -0.2331598699092865, 0.4368189871311188, 0.05471715331077576, -0.42822927236557007, -0.14124076068401337, -0.26543673872947693, 0.138379767537117, 0.19764147698879242, -0.3386262357234955, -0.3851015865802765, 0.3459579050540924, 0.21852116286754608, -0.5142945647239685, 0.061202239245176315, 0.1416056603193283, -0.23079374432563782, -0.07979730516672134, -0.36163797974586487, -0.09962424635887146, 0.4268384873867035, 0.0033344917465001345, -0.023698462173342705, 0.09648961573839188, -0.06369579583406448, 0.07250551879405975, -0.014906167052686214, -0.1232110932469368, 0.17652064561843872, -0.17675280570983887, -0.18091297149658203, -0.03626895323395729, 0.08700740337371826, -0.014656524173915386, -0.056827645748853683, 0.07367757707834244, -0.1476808786392212, 0.18182455003261566, 0.22394292056560516, -0.23577040433883667, 0.0764833465218544, 0.08387887477874756, 0.10544753819704056, -0.25535258650779724, -0.06099541112780571, -0.2044450044631958, -0.08026929199695587, -0.0291869156062603, -0.026704205200076103, 0.04046407341957092, -0.03126930072903633, -0.047026459127664566, 0.28384363651275635, -0.036447033286094666, 0.04823168367147446, 0.22764523327350616, 0.2771165370941162, 0.31928539276123047, 0.3141228258609772, -0.14964842796325684, -0.3007808327674866, -0.0035898727364838123, -0.04017503559589386, 0.10653647035360336, -0.21346953511238098, -0.18415072560310364, -0.0061498405411839485, 0.05187676101922989, 0.06723806262016296, -0.01070018857717514, 0.08166578412055969, -0.030717279762029648, -0.41872504353523254, -0.10159039497375488, 0.4933367669582367, 0.29894283413887024, -0.2829146087169647, 0.011782077141106129, -0.07335838675498962, 0.207185298204422, -0.05283598601818085, 0.41643938422203064, -0.28959938883781433, -0.33995091915130615, -0.44800153374671936, 0.18601086735725403, -0.06035533547401428, -0.0544925183057785, -0.21631518006324768, 0.10663244128227234, -0.0609845295548439, -0.43966978788375854, 0.36070361733436584, -0.0651908814907074, -0.1824384331703186, -0.021786147728562355, -0.02901270054280758, 0.1606704741716385, -0.2010079324245453, -0.158024400472641, 0.03423117473721504, -0.34010884165763855, 0.2064998298883438, 0.17232945561408997, -0.14277270436286926, -0.07860682159662247, -0.5484786033630371, -0.018625397235155106, 0.3904789686203003, -0.11171207576990128, 0.13737717270851135, 0.4155237078666687, 0.4435250163078308, -0.03140587359666824, 0.12495262175798416, -0.07907680422067642, 0.07837896794080734, -0.0639030784368515, 0.03283245861530304, 0.13675415515899658, 0.38338595628738403, -0.10093332827091217, 0.03761756420135498, -0.09615938365459442, -0.06089870259165764, 0.153115913271904, 0.07830806076526642, 0.4977205991744995, 0.313158243894577, 0.28682059049606323, 0.09868800640106201, -0.12226194143295288, -0.04500000551342964, 0.29897454380989075, 0.35052162408828735, 0.06415721029043198, 0.16604821383953094, -0.21268139779567719, -0.26831862330436707, 0.06550416350364685, 0.0734020471572876, -0.18602272868156433, 0.360020250082016, 0.0012029811041429639, 0.1601233035326004, 0.19437509775161743, 0.31205451488494873, 0.39447134733200073, 0.10176290571689606, 0.027004212141036987, 0.029437346383929253, -0.19016125798225403, -0.11622130870819092, 0.09844881296157837, -0.2974560558795929, -0.17085692286491394, 0.17921841144561768, 0.14779061079025269, -0.22511352598667145, -0.10748288780450821, -0.2216506451368332, -0.06484142690896988, 0.08922326564788818, 0.002845197916030884, 0.03049277886748314, 0.4985972046852112, 0.4836905598640442, 0.19126445055007935, -0.2199910432100296, 0.3540860414505005, 0.09030447155237198, 0.39108845591545105, 0.029238218441605568, 0.19079983234405518, 0.09302715957164764, 0.17693939805030823, 0.10080631077289581, 0.22894002497196198, 0.001054035616107285, -0.21493126451969147, 0.21865162253379822, -0.04885868355631828, 0.07125239074230194, 0.27034470438957214, -0.021351337432861328, -0.058424212038517, 0.15042777359485626, 0.17099523544311523, -0.09815627336502075, 0.11779725551605225, 0.11593654006719589, -0.38314884901046753, 0.337475061416626, -0.3079074025154114, 0.23857416212558746, 0.3091667890548706, 0.4993666410446167, -0.3036496937274933, 0.3271876871585846, -0.07573755830526352, 0.555744469165802, 0.09329201281070709, 0.35390275716781616, -0.0786290094256401, 0.11445493251085281, -0.14084714651107788, 0.5653514266014099, -0.026455219835042953, 0.17247097194194794, 0.29913637042045593, -0.14713509380817413, -0.0286080464720726, -0.33638662099838257, -0.01165571715682745, -0.07577893882989883, -0.0824824869632721, -0.4327217936515808, -0.026012888178229332, -0.02246982604265213, 0.06895322352647781, 0.24559386074543, 0.329026997089386, -0.17312806844711304, -0.11564669013023376, -0.19721101224422455, 0.4346480369567871, -0.0905761569738388, -0.02123011276125908, -0.14498072862625122, 0.41273054480552673, 0.004145042970776558, 0.09101720154285431, -0.39477264881134033, 0.10460180789232254, 0.19224660098552704, 0.1253688633441925, -0.09050783514976501, -0.2814274728298187, -0.1498957872390747, 0.1946849226951599, 0.20046178996562958, -0.6303179860115051, -0.22181697189807892, -0.01062761154025793, 0.2188614308834076, 0.07279286533594131, 0.2990354001522064, 0.1091017872095108, -0.04500914365053177, 0.12653110921382904, 0.04348327964544296, -0.664483368396759, -0.22538255155086517, -0.13512350618839264, -0.15973925590515137, -0.13875174522399902, -0.608482301235199, 0.4633220434188843, 0.01783626154065132, -0.34439191222190857, 0.07484722882509232, 0.04700221121311188, 0.05848747491836548, 0.397530734539032, -0.023891758173704147, -0.12758025527000427, 0.6271732449531555, 0.20331797003746033, -0.6058672070503235, 0.0076126828789711, 0.10389361530542374, -0.01708466187119484, -0.10824370384216309, -0.09104635566473007, 0.1628500521183014, -0.1890578716993332, 0.11012087017297745, -0.2116544544696808, -0.3450142741203308, 0.11678895354270935, 0.04282141849398613, -0.40080979466438293, 0.2701658308506012, 0.24005824327468872, 0.1084422618150711, -0.14470182359218597, -0.2628076374530792, -0.1242154911160469, -0.09512288868427277, -0.11506923288106918, 0.04882120341062546, 0.03483811393380165, 0.24887074530124664, 0.19219644367694855, 0.13027583062648773, -0.4442442059516907, 0.16811466217041016, 0.3860562741756439, -0.17419536411762238, 0.6756700277328491, -0.2919996976852417, -0.009063325822353363, -0.06614834070205688, -0.12613563239574432, -0.46992725133895874, 0.049386925995349884, -0.33790141344070435, -0.03278665989637375, -0.06554833054542542, 0.30293703079223633, -0.23633727431297302, 0.12001579999923706, -0.18682031333446503, -0.2789500951766968, -0.002744043245911598, -0.10262557864189148, 0.38747701048851013, -0.0642002522945404, 0.26614269614219666, 0.3874093294143677, 0.10935685783624649, 0.24036617577075958, -0.0960596352815628, -0.49060025811195374, -0.016554182395339012, -0.1293543577194214, 0.05987204611301422, 0.10354706645011902, 0.22179359197616577, -0.1052522137761116, -0.374585896730423, 0.060116782784461975, -0.34975162148475647, 0.7060147523880005, 0.2105334848165512, -0.049510832875967026, 0.14594900608062744, -0.16626060009002686, -0.1710069626569748, -0.06563793122768402, -0.04022276774048805, -0.17487959563732147, -0.16609449684619904, 0.31304436922073364, -0.06715113669633865, -0.48389577865600586, -0.06623426079750061, -0.459860622882843, -0.08952497690916061, -0.2726500928401947, -0.37377166748046875, -0.08103885501623154, -0.13226792216300964, -0.33392584323883057, 0.15419401228427887, -0.011621756479144096, -0.17191079258918762, 0.21426540613174438, -0.1168581023812294, -0.00903906300663948, 0.15893474221229553, -0.07727493345737457, 0.13921722769737244, 0.005196428392082453, -0.24608121812343597, -0.02713922969996929, -0.18151342868804932, -0.03395615145564079, 0.0006693992181681097, -0.3502773344516754, 0.2575019896030426, 0.46655598282814026, 0.2079988420009613, -0.023346176370978355, 0.15583866834640503, -0.018845276907086372, -0.15745452046394348, -0.25038790702819824, -0.24436351656913757, -0.5601850748062134, -0.282770574092865, 0.08664779365062714, -0.16114486753940582, 0.3149280846118927, -0.13785380125045776, 0.20403027534484863, -0.06231989338994026, -0.025523697957396507, 0.009739733301103115, 0.3308720588684082, -0.22078512609004974, 0.27579206228256226, 0.12491805851459503, 0.7631402015686035, -0.006671303883194923, 0.39239197969436646, 0.5369349718093872, 0.054222431033849716, -0.29131725430488586, -0.1031636893749237, -0.1115405261516571, -0.24280034005641937, -0.01110767014324665, -0.09686640650033951, -0.13840027153491974, 0.26484644412994385, 0.10014720261096954, 0.04870719835162163, -0.09718413650989532, 0.220461905002594, 0.19863970577716827, -0.05705792084336281, 0.04319548234343529, -0.12648211419582367, -0.09586090594530106, -0.4674730896949768, 0.21797257661819458, -0.0734451562166214, 0.16381116211414337, -0.25428372621536255, 0.18225263059139252, 0.18945293128490448, -0.14796093106269836, 0.07893446832895279, 0.13669556379318237, -0.042649224400520325, 0.5715972185134888, 0.18352243304252625, 0.24786296486854553, -0.4247935116291046, 0.2158275544643402, 0.244073286652565, 0.028445066884160042, 0.1685512810945511, 0.20729327201843262, -0.0766453668475151, 0.4133330285549164, -0.2946423590183258, 0.09031189978122711, 0.1832485944032669, -0.012162404134869576, 0.18270359933376312, 0.06692302227020264, -0.11062531173229218, -0.5557011961936951, 0.006586533039808273, -0.04655224457383156, -0.03599351644515991, -0.047173503786325455, -0.48645880818367004, 0.017071561887860298, 0.20532971620559692, 0.0749194324016571, 0.143787682056427, 0.04115431755781174, 0.010156402364373207, -0.02710861526429653, -0.25366976857185364, -0.023666324093937874, -0.1002904549241066, 0.6212434768676758, -0.134184330701828, -0.2228279411792755, 0.07058052718639374, -0.39345499873161316, -0.35260462760925293, -0.16578532755374908, 0.1198522299528122, -0.2470705211162567, -0.04804617166519165, 0.2967948913574219, -0.03943087160587311, -0.41112130880355835, -0.044351976364851, 0.2798301875591278, 0.15617060661315918, 0.33065101504325867, -0.09768062084913254, 0.10016561299562454, -0.06036815419793129, 0.07489731907844543, -0.0651690885424614, 0.29639744758605957, 0.5242523550987244, -0.5089309811592102, -0.3141583502292633, -0.46718841791152954, -0.3409419357776642, 0.30789053440093994, 0.2123977392911911, -0.1642863154411316, 0.11750417947769165, -0.4641244113445282, 0.2163330465555191, -0.012344663962721825, 0.21760860085487366, -0.014320295304059982, -0.21924534440040588, -0.18094411492347717, -0.15354330837726593, 0.12650790810585022, 0.18457335233688354, 0.1529829055070877, -0.03273428604006767, -0.21971218287944794, -0.33681246638298035, 0.011715792119503021, -0.023299023509025574, 0.5471987128257751, -0.09695518761873245, 0.506601095199585, 0.40710222721099854, 0.22453506290912628, 0.10363949835300446, 0.2544850707054138, 0.22028736770153046, 0.49218836426734924, -0.16762594878673553, 0.19313834607601166, -0.36921611428260803, -0.036305882036685944, -0.34004536271095276, 0.49973219633102417, 0.18171396851539612, 0.13636669516563416, 0.339179128408432, -0.010792101733386517, -0.029547732323408127, -0.16336208581924438, 0.36434638500213623, 0.16064497828483582, -0.18425899744033813, -0.19515348970890045, -0.08989496529102325, 0.17875070869922638, 0.09859226644039154, -0.20609916746616364, -0.17217248678207397, -0.2333582639694214, 0.03918258845806122, 0.17190933227539062, 0.19375045597553253, -0.08661619573831558, 0.5331835150718689, -0.04381263628602028, -0.03546897694468498, 0.1138077974319458, -0.36801648139953613, 0.26686081290245056, 0.14916689693927765, 0.20713812112808228, 0.28092920780181885, -0.05491989105939865, 0.27918243408203125, 0.5859880447387695, -0.2900342047214508, 0.008995984680950642, 0.20078977942466736, 0.3292788565158844, 0.006435496732592583, -0.46375608444213867, 0.2341981679201126, -0.05111222714185715, -0.37768903374671936, 0.08835618942975998, -0.14138413965702057, -0.2068158984184265, -0.3615950345993042, -0.07159868627786636, -0.12583179771900177, -0.046092018485069275, -0.49974554777145386, -0.3619389832019806, 0.11745695769786835, 0.11739756911993027, 0.05922878533601761, 0.03518995642662048, -0.0443602129817009, 0.05949748679995537, -0.012818245217204094, 0.03091186285018921, 0.3055799901485443, 0.419746458530426, -0.14709782600402832, -0.1282135248184204, 0.1450454592704773, -0.18947724997997284, -0.16040782630443573, -0.1988697648048401, 0.20242972671985626, 0.18497319519519806, 0.005652709864079952, 0.489838182926178, 0.1672627329826355, 0.06560415029525757, -0.39511439204216003, 0.1457034796476364, -0.009878592565655708, 0.004725901409983635, 0.1847323626279831, 0.34981828927993774, 0.5434962511062622, 0.31553786993026733, 0.18241259455680847, -0.22532634437084198, -0.13147205114364624, 0.21117787063121796, 0.059580735862255096, -0.24215571582317352, 0.17401805520057678, 0.04809607192873955, -0.001966815674677491, -0.1655191332101822, 0.4762977659702301, -0.31693485379219055, -0.21272240579128265, 0.08178404718637466, -0.17772825062274933, 0.15459348261356354, 0.17817848920822144, 0.11081958562135696, 0.3577880561351776, 0.22636178135871887, 0.20221838355064392, -0.24339956045150757, 0.060734160244464874, 0.15116854012012482, -0.210092693567276, -0.01577548123896122, 0.5837059617042542, 0.4554401934146881, -0.2614087462425232, 0.3025130033493042, 0.05316153168678284, -0.19538165628910065, -0.11767655611038208, -0.27931666374206543, 0.11023221164941788, 0.001632549101486802, 0.15461686253547668, 0.020939132198691368, -0.06827761977910995, -0.307591050863266, -0.08948400616645813, -0.537356972694397, 0.20574533939361572, -0.1348268687725067, 0.10757780820131302, -0.088455431163311, 0.03384533151984215, -0.24570384621620178, 0.19209381937980652, 0.44385531544685364, -0.1275007128715515, -0.047254957258701324, -0.14202168583869934, -0.32234737277030945, 0.24294976890087128, -0.21874494850635529, 0.31864047050476074, -0.15476296842098236, -0.22303421795368195, 0.09112996608018875, -0.09242233633995056, 0.2276526242494583, -0.14363379776477814, 0.2713485062122345, -0.00383083731867373, -0.15228067338466644, -0.641356885433197, 0.27070102095603943, -0.3723811209201813, -0.10588335245847702, -0.042472392320632935, 0.24525989592075348, -0.0017974476795643568, 0.18777398765087128, -0.2448958307504654, 0.09574916958808899, 0.11684468388557434, -0.12363090366125107, -0.0038082515820860863, -0.16510428488254547, 0.12122918665409088, 0.10658346861600876, -0.17995300889015198, -0.29840534925460815, -0.0023399905767291784, 0.23074699938297272, -0.04297700524330139, -0.11629665642976761, 0.4553198516368866, -0.36309969425201416, 0.058667585253715515, -0.25951090455055237, 0.0336267352104187, -0.017042698338627815, -0.07136137038469315, 0.10642902553081512, -0.06796613335609436 ]
https://github.com/huggingface/datasets/issues/5385
Is `fs=` deprecated in `load_from_disk()` as well?
> Hi! Yes, we should deprecate the `fs` param here. Would you be interested in submitting a PR? Yeah I can do that sometime next week. Should the storage_options be a new arg here? I’ll look around for anywhere else where fs is an arg.
### Describe the bug The `fs=` argument was deprecated from `Dataset.save_to_disk` and `Dataset.load_from_disk` in favor of automagically figuring it out via fsspec: https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/arrow_dataset.py#L1339-L1340 Is there a reason the same thing shouldn't also apply to `datasets.load.load_from_disk()` as well ? https://github.com/huggingface/datasets/blob/9a7272cd4222383a5b932b0083a4cc173fda44e8/src/datasets/load.py#L1779 ### Steps to reproduce the bug n/a ### Expected behavior n/a ### Environment info n/a
45
Is `fs=` deprecated in `load_from_disk()` as well?
[ -0.21502220630645752, -0.6732359528541565, -0.26653432846069336, -0.10288771986961365, 0.36395934224128723, -0.3296699523925781, 0.2782036066055298, 0.0007635535439476371, 0.3935280740261078, 0.1810871660709381, -0.1642301231622696, 0.18184421956539154, 0.0003201330255251378, 0.14394697546958923, -0.17224223911762238, 0.4218766391277313, 0.35341373085975647, 0.3106412887573242, -0.24566440284252167, 0.05341382324695587, -0.2340409904718399, 0.5114245414733887, -0.16809986531734467, -0.005122789181768894, -0.041047658771276474, 0.26750290393829346, -0.1394306868314743, 0.023088671267032623, -0.10312973707914352, 0.05549655854701996, 0.015137769281864166, -0.03827492520213127, 0.22321216762065887, 0.1246446818113327, -0.00011544187873369083, -0.08637329936027527, 0.1385563760995865, -0.25155743956565857, -0.669704794883728, 0.3219093978404999, 0.32109206914901733, 0.14508698880672455, -0.03334858641028404, -0.18327271938323975, 0.09443458169698715, 0.0036852422636002302, 0.11642657965421677, -0.3342696726322174, -0.027572765946388245, 0.17302952706813812, 0.24234187602996826, 0.07484828680753708, -0.07067863643169403, -0.31787344813346863, 0.00987770315259695, 0.3127278983592987, -0.17675752937793732, 0.21007756888866425, 0.025601351633667946, -0.18876992166042328, -0.07322834432125092, -0.09129346162080765, -0.2159564048051834, -0.020229244604706764, 0.46202170848846436, -0.09690092504024506, 0.48859086632728577, 0.11497405171394348, -0.0919284000992775, -0.2331598699092865, 0.4368189871311188, 0.05471715331077576, -0.42822927236557007, -0.14124076068401337, -0.26543673872947693, 0.138379767537117, 0.19764147698879242, -0.3386262357234955, -0.3851015865802765, 0.3459579050540924, 0.21852116286754608, -0.5142945647239685, 0.061202239245176315, 0.1416056603193283, -0.23079374432563782, -0.07979730516672134, -0.36163797974586487, -0.09962424635887146, 0.4268384873867035, 0.0033344917465001345, -0.023698462173342705, 0.09648961573839188, -0.06369579583406448, 0.07250551879405975, -0.014906167052686214, -0.1232110932469368, 0.17652064561843872, -0.17675280570983887, -0.18091297149658203, -0.03626895323395729, 0.08700740337371826, -0.014656524173915386, -0.056827645748853683, 0.07367757707834244, -0.1476808786392212, 0.18182455003261566, 0.22394292056560516, -0.23577040433883667, 0.0764833465218544, 0.08387887477874756, 0.10544753819704056, -0.25535258650779724, -0.06099541112780571, -0.2044450044631958, -0.08026929199695587, -0.0291869156062603, -0.026704205200076103, 0.04046407341957092, -0.03126930072903633, -0.047026459127664566, 0.28384363651275635, -0.036447033286094666, 0.04823168367147446, 0.22764523327350616, 0.2771165370941162, 0.31928539276123047, 0.3141228258609772, -0.14964842796325684, -0.3007808327674866, -0.0035898727364838123, -0.04017503559589386, 0.10653647035360336, -0.21346953511238098, -0.18415072560310364, -0.0061498405411839485, 0.05187676101922989, 0.06723806262016296, -0.01070018857717514, 0.08166578412055969, -0.030717279762029648, -0.41872504353523254, -0.10159039497375488, 0.4933367669582367, 0.29894283413887024, -0.2829146087169647, 0.011782077141106129, -0.07335838675498962, 0.207185298204422, -0.05283598601818085, 0.41643938422203064, -0.28959938883781433, -0.33995091915130615, -0.44800153374671936, 0.18601086735725403, -0.06035533547401428, -0.0544925183057785, -0.21631518006324768, 0.10663244128227234, -0.0609845295548439, -0.43966978788375854, 0.36070361733436584, -0.0651908814907074, -0.1824384331703186, -0.021786147728562355, -0.02901270054280758, 0.1606704741716385, -0.2010079324245453, -0.158024400472641, 0.03423117473721504, -0.34010884165763855, 0.2064998298883438, 0.17232945561408997, -0.14277270436286926, -0.07860682159662247, -0.5484786033630371, -0.018625397235155106, 0.3904789686203003, -0.11171207576990128, 0.13737717270851135, 0.4155237078666687, 0.4435250163078308, -0.03140587359666824, 0.12495262175798416, -0.07907680422067642, 0.07837896794080734, -0.0639030784368515, 0.03283245861530304, 0.13675415515899658, 0.38338595628738403, -0.10093332827091217, 0.03761756420135498, -0.09615938365459442, -0.06089870259165764, 0.153115913271904, 0.07830806076526642, 0.4977205991744995, 0.313158243894577, 0.28682059049606323, 0.09868800640106201, -0.12226194143295288, -0.04500000551342964, 0.29897454380989075, 0.35052162408828735, 0.06415721029043198, 0.16604821383953094, -0.21268139779567719, -0.26831862330436707, 0.06550416350364685, 0.0734020471572876, -0.18602272868156433, 0.360020250082016, 0.0012029811041429639, 0.1601233035326004, 0.19437509775161743, 0.31205451488494873, 0.39447134733200073, 0.10176290571689606, 0.027004212141036987, 0.029437346383929253, -0.19016125798225403, -0.11622130870819092, 0.09844881296157837, -0.2974560558795929, -0.17085692286491394, 0.17921841144561768, 0.14779061079025269, -0.22511352598667145, -0.10748288780450821, -0.2216506451368332, -0.06484142690896988, 0.08922326564788818, 0.002845197916030884, 0.03049277886748314, 0.4985972046852112, 0.4836905598640442, 0.19126445055007935, -0.2199910432100296, 0.3540860414505005, 0.09030447155237198, 0.39108845591545105, 0.029238218441605568, 0.19079983234405518, 0.09302715957164764, 0.17693939805030823, 0.10080631077289581, 0.22894002497196198, 0.001054035616107285, -0.21493126451969147, 0.21865162253379822, -0.04885868355631828, 0.07125239074230194, 0.27034470438957214, -0.021351337432861328, -0.058424212038517, 0.15042777359485626, 0.17099523544311523, -0.09815627336502075, 0.11779725551605225, 0.11593654006719589, -0.38314884901046753, 0.337475061416626, -0.3079074025154114, 0.23857416212558746, 0.3091667890548706, 0.4993666410446167, -0.3036496937274933, 0.3271876871585846, -0.07573755830526352, 0.555744469165802, 0.09329201281070709, 0.35390275716781616, -0.0786290094256401, 0.11445493251085281, -0.14084714651107788, 0.5653514266014099, -0.026455219835042953, 0.17247097194194794, 0.29913637042045593, -0.14713509380817413, -0.0286080464720726, -0.33638662099838257, -0.01165571715682745, -0.07577893882989883, -0.0824824869632721, -0.4327217936515808, -0.026012888178229332, -0.02246982604265213, 0.06895322352647781, 0.24559386074543, 0.329026997089386, -0.17312806844711304, -0.11564669013023376, -0.19721101224422455, 0.4346480369567871, -0.0905761569738388, -0.02123011276125908, -0.14498072862625122, 0.41273054480552673, 0.004145042970776558, 0.09101720154285431, -0.39477264881134033, 0.10460180789232254, 0.19224660098552704, 0.1253688633441925, -0.09050783514976501, -0.2814274728298187, -0.1498957872390747, 0.1946849226951599, 0.20046178996562958, -0.6303179860115051, -0.22181697189807892, -0.01062761154025793, 0.2188614308834076, 0.07279286533594131, 0.2990354001522064, 0.1091017872095108, -0.04500914365053177, 0.12653110921382904, 0.04348327964544296, -0.664483368396759, -0.22538255155086517, -0.13512350618839264, -0.15973925590515137, -0.13875174522399902, -0.608482301235199, 0.4633220434188843, 0.01783626154065132, -0.34439191222190857, 0.07484722882509232, 0.04700221121311188, 0.05848747491836548, 0.397530734539032, -0.023891758173704147, -0.12758025527000427, 0.6271732449531555, 0.20331797003746033, -0.6058672070503235, 0.0076126828789711, 0.10389361530542374, -0.01708466187119484, -0.10824370384216309, -0.09104635566473007, 0.1628500521183014, -0.1890578716993332, 0.11012087017297745, -0.2116544544696808, -0.3450142741203308, 0.11678895354270935, 0.04282141849398613, -0.40080979466438293, 0.2701658308506012, 0.24005824327468872, 0.1084422618150711, -0.14470182359218597, -0.2628076374530792, -0.1242154911160469, -0.09512288868427277, -0.11506923288106918, 0.04882120341062546, 0.03483811393380165, 0.24887074530124664, 0.19219644367694855, 0.13027583062648773, -0.4442442059516907, 0.16811466217041016, 0.3860562741756439, -0.17419536411762238, 0.6756700277328491, -0.2919996976852417, -0.009063325822353363, -0.06614834070205688, -0.12613563239574432, -0.46992725133895874, 0.049386925995349884, -0.33790141344070435, -0.03278665989637375, -0.06554833054542542, 0.30293703079223633, -0.23633727431297302, 0.12001579999923706, -0.18682031333446503, -0.2789500951766968, -0.002744043245911598, -0.10262557864189148, 0.38747701048851013, -0.0642002522945404, 0.26614269614219666, 0.3874093294143677, 0.10935685783624649, 0.24036617577075958, -0.0960596352815628, -0.49060025811195374, -0.016554182395339012, -0.1293543577194214, 0.05987204611301422, 0.10354706645011902, 0.22179359197616577, -0.1052522137761116, -0.374585896730423, 0.060116782784461975, -0.34975162148475647, 0.7060147523880005, 0.2105334848165512, -0.049510832875967026, 0.14594900608062744, -0.16626060009002686, -0.1710069626569748, -0.06563793122768402, -0.04022276774048805, -0.17487959563732147, -0.16609449684619904, 0.31304436922073364, -0.06715113669633865, -0.48389577865600586, -0.06623426079750061, -0.459860622882843, -0.08952497690916061, -0.2726500928401947, -0.37377166748046875, -0.08103885501623154, -0.13226792216300964, -0.33392584323883057, 0.15419401228427887, -0.011621756479144096, -0.17191079258918762, 0.21426540613174438, -0.1168581023812294, -0.00903906300663948, 0.15893474221229553, -0.07727493345737457, 0.13921722769737244, 0.005196428392082453, -0.24608121812343597, -0.02713922969996929, -0.18151342868804932, -0.03395615145564079, 0.0006693992181681097, -0.3502773344516754, 0.2575019896030426, 0.46655598282814026, 0.2079988420009613, -0.023346176370978355, 0.15583866834640503, -0.018845276907086372, -0.15745452046394348, -0.25038790702819824, -0.24436351656913757, -0.5601850748062134, -0.282770574092865, 0.08664779365062714, -0.16114486753940582, 0.3149280846118927, -0.13785380125045776, 0.20403027534484863, -0.06231989338994026, -0.025523697957396507, 0.009739733301103115, 0.3308720588684082, -0.22078512609004974, 0.27579206228256226, 0.12491805851459503, 0.7631402015686035, -0.006671303883194923, 0.39239197969436646, 0.5369349718093872, 0.054222431033849716, -0.29131725430488586, -0.1031636893749237, -0.1115405261516571, -0.24280034005641937, -0.01110767014324665, -0.09686640650033951, -0.13840027153491974, 0.26484644412994385, 0.10014720261096954, 0.04870719835162163, -0.09718413650989532, 0.220461905002594, 0.19863970577716827, -0.05705792084336281, 0.04319548234343529, -0.12648211419582367, -0.09586090594530106, -0.4674730896949768, 0.21797257661819458, -0.0734451562166214, 0.16381116211414337, -0.25428372621536255, 0.18225263059139252, 0.18945293128490448, -0.14796093106269836, 0.07893446832895279, 0.13669556379318237, -0.042649224400520325, 0.5715972185134888, 0.18352243304252625, 0.24786296486854553, -0.4247935116291046, 0.2158275544643402, 0.244073286652565, 0.028445066884160042, 0.1685512810945511, 0.20729327201843262, -0.0766453668475151, 0.4133330285549164, -0.2946423590183258, 0.09031189978122711, 0.1832485944032669, -0.012162404134869576, 0.18270359933376312, 0.06692302227020264, -0.11062531173229218, -0.5557011961936951, 0.006586533039808273, -0.04655224457383156, -0.03599351644515991, -0.047173503786325455, -0.48645880818367004, 0.017071561887860298, 0.20532971620559692, 0.0749194324016571, 0.143787682056427, 0.04115431755781174, 0.010156402364373207, -0.02710861526429653, -0.25366976857185364, -0.023666324093937874, -0.1002904549241066, 0.6212434768676758, -0.134184330701828, -0.2228279411792755, 0.07058052718639374, -0.39345499873161316, -0.35260462760925293, -0.16578532755374908, 0.1198522299528122, -0.2470705211162567, -0.04804617166519165, 0.2967948913574219, -0.03943087160587311, -0.41112130880355835, -0.044351976364851, 0.2798301875591278, 0.15617060661315918, 0.33065101504325867, -0.09768062084913254, 0.10016561299562454, -0.06036815419793129, 0.07489731907844543, -0.0651690885424614, 0.29639744758605957, 0.5242523550987244, -0.5089309811592102, -0.3141583502292633, -0.46718841791152954, -0.3409419357776642, 0.30789053440093994, 0.2123977392911911, -0.1642863154411316, 0.11750417947769165, -0.4641244113445282, 0.2163330465555191, -0.012344663962721825, 0.21760860085487366, -0.014320295304059982, -0.21924534440040588, -0.18094411492347717, -0.15354330837726593, 0.12650790810585022, 0.18457335233688354, 0.1529829055070877, -0.03273428604006767, -0.21971218287944794, -0.33681246638298035, 0.011715792119503021, -0.023299023509025574, 0.5471987128257751, -0.09695518761873245, 0.506601095199585, 0.40710222721099854, 0.22453506290912628, 0.10363949835300446, 0.2544850707054138, 0.22028736770153046, 0.49218836426734924, -0.16762594878673553, 0.19313834607601166, -0.36921611428260803, -0.036305882036685944, -0.34004536271095276, 0.49973219633102417, 0.18171396851539612, 0.13636669516563416, 0.339179128408432, -0.010792101733386517, -0.029547732323408127, -0.16336208581924438, 0.36434638500213623, 0.16064497828483582, -0.18425899744033813, -0.19515348970890045, -0.08989496529102325, 0.17875070869922638, 0.09859226644039154, -0.20609916746616364, -0.17217248678207397, -0.2333582639694214, 0.03918258845806122, 0.17190933227539062, 0.19375045597553253, -0.08661619573831558, 0.5331835150718689, -0.04381263628602028, -0.03546897694468498, 0.1138077974319458, -0.36801648139953613, 0.26686081290245056, 0.14916689693927765, 0.20713812112808228, 0.28092920780181885, -0.05491989105939865, 0.27918243408203125, 0.5859880447387695, -0.2900342047214508, 0.008995984680950642, 0.20078977942466736, 0.3292788565158844, 0.006435496732592583, -0.46375608444213867, 0.2341981679201126, -0.05111222714185715, -0.37768903374671936, 0.08835618942975998, -0.14138413965702057, -0.2068158984184265, -0.3615950345993042, -0.07159868627786636, -0.12583179771900177, -0.046092018485069275, -0.49974554777145386, -0.3619389832019806, 0.11745695769786835, 0.11739756911993027, 0.05922878533601761, 0.03518995642662048, -0.0443602129817009, 0.05949748679995537, -0.012818245217204094, 0.03091186285018921, 0.3055799901485443, 0.419746458530426, -0.14709782600402832, -0.1282135248184204, 0.1450454592704773, -0.18947724997997284, -0.16040782630443573, -0.1988697648048401, 0.20242972671985626, 0.18497319519519806, 0.005652709864079952, 0.489838182926178, 0.1672627329826355, 0.06560415029525757, -0.39511439204216003, 0.1457034796476364, -0.009878592565655708, 0.004725901409983635, 0.1847323626279831, 0.34981828927993774, 0.5434962511062622, 0.31553786993026733, 0.18241259455680847, -0.22532634437084198, -0.13147205114364624, 0.21117787063121796, 0.059580735862255096, -0.24215571582317352, 0.17401805520057678, 0.04809607192873955, -0.001966815674677491, -0.1655191332101822, 0.4762977659702301, -0.31693485379219055, -0.21272240579128265, 0.08178404718637466, -0.17772825062274933, 0.15459348261356354, 0.17817848920822144, 0.11081958562135696, 0.3577880561351776, 0.22636178135871887, 0.20221838355064392, -0.24339956045150757, 0.060734160244464874, 0.15116854012012482, -0.210092693567276, -0.01577548123896122, 0.5837059617042542, 0.4554401934146881, -0.2614087462425232, 0.3025130033493042, 0.05316153168678284, -0.19538165628910065, -0.11767655611038208, -0.27931666374206543, 0.11023221164941788, 0.001632549101486802, 0.15461686253547668, 0.020939132198691368, -0.06827761977910995, -0.307591050863266, -0.08948400616645813, -0.537356972694397, 0.20574533939361572, -0.1348268687725067, 0.10757780820131302, -0.088455431163311, 0.03384533151984215, -0.24570384621620178, 0.19209381937980652, 0.44385531544685364, -0.1275007128715515, -0.047254957258701324, -0.14202168583869934, -0.32234737277030945, 0.24294976890087128, -0.21874494850635529, 0.31864047050476074, -0.15476296842098236, -0.22303421795368195, 0.09112996608018875, -0.09242233633995056, 0.2276526242494583, -0.14363379776477814, 0.2713485062122345, -0.00383083731867373, -0.15228067338466644, -0.641356885433197, 0.27070102095603943, -0.3723811209201813, -0.10588335245847702, -0.042472392320632935, 0.24525989592075348, -0.0017974476795643568, 0.18777398765087128, -0.2448958307504654, 0.09574916958808899, 0.11684468388557434, -0.12363090366125107, -0.0038082515820860863, -0.16510428488254547, 0.12122918665409088, 0.10658346861600876, -0.17995300889015198, -0.29840534925460815, -0.0023399905767291784, 0.23074699938297272, -0.04297700524330139, -0.11629665642976761, 0.4553198516368866, -0.36309969425201416, 0.058667585253715515, -0.25951090455055237, 0.0336267352104187, -0.017042698338627815, -0.07136137038469315, 0.10642902553081512, -0.06796613335609436 ]
https://github.com/huggingface/datasets/issues/5383
IterableDataset missing column_names, differs from Dataset interface
Another example is that `IterableDataset.map` does not have `fn_kwargs`, among other arguments. It makes it harder to convert code from Dataset to IterableDataset.
### Describe the bug The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like ``` dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...) ``` will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available. ### Steps to reproduce the bug See above ### Expected behavior Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation. ### Environment info n/a
23
IterableDataset missing column_names, differs from Dataset interface
[ -0.17891345918178558, 0.15316186845302582, -0.2357303500175476, 0.0967603251338005, 0.3883974552154541, 0.17627078294754028, 0.5065873265266418, 0.21392624080181122, -0.028160646557807922, 0.09710617363452911, -0.06768764555454254, 0.36895355582237244, 0.1344282478094101, 0.07603011280298233, -0.03951658681035042, 0.034267984330654144, 0.11612233519554138, 0.2984924614429474, -0.4119992256164551, -0.07582264393568039, -0.09846693277359009, 0.3521028161048889, -0.3220345377922058, 0.0898241400718689, -0.009495002217590809, 0.06992759555578232, -0.11943033337593079, 0.09694046527147293, -0.11032194644212723, -0.3057214319705963, 0.41214486956596375, 0.316956102848053, -0.12775802612304688, 0.21736885607242584, -0.00010651702905306593, 0.08712803572416306, 0.14209125936031342, -0.022667722776532173, -0.30759212374687195, 0.23968471586704254, -0.12106412649154663, -0.08624192327260971, 0.08773531764745712, -0.5127413272857666, -0.10379356890916824, -0.48163414001464844, 0.054668255150318146, -0.11860588192939758, -0.17564113438129425, 0.1023930013179779, 0.30646538734436035, 0.022877363488078117, -0.09357620030641556, -0.21111856400966644, 0.005634451750665903, 0.15789568424224854, -0.20613248646259308, 0.15660259127616882, 0.324736088514328, -0.013223830610513687, 0.011803965084254742, 0.15777425467967987, -0.10654747486114502, -0.04453027620911598, -0.12934741377830505, 0.026082322001457214, -0.28320229053497314, 0.2147756665945053, 0.38851821422576904, -0.03826738893985748, 0.5325772166252136, -0.2883884906768799, -0.08657282590866089, -0.08921261876821518, -0.09091200679540634, -0.269713819026947, 0.21994411945343018, -0.3757496476173401, 0.15589629113674164, 0.12520205974578857, 0.0058708228170871735, 0.08314891159534454, -0.12355002760887146, 0.001079640118405223, 0.07004521042108536, -0.09285126626491547, -0.19334575533866882, 0.17409898340702057, -0.27786681056022644, -0.18021567165851593, 0.4927845597267151, -0.01292337104678154, 0.013902290724217892, 0.08537277579307556, -0.2683353126049042, -0.004399374593049288, 0.2168801873922348, 0.014483196660876274, 0.07189054787158966, 0.022203918546438217, -0.020743658766150475, 0.03483382984995842, 0.1651892513036728, -0.20370256900787354, 0.20479556918144226, -0.13796377182006836, -0.03991270810365677, 0.3784730136394501, 0.1995757520198822, 0.06446423381567001, -0.1762971431016922, -0.194181889295578, -0.04391375929117203, 0.10205528885126114, 0.40061622858047485, -0.0995059460401535, -0.06450667232275009, -0.11996275186538696, -0.30111777782440186, -0.026838839054107666, -0.1369754821062088, -0.06434854865074158, 0.10653554648160934, 0.1304706633090973, 0.15587455034255981, 0.002470854902639985, -0.22899951040744781, 0.28431180119514465, 0.01779794692993164, -0.11503545939922333, -0.45453086495399475, -0.02918950654566288, 0.07826386392116547, 0.014353863894939423, 0.12556126713752747, 0.07987972348928452, 0.3646742105484009, -0.0544707216322422, -0.3368750214576721, 0.07776741683483124, 0.1111360490322113, -0.0927821546792984, 0.2045220136642456, 0.19878531992435455, 0.06970340013504028, 0.10722050070762634, 0.1548895537853241, -0.2921122610569, 0.05711282417178154, -0.12196651846170425, -0.013436730951070786, -0.1846565455198288, -0.03465825691819191, 0.27381038665771484, -0.05286964774131775, -0.06873004138469696, 0.06438993662595749, 0.02791530080139637, 0.17432379722595215, -0.33227163553237915, 0.017457392066717148, -0.04884295538067818, 0.24134303629398346, -0.06469517946243286, -0.05222892016172409, 0.2721386253833771, -0.4820610582828522, 0.036585841327905655, -0.12882359325885773, -0.08103378117084503, 0.207869753241539, -0.08985821157693863, -0.008199038915336132, 0.20881088078022003, -0.3806862235069275, 0.34095197916030884, 0.1999615877866745, -0.10966664552688599, -0.27111387252807617, 0.03913978114724159, 0.2849750518798828, 0.07269030064344406, 0.21680329740047455, -0.04877013713121414, 0.02506251074373722, -0.10430441051721573, 0.0773712545633316, -0.22138729691505432, -0.2757442891597748, -0.06632153689861298, -0.017126139253377914, -0.01649048551917076, -0.08083480596542358, 0.15741729736328125, 0.08635604381561279, 0.36854249238967896, 0.2461315542459488, -0.30326002836227417, 0.3141753375530243, -0.2800823450088501, -0.049452781677246094, 0.3605410158634186, 0.0017564923036843538, -0.024660388007760048, 0.19451330602169037, -0.24824832379817963, -0.5116763710975647, -0.03682130202651024, 0.5448897480964661, 0.08133988082408905, -0.20545382797718048, -0.022955434396862984, -0.47975659370422363, 0.17811454832553864, -0.038157012313604355, 0.22382111847400665, 0.2844213843345642, 0.44717133045196533, -0.030867483466863632, -0.08740390092134476, -0.2814008891582489, 0.10764079540967941, -0.5900452136993408, -0.27817168831825256, -0.3483583629131317, 0.08403661847114563, 0.12716667354106903, -0.20524688065052032, 0.127097949385643, 0.1528518795967102, 0.18964003026485443, -0.22917817533016205, -0.006818484980612993, 0.28467094898223877, -0.01439010538160801, -0.10500475019216537, 0.11834529042243958, 0.5544052124023438, -0.17954230308532715, 0.03153747320175171, -0.15441188216209412, -0.23396602272987366, 0.21719183027744293, -0.1007443442940712, -0.020723940804600716, 0.28295180201530457, -0.24450349807739258, 0.31413811445236206, 0.24550314247608185, 0.07318200916051865, 0.6056528687477112, 0.029125161468982697, -0.16242466866970062, -0.4576607644557953, -0.11695250868797302, 0.12370189279317856, 0.18541750311851501, -0.0814657211303711, -0.2859894633293152, 0.21196319162845612, 0.573397159576416, 0.10713434964418411, 0.047517094761133194, -0.2662874460220337, 0.025926141068339348, -0.07795997709035873, 0.08290595561265945, 0.1517448127269745, 0.526090681552887, 0.21049533784389496, 0.12091921269893646, -0.15154430270195007, -0.08919520676136017, -0.13901638984680176, 0.2093091607093811, 0.05544523149728775, 0.143036350607872, 0.060327254235744476, 0.012329592369496822, -0.33046194911003113, -0.47526344656944275, -0.20985037088394165, 0.2531979978084564, 0.290157288312912, -0.15915578603744507, 0.11363248527050018, -0.26863837242126465, -0.30315977334976196, 0.2296498566865921, -0.2023400515317917, 0.28428104519844055, -0.4916495978832245, -0.1446024477481842, 0.3907756507396698, -0.11080819368362427, 0.35075345635414124, -0.22050337493419647, 0.20341569185256958, 0.12539105117321014, 0.031356047838926315, -0.39106839895248413, -0.2887701988220215, -0.3332482874393463, 0.15105555951595306, -0.008353959769010544, -0.2375146448612213, 0.21128949522972107, -0.15649543702602386, -0.11040102690458298, -0.4631522297859192, -0.27616551518440247, 0.3244600296020508, -0.10516498982906342, 0.18219375610351562, 0.4335440695285797, 0.10795868188142776, 0.07633843272924423, -0.09496083855628967, 0.23710252344608307, 0.12256679683923721, -0.1003970056772232, 0.10644225776195526, -0.16309037804603577, -0.4557857811450958, -0.004637688864022493, -0.33821794390678406, 0.0398569256067276, -0.1593204289674759, 0.02348291128873825, -0.07299435883760452, 0.13333459198474884, 0.4342425763607025, -0.3217830955982208, -0.009084278717637062, 0.3452266752719879, 0.0178745836019516, -0.448395311832428, -0.06626523286104202, 0.23296765983104706, -0.34403106570243835, -0.22670724987983704, -0.08086562901735306, -0.07956617325544357, 0.37649208307266235, 0.2241341918706894, -0.2751893997192383, -0.30426228046417236, -0.13605977594852448, 0.08655103296041489, 0.21054141223430634, -0.032632578164339066, 0.24100729823112488, 0.1020502969622612, -0.16070738434791565, -0.379470556974411, -0.385611891746521, 0.25887107849121094, 0.1642449051141739, -0.1342521458864212, 0.0729818120598793, 0.4892484247684479, -0.27446845173835754, 0.1393725872039795, 0.036403361707925797, 0.17503303289413452, 0.4106371998786926, -0.36942824721336365, 0.25448280572891235, -0.24703079462051392, -0.3511809706687927, 0.012815458700060844, -0.08953244984149933, -0.07013367116451263, 0.18785253167152405, -0.3395579755306244, -0.3432747721672058, 0.01945304684340954, 0.4146224558353424, -0.10644631087779999, -0.2112884521484375, -0.11425267904996872, 0.020608171820640564, 0.24390792846679688, 0.3913017511367798, 0.16501906514167786, -0.3467351198196411, 0.033910926431417465, 0.09260891377925873, -0.2528200149536133, -0.12174994498491287, -0.15764544904232025, -0.46633774042129517, -0.052919644862413406, -0.1410994678735733, 0.11460423469543457, -0.026181304827332497, 0.572917103767395, -0.09004918485879898, -0.4013190269470215, 0.055538028478622437, 0.171711266040802, 0.6591591835021973, -0.2859039306640625, -0.21276052296161652, 0.34699273109436035, 0.2231651395559311, -0.03350928798317909, -0.1617649793624878, -0.1581510454416275, 0.5311183929443359, 0.20241789519786835, 0.5095130801200867, -0.25115829706192017, -0.2161705493927002, 0.5288524627685547, -0.02845420315861702, -0.06717921793460846, -0.05790106952190399, -0.10919159650802612, -0.45580169558525085, 0.13294565677642822, -0.12816722691059113, 0.20240876078605652, 0.2846760153770447, 0.0838426724076271, -0.06381881982088089, -0.2840555012226105, -0.2259790599346161, -0.05198225378990173, 0.4264680743217468, 0.11501346528530121, -0.02489897422492504, 0.34760138392448425, -0.06608600169420242, 0.35396838188171387, -0.0389268659055233, 0.41708412766456604, -0.13960178196430206, -0.19453704357147217, 0.557489812374115, -0.6501864790916443, 0.2572557032108307, 0.17224839329719543, -0.08699538558721542, 0.15074388682842255, 0.041720710694789886, -0.02884509414434433, -0.23968183994293213, -0.11452103406190872, 0.3434332311153412, -0.06307394802570343, -0.21871009469032288, -0.42139381170272827, 0.15311136841773987, 0.10329863429069519, -0.07834409922361374, 0.4911765456199646, 0.42026734352111816, -0.26627179980278015, 0.1759478747844696, -0.1087067648768425, 0.5112248063087463, 0.07952956110239029, -0.20490926504135132, 0.4085407853126526, -0.1606610119342804, 0.051652587950229645, 0.20659232139587402, 0.22873981297016144, -0.2953382432460785, -0.46505680680274963, 0.04728921130299568, 0.10371503233909607, 0.09581827372312546, 0.2955135405063629, 0.21053948998451233, 0.3223603367805481, 0.1648004651069641, 0.22172772884368896, 0.042849019169807434, -0.09809864312410355, -0.011727790348231792, -0.15358813107013702, -0.14364133775234222, 0.15869294106960297, 0.08995494991540909, -0.2189781814813614, -0.018749555572867393, 0.1064247116446495, 0.1838332563638687, 0.017649967223405838, -0.17116980254650116, -0.03840966522693634, 0.04869282618165016, 0.10130902379751205, 0.1960008144378662, -0.1796322464942932, -0.21033604443073273, -0.04400787875056267, 0.3656030297279358, -0.2235632687807083, -0.031949516385793686, 0.26276835799217224, 0.14489169418811798, 0.2541039288043976, 0.02818644978106022, 0.1426234394311905, 0.2944267988204956, -0.012734705582261086, 0.08109162002801895, -0.11657902598381042, -0.046926531940698624, -0.09722156822681427, -0.11298567801713943, -0.0776902362704277, 0.3170372545719147, -0.4641861915588379, 0.006635716650635004, -0.03463578224182129, 0.12291248887777328, -0.3808172643184662, 0.16639070212841034, -0.18365740776062012, 0.13799862563610077, 0.3346537947654724, -0.22484274208545685, -0.08655022829771042, -0.11406159400939941, 0.19271986186504364, 0.036899223923683167, 0.04314659535884857, 0.6668910384178162, 0.01693432405591011, -0.1532163769006729, -0.27495983242988586, -0.28041255474090576, 0.3945758640766144, -0.29626035690307617, 0.1258220076560974, -0.21118506789207458, 0.012261353433132172, 0.20913289487361908, 0.37551456689834595, -0.0729500874876976, 0.06558138877153397, -0.25952044129371643, -0.2246391773223877, -0.33386170864105225, 0.0947117879986763, 0.2949468791484833, 0.1381583958864212, -0.017437664791941643, -0.44868308305740356, -0.2343645691871643, -0.20888012647628784, -0.3836697041988373, -0.28611162304878235, -0.3407312035560608, 0.15404774248600006, 0.15271025896072388, 0.09989272058010101, 0.3022034168243408, -0.08308543264865875, 0.3922530710697174, -0.07362508028745651, 0.18121983110904694, -0.26161280274391174, -0.11479377746582031, 0.06284555792808533, -0.012550813145935535, -0.08275225013494492, -0.1542665809392929, -0.24285869300365448, -0.4270096719264984, -0.1705254763364792, 0.1439284235239029, -0.047832224518060684, 0.09355996549129486, -0.010987693443894386, -0.13441018760204315, -0.0287814661860466, -0.06455563753843307, -0.0740886852145195, 0.1760474145412445, -0.028661604970693588, 0.1317201405763626, 0.13563404977321625, -0.1336413472890854, -0.14293493330478668, 0.3436339497566223, 0.1731634885072708, 0.03851359710097313, -0.009309976361691952, 0.37811315059661865, -0.2905080020427704, -0.025997109711170197, 0.4262281358242035, 0.2250780165195465, 0.45260998606681824, -0.18014337122440338, -0.21921788156032562, 0.06912611424922943, 0.2608379125595093, -0.338496595621109, -0.17058542370796204, 0.027211235836148262, -0.04480912908911705, 0.1533747762441635, 0.3468914330005646, 0.17832668125629425, -0.04384917765855789, 0.20290343463420868, 0.013371926732361317, 0.3789938688278198, -0.36569321155548096, -0.153682142496109, 0.3200014531612396, 0.18552352488040924, 0.08531782776117325, 0.3756558895111084, 0.34003177285194397, -0.06824400275945663, 0.6535715460777283, 0.057976968586444855, 0.06166195124387741, 0.050982072949409485, 0.06162542849779129, 0.01597043313086033, -0.2817324101924896, 0.12132733315229416, -0.18464823067188263, 0.056563880294561386, 0.17046880722045898, 0.06817016005516052, -0.244364932179451, 0.027214545756578445, 0.1260237693786621, -0.24306540191173553, -0.22489885985851288, -0.17111153900623322, -0.09766779094934464, -0.32555949687957764, -0.16776564717292786, -0.08134385943412781, -0.20901548862457275, -0.037527527660131454, 0.12116529047489166, 0.3019024431705475, -0.2431761473417282, 0.21170055866241455, -0.5488353371620178, -0.018891705200076103, -0.0015765184070914984, 0.2170565277338028, -0.16079026460647583, 0.26262956857681274, 0.09726085513830185, -0.09120868146419525, 0.04392414912581444, 0.3324953615665436, 0.1373092085123062, 0.09367338567972183, 0.29899802803993225, -0.27719172835350037, -0.06455093622207642, -0.3748452961444855, -0.13264063000679016, 0.3279156982898712, -0.10226446390151978, 0.21499139070510864, 0.09901826828718185, 0.1871594935655594, -0.07232825458049774, 0.08836136013269424, 0.3170144259929657, -0.02756478078663349, 0.021168619394302368, 0.06675232201814651, -0.13316519558429718, -0.21946190297603607, 0.004237299785017967, -0.060034796595573425, -0.04221722483634949, -0.2355864942073822, 0.2780924141407013, -0.17440734803676605, 0.3072936534881592, 0.09146563708782196, 0.15121105313301086, -0.13749343156814575, 0.22456888854503632, 0.18759918212890625, -0.23682616651058197, -0.17923027276992798, -0.3338928818702698, -0.13951896131038666, -0.10414637625217438, 0.0630636215209961, -0.18672671914100647, 0.2628869414329529, 0.4041144549846649, 0.48776310682296753, -0.35748523473739624, 0.024099145084619522, -0.34328022599220276, -0.01869138516485691, 0.40020397305488586, -0.28598469495773315, -0.5710671544075012, 0.1308581829071045, -0.09079936891794205, -0.03790685161948204, -0.24595311284065247, 0.16118629276752472, 0.12794005870819092, 0.15341463685035706, -0.1635321080684662, 0.04111279547214508, 0.24811182916164398, -0.16730840504169464, 0.043954476714134216, 0.008367493748664856, 0.19272169470787048, -0.10678981244564056, -0.005533534102141857, -0.28808775544166565, -0.25655218958854675, -0.16314688324928284, 0.5066491961479187, -0.01852456107735634, -0.09150060266256332, 0.06743045151233673, 0.2313608080148697, -0.03296560421586037, -0.06796243786811829, 0.06610957533121109, 0.28761956095695496, -0.19180099666118622, 0.38758549094200134, -0.059846170246601105, 0.20949040353298187, 0.06752321124076843, -0.02726040966808796, 0.16622379422187805, 0.3679792881011963, -0.14122238755226135, -0.3888523578643799, 0.32603582739830017, -0.08576740324497223, -0.35690799355506897, 0.03369147703051567, 0.15203799307346344, 0.11498559266328812, -0.07443217933177948, -0.1648799628019333, -0.01539982482790947, 0.4247278869152069, -0.3492845594882965, -0.031405556946992874, 0.27925989031791687, 0.19823908805847168, 0.2712358236312866, 0.09228740632534027, 0.3183274269104004, 0.13882511854171753, -0.23670610785484314, -0.24312691390514374, -0.002393158385530114 ]
https://github.com/huggingface/datasets/issues/5383
IterableDataset missing column_names, differs from Dataset interface
Hi! `fn_kwargs` was added to `IterableDataset.map` in `datasets 2.5.0`, so please update your installation (`pip install -U datasets`) to use it. Regarding `column_names`, I agree we should add this property to `IterableDataset`. In the meantime, you can use `list(dataset.features.keys())` instead.
### Describe the bug The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like ``` dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...) ``` will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available. ### Steps to reproduce the bug See above ### Expected behavior Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation. ### Environment info n/a
40
IterableDataset missing column_names, differs from Dataset interface
[ -0.17891345918178558, 0.15316186845302582, -0.2357303500175476, 0.0967603251338005, 0.3883974552154541, 0.17627078294754028, 0.5065873265266418, 0.21392624080181122, -0.028160646557807922, 0.09710617363452911, -0.06768764555454254, 0.36895355582237244, 0.1344282478094101, 0.07603011280298233, -0.03951658681035042, 0.034267984330654144, 0.11612233519554138, 0.2984924614429474, -0.4119992256164551, -0.07582264393568039, -0.09846693277359009, 0.3521028161048889, -0.3220345377922058, 0.0898241400718689, -0.009495002217590809, 0.06992759555578232, -0.11943033337593079, 0.09694046527147293, -0.11032194644212723, -0.3057214319705963, 0.41214486956596375, 0.316956102848053, -0.12775802612304688, 0.21736885607242584, -0.00010651702905306593, 0.08712803572416306, 0.14209125936031342, -0.022667722776532173, -0.30759212374687195, 0.23968471586704254, -0.12106412649154663, -0.08624192327260971, 0.08773531764745712, -0.5127413272857666, -0.10379356890916824, -0.48163414001464844, 0.054668255150318146, -0.11860588192939758, -0.17564113438129425, 0.1023930013179779, 0.30646538734436035, 0.022877363488078117, -0.09357620030641556, -0.21111856400966644, 0.005634451750665903, 0.15789568424224854, -0.20613248646259308, 0.15660259127616882, 0.324736088514328, -0.013223830610513687, 0.011803965084254742, 0.15777425467967987, -0.10654747486114502, -0.04453027620911598, -0.12934741377830505, 0.026082322001457214, -0.28320229053497314, 0.2147756665945053, 0.38851821422576904, -0.03826738893985748, 0.5325772166252136, -0.2883884906768799, -0.08657282590866089, -0.08921261876821518, -0.09091200679540634, -0.269713819026947, 0.21994411945343018, -0.3757496476173401, 0.15589629113674164, 0.12520205974578857, 0.0058708228170871735, 0.08314891159534454, -0.12355002760887146, 0.001079640118405223, 0.07004521042108536, -0.09285126626491547, -0.19334575533866882, 0.17409898340702057, -0.27786681056022644, -0.18021567165851593, 0.4927845597267151, -0.01292337104678154, 0.013902290724217892, 0.08537277579307556, -0.2683353126049042, -0.004399374593049288, 0.2168801873922348, 0.014483196660876274, 0.07189054787158966, 0.022203918546438217, -0.020743658766150475, 0.03483382984995842, 0.1651892513036728, -0.20370256900787354, 0.20479556918144226, -0.13796377182006836, -0.03991270810365677, 0.3784730136394501, 0.1995757520198822, 0.06446423381567001, -0.1762971431016922, -0.194181889295578, -0.04391375929117203, 0.10205528885126114, 0.40061622858047485, -0.0995059460401535, -0.06450667232275009, -0.11996275186538696, -0.30111777782440186, -0.026838839054107666, -0.1369754821062088, -0.06434854865074158, 0.10653554648160934, 0.1304706633090973, 0.15587455034255981, 0.002470854902639985, -0.22899951040744781, 0.28431180119514465, 0.01779794692993164, -0.11503545939922333, -0.45453086495399475, -0.02918950654566288, 0.07826386392116547, 0.014353863894939423, 0.12556126713752747, 0.07987972348928452, 0.3646742105484009, -0.0544707216322422, -0.3368750214576721, 0.07776741683483124, 0.1111360490322113, -0.0927821546792984, 0.2045220136642456, 0.19878531992435455, 0.06970340013504028, 0.10722050070762634, 0.1548895537853241, -0.2921122610569, 0.05711282417178154, -0.12196651846170425, -0.013436730951070786, -0.1846565455198288, -0.03465825691819191, 0.27381038665771484, -0.05286964774131775, -0.06873004138469696, 0.06438993662595749, 0.02791530080139637, 0.17432379722595215, -0.33227163553237915, 0.017457392066717148, -0.04884295538067818, 0.24134303629398346, -0.06469517946243286, -0.05222892016172409, 0.2721386253833771, -0.4820610582828522, 0.036585841327905655, -0.12882359325885773, -0.08103378117084503, 0.207869753241539, -0.08985821157693863, -0.008199038915336132, 0.20881088078022003, -0.3806862235069275, 0.34095197916030884, 0.1999615877866745, -0.10966664552688599, -0.27111387252807617, 0.03913978114724159, 0.2849750518798828, 0.07269030064344406, 0.21680329740047455, -0.04877013713121414, 0.02506251074373722, -0.10430441051721573, 0.0773712545633316, -0.22138729691505432, -0.2757442891597748, -0.06632153689861298, -0.017126139253377914, -0.01649048551917076, -0.08083480596542358, 0.15741729736328125, 0.08635604381561279, 0.36854249238967896, 0.2461315542459488, -0.30326002836227417, 0.3141753375530243, -0.2800823450088501, -0.049452781677246094, 0.3605410158634186, 0.0017564923036843538, -0.024660388007760048, 0.19451330602169037, -0.24824832379817963, -0.5116763710975647, -0.03682130202651024, 0.5448897480964661, 0.08133988082408905, -0.20545382797718048, -0.022955434396862984, -0.47975659370422363, 0.17811454832553864, -0.038157012313604355, 0.22382111847400665, 0.2844213843345642, 0.44717133045196533, -0.030867483466863632, -0.08740390092134476, -0.2814008891582489, 0.10764079540967941, -0.5900452136993408, -0.27817168831825256, -0.3483583629131317, 0.08403661847114563, 0.12716667354106903, -0.20524688065052032, 0.127097949385643, 0.1528518795967102, 0.18964003026485443, -0.22917817533016205, -0.006818484980612993, 0.28467094898223877, -0.01439010538160801, -0.10500475019216537, 0.11834529042243958, 0.5544052124023438, -0.17954230308532715, 0.03153747320175171, -0.15441188216209412, -0.23396602272987366, 0.21719183027744293, -0.1007443442940712, -0.020723940804600716, 0.28295180201530457, -0.24450349807739258, 0.31413811445236206, 0.24550314247608185, 0.07318200916051865, 0.6056528687477112, 0.029125161468982697, -0.16242466866970062, -0.4576607644557953, -0.11695250868797302, 0.12370189279317856, 0.18541750311851501, -0.0814657211303711, -0.2859894633293152, 0.21196319162845612, 0.573397159576416, 0.10713434964418411, 0.047517094761133194, -0.2662874460220337, 0.025926141068339348, -0.07795997709035873, 0.08290595561265945, 0.1517448127269745, 0.526090681552887, 0.21049533784389496, 0.12091921269893646, -0.15154430270195007, -0.08919520676136017, -0.13901638984680176, 0.2093091607093811, 0.05544523149728775, 0.143036350607872, 0.060327254235744476, 0.012329592369496822, -0.33046194911003113, -0.47526344656944275, -0.20985037088394165, 0.2531979978084564, 0.290157288312912, -0.15915578603744507, 0.11363248527050018, -0.26863837242126465, -0.30315977334976196, 0.2296498566865921, -0.2023400515317917, 0.28428104519844055, -0.4916495978832245, -0.1446024477481842, 0.3907756507396698, -0.11080819368362427, 0.35075345635414124, -0.22050337493419647, 0.20341569185256958, 0.12539105117321014, 0.031356047838926315, -0.39106839895248413, -0.2887701988220215, -0.3332482874393463, 0.15105555951595306, -0.008353959769010544, -0.2375146448612213, 0.21128949522972107, -0.15649543702602386, -0.11040102690458298, -0.4631522297859192, -0.27616551518440247, 0.3244600296020508, -0.10516498982906342, 0.18219375610351562, 0.4335440695285797, 0.10795868188142776, 0.07633843272924423, -0.09496083855628967, 0.23710252344608307, 0.12256679683923721, -0.1003970056772232, 0.10644225776195526, -0.16309037804603577, -0.4557857811450958, -0.004637688864022493, -0.33821794390678406, 0.0398569256067276, -0.1593204289674759, 0.02348291128873825, -0.07299435883760452, 0.13333459198474884, 0.4342425763607025, -0.3217830955982208, -0.009084278717637062, 0.3452266752719879, 0.0178745836019516, -0.448395311832428, -0.06626523286104202, 0.23296765983104706, -0.34403106570243835, -0.22670724987983704, -0.08086562901735306, -0.07956617325544357, 0.37649208307266235, 0.2241341918706894, -0.2751893997192383, -0.30426228046417236, -0.13605977594852448, 0.08655103296041489, 0.21054141223430634, -0.032632578164339066, 0.24100729823112488, 0.1020502969622612, -0.16070738434791565, -0.379470556974411, -0.385611891746521, 0.25887107849121094, 0.1642449051141739, -0.1342521458864212, 0.0729818120598793, 0.4892484247684479, -0.27446845173835754, 0.1393725872039795, 0.036403361707925797, 0.17503303289413452, 0.4106371998786926, -0.36942824721336365, 0.25448280572891235, -0.24703079462051392, -0.3511809706687927, 0.012815458700060844, -0.08953244984149933, -0.07013367116451263, 0.18785253167152405, -0.3395579755306244, -0.3432747721672058, 0.01945304684340954, 0.4146224558353424, -0.10644631087779999, -0.2112884521484375, -0.11425267904996872, 0.020608171820640564, 0.24390792846679688, 0.3913017511367798, 0.16501906514167786, -0.3467351198196411, 0.033910926431417465, 0.09260891377925873, -0.2528200149536133, -0.12174994498491287, -0.15764544904232025, -0.46633774042129517, -0.052919644862413406, -0.1410994678735733, 0.11460423469543457, -0.026181304827332497, 0.572917103767395, -0.09004918485879898, -0.4013190269470215, 0.055538028478622437, 0.171711266040802, 0.6591591835021973, -0.2859039306640625, -0.21276052296161652, 0.34699273109436035, 0.2231651395559311, -0.03350928798317909, -0.1617649793624878, -0.1581510454416275, 0.5311183929443359, 0.20241789519786835, 0.5095130801200867, -0.25115829706192017, -0.2161705493927002, 0.5288524627685547, -0.02845420315861702, -0.06717921793460846, -0.05790106952190399, -0.10919159650802612, -0.45580169558525085, 0.13294565677642822, -0.12816722691059113, 0.20240876078605652, 0.2846760153770447, 0.0838426724076271, -0.06381881982088089, -0.2840555012226105, -0.2259790599346161, -0.05198225378990173, 0.4264680743217468, 0.11501346528530121, -0.02489897422492504, 0.34760138392448425, -0.06608600169420242, 0.35396838188171387, -0.0389268659055233, 0.41708412766456604, -0.13960178196430206, -0.19453704357147217, 0.557489812374115, -0.6501864790916443, 0.2572557032108307, 0.17224839329719543, -0.08699538558721542, 0.15074388682842255, 0.041720710694789886, -0.02884509414434433, -0.23968183994293213, -0.11452103406190872, 0.3434332311153412, -0.06307394802570343, -0.21871009469032288, -0.42139381170272827, 0.15311136841773987, 0.10329863429069519, -0.07834409922361374, 0.4911765456199646, 0.42026734352111816, -0.26627179980278015, 0.1759478747844696, -0.1087067648768425, 0.5112248063087463, 0.07952956110239029, -0.20490926504135132, 0.4085407853126526, -0.1606610119342804, 0.051652587950229645, 0.20659232139587402, 0.22873981297016144, -0.2953382432460785, -0.46505680680274963, 0.04728921130299568, 0.10371503233909607, 0.09581827372312546, 0.2955135405063629, 0.21053948998451233, 0.3223603367805481, 0.1648004651069641, 0.22172772884368896, 0.042849019169807434, -0.09809864312410355, -0.011727790348231792, -0.15358813107013702, -0.14364133775234222, 0.15869294106960297, 0.08995494991540909, -0.2189781814813614, -0.018749555572867393, 0.1064247116446495, 0.1838332563638687, 0.017649967223405838, -0.17116980254650116, -0.03840966522693634, 0.04869282618165016, 0.10130902379751205, 0.1960008144378662, -0.1796322464942932, -0.21033604443073273, -0.04400787875056267, 0.3656030297279358, -0.2235632687807083, -0.031949516385793686, 0.26276835799217224, 0.14489169418811798, 0.2541039288043976, 0.02818644978106022, 0.1426234394311905, 0.2944267988204956, -0.012734705582261086, 0.08109162002801895, -0.11657902598381042, -0.046926531940698624, -0.09722156822681427, -0.11298567801713943, -0.0776902362704277, 0.3170372545719147, -0.4641861915588379, 0.006635716650635004, -0.03463578224182129, 0.12291248887777328, -0.3808172643184662, 0.16639070212841034, -0.18365740776062012, 0.13799862563610077, 0.3346537947654724, -0.22484274208545685, -0.08655022829771042, -0.11406159400939941, 0.19271986186504364, 0.036899223923683167, 0.04314659535884857, 0.6668910384178162, 0.01693432405591011, -0.1532163769006729, -0.27495983242988586, -0.28041255474090576, 0.3945758640766144, -0.29626035690307617, 0.1258220076560974, -0.21118506789207458, 0.012261353433132172, 0.20913289487361908, 0.37551456689834595, -0.0729500874876976, 0.06558138877153397, -0.25952044129371643, -0.2246391773223877, -0.33386170864105225, 0.0947117879986763, 0.2949468791484833, 0.1381583958864212, -0.017437664791941643, -0.44868308305740356, -0.2343645691871643, -0.20888012647628784, -0.3836697041988373, -0.28611162304878235, -0.3407312035560608, 0.15404774248600006, 0.15271025896072388, 0.09989272058010101, 0.3022034168243408, -0.08308543264865875, 0.3922530710697174, -0.07362508028745651, 0.18121983110904694, -0.26161280274391174, -0.11479377746582031, 0.06284555792808533, -0.012550813145935535, -0.08275225013494492, -0.1542665809392929, -0.24285869300365448, -0.4270096719264984, -0.1705254763364792, 0.1439284235239029, -0.047832224518060684, 0.09355996549129486, -0.010987693443894386, -0.13441018760204315, -0.0287814661860466, -0.06455563753843307, -0.0740886852145195, 0.1760474145412445, -0.028661604970693588, 0.1317201405763626, 0.13563404977321625, -0.1336413472890854, -0.14293493330478668, 0.3436339497566223, 0.1731634885072708, 0.03851359710097313, -0.009309976361691952, 0.37811315059661865, -0.2905080020427704, -0.025997109711170197, 0.4262281358242035, 0.2250780165195465, 0.45260998606681824, -0.18014337122440338, -0.21921788156032562, 0.06912611424922943, 0.2608379125595093, -0.338496595621109, -0.17058542370796204, 0.027211235836148262, -0.04480912908911705, 0.1533747762441635, 0.3468914330005646, 0.17832668125629425, -0.04384917765855789, 0.20290343463420868, 0.013371926732361317, 0.3789938688278198, -0.36569321155548096, -0.153682142496109, 0.3200014531612396, 0.18552352488040924, 0.08531782776117325, 0.3756558895111084, 0.34003177285194397, -0.06824400275945663, 0.6535715460777283, 0.057976968586444855, 0.06166195124387741, 0.050982072949409485, 0.06162542849779129, 0.01597043313086033, -0.2817324101924896, 0.12132733315229416, -0.18464823067188263, 0.056563880294561386, 0.17046880722045898, 0.06817016005516052, -0.244364932179451, 0.027214545756578445, 0.1260237693786621, -0.24306540191173553, -0.22489885985851288, -0.17111153900623322, -0.09766779094934464, -0.32555949687957764, -0.16776564717292786, -0.08134385943412781, -0.20901548862457275, -0.037527527660131454, 0.12116529047489166, 0.3019024431705475, -0.2431761473417282, 0.21170055866241455, -0.5488353371620178, -0.018891705200076103, -0.0015765184070914984, 0.2170565277338028, -0.16079026460647583, 0.26262956857681274, 0.09726085513830185, -0.09120868146419525, 0.04392414912581444, 0.3324953615665436, 0.1373092085123062, 0.09367338567972183, 0.29899802803993225, -0.27719172835350037, -0.06455093622207642, -0.3748452961444855, -0.13264063000679016, 0.3279156982898712, -0.10226446390151978, 0.21499139070510864, 0.09901826828718185, 0.1871594935655594, -0.07232825458049774, 0.08836136013269424, 0.3170144259929657, -0.02756478078663349, 0.021168619394302368, 0.06675232201814651, -0.13316519558429718, -0.21946190297603607, 0.004237299785017967, -0.060034796595573425, -0.04221722483634949, -0.2355864942073822, 0.2780924141407013, -0.17440734803676605, 0.3072936534881592, 0.09146563708782196, 0.15121105313301086, -0.13749343156814575, 0.22456888854503632, 0.18759918212890625, -0.23682616651058197, -0.17923027276992798, -0.3338928818702698, -0.13951896131038666, -0.10414637625217438, 0.0630636215209961, -0.18672671914100647, 0.2628869414329529, 0.4041144549846649, 0.48776310682296753, -0.35748523473739624, 0.024099145084619522, -0.34328022599220276, -0.01869138516485691, 0.40020397305488586, -0.28598469495773315, -0.5710671544075012, 0.1308581829071045, -0.09079936891794205, -0.03790685161948204, -0.24595311284065247, 0.16118629276752472, 0.12794005870819092, 0.15341463685035706, -0.1635321080684662, 0.04111279547214508, 0.24811182916164398, -0.16730840504169464, 0.043954476714134216, 0.008367493748664856, 0.19272169470787048, -0.10678981244564056, -0.005533534102141857, -0.28808775544166565, -0.25655218958854675, -0.16314688324928284, 0.5066491961479187, -0.01852456107735634, -0.09150060266256332, 0.06743045151233673, 0.2313608080148697, -0.03296560421586037, -0.06796243786811829, 0.06610957533121109, 0.28761956095695496, -0.19180099666118622, 0.38758549094200134, -0.059846170246601105, 0.20949040353298187, 0.06752321124076843, -0.02726040966808796, 0.16622379422187805, 0.3679792881011963, -0.14122238755226135, -0.3888523578643799, 0.32603582739830017, -0.08576740324497223, -0.35690799355506897, 0.03369147703051567, 0.15203799307346344, 0.11498559266328812, -0.07443217933177948, -0.1648799628019333, -0.01539982482790947, 0.4247278869152069, -0.3492845594882965, -0.031405556946992874, 0.27925989031791687, 0.19823908805847168, 0.2712358236312866, 0.09228740632534027, 0.3183274269104004, 0.13882511854171753, -0.23670610785484314, -0.24312691390514374, -0.002393158385530114 ]
https://github.com/huggingface/datasets/issues/5383
IterableDataset missing column_names, differs from Dataset interface
Thanks! That's great news. On Thu, Dec 22, 2022, 07:48 Mario Šaško ***@***.***> wrote: > Hi! fn_kwargs was added to IterableDataset.map in datasets 2.5.0, so > please update your installation (pip install -U datasets) to use it. > > Regarding column_names, I agree we should add this property to > IterableDataset. In the meantime, you can use > list(dataset.features.keys()) instead. > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/5383#issuecomment-1362993633>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAHD6N2EQUFEOUFDW3VHSILWORZ45ANCNFSM6AAAAAATGKWVGM> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
### Describe the bug The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like ``` dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...) ``` will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available. ### Steps to reproduce the bug See above ### Expected behavior Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation. ### Environment info n/a
96
IterableDataset missing column_names, differs from Dataset interface
[ -0.17891345918178558, 0.15316186845302582, -0.2357303500175476, 0.0967603251338005, 0.3883974552154541, 0.17627078294754028, 0.5065873265266418, 0.21392624080181122, -0.028160646557807922, 0.09710617363452911, -0.06768764555454254, 0.36895355582237244, 0.1344282478094101, 0.07603011280298233, -0.03951658681035042, 0.034267984330654144, 0.11612233519554138, 0.2984924614429474, -0.4119992256164551, -0.07582264393568039, -0.09846693277359009, 0.3521028161048889, -0.3220345377922058, 0.0898241400718689, -0.009495002217590809, 0.06992759555578232, -0.11943033337593079, 0.09694046527147293, -0.11032194644212723, -0.3057214319705963, 0.41214486956596375, 0.316956102848053, -0.12775802612304688, 0.21736885607242584, -0.00010651702905306593, 0.08712803572416306, 0.14209125936031342, -0.022667722776532173, -0.30759212374687195, 0.23968471586704254, -0.12106412649154663, -0.08624192327260971, 0.08773531764745712, -0.5127413272857666, -0.10379356890916824, -0.48163414001464844, 0.054668255150318146, -0.11860588192939758, -0.17564113438129425, 0.1023930013179779, 0.30646538734436035, 0.022877363488078117, -0.09357620030641556, -0.21111856400966644, 0.005634451750665903, 0.15789568424224854, -0.20613248646259308, 0.15660259127616882, 0.324736088514328, -0.013223830610513687, 0.011803965084254742, 0.15777425467967987, -0.10654747486114502, -0.04453027620911598, -0.12934741377830505, 0.026082322001457214, -0.28320229053497314, 0.2147756665945053, 0.38851821422576904, -0.03826738893985748, 0.5325772166252136, -0.2883884906768799, -0.08657282590866089, -0.08921261876821518, -0.09091200679540634, -0.269713819026947, 0.21994411945343018, -0.3757496476173401, 0.15589629113674164, 0.12520205974578857, 0.0058708228170871735, 0.08314891159534454, -0.12355002760887146, 0.001079640118405223, 0.07004521042108536, -0.09285126626491547, -0.19334575533866882, 0.17409898340702057, -0.27786681056022644, -0.18021567165851593, 0.4927845597267151, -0.01292337104678154, 0.013902290724217892, 0.08537277579307556, -0.2683353126049042, -0.004399374593049288, 0.2168801873922348, 0.014483196660876274, 0.07189054787158966, 0.022203918546438217, -0.020743658766150475, 0.03483382984995842, 0.1651892513036728, -0.20370256900787354, 0.20479556918144226, -0.13796377182006836, -0.03991270810365677, 0.3784730136394501, 0.1995757520198822, 0.06446423381567001, -0.1762971431016922, -0.194181889295578, -0.04391375929117203, 0.10205528885126114, 0.40061622858047485, -0.0995059460401535, -0.06450667232275009, -0.11996275186538696, -0.30111777782440186, -0.026838839054107666, -0.1369754821062088, -0.06434854865074158, 0.10653554648160934, 0.1304706633090973, 0.15587455034255981, 0.002470854902639985, -0.22899951040744781, 0.28431180119514465, 0.01779794692993164, -0.11503545939922333, -0.45453086495399475, -0.02918950654566288, 0.07826386392116547, 0.014353863894939423, 0.12556126713752747, 0.07987972348928452, 0.3646742105484009, -0.0544707216322422, -0.3368750214576721, 0.07776741683483124, 0.1111360490322113, -0.0927821546792984, 0.2045220136642456, 0.19878531992435455, 0.06970340013504028, 0.10722050070762634, 0.1548895537853241, -0.2921122610569, 0.05711282417178154, -0.12196651846170425, -0.013436730951070786, -0.1846565455198288, -0.03465825691819191, 0.27381038665771484, -0.05286964774131775, -0.06873004138469696, 0.06438993662595749, 0.02791530080139637, 0.17432379722595215, -0.33227163553237915, 0.017457392066717148, -0.04884295538067818, 0.24134303629398346, -0.06469517946243286, -0.05222892016172409, 0.2721386253833771, -0.4820610582828522, 0.036585841327905655, -0.12882359325885773, -0.08103378117084503, 0.207869753241539, -0.08985821157693863, -0.008199038915336132, 0.20881088078022003, -0.3806862235069275, 0.34095197916030884, 0.1999615877866745, -0.10966664552688599, -0.27111387252807617, 0.03913978114724159, 0.2849750518798828, 0.07269030064344406, 0.21680329740047455, -0.04877013713121414, 0.02506251074373722, -0.10430441051721573, 0.0773712545633316, -0.22138729691505432, -0.2757442891597748, -0.06632153689861298, -0.017126139253377914, -0.01649048551917076, -0.08083480596542358, 0.15741729736328125, 0.08635604381561279, 0.36854249238967896, 0.2461315542459488, -0.30326002836227417, 0.3141753375530243, -0.2800823450088501, -0.049452781677246094, 0.3605410158634186, 0.0017564923036843538, -0.024660388007760048, 0.19451330602169037, -0.24824832379817963, -0.5116763710975647, -0.03682130202651024, 0.5448897480964661, 0.08133988082408905, -0.20545382797718048, -0.022955434396862984, -0.47975659370422363, 0.17811454832553864, -0.038157012313604355, 0.22382111847400665, 0.2844213843345642, 0.44717133045196533, -0.030867483466863632, -0.08740390092134476, -0.2814008891582489, 0.10764079540967941, -0.5900452136993408, -0.27817168831825256, -0.3483583629131317, 0.08403661847114563, 0.12716667354106903, -0.20524688065052032, 0.127097949385643, 0.1528518795967102, 0.18964003026485443, -0.22917817533016205, -0.006818484980612993, 0.28467094898223877, -0.01439010538160801, -0.10500475019216537, 0.11834529042243958, 0.5544052124023438, -0.17954230308532715, 0.03153747320175171, -0.15441188216209412, -0.23396602272987366, 0.21719183027744293, -0.1007443442940712, -0.020723940804600716, 0.28295180201530457, -0.24450349807739258, 0.31413811445236206, 0.24550314247608185, 0.07318200916051865, 0.6056528687477112, 0.029125161468982697, -0.16242466866970062, -0.4576607644557953, -0.11695250868797302, 0.12370189279317856, 0.18541750311851501, -0.0814657211303711, -0.2859894633293152, 0.21196319162845612, 0.573397159576416, 0.10713434964418411, 0.047517094761133194, -0.2662874460220337, 0.025926141068339348, -0.07795997709035873, 0.08290595561265945, 0.1517448127269745, 0.526090681552887, 0.21049533784389496, 0.12091921269893646, -0.15154430270195007, -0.08919520676136017, -0.13901638984680176, 0.2093091607093811, 0.05544523149728775, 0.143036350607872, 0.060327254235744476, 0.012329592369496822, -0.33046194911003113, -0.47526344656944275, -0.20985037088394165, 0.2531979978084564, 0.290157288312912, -0.15915578603744507, 0.11363248527050018, -0.26863837242126465, -0.30315977334976196, 0.2296498566865921, -0.2023400515317917, 0.28428104519844055, -0.4916495978832245, -0.1446024477481842, 0.3907756507396698, -0.11080819368362427, 0.35075345635414124, -0.22050337493419647, 0.20341569185256958, 0.12539105117321014, 0.031356047838926315, -0.39106839895248413, -0.2887701988220215, -0.3332482874393463, 0.15105555951595306, -0.008353959769010544, -0.2375146448612213, 0.21128949522972107, -0.15649543702602386, -0.11040102690458298, -0.4631522297859192, -0.27616551518440247, 0.3244600296020508, -0.10516498982906342, 0.18219375610351562, 0.4335440695285797, 0.10795868188142776, 0.07633843272924423, -0.09496083855628967, 0.23710252344608307, 0.12256679683923721, -0.1003970056772232, 0.10644225776195526, -0.16309037804603577, -0.4557857811450958, -0.004637688864022493, -0.33821794390678406, 0.0398569256067276, -0.1593204289674759, 0.02348291128873825, -0.07299435883760452, 0.13333459198474884, 0.4342425763607025, -0.3217830955982208, -0.009084278717637062, 0.3452266752719879, 0.0178745836019516, -0.448395311832428, -0.06626523286104202, 0.23296765983104706, -0.34403106570243835, -0.22670724987983704, -0.08086562901735306, -0.07956617325544357, 0.37649208307266235, 0.2241341918706894, -0.2751893997192383, -0.30426228046417236, -0.13605977594852448, 0.08655103296041489, 0.21054141223430634, -0.032632578164339066, 0.24100729823112488, 0.1020502969622612, -0.16070738434791565, -0.379470556974411, -0.385611891746521, 0.25887107849121094, 0.1642449051141739, -0.1342521458864212, 0.0729818120598793, 0.4892484247684479, -0.27446845173835754, 0.1393725872039795, 0.036403361707925797, 0.17503303289413452, 0.4106371998786926, -0.36942824721336365, 0.25448280572891235, -0.24703079462051392, -0.3511809706687927, 0.012815458700060844, -0.08953244984149933, -0.07013367116451263, 0.18785253167152405, -0.3395579755306244, -0.3432747721672058, 0.01945304684340954, 0.4146224558353424, -0.10644631087779999, -0.2112884521484375, -0.11425267904996872, 0.020608171820640564, 0.24390792846679688, 0.3913017511367798, 0.16501906514167786, -0.3467351198196411, 0.033910926431417465, 0.09260891377925873, -0.2528200149536133, -0.12174994498491287, -0.15764544904232025, -0.46633774042129517, -0.052919644862413406, -0.1410994678735733, 0.11460423469543457, -0.026181304827332497, 0.572917103767395, -0.09004918485879898, -0.4013190269470215, 0.055538028478622437, 0.171711266040802, 0.6591591835021973, -0.2859039306640625, -0.21276052296161652, 0.34699273109436035, 0.2231651395559311, -0.03350928798317909, -0.1617649793624878, -0.1581510454416275, 0.5311183929443359, 0.20241789519786835, 0.5095130801200867, -0.25115829706192017, -0.2161705493927002, 0.5288524627685547, -0.02845420315861702, -0.06717921793460846, -0.05790106952190399, -0.10919159650802612, -0.45580169558525085, 0.13294565677642822, -0.12816722691059113, 0.20240876078605652, 0.2846760153770447, 0.0838426724076271, -0.06381881982088089, -0.2840555012226105, -0.2259790599346161, -0.05198225378990173, 0.4264680743217468, 0.11501346528530121, -0.02489897422492504, 0.34760138392448425, -0.06608600169420242, 0.35396838188171387, -0.0389268659055233, 0.41708412766456604, -0.13960178196430206, -0.19453704357147217, 0.557489812374115, -0.6501864790916443, 0.2572557032108307, 0.17224839329719543, -0.08699538558721542, 0.15074388682842255, 0.041720710694789886, -0.02884509414434433, -0.23968183994293213, -0.11452103406190872, 0.3434332311153412, -0.06307394802570343, -0.21871009469032288, -0.42139381170272827, 0.15311136841773987, 0.10329863429069519, -0.07834409922361374, 0.4911765456199646, 0.42026734352111816, -0.26627179980278015, 0.1759478747844696, -0.1087067648768425, 0.5112248063087463, 0.07952956110239029, -0.20490926504135132, 0.4085407853126526, -0.1606610119342804, 0.051652587950229645, 0.20659232139587402, 0.22873981297016144, -0.2953382432460785, -0.46505680680274963, 0.04728921130299568, 0.10371503233909607, 0.09581827372312546, 0.2955135405063629, 0.21053948998451233, 0.3223603367805481, 0.1648004651069641, 0.22172772884368896, 0.042849019169807434, -0.09809864312410355, -0.011727790348231792, -0.15358813107013702, -0.14364133775234222, 0.15869294106960297, 0.08995494991540909, -0.2189781814813614, -0.018749555572867393, 0.1064247116446495, 0.1838332563638687, 0.017649967223405838, -0.17116980254650116, -0.03840966522693634, 0.04869282618165016, 0.10130902379751205, 0.1960008144378662, -0.1796322464942932, -0.21033604443073273, -0.04400787875056267, 0.3656030297279358, -0.2235632687807083, -0.031949516385793686, 0.26276835799217224, 0.14489169418811798, 0.2541039288043976, 0.02818644978106022, 0.1426234394311905, 0.2944267988204956, -0.012734705582261086, 0.08109162002801895, -0.11657902598381042, -0.046926531940698624, -0.09722156822681427, -0.11298567801713943, -0.0776902362704277, 0.3170372545719147, -0.4641861915588379, 0.006635716650635004, -0.03463578224182129, 0.12291248887777328, -0.3808172643184662, 0.16639070212841034, -0.18365740776062012, 0.13799862563610077, 0.3346537947654724, -0.22484274208545685, -0.08655022829771042, -0.11406159400939941, 0.19271986186504364, 0.036899223923683167, 0.04314659535884857, 0.6668910384178162, 0.01693432405591011, -0.1532163769006729, -0.27495983242988586, -0.28041255474090576, 0.3945758640766144, -0.29626035690307617, 0.1258220076560974, -0.21118506789207458, 0.012261353433132172, 0.20913289487361908, 0.37551456689834595, -0.0729500874876976, 0.06558138877153397, -0.25952044129371643, -0.2246391773223877, -0.33386170864105225, 0.0947117879986763, 0.2949468791484833, 0.1381583958864212, -0.017437664791941643, -0.44868308305740356, -0.2343645691871643, -0.20888012647628784, -0.3836697041988373, -0.28611162304878235, -0.3407312035560608, 0.15404774248600006, 0.15271025896072388, 0.09989272058010101, 0.3022034168243408, -0.08308543264865875, 0.3922530710697174, -0.07362508028745651, 0.18121983110904694, -0.26161280274391174, -0.11479377746582031, 0.06284555792808533, -0.012550813145935535, -0.08275225013494492, -0.1542665809392929, -0.24285869300365448, -0.4270096719264984, -0.1705254763364792, 0.1439284235239029, -0.047832224518060684, 0.09355996549129486, -0.010987693443894386, -0.13441018760204315, -0.0287814661860466, -0.06455563753843307, -0.0740886852145195, 0.1760474145412445, -0.028661604970693588, 0.1317201405763626, 0.13563404977321625, -0.1336413472890854, -0.14293493330478668, 0.3436339497566223, 0.1731634885072708, 0.03851359710097313, -0.009309976361691952, 0.37811315059661865, -0.2905080020427704, -0.025997109711170197, 0.4262281358242035, 0.2250780165195465, 0.45260998606681824, -0.18014337122440338, -0.21921788156032562, 0.06912611424922943, 0.2608379125595093, -0.338496595621109, -0.17058542370796204, 0.027211235836148262, -0.04480912908911705, 0.1533747762441635, 0.3468914330005646, 0.17832668125629425, -0.04384917765855789, 0.20290343463420868, 0.013371926732361317, 0.3789938688278198, -0.36569321155548096, -0.153682142496109, 0.3200014531612396, 0.18552352488040924, 0.08531782776117325, 0.3756558895111084, 0.34003177285194397, -0.06824400275945663, 0.6535715460777283, 0.057976968586444855, 0.06166195124387741, 0.050982072949409485, 0.06162542849779129, 0.01597043313086033, -0.2817324101924896, 0.12132733315229416, -0.18464823067188263, 0.056563880294561386, 0.17046880722045898, 0.06817016005516052, -0.244364932179451, 0.027214545756578445, 0.1260237693786621, -0.24306540191173553, -0.22489885985851288, -0.17111153900623322, -0.09766779094934464, -0.32555949687957764, -0.16776564717292786, -0.08134385943412781, -0.20901548862457275, -0.037527527660131454, 0.12116529047489166, 0.3019024431705475, -0.2431761473417282, 0.21170055866241455, -0.5488353371620178, -0.018891705200076103, -0.0015765184070914984, 0.2170565277338028, -0.16079026460647583, 0.26262956857681274, 0.09726085513830185, -0.09120868146419525, 0.04392414912581444, 0.3324953615665436, 0.1373092085123062, 0.09367338567972183, 0.29899802803993225, -0.27719172835350037, -0.06455093622207642, -0.3748452961444855, -0.13264063000679016, 0.3279156982898712, -0.10226446390151978, 0.21499139070510864, 0.09901826828718185, 0.1871594935655594, -0.07232825458049774, 0.08836136013269424, 0.3170144259929657, -0.02756478078663349, 0.021168619394302368, 0.06675232201814651, -0.13316519558429718, -0.21946190297603607, 0.004237299785017967, -0.060034796595573425, -0.04221722483634949, -0.2355864942073822, 0.2780924141407013, -0.17440734803676605, 0.3072936534881592, 0.09146563708782196, 0.15121105313301086, -0.13749343156814575, 0.22456888854503632, 0.18759918212890625, -0.23682616651058197, -0.17923027276992798, -0.3338928818702698, -0.13951896131038666, -0.10414637625217438, 0.0630636215209961, -0.18672671914100647, 0.2628869414329529, 0.4041144549846649, 0.48776310682296753, -0.35748523473739624, 0.024099145084619522, -0.34328022599220276, -0.01869138516485691, 0.40020397305488586, -0.28598469495773315, -0.5710671544075012, 0.1308581829071045, -0.09079936891794205, -0.03790685161948204, -0.24595311284065247, 0.16118629276752472, 0.12794005870819092, 0.15341463685035706, -0.1635321080684662, 0.04111279547214508, 0.24811182916164398, -0.16730840504169464, 0.043954476714134216, 0.008367493748664856, 0.19272169470787048, -0.10678981244564056, -0.005533534102141857, -0.28808775544166565, -0.25655218958854675, -0.16314688324928284, 0.5066491961479187, -0.01852456107735634, -0.09150060266256332, 0.06743045151233673, 0.2313608080148697, -0.03296560421586037, -0.06796243786811829, 0.06610957533121109, 0.28761956095695496, -0.19180099666118622, 0.38758549094200134, -0.059846170246601105, 0.20949040353298187, 0.06752321124076843, -0.02726040966808796, 0.16622379422187805, 0.3679792881011963, -0.14122238755226135, -0.3888523578643799, 0.32603582739830017, -0.08576740324497223, -0.35690799355506897, 0.03369147703051567, 0.15203799307346344, 0.11498559266328812, -0.07443217933177948, -0.1648799628019333, -0.01539982482790947, 0.4247278869152069, -0.3492845594882965, -0.031405556946992874, 0.27925989031791687, 0.19823908805847168, 0.2712358236312866, 0.09228740632534027, 0.3183274269104004, 0.13882511854171753, -0.23670610785484314, -0.24312691390514374, -0.002393158385530114 ]
https://github.com/huggingface/datasets/issues/5383
IterableDataset missing column_names, differs from Dataset interface
I'm marking this issue as a "good first issue", as it makes sense to have `IterableDataset.column_names` in the API. Besides the case when `features` are `None` (e.g., `features` are `None` after `map`), in which we can also return `column_names` as `None`, adding this property should be straightforward,
### Describe the bug The documentation on [Stream](https://huggingface.co/docs/datasets/v1.18.2/stream.html) seems to imply that IterableDataset behaves just like a Dataset. However, examples like ``` dataset.map(augment_data, batched=True, remove_columns=dataset.column_names, ...) ``` will not work because `.column_names` does not exist on IterableDataset. I cannot find any clear explanation on why this is not available, is it an oversight? We do have `iterable_ds.features` available. ### Steps to reproduce the bug See above ### Expected behavior Dataset and IterableDataset would be expected to have the same interface, with any differences noted in the documentation. ### Environment info n/a
47
IterableDataset missing column_names, differs from Dataset interface
[ -0.17891345918178558, 0.15316186845302582, -0.2357303500175476, 0.0967603251338005, 0.3883974552154541, 0.17627078294754028, 0.5065873265266418, 0.21392624080181122, -0.028160646557807922, 0.09710617363452911, -0.06768764555454254, 0.36895355582237244, 0.1344282478094101, 0.07603011280298233, -0.03951658681035042, 0.034267984330654144, 0.11612233519554138, 0.2984924614429474, -0.4119992256164551, -0.07582264393568039, -0.09846693277359009, 0.3521028161048889, -0.3220345377922058, 0.0898241400718689, -0.009495002217590809, 0.06992759555578232, -0.11943033337593079, 0.09694046527147293, -0.11032194644212723, -0.3057214319705963, 0.41214486956596375, 0.316956102848053, -0.12775802612304688, 0.21736885607242584, -0.00010651702905306593, 0.08712803572416306, 0.14209125936031342, -0.022667722776532173, -0.30759212374687195, 0.23968471586704254, -0.12106412649154663, -0.08624192327260971, 0.08773531764745712, -0.5127413272857666, -0.10379356890916824, -0.48163414001464844, 0.054668255150318146, -0.11860588192939758, -0.17564113438129425, 0.1023930013179779, 0.30646538734436035, 0.022877363488078117, -0.09357620030641556, -0.21111856400966644, 0.005634451750665903, 0.15789568424224854, -0.20613248646259308, 0.15660259127616882, 0.324736088514328, -0.013223830610513687, 0.011803965084254742, 0.15777425467967987, -0.10654747486114502, -0.04453027620911598, -0.12934741377830505, 0.026082322001457214, -0.28320229053497314, 0.2147756665945053, 0.38851821422576904, -0.03826738893985748, 0.5325772166252136, -0.2883884906768799, -0.08657282590866089, -0.08921261876821518, -0.09091200679540634, -0.269713819026947, 0.21994411945343018, -0.3757496476173401, 0.15589629113674164, 0.12520205974578857, 0.0058708228170871735, 0.08314891159534454, -0.12355002760887146, 0.001079640118405223, 0.07004521042108536, -0.09285126626491547, -0.19334575533866882, 0.17409898340702057, -0.27786681056022644, -0.18021567165851593, 0.4927845597267151, -0.01292337104678154, 0.013902290724217892, 0.08537277579307556, -0.2683353126049042, -0.004399374593049288, 0.2168801873922348, 0.014483196660876274, 0.07189054787158966, 0.022203918546438217, -0.020743658766150475, 0.03483382984995842, 0.1651892513036728, -0.20370256900787354, 0.20479556918144226, -0.13796377182006836, -0.03991270810365677, 0.3784730136394501, 0.1995757520198822, 0.06446423381567001, -0.1762971431016922, -0.194181889295578, -0.04391375929117203, 0.10205528885126114, 0.40061622858047485, -0.0995059460401535, -0.06450667232275009, -0.11996275186538696, -0.30111777782440186, -0.026838839054107666, -0.1369754821062088, -0.06434854865074158, 0.10653554648160934, 0.1304706633090973, 0.15587455034255981, 0.002470854902639985, -0.22899951040744781, 0.28431180119514465, 0.01779794692993164, -0.11503545939922333, -0.45453086495399475, -0.02918950654566288, 0.07826386392116547, 0.014353863894939423, 0.12556126713752747, 0.07987972348928452, 0.3646742105484009, -0.0544707216322422, -0.3368750214576721, 0.07776741683483124, 0.1111360490322113, -0.0927821546792984, 0.2045220136642456, 0.19878531992435455, 0.06970340013504028, 0.10722050070762634, 0.1548895537853241, -0.2921122610569, 0.05711282417178154, -0.12196651846170425, -0.013436730951070786, -0.1846565455198288, -0.03465825691819191, 0.27381038665771484, -0.05286964774131775, -0.06873004138469696, 0.06438993662595749, 0.02791530080139637, 0.17432379722595215, -0.33227163553237915, 0.017457392066717148, -0.04884295538067818, 0.24134303629398346, -0.06469517946243286, -0.05222892016172409, 0.2721386253833771, -0.4820610582828522, 0.036585841327905655, -0.12882359325885773, -0.08103378117084503, 0.207869753241539, -0.08985821157693863, -0.008199038915336132, 0.20881088078022003, -0.3806862235069275, 0.34095197916030884, 0.1999615877866745, -0.10966664552688599, -0.27111387252807617, 0.03913978114724159, 0.2849750518798828, 0.07269030064344406, 0.21680329740047455, -0.04877013713121414, 0.02506251074373722, -0.10430441051721573, 0.0773712545633316, -0.22138729691505432, -0.2757442891597748, -0.06632153689861298, -0.017126139253377914, -0.01649048551917076, -0.08083480596542358, 0.15741729736328125, 0.08635604381561279, 0.36854249238967896, 0.2461315542459488, -0.30326002836227417, 0.3141753375530243, -0.2800823450088501, -0.049452781677246094, 0.3605410158634186, 0.0017564923036843538, -0.024660388007760048, 0.19451330602169037, -0.24824832379817963, -0.5116763710975647, -0.03682130202651024, 0.5448897480964661, 0.08133988082408905, -0.20545382797718048, -0.022955434396862984, -0.47975659370422363, 0.17811454832553864, -0.038157012313604355, 0.22382111847400665, 0.2844213843345642, 0.44717133045196533, -0.030867483466863632, -0.08740390092134476, -0.2814008891582489, 0.10764079540967941, -0.5900452136993408, -0.27817168831825256, -0.3483583629131317, 0.08403661847114563, 0.12716667354106903, -0.20524688065052032, 0.127097949385643, 0.1528518795967102, 0.18964003026485443, -0.22917817533016205, -0.006818484980612993, 0.28467094898223877, -0.01439010538160801, -0.10500475019216537, 0.11834529042243958, 0.5544052124023438, -0.17954230308532715, 0.03153747320175171, -0.15441188216209412, -0.23396602272987366, 0.21719183027744293, -0.1007443442940712, -0.020723940804600716, 0.28295180201530457, -0.24450349807739258, 0.31413811445236206, 0.24550314247608185, 0.07318200916051865, 0.6056528687477112, 0.029125161468982697, -0.16242466866970062, -0.4576607644557953, -0.11695250868797302, 0.12370189279317856, 0.18541750311851501, -0.0814657211303711, -0.2859894633293152, 0.21196319162845612, 0.573397159576416, 0.10713434964418411, 0.047517094761133194, -0.2662874460220337, 0.025926141068339348, -0.07795997709035873, 0.08290595561265945, 0.1517448127269745, 0.526090681552887, 0.21049533784389496, 0.12091921269893646, -0.15154430270195007, -0.08919520676136017, -0.13901638984680176, 0.2093091607093811, 0.05544523149728775, 0.143036350607872, 0.060327254235744476, 0.012329592369496822, -0.33046194911003113, -0.47526344656944275, -0.20985037088394165, 0.2531979978084564, 0.290157288312912, -0.15915578603744507, 0.11363248527050018, -0.26863837242126465, -0.30315977334976196, 0.2296498566865921, -0.2023400515317917, 0.28428104519844055, -0.4916495978832245, -0.1446024477481842, 0.3907756507396698, -0.11080819368362427, 0.35075345635414124, -0.22050337493419647, 0.20341569185256958, 0.12539105117321014, 0.031356047838926315, -0.39106839895248413, -0.2887701988220215, -0.3332482874393463, 0.15105555951595306, -0.008353959769010544, -0.2375146448612213, 0.21128949522972107, -0.15649543702602386, -0.11040102690458298, -0.4631522297859192, -0.27616551518440247, 0.3244600296020508, -0.10516498982906342, 0.18219375610351562, 0.4335440695285797, 0.10795868188142776, 0.07633843272924423, -0.09496083855628967, 0.23710252344608307, 0.12256679683923721, -0.1003970056772232, 0.10644225776195526, -0.16309037804603577, -0.4557857811450958, -0.004637688864022493, -0.33821794390678406, 0.0398569256067276, -0.1593204289674759, 0.02348291128873825, -0.07299435883760452, 0.13333459198474884, 0.4342425763607025, -0.3217830955982208, -0.009084278717637062, 0.3452266752719879, 0.0178745836019516, -0.448395311832428, -0.06626523286104202, 0.23296765983104706, -0.34403106570243835, -0.22670724987983704, -0.08086562901735306, -0.07956617325544357, 0.37649208307266235, 0.2241341918706894, -0.2751893997192383, -0.30426228046417236, -0.13605977594852448, 0.08655103296041489, 0.21054141223430634, -0.032632578164339066, 0.24100729823112488, 0.1020502969622612, -0.16070738434791565, -0.379470556974411, -0.385611891746521, 0.25887107849121094, 0.1642449051141739, -0.1342521458864212, 0.0729818120598793, 0.4892484247684479, -0.27446845173835754, 0.1393725872039795, 0.036403361707925797, 0.17503303289413452, 0.4106371998786926, -0.36942824721336365, 0.25448280572891235, -0.24703079462051392, -0.3511809706687927, 0.012815458700060844, -0.08953244984149933, -0.07013367116451263, 0.18785253167152405, -0.3395579755306244, -0.3432747721672058, 0.01945304684340954, 0.4146224558353424, -0.10644631087779999, -0.2112884521484375, -0.11425267904996872, 0.020608171820640564, 0.24390792846679688, 0.3913017511367798, 0.16501906514167786, -0.3467351198196411, 0.033910926431417465, 0.09260891377925873, -0.2528200149536133, -0.12174994498491287, -0.15764544904232025, -0.46633774042129517, -0.052919644862413406, -0.1410994678735733, 0.11460423469543457, -0.026181304827332497, 0.572917103767395, -0.09004918485879898, -0.4013190269470215, 0.055538028478622437, 0.171711266040802, 0.6591591835021973, -0.2859039306640625, -0.21276052296161652, 0.34699273109436035, 0.2231651395559311, -0.03350928798317909, -0.1617649793624878, -0.1581510454416275, 0.5311183929443359, 0.20241789519786835, 0.5095130801200867, -0.25115829706192017, -0.2161705493927002, 0.5288524627685547, -0.02845420315861702, -0.06717921793460846, -0.05790106952190399, -0.10919159650802612, -0.45580169558525085, 0.13294565677642822, -0.12816722691059113, 0.20240876078605652, 0.2846760153770447, 0.0838426724076271, -0.06381881982088089, -0.2840555012226105, -0.2259790599346161, -0.05198225378990173, 0.4264680743217468, 0.11501346528530121, -0.02489897422492504, 0.34760138392448425, -0.06608600169420242, 0.35396838188171387, -0.0389268659055233, 0.41708412766456604, -0.13960178196430206, -0.19453704357147217, 0.557489812374115, -0.6501864790916443, 0.2572557032108307, 0.17224839329719543, -0.08699538558721542, 0.15074388682842255, 0.041720710694789886, -0.02884509414434433, -0.23968183994293213, -0.11452103406190872, 0.3434332311153412, -0.06307394802570343, -0.21871009469032288, -0.42139381170272827, 0.15311136841773987, 0.10329863429069519, -0.07834409922361374, 0.4911765456199646, 0.42026734352111816, -0.26627179980278015, 0.1759478747844696, -0.1087067648768425, 0.5112248063087463, 0.07952956110239029, -0.20490926504135132, 0.4085407853126526, -0.1606610119342804, 0.051652587950229645, 0.20659232139587402, 0.22873981297016144, -0.2953382432460785, -0.46505680680274963, 0.04728921130299568, 0.10371503233909607, 0.09581827372312546, 0.2955135405063629, 0.21053948998451233, 0.3223603367805481, 0.1648004651069641, 0.22172772884368896, 0.042849019169807434, -0.09809864312410355, -0.011727790348231792, -0.15358813107013702, -0.14364133775234222, 0.15869294106960297, 0.08995494991540909, -0.2189781814813614, -0.018749555572867393, 0.1064247116446495, 0.1838332563638687, 0.017649967223405838, -0.17116980254650116, -0.03840966522693634, 0.04869282618165016, 0.10130902379751205, 0.1960008144378662, -0.1796322464942932, -0.21033604443073273, -0.04400787875056267, 0.3656030297279358, -0.2235632687807083, -0.031949516385793686, 0.26276835799217224, 0.14489169418811798, 0.2541039288043976, 0.02818644978106022, 0.1426234394311905, 0.2944267988204956, -0.012734705582261086, 0.08109162002801895, -0.11657902598381042, -0.046926531940698624, -0.09722156822681427, -0.11298567801713943, -0.0776902362704277, 0.3170372545719147, -0.4641861915588379, 0.006635716650635004, -0.03463578224182129, 0.12291248887777328, -0.3808172643184662, 0.16639070212841034, -0.18365740776062012, 0.13799862563610077, 0.3346537947654724, -0.22484274208545685, -0.08655022829771042, -0.11406159400939941, 0.19271986186504364, 0.036899223923683167, 0.04314659535884857, 0.6668910384178162, 0.01693432405591011, -0.1532163769006729, -0.27495983242988586, -0.28041255474090576, 0.3945758640766144, -0.29626035690307617, 0.1258220076560974, -0.21118506789207458, 0.012261353433132172, 0.20913289487361908, 0.37551456689834595, -0.0729500874876976, 0.06558138877153397, -0.25952044129371643, -0.2246391773223877, -0.33386170864105225, 0.0947117879986763, 0.2949468791484833, 0.1381583958864212, -0.017437664791941643, -0.44868308305740356, -0.2343645691871643, -0.20888012647628784, -0.3836697041988373, -0.28611162304878235, -0.3407312035560608, 0.15404774248600006, 0.15271025896072388, 0.09989272058010101, 0.3022034168243408, -0.08308543264865875, 0.3922530710697174, -0.07362508028745651, 0.18121983110904694, -0.26161280274391174, -0.11479377746582031, 0.06284555792808533, -0.012550813145935535, -0.08275225013494492, -0.1542665809392929, -0.24285869300365448, -0.4270096719264984, -0.1705254763364792, 0.1439284235239029, -0.047832224518060684, 0.09355996549129486, -0.010987693443894386, -0.13441018760204315, -0.0287814661860466, -0.06455563753843307, -0.0740886852145195, 0.1760474145412445, -0.028661604970693588, 0.1317201405763626, 0.13563404977321625, -0.1336413472890854, -0.14293493330478668, 0.3436339497566223, 0.1731634885072708, 0.03851359710097313, -0.009309976361691952, 0.37811315059661865, -0.2905080020427704, -0.025997109711170197, 0.4262281358242035, 0.2250780165195465, 0.45260998606681824, -0.18014337122440338, -0.21921788156032562, 0.06912611424922943, 0.2608379125595093, -0.338496595621109, -0.17058542370796204, 0.027211235836148262, -0.04480912908911705, 0.1533747762441635, 0.3468914330005646, 0.17832668125629425, -0.04384917765855789, 0.20290343463420868, 0.013371926732361317, 0.3789938688278198, -0.36569321155548096, -0.153682142496109, 0.3200014531612396, 0.18552352488040924, 0.08531782776117325, 0.3756558895111084, 0.34003177285194397, -0.06824400275945663, 0.6535715460777283, 0.057976968586444855, 0.06166195124387741, 0.050982072949409485, 0.06162542849779129, 0.01597043313086033, -0.2817324101924896, 0.12132733315229416, -0.18464823067188263, 0.056563880294561386, 0.17046880722045898, 0.06817016005516052, -0.244364932179451, 0.027214545756578445, 0.1260237693786621, -0.24306540191173553, -0.22489885985851288, -0.17111153900623322, -0.09766779094934464, -0.32555949687957764, -0.16776564717292786, -0.08134385943412781, -0.20901548862457275, -0.037527527660131454, 0.12116529047489166, 0.3019024431705475, -0.2431761473417282, 0.21170055866241455, -0.5488353371620178, -0.018891705200076103, -0.0015765184070914984, 0.2170565277338028, -0.16079026460647583, 0.26262956857681274, 0.09726085513830185, -0.09120868146419525, 0.04392414912581444, 0.3324953615665436, 0.1373092085123062, 0.09367338567972183, 0.29899802803993225, -0.27719172835350037, -0.06455093622207642, -0.3748452961444855, -0.13264063000679016, 0.3279156982898712, -0.10226446390151978, 0.21499139070510864, 0.09901826828718185, 0.1871594935655594, -0.07232825458049774, 0.08836136013269424, 0.3170144259929657, -0.02756478078663349, 0.021168619394302368, 0.06675232201814651, -0.13316519558429718, -0.21946190297603607, 0.004237299785017967, -0.060034796595573425, -0.04221722483634949, -0.2355864942073822, 0.2780924141407013, -0.17440734803676605, 0.3072936534881592, 0.09146563708782196, 0.15121105313301086, -0.13749343156814575, 0.22456888854503632, 0.18759918212890625, -0.23682616651058197, -0.17923027276992798, -0.3338928818702698, -0.13951896131038666, -0.10414637625217438, 0.0630636215209961, -0.18672671914100647, 0.2628869414329529, 0.4041144549846649, 0.48776310682296753, -0.35748523473739624, 0.024099145084619522, -0.34328022599220276, -0.01869138516485691, 0.40020397305488586, -0.28598469495773315, -0.5710671544075012, 0.1308581829071045, -0.09079936891794205, -0.03790685161948204, -0.24595311284065247, 0.16118629276752472, 0.12794005870819092, 0.15341463685035706, -0.1635321080684662, 0.04111279547214508, 0.24811182916164398, -0.16730840504169464, 0.043954476714134216, 0.008367493748664856, 0.19272169470787048, -0.10678981244564056, -0.005533534102141857, -0.28808775544166565, -0.25655218958854675, -0.16314688324928284, 0.5066491961479187, -0.01852456107735634, -0.09150060266256332, 0.06743045151233673, 0.2313608080148697, -0.03296560421586037, -0.06796243786811829, 0.06610957533121109, 0.28761956095695496, -0.19180099666118622, 0.38758549094200134, -0.059846170246601105, 0.20949040353298187, 0.06752321124076843, -0.02726040966808796, 0.16622379422187805, 0.3679792881011963, -0.14122238755226135, -0.3888523578643799, 0.32603582739830017, -0.08576740324497223, -0.35690799355506897, 0.03369147703051567, 0.15203799307346344, 0.11498559266328812, -0.07443217933177948, -0.1648799628019333, -0.01539982482790947, 0.4247278869152069, -0.3492845594882965, -0.031405556946992874, 0.27925989031791687, 0.19823908805847168, 0.2712358236312866, 0.09228740632534027, 0.3183274269104004, 0.13882511854171753, -0.23670610785484314, -0.24312691390514374, -0.002393158385530114 ]
https://github.com/huggingface/datasets/issues/5381
Wrong URL for the_pile dataset
Hi! This error can happen if there is a local file/folder with the same name as the requested dataset. And to avoid it, rename the local file/folder. Soon, it will be possible to explicitly request a Hub dataset as follows:https://github.com/huggingface/datasets/issues/5228#issuecomment-1313494020
### Describe the bug When trying to load `the_pile` dataset from the library, I get a `FileNotFound` error. ### Steps to reproduce the bug Steps to reproduce: Run: ``` from datasets import load_dataset dataset = load_dataset("the_pile") ``` I get the output: "name": "FileNotFoundError", "message": "Unable to resolve any data file that matches '['**']' at /storage/store/work/lgrinszt/memorization/the_pile with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'BLP', 'BMP', 'DIB', 'BUFR', 'CUR', 'PCX', 'DCX', 'DDS', 'PS', 'EPS', 'FIT', 'FITS', 'FLI', 'FLC', 'FTC', 'FTU', 'GBR', 'GIF', 'GRIB', 'H5', 'HDF', 'PNG', 'APNG', 'JP2', 'J2K', 'JPC', 'JPF', 'JPX', 'J2C', 'ICNS', 'ICO', 'IM', 'IIM', 'TIF', 'TIFF', 'JFIF', 'JPE', 'JPG', 'JPEG', 'MPG', 'MPEG', 'MSP', 'PCD', 'PXR', 'PBM', 'PGM', 'PPM', 'PNM', 'PSD', 'BW', 'RGB', 'RGBA', 'SGI', 'RAS', 'TGA', 'ICB', 'VDA', 'VST', 'WEBP', 'WMF', 'EMF', 'XBM', 'XPM', 'aiff', 'au', 'avr', 'caf', 'flac', 'htk', 'svx', 'mat4', 'mat5', 'mpc2k', 'ogg', 'paf', 'pvf', 'raw', 'rf64', 'sd2', 'sds', 'ircam', 'voc', 'w64', 'wav', 'nist', 'wavex', 'wve', 'xi', 'mp3', 'opus', 'AIFF', 'AU', 'AVR', 'CAF', 'FLAC', 'HTK', 'SVX', 'MAT4', 'MAT5', 'MPC2K', 'OGG', 'PAF', 'PVF', 'RAW', 'RF64', 'SD2', 'SDS', 'IRCAM', 'VOC', 'W64', 'WAV', 'NIST', 'WAVEX', 'WVE', 'XI', 'MP3', 'OPUS', 'zip']" ### Expected behavior `the_pile` dataset should be dowloaded. ### Environment info - `datasets` version: 2.7.1 - Platform: Linux-4.15.0-112-generic-x86_64-with-glibc2.27 - Python version: 3.10.8 - PyArrow version: 10.0.1 - Pandas version: 1.5.2
40
Wrong URL for the_pile dataset
[ 0.014184454455971718, 0.17543630301952362, -0.13514646887779236, 0.23639947175979614, -0.13966408371925354, 0.2542980909347534, 0.35521799325942993, 0.24236929416656494, -0.3347558379173279, -0.039526671171188354, 0.01440944243222475, 0.18186889588832855, 0.10351338237524033, -0.0992998257279396, 0.135087251663208, 0.2801431119441986, -0.07192107290029526, -0.3035956919193268, 0.005470442585647106, -0.33139488101005554, -0.21966299414634705, 0.07637373358011246, -0.1914670467376709, 0.11501478403806686, 0.016696132719516754, 0.04368264973163605, -0.06330215930938721, 0.3080384135246277, -0.22613273561000824, -0.1668713092803955, 0.2408912032842636, 0.24460811913013458, -0.0484611913561821, 0.6183204054832458, -0.00010412696428829804, 0.027859408408403397, 0.12112876772880554, 0.0364646390080452, -0.18513824045658112, -0.056338634341955185, -0.38776201009750366, -0.1266898214817047, -0.16446426510810852, -0.27483490109443665, 0.16501912474632263, -0.34152859449386597, 0.341126948595047, 0.11846233159303665, -0.27503466606140137, 0.29401135444641113, 0.28659647703170776, 0.12661872804164886, -0.10216232389211655, -0.046744681894779205, 0.01317415852099657, -0.069800965487957, 0.011405331082642078, 0.47736993432044983, -0.21671225130558014, 0.18951506912708282, -0.2144680768251419, 0.3409278988838196, 0.2205175757408142, -0.0006262087263166904, 0.09045340120792389, 0.3771761953830719, 0.05828794836997986, 0.22238324582576752, 0.10463250428438187, -0.08405237644910812, 0.2799997627735138, -0.05023307353258133, -0.16905391216278076, 0.3533990979194641, -0.2967274785041809, 0.00048810598673298955, 0.11331776529550552, 0.35725247859954834, 0.16289521753787994, 0.19622787833213806, -0.14430870115756989, -0.07088388502597809, -0.150139719247818, 0.32277339696884155, 0.09797179698944092, 0.026951700448989868, -0.014726405031979084, 0.027314046397805214, -0.0840851217508316, 0.08458476513624191, 0.46411043405532837, -0.006999537348747253, 0.0618312768638134, -0.03852362930774689, -0.06473156064748764, -0.11152485758066177, 0.3245595693588257, 0.28162866830825806, 0.30916640162467957, -0.2886461317539215, 0.3318018913269043, 0.08153427392244339, -0.06361599266529083, -0.12886354327201843, 0.4806649386882782, -0.19877272844314575, -0.23373465240001678, -0.1803075075149536, 0.4606555998325348, 0.22844208776950836, -0.11592055857181549, 0.11561571061611176, 0.08648651093244553, -0.16283436119556427, 0.09746725112199783, -0.07751636952161789, 0.09851233661174774, -0.229070246219635, 0.01713348738849163, -0.008396393619477749, 0.10064732283353806, -0.09811034798622131, -0.18183623254299164, 0.25410181283950806, -0.07767260819673538, 0.05628109723329544, -0.19223609566688538, 0.2496218979358673, 0.059541065245866776, 0.11088911443948746, -0.46601682901382446, 0.15068663656711578, -0.22620847821235657, -0.08684647083282471, 0.08484167605638504, -0.2359321266412735, 0.22026632726192474, 0.04221053421497345, 0.03303803876042366, -0.15113705396652222, -0.04383396357297897, 0.1866670399904251, 0.00527662318199873, 0.15998497605323792, 0.3028486967086792, 0.06909307837486267, 0.2830432653427124, 0.273000031709671, -0.22559145092964172, 0.12301522493362427, -0.611644983291626, -0.4924377202987671, 0.002618031110614538, 0.2035374790430069, 0.09753397852182388, 0.02906319499015808, -0.38141900300979614, -0.07549833506345749, -0.0743025690317154, 0.07113080471754074, -0.1778741478919983, 0.10509373247623444, 0.06507040560245514, -0.3712203800678253, -0.09041859954595566, -0.07257603108882904, -0.2941545844078064, 0.08208367228507996, -0.405384361743927, 0.2085919976234436, 0.1657310575246811, 0.3091757595539093, -0.24648219347000122, 0.020748469978570938, -0.37974298000335693, 0.06431087851524353, 0.6506465673446655, -0.20146699249744415, -0.29681384563446045, 0.17866407334804535, -0.21069788932800293, -0.26746833324432373, -0.08689730614423752, 0.15608786046504974, -0.24852707982063293, -0.18438611924648285, 0.3121013641357422, -0.094192273914814, 0.2953577935695648, 0.05016458034515381, -0.14246147871017456, -0.24802526831626892, -0.12104611098766327, 0.04290322586894035, -0.10389838367700577, 0.16275955736637115, 0.39738962054252625, -0.1980617642402649, 0.3209262788295746, 0.14318035542964935, -0.26763248443603516, 0.16353031992912292, 0.28826063871383667, -0.017463132739067078, 0.1394607275724411, 0.17816120386123657, -0.3597997725009918, -0.08249547332525253, -0.3103857636451721, 0.3233037292957306, -0.13571390509605408, -0.14324817061424255, -0.5326665639877319, -0.0816354975104332, 0.09871435165405273, -0.017201408743858337, 0.26777270436286926, 0.10376144200563431, -0.07579431682825089, 0.03128926455974579, -0.20775234699249268, -0.009837317280471325, -0.22896160185337067, -0.0013959486968815327, -0.33368441462516785, 0.3506999611854553, -0.21084381639957428, -0.041486628353595734, 0.2293739765882492, -0.007907837629318237, 0.14521673321723938, -0.21585118770599365, 0.13026836514472961, 0.4191603362560272, -0.111298106610775, -0.02215605601668358, 0.31158292293548584, 0.23585397005081177, 0.208699569106102, -0.47739866375923157, 0.19615018367767334, -0.02650558017194271, 0.16186602413654327, 0.2308184653520584, -0.09732579439878464, 0.027163539081811905, 0.22326526045799255, -0.055457353591918945, 0.1620945781469345, -0.0782131478190422, 0.3565017282962799, 0.002922849729657173, 0.29558444023132324, -0.2211829423904419, -0.13093896210193634, 0.43750885128974915, -0.09863482415676117, 0.1377490758895874, -0.12447816133499146, 0.19825506210327148, 0.25320470333099365, -0.0357910580933094, 0.04924864321947098, 0.26512861251831055, 0.01487573329359293, -0.42304515838623047, -0.06634152680635452, 0.012133960612118244, 0.29623615741729736, 0.2579731047153473, 0.18126992881298065, 0.07540863007307053, -0.06443057209253311, -0.2815536558628082, 0.03790764883160591, 0.01074113231152296, -0.2195981740951538, -0.10512890666723251, 0.2808607518672943, -0.3597361147403717, -0.350799560546875, -0.1178167387843132, 0.0658695325255394, 0.21700018644332886, -0.18507938086986542, -0.15132133662700653, -0.3870652914047241, -0.15454429388046265, -0.0800875574350357, -0.0024995659478008747, -0.21022772789001465, -0.4742316007614136, 0.1581379920244217, 0.04068788141012192, -0.14816567301750183, 0.091810442507267, -0.1361600160598755, 0.21219898760318756, 0.19661451876163483, 0.18541178107261658, -0.1612897366285324, -0.12487640976905823, -0.1786678433418274, 0.15564431250095367, -0.2977190911769867, 0.29087191820144653, -0.059530217200517654, -0.266208291053772, -0.07493149489164352, -0.46269646286964417, -0.229439839720726, 0.1029028370976448, 0.22095271944999695, 0.04935869202017784, 0.36962446570396423, 0.3572697937488556, 0.005543469917029142, -0.24462294578552246, 0.11941362917423248, -0.2597685158252716, 0.01968873105943203, -0.057717762887477875, -0.04810882359743118, 0.019900763407349586, 0.03884787857532501, -0.6128855347633362, -0.14733043313026428, -0.11993595957756042, -0.32980960607528687, 0.17141662538051605, 0.08229110389947891, -0.024933015927672386, 0.13179145753383636, 0.03487806022167206, 0.14608943462371826, -0.2263273447751999, -0.32454144954681396, -0.5435237288475037, 0.4899064004421234, -0.20979832112789154, -0.4603389501571655, -0.005529068410396576, -0.11460360139608383, -0.05808994546532631, 0.2778950035572052, -0.47401171922683716, -0.24179202318191528, -0.24926751852035522, -0.011712825857102871, 0.23068614304065704, 0.05955849215388298, 0.09530896693468094, -0.14107146859169006, -0.37844136357307434, -0.12433461099863052, -0.17163334786891937, 0.2856055796146393, 0.5431016683578491, 0.2689189016819, 0.1730915755033493, 0.36196625232696533, 0.2969808876514435, 0.6569274663925171, -0.09441091865301132, -0.12814396619796753, 0.32778969407081604, -0.13743956387043, 0.5462549924850464, 0.09442238509654999, -0.01711055263876915, 0.1678435057401657, 0.11284999549388885, -0.020219380035996437, 0.30930379033088684, 0.3120514750480652, -0.2244035005569458, 0.050802625715732574, 0.03193960711359978, -0.25187456607818604, -0.27453291416168213, -0.2521958351135254, 0.5538252592086792, -0.003500922815874219, 0.4488806426525116, -0.19577878713607788, -0.17856498062610626, -0.26045432686805725, 0.19307348132133484, 0.24012404680252075, -0.0979231595993042, -0.03433764725923538, -0.3454846441745758, 0.4879475235939026, -0.33712610602378845, 0.22695483267307281, 0.019935110583901405, 0.2066599279642105, -0.025957714766263962, -0.022978525608778, 0.1029539555311203, 0.14795994758605957, 0.6940823793411255, -0.3230157196521759, 0.5366600751876831, -0.1671714037656784, 0.3146185278892517, -0.20493672788143158, 0.2085893303155899, -0.14487190544605255, 0.05819568783044815, 0.5110172033309937, 0.4054757058620453, -0.22022143006324768, 0.1433519870042801, 0.37908950448036194, -0.10973728448152542, -0.15195031464099884, -0.15689067542552948, -0.20352120697498322, -0.6700243949890137, 0.10599221289157867, -0.2147037237882614, 0.3081321716308594, 0.06819933652877808, 0.05278175324201584, -0.1606469303369522, 0.21818234026432037, -0.1949886679649353, -0.15739025175571442, -0.030193477869033813, 0.13727405667304993, 0.19245187938213348, -0.206276997923851, 0.17404258251190186, 0.45525026321411133, 0.19181609153747559, 0.368364542722702, -0.1270740032196045, -0.250603586435318, 0.37508878111839294, -0.28233602643013, 0.17777183651924133, 0.3352246582508087, -0.10505412518978119, -0.18078221380710602, 0.14133815467357635, 0.05512973293662071, 0.21645087003707886, 0.39202749729156494, 0.12157829850912094, -0.08194544166326523, -0.2561601996421814, -0.4703733026981354, 0.23301850259304047, -0.1686936765909195, -0.03884023800492287, 0.3847545087337494, 0.29239627718925476, -0.2202063798904419, 0.2244260013103485, -0.23547375202178955, 0.8922860026359558, 0.12426947802305222, 0.1469501554965973, 0.13626216351985931, -0.09791692346334457, -0.031197361648082733, -0.2651063799858093, 0.12352295964956284, -0.19539593160152435, -0.509891927242279, -0.008401837199926376, -0.19665363430976868, -0.08913113176822662, 0.627816915512085, 0.07620704919099808, 0.48665979504585266, -0.06319113075733185, -0.05376671627163887, 0.10886078327894211, 0.11303200572729111, 0.11976810544729233, 0.0986819937825203, -0.2771989405155182, 0.21114110946655273, 0.12916217744350433, 0.23795783519744873, -0.11742841452360153, 0.030555494129657745, 0.05513683706521988, -0.17009924352169037, -0.010304922237992287, 0.08292850852012634, 0.10010117292404175, 0.3082517087459564, -0.11577270179986954, -0.15029413998126984, -0.5554022789001465, 0.2426902800798416, 0.26204612851142883, 0.15854959189891815, -0.10105489194393158, 0.1522974818944931, -0.05389934778213501, -0.01917976140975952, 0.22418229281902313, 0.17691351473331451, -0.06572597473859787, -0.09695523232221603, -0.18911707401275635, 0.025560474023222923, 0.057721104472875595, -0.5469785928726196, 0.10257919132709503, 0.04791697859764099, -0.15667779743671417, -0.11853444576263428, -0.22116777300834656, 0.013476544991135597, -0.056401025503873825, -0.19622071087360382, 0.16172783076763153, 0.13968481123447418, 0.3035757541656494, -0.2802075445652008, 0.09642145037651062, -0.39647620916366577, -0.2475103884935379, 0.29828116297721863, 0.10849139094352722, 0.006666082888841629, -0.020382670685648918, -0.10754773765802383, -0.16101135313510895, -0.23832891881465912, -0.12827177345752716, 0.032152969390153885, -0.21770963072776794, 0.1302730292081833, -0.15057389438152313, 0.07515537738800049, -0.21114642918109894, 0.02217845246195793, 0.19158083200454712, 0.32044774293899536, -0.202724888920784, -0.3499809503555298, -0.050124041736125946, 0.11580951511859894, 0.031123999506235123, 0.026912888512015343, -0.062078651040792465, -0.08449651300907135, 0.20798075199127197, -0.372918963432312, -0.40199825167655945, 0.14633139967918396, -0.1899653524160385, -0.18755804002285004, -0.16498509049415588, 0.03672657161951065, 0.35359665751457214, 0.11878064274787903, 0.20143496990203857, -0.3283105194568634, 0.01275965478271246, -0.29377856850624084, -0.15886074304580688, 0.0229493398219347, 0.10136115550994873, -0.13490445911884308, -0.027315553277730942, -0.3197818994522095, -0.3672630190849304, 0.043485477566719055, 0.020727496594190598, 0.3334287405014038, 0.20180654525756836, -0.09673110395669937, 0.0935072973370552, -0.2609415352344513, -0.025298098102211952, 0.2107228934764862, 0.1334543377161026, 0.17309953272342682, 0.2410878986120224, -0.050761181861162186, -0.27088096737861633, -0.11110344529151917, 0.13516342639923096, -0.06107456982135773, 0.012425980530679226, 0.2127658724784851, 0.09651197493076324, -0.046924691647291183, -0.2955000698566437, 0.11859509348869324, 0.254036545753479, 0.030597368255257607, -0.17536050081253052, -0.09599138051271439, -0.003701345529407263, 0.20221133530139923, -0.38647550344467163, -0.11446923762559891, 0.22170691192150116, 0.04124419018626213, 0.03912670165300369, 0.06779135763645172, 0.023329470306634903, 0.009194416925311089, -0.10317628085613251, 0.08790476620197296, 0.3994932472705841, -0.374606192111969, -0.02976534143090248, 0.025748586282134056, -0.0678006261587143, 0.2154165506362915, 0.3068563938140869, 0.04532409831881523, -0.016264034435153008, -0.022255271673202515, 0.3367021083831787, 0.13315007090568542, 0.16427183151245117, -0.15177182853221893, -0.032307323068380356, 0.022080155089497566, -0.12720046937465668, 0.714185357093811, -0.07082676887512207, 0.10113446414470673, 0.245782732963562, 0.1970212310552597, -0.041885584592819214, 0.21515119075775146, -0.356370747089386, -0.18215808272361755, 0.019250793382525444, -0.1625276356935501, 0.3029979467391968, -0.09243951737880707, -0.008374889381229877, 0.16521824896335602, -0.17463476955890656, -0.4066932499408722, -0.16899091005325317, -0.18711920082569122, -0.002182615688070655, -0.53730708360672, 0.1305062472820282, 0.10519753396511078, -0.03716517984867096, 0.28035956621170044, 0.10571815073490143, -0.10339740663766861, 0.04240715131163597, 0.3920730650424957, 0.2203834056854248, -0.02203422412276268, -0.019568489864468575, 0.5105129480361938, -0.2314683347940445, 0.25882917642593384, -0.15403041243553162, -0.21945567429065704, 0.04563300311565399, 0.06838592141866684, 0.13789188861846924, 0.3417120575904846, 0.2782287895679474, -0.2699378728866577, 0.04120801016688347, 0.31071120500564575, 0.5415340662002563, -0.013283881358802319, 0.5032793283462524, -0.23597395420074463, -0.12575992941856384, 0.11612587422132492, 0.040626928210258484, -0.40648582577705383, -0.3340902030467987, 0.23726928234100342, -0.26229432225227356, 0.22913990914821625, -0.11223673075437546, 0.12192123383283615, -0.1602070927619934, 0.4419945776462555, 0.3728710412979126, 0.04055243358016014, 0.059599198400974274, -0.26164743304252625, -0.8476772904396057, 0.28780609369277954, 0.048708487302064896, 0.024902697652578354, -0.0214978214353323, 0.27017781138420105, 0.057997819036245346, 0.09569050371646881, 0.20586256682872772, -0.10411905497312546, -0.13456077873706818, 0.05640081688761711, -0.13265933096408844, -0.15309084951877594, -0.08572038263082504, 0.4585687816143036, -0.11697458475828171, -0.10886655002832413, 0.06096122786402702, 0.10564342886209488, 0.13297994434833527, -0.009059441275894642, -0.05158689618110657, -0.08574584871530533, 0.015500787645578384, 0.12470897287130356, -0.0904061570763588, 0.020111214369535446, -0.20173075795173645, -0.058268558233976364, -0.362765371799469, -0.3736668825149536, -0.05250361189246178, 0.08590546995401382, 0.013667847961187363, -0.23696205019950867, -0.18523479998111725, 0.1571655571460724, 0.01734269969165325, 0.2543257474899292, 0.13082759082317352, -0.10843504220247269, -0.11024434119462967, 0.3437884747982025, -0.016452837735414505, -0.14905299246311188, 0.10284272581338882, -0.039860423654317856, -0.04651608690619469, -0.13283415138721466, 0.2408413589000702, -0.191883385181427, 0.40016278624534607, -0.3794013559818268, -0.25843197107315063, 0.040242377668619156, 0.26214107871055603, -0.02725752629339695, 0.08589273691177368, -0.10783901065587997, 0.13305504620075226, 0.33330410718917847, 0.029102876782417297, -0.10393606871366501, 0.07086793333292007, -0.5045121312141418, 0.05762531980872154, -0.0576326847076416, 0.4013499319553375, 0.2894398272037506, -0.6552773118019104, -0.05123991519212723, -0.1142842099070549 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
Hi! I agree `skip` can be inefficient to use in the current state. To make it fast, we could use "statistics" stored in Parquet metadata and read only the chunks needed to form a dataset. And thanks to the "datasets-server" project, which aims to store the Parquet versions of the Hub datasets (only the smaller datasets are covered currently), this solution can also be applied to datasets stored in formats other than Parquet. (cc @severo)
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
75
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
@mariosasko do the current parquet files created by the datasets-server already have the required "statistics"? If not, please open an issue on https://github.com/huggingface/datasets-server with some details to make sure we implement it.
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
32
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
Yes, nothing has to be changed on the datasets-server side. What I mean by "statistics" is that we can use the "row_group" metadata embedded in a Parquet file (by default) to fetch the requested rows more efficiently.
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
37
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
Glad to see the feature could be of interest. I'm sure there are many possible ways to implement this feature. I don't know enough about the datasets-server, but I guess that it is not instantaneous, in the sense that user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all), which could be cumbersome. Having optionally that information in the `dataset_infos.json` file would make it easier for users to control the skip process a bit.
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
82
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
re: statistics: - https://arrow.apache.org/docs/python/generated/pyarrow.parquet.FileMetaData.html - https://arrow.apache.org/docs/python/generated/pyarrow.parquet.RowGroupMetaData.html ```python >>> import pyarrow.parquet as pq >>> import hffs >>> fs = hffs.HfFileSystem("glue", repo_type="dataset", revision="refs/convert/parquet") >>> metadata = pq.read_metadata("ax/glue-test.parquet", filesystem=fs) >>> metadata <pyarrow._parquet.FileMetaData object at 0x7f4537cec400> created_by: parquet-cpp-arrow version 7.0.0 num_columns: 4 num_rows: 1104 num_row_groups: 2 format_version: 1.0 serialized_size: 2902 >>> metadata.row_group(0) <pyarrow._parquet.RowGroupMetaData object at 0x7f45564bcbd0> num_columns: 4 num_rows: 1000 total_byte_size: 164474 >>> metadata.row_group(1) <pyarrow._parquet.RowGroupMetaData object at 0x7f455005c400> num_columns: 4 num_rows: 104 total_byte_size: 13064 ```
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
71
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
> user-owned private datasets might need hours or days until they are ported to the datasets-server (if at all) private datasets are not supported yet (https://github.com/huggingface/datasets-server/issues/39)
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
26
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
@versae `Dataset.push_to_hub` writes shards in Parquet, so this solution would also work for such datasets (immediately after the push).
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
19
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
@mariosasko that is right. However, there are still a good amount of datasets for which the shards are created manually. In our very specific case, we create medium-sized datasets (rarely over 100-200GB) of both text and audio, we prepare the shards by hand and then upload then. It would be great to have immediate access to this download skipping feature for them too.
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
63
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
From looking at Arrow's source, it seems Parquet stores metadata at the end, which means one needs to iterate over a Parquet file's data before accessing its metadata. We could mimic Dask to address this "limitation" and write metadata in a `_metadata`/`_common_metadata` file in `to_parquet`/`push_to_hub`, which we could then use to optimize reads (if present). Plus, it's handy that PyArrow can also parse these metadata files.
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
66
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5380
Improve dataset `.skip()` speed in streaming mode
So if Parquet metadata needs to be in its own file anyway, why not implement this skipping feature by storing the example counts per shard in `dataset_infos.json`? That would allow: - Support both private and public datasets - Immediate access to the feature upon uploading of shards - Use any dataset, not only those uploaded using `.push_to_hub()` A proper Parquet metadata file could still be created and "overwrite" the `dataset_infos.json` info in the datasets-server.
### Feature request Add extra information to the `dataset_infos.json` file to include the number of samples/examples in each shard, for example in a new field `num_examples` alongside `num_bytes`. The `.skip()` function could use this information to ignore the download of a shard when in streaming mode, which AFAICT it should speed up the skipping process. ### Motivation When resuming from a checkpoint after a crashed run, using `dataset.skip()` is very convenient to recover the exact state of the data and to not train again over the same examples (assuming same seed, no shuffling). However, I have noticed that for audio datasets in streaming mode this is very costly in terms of time, as shards need to be downloaded every time before skipping the right number of examples. ### Your contribution I took a look already at the code, but it seems a change like this is way deeper than I am able to manage, as it touches the library in several parts. I could give it a try but might need some guidance on the internals.
74
Improve dataset `.skip()` speed in streaming mode
[ -0.7333598732948303, -0.21654553711414337, -0.10560119152069092, -0.06403432786464691, 0.18854792416095734, 0.06046506017446518, -0.18331243097782135, 0.31079116463661194, -0.037159331142902374, 0.04578973725438118, -0.09746876358985901, 0.2094297856092453, -0.06387662142515182, 0.38515350222587585, -0.06457993388175964, -0.128719761967659, 0.05190965533256531, 0.1344725638628006, -0.07482567429542542, -0.02604975737631321, -0.058830950409173965, -0.2283443808555603, -0.23278546333312988, -0.3241629898548126, 0.31051743030548096, -0.041805289685726166, 0.24065357446670532, 0.11262428760528564, -0.1210748627781868, -0.2801287770271301, -0.11482182890176773, 0.30017152428627014, 0.03669234365224838, 0.10610590130090714, -0.00011036262003472075, 0.01960640400648117, 0.2301868349313736, 0.10381358861923218, -0.3464692234992981, 0.3502996265888214, -0.47765472531318665, 0.11284833401441574, -0.19621992111206055, 0.08236748725175858, -0.00041416456224396825, 0.09908246994018555, 0.13044901192188263, -0.5711652040481567, 0.12091334164142609, 0.13498471677303314, 0.16645203530788422, 0.33301612734794617, -0.44532260298728943, 0.01582998037338257, 0.15725776553153992, 0.2527906596660614, -0.17287640273571014, 0.07059885561466217, 0.33028778433799744, 0.22431616485118866, -0.24871087074279785, 0.5598795413970947, -0.19356249272823334, 0.13409073650836945, 0.22448723018169403, -0.20973439514636993, -0.2234942615032196, -0.0034092399291694164, 0.27280592918395996, 0.29828980565071106, 0.3016396760940552, -0.12333320081233978, -0.2684326171875, -0.37708979845046997, 0.04410335049033165, -0.39250651001930237, 0.03683241084218025, -0.05955299735069275, -0.0940556526184082, 0.1257922351360321, -0.5520997643470764, -0.29366356134414673, -0.12166469544172287, -0.19261252880096436, 0.01823759824037552, -0.014353823848068714, 0.2164989560842514, -0.09356853365898132, 0.45730531215667725, -0.06806175410747528, 0.4381697177886963, -0.20039889216423035, 0.1325761377811432, -0.04601302742958069, -0.20352253317832947, -0.08964568376541138, 0.08364798873662949, 0.23571425676345825, 0.007871068082749844, 0.10327070206403732, 0.48823869228363037, 0.47134527564048767, 0.34047970175743103, -0.00455769756808877, 0.11165077239274979, -0.2951383888721466, -0.09052558243274689, -0.011285848915576935, 0.26037299633026123, 0.2834678292274475, -0.09159858524799347, 0.09918341785669327, 0.09062272310256958, 0.15042471885681152, -0.0025701727718114853, 0.040940165519714355, 0.06332804262638092, 0.0003754272765945643, -0.3767126798629761, 0.10001015663146973, -0.09398315101861954, -0.05875052139163017, 0.004489769693464041, 0.19861097633838654, -0.16901226341724396, 0.1301424205303192, -0.3599661886692047, -0.017716730013489723, -0.1788414865732193, -0.3725087642669678, -0.22952225804328918, -0.15855781733989716, 0.23736721277236938, -0.018184373155236244, 0.009703120216727257, -0.23529081046581268, 0.06515476107597351, -0.12989689409732819, 0.1331683248281479, 0.2977546751499176, 0.27643126249313354, -0.14131289720535278, 0.07381141185760498, 0.06944946944713593, -0.0401420034468174, 0.09564609825611115, 0.007443842012435198, 0.25128644704818726, 0.05743858963251114, 0.2633945941925049, 0.07880986481904984, -0.31085386872291565, 0.36817166209220886, 0.22725075483322144, -0.0012187560787424445, -0.2774662375450134, -0.047101330012083054, 0.46744266152381897, -0.084748774766922, -0.30457907915115356, -0.1370629221200943, 0.15998885035514832, -0.2785482108592987, 0.061319347470998764, 0.15445345640182495, 0.32316863536834717, -0.324380099773407, -0.20468337833881378, -0.17926500737667084, 0.007705134339630604, 0.6825487613677979, 0.08646494895219803, 0.0008165867766365409, -0.37061256170272827, -0.08269727975130081, 0.27542319893836975, 0.33139878511428833, -0.16545729339122772, -0.3586669862270355, 0.4121188223361969, -0.2215557098388672, 0.25414252281188965, 0.3922315239906311, 0.21329356729984283, 0.4538854658603668, -0.02239641174674034, 0.20503740012645721, 0.41534623503685, -0.3393975496292114, 0.19124026596546173, -0.2565314471721649, -0.20022478699684143, 0.35573357343673706, 0.2367030680179596, -0.14153890311717987, -0.015481827780604362, -0.06693334877490997, -0.05872635170817375, 0.3685392737388611, -0.10091736912727356, 0.008683320134878159, -0.02074303850531578, 0.11180222779512405, -0.3003842532634735, -0.23781895637512207, -0.040467604994773865, -0.17269101738929749, -0.023276356980204582, 0.5518304109573364, -0.12180378288030624, 0.15570978820323944, -0.3239433169364929, -0.0022818599827587605, -0.06678842008113861, -0.03329380601644516, 0.034182801842689514, 0.1397789865732193, 0.24052609503269196, -0.22817692160606384, -0.14381331205368042, -0.06544362753629684, 0.09171194583177567, -0.09874657541513443, 0.03290827199816704, -0.15213505923748016, 0.20034977793693542, 0.19767677783966064, -0.09678960591554642, 0.2860579788684845, -0.1869862675666809, 0.10764744877815247, -0.07078026235103607, -0.1169196292757988, 0.2707909047603607, 0.12129867821931839, 0.5704531669616699, 0.21433620154857635, 0.08086645603179932, 0.32500940561294556, -0.30211329460144043, 0.2197989672422409, 0.37441155314445496, 0.047963205724954605, 0.04169895127415657, -0.30870112776756287, 0.20724913477897644, 0.07061351090669632, 0.2822072207927704, 0.37701040506362915, -0.1401565968990326, 0.23861992359161377, 0.35589078068733215, -0.010538885369896889, -0.2582811117172241, 0.26094773411750793, -0.10154954344034195, 0.2572300434112549, 0.3341451585292816, -0.564674973487854, 0.5109515190124512, 0.6844134330749512, 0.021105090156197548, -0.2498590648174286, 0.25817668437957764, -0.08558136224746704, -0.4207017719745636, 0.31861066818237305, 0.24194253981113434, 0.1568533182144165, 0.3761802613735199, 0.5523634552955627, -0.15110519528388977, -0.04213336110115051, -0.30329251289367676, 0.3008117377758026, -0.09012743830680847, 0.02097107656300068, 0.13948366045951843, 0.13532420992851257, -0.3076130151748657, -0.50313401222229, -0.12936341762542725, 0.16467465460300446, 0.1053350418806076, 0.06725060194730759, -0.11529220640659332, -0.24624121189117432, -0.40991586446762085, 0.28670910000801086, 0.026007911190390587, 0.11368370056152344, -0.3329847753047943, 0.3107607662677765, 0.3172461688518524, -0.30532851815223694, 0.35127493739128113, -0.055749863386154175, 0.06443777680397034, 0.15345384180545807, -0.17801064252853394, -0.053091540932655334, -0.06225249543786049, 0.041281022131443024, 0.18265025317668915, -0.008444943465292454, 0.19264420866966248, 0.3133174479007721, -0.0705089345574379, 0.06920076906681061, -0.14559808373451233, 0.11091320961713791, 0.038799040019512177, 0.13612952828407288, 0.12697312235832214, 0.09347453713417053, 0.3801831007003784, 0.004413282033056021, 0.049262404441833496, -0.0029107597656548023, -0.2759469449520111, -0.08820205926895142, 0.05775260552763939, 0.045989975333213806, 0.24803926050662994, 0.00422580586746335, -0.24229054152965546, -0.3313027024269104, -0.37356385588645935, -0.19711382687091827, -0.13580746948719025, -0.04663991928100586, -0.11227545887231827, 0.11531299352645874, -0.12645550072193146, 0.1464681327342987, 0.0556035079061985, -0.1587783694267273, -0.3794710040092468, 0.38805797696113586, -0.05642915517091751, 0.028718959540128708, -0.2136848419904709, 0.004835227970033884, 0.06809834390878677, 0.35839948058128357, -0.307003378868103, -0.030177993699908257, -0.40284010767936707, 0.0006318546365946531, -0.14521470665931702, -0.25946271419525146, 0.11518090963363647, -0.0018481462029740214, -0.21885059773921967, -0.00973606202751398, -0.03590169548988342, -0.07937853783369064, -0.05662233754992485, -0.21533851325511932, -0.088404081761837, 0.36886245012283325, 0.1183076947927475, 0.6270619630813599, 0.20566029846668243, 0.179406076669693, 0.1575271040201187, 0.0739978775382042, 0.2136518955230713, -0.13915124535560608, -0.04167936369776726, 0.3618009686470032, 0.048256177455186844, -0.1592216193675995, 0.13824141025543213, -0.1817048192024231, -0.30628877878189087, 0.015326532535254955, -0.09618691354990005, 0.13210232555866241, -0.1712876856327057, 0.11612789332866669, -0.05581644922494888, 0.026180706918239594, 0.2742307782173157, 0.43016549944877625, -0.19128085672855377, -0.1388796716928482, -0.05917494744062424, -0.1718163639307022, 0.395086407661438, -0.10842971503734589, -0.29505252838134766, -0.10241134464740753, -0.612146258354187, 0.124579057097435, 0.2588265538215637, 0.27976757287979126, 0.03318391367793083, -0.2102378010749817, -0.014230447821319103, -0.020592136308550835, 0.2921515703201294, -0.4338895082473755, 0.22816607356071472, 0.01639285497367382, 0.14227792620658875, -0.030094878748059273, 0.2481631189584732, -0.22585268318653107, 0.2738308310508728, 0.20733116567134857, -0.16078326106071472, -0.17478379607200623, 0.06736637651920319, 0.1712866872549057, 0.1447727233171463, 0.2225765436887741, 0.03715280070900917, -0.06405194103717804, 0.031214728951454163, -0.3715958893299103, 0.24551847577095032, 0.05007369443774223, 0.0021099229343235493, -0.30315670371055603, -0.41506722569465637, 0.13640736043453217, 0.03321167826652527, 0.03518521785736084, 0.14653213322162628, 0.2393205165863037, 0.1228765994310379, 0.2686244547367096, -0.05548373982310295, -0.1006685271859169, 0.2648465633392334, 0.22345808148384094, 0.2704426646232605, -0.3130559027194977, 0.03626951575279236, 0.21923626959323883, 0.09048180282115936, 0.2800142168998718, -0.1370370090007782, 0.37330180406570435, 0.2691348195075989, 0.4291705787181854, -0.12781263887882233, 0.13582417368888855, 0.040112126618623734, -0.03133346885442734, -0.13682851195335388, -0.44942858815193176, 0.0889681875705719, 0.08681035786867142, -0.01600445993244648, 0.39172592759132385, -0.22796203196048737, -0.007552521303296089, -0.13073784112930298, -0.051567744463682175, 0.6183274984359741, 0.19739344716072083, -0.04044326767325401, 0.07144228368997574, -0.2723256051540375, 0.10582970827817917, -0.21650612354278564, 0.2124779373407364, 0.04073226451873779, -0.4601562023162842, 0.08275922387838364, 0.10777931660413742, 0.10035401582717896, -0.08695821464061737, -0.3861735463142395, 0.06397611647844315, 0.12993356585502625, 0.512964129447937, -0.14081105589866638, -0.022385356947779655, -0.41681888699531555, -0.23474055528640747, -0.17184697091579437, 0.13140277564525604, -0.08498426526784897, -0.5343072414398193, 0.1466369479894638, -0.17128118872642517, 0.27811744809150696, 0.010157960467040539, -0.22010290622711182, -0.10931625217199326, -0.41005122661590576, -0.23204760253429413, -0.48577630519866943, -0.23711615800857544, -0.2210802286863327, 0.05588461458683014, -0.31384384632110596, 0.03376912325620651, -0.3003227710723877, 0.2564643621444702, -0.04815473407506943, 0.41805046796798706, 0.016505416482686996, -0.21169646084308624, -0.056341953575611115, -0.03650081902742386, -0.22898565232753754, 0.17309774458408356, -0.19557440280914307, -0.28936412930488586, 0.3742893934249878, -0.41469907760620117, 0.2894423305988312, 0.08899399638175964, -0.13367491960525513, -0.16726507246494293, -0.1703498363494873, -0.5356423258781433, 0.12832775712013245, -0.019386563450098038, -0.06735631823539734, 0.2340615689754486, 0.09201359003782272, -0.14350926876068115, -0.35567155480384827, 0.60947585105896, -0.07840199023485184, 0.2140778750181198, 0.10809369385242462, -0.00959604512900114, -0.48628947138786316, -0.227779820561409, 0.1843034029006958, -0.03827996179461479, 0.06948761641979218, 0.22223696112632751, -0.18312181532382965, -0.19100052118301392, -0.07697547227144241, -0.2695007026195526, -0.27442312240600586, 0.13450996577739716, -0.3491848409175873, -0.025966951623558998, -0.24508115649223328, 0.05469784513115883, 0.1458071917295456, 0.1547532081604004, -0.14043645560741425, 0.009884546510875225, 0.1175999864935875, 0.11996835470199585, -0.3412650227546692, -0.24572838842868805, 0.011688761413097382, -0.0835740864276886, 0.11951562762260437, 0.09947993606328964, -0.0188650693744421, 0.047620560973882675, 0.15034550428390503, 0.24366027116775513, -0.09819667041301727, -0.22690144181251526, 0.1412634402513504, 0.1290002465248108, -0.10499513149261475, -0.27385449409484863, 0.12207657098770142, -0.09106447547674179, -0.45540595054626465, -0.2445676475763321, 0.03859548643231392, -0.210313618183136, 0.01606411673128605, -0.17011190950870514, 0.13726551830768585, -0.07804757356643677, 0.14831656217575073, -0.12870529294013977, -0.07223843038082123, 0.23659034073352814, -0.22519752383232117, -0.017935950309038162, 0.18226876854896545, -0.21732337772846222, 0.37994384765625, -0.10288219153881073, 0.25134631991386414, 0.15570007264614105, 0.13004228472709656, -0.13164189457893372, -0.19252920150756836, 0.31984177231788635, 0.38193821907043457, 0.5492735505104065, 0.22074422240257263, -0.23567599058151245, -0.14668092131614685, 0.25378406047821045, -0.37600526213645935, -0.5405358672142029, 0.1313156932592392, -0.04600594937801361, 0.4377741813659668, -0.06265272945165634, -0.03638981282711029, 0.16174083948135376, 0.12983174622058868, 0.14194375276565552, 0.13887682557106018, -0.1272062510251999, 0.1085691824555397, 0.32530614733695984, 0.19190600514411926, -0.009731607511639595, -0.19930322468280792, 0.11991869658231735, 0.3051452338695526, 0.5959113240242004, -0.06360612064599991, 0.428109735250473, 0.3138815760612488, 0.39427486062049866, -0.4654577076435089, -0.46370187401771545, -0.14579704403877258, 0.40963026881217957, -0.38931894302368164, 0.2900339365005493, 0.43616247177124023, -0.10930654406547546, 0.0647352859377861, -0.3371998369693756, -0.15583324432373047, -0.17246371507644653, 0.1356135457754135, -0.16865892708301544, -0.031002748757600784, -0.025075096637010574, -0.3620191216468811, 0.26305246353149414, -0.030707404017448425, 0.42679962515830994, 0.24560940265655518, -0.32598549127578735, 0.41842442750930786, -0.4125089943408966, 0.1658848226070404, -0.30967360734939575, 0.009994001127779484, -0.07669451832771301, 0.15655864775180817, 0.37805303931236267, 0.10360202193260193, 0.1387205868959427, -0.12392361462116241, 0.0032267235219478607, -0.2767789959907532, -0.024163803085684776, 0.11466185003519058, -0.09964439272880554, -0.2619432210922241, -0.30773329734802246, 0.10441596806049347, 0.09627941995859146, -0.051068585366010666, 0.23577049374580383, 0.1466878056526184, -0.2245287150144577, 0.2607670724391937, 0.17030587792396545, -0.0761321485042572, -0.16508427262306213, -0.04619003087282181, 0.12196190655231476, 0.13138628005981445, -0.18125693500041962, -0.36663246154785156, -0.23613759875297546, 0.05097046121954918, 0.28770074248313904, -0.4905049502849579, -0.06405703723430634, -0.007965142838656902, 0.14163562655448914, -0.1370052844285965, 0.45830440521240234, -0.03645666316151619, -0.060618311166763306, -0.22105622291564941, -0.264786034822464, -0.6033849120140076, -0.084408238530159, 0.12898360192775726, 0.09327898174524307, 0.09167508780956268, 0.3099351227283478, 0.1320783495903015, 0.21638049185276031, 0.0368388332426548, 0.16363345086574554, 0.3119669556617737, 0.05601760745048523, -0.23812885582447052, -0.2769336700439453, -0.21546289324760437, 0.03376055136322975, -0.05564214661717415, -0.3991864025592804, 0.49133509397506714, 0.023449338972568512, 0.12858445942401886, -0.019153958186507225, -0.2924511730670929, 0.049099478870630264, -0.060327816754579544, 0.17852702736854553, -0.023403001949191093, -0.08872893452644348, -0.425482839345932, 0.1438315510749817, 0.10975499451160431, 0.23687948286533356, -0.1177053302526474, 0.06861761957406998, 0.20609743893146515, 0.43866756558418274, -0.059455011039972305, 0.13689389824867249, 0.0733988881111145, 0.17577359080314636, 0.23132936656475067, 0.0574616901576519, -0.2815398573875427, 0.300965279340744, -0.1998615711927414, 0.22993087768554688, -0.26629406213760376, -0.1146947517991066, -0.01671360433101654, -0.01158764585852623, -0.11956963688135147, -0.30482274293899536, 0.45680946111679077, 0.0012448140187188983, -0.11161672323942184, -0.3557445704936981, 0.0004898665356449783, 0.6075072288513184, 0.04045949503779411, -0.3330898582935333, 0.031603455543518066, 0.1788511425256729, -0.13046059012413025, 0.06676534563302994, 0.46962836384773254, -0.12161265313625336, 0.11679805815219879, -0.12481646984815598, 0.45292824506759644, 0.18378376960754395, -0.17279095947742462, 0.11449290066957474, -0.27183958888053894 ]
https://github.com/huggingface/datasets/issues/5378
The dataset "the_pile", subset "enron_emails" , load_dataset() failure
Thanks for reporting @shaoyuta. We are investigating it. We are transferring the issue to "the_pile" Community tab on the Hub: https://huggingface.co/datasets/the_pile/discussions/4
### Describe the bug When run "datasets.load_dataset("the_pile","enron_emails")" failure ![image](https://user-images.githubusercontent.com/52023469/208565302-cfab7b89-0b97-4fa6-a5ba-c11b0b629b1a.png) ### Steps to reproduce the bug Run below code in python cli: >>> import datasets >>> datasets.load_dataset("the_pile","enron_emails") ### Expected behavior Load dataset "the_pile", "enron_emails" successfully. ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.7.1 - Platform: Linux-5.15.0-53-generic-x86_64-with-glibc2.35 - Python version: 3.10.6 - PyArrow version: 10.0.0 - Pandas version: 1.4.3
21
The dataset "the_pile", subset "enron_emails" , load_dataset() failure
[ -0.3062807023525238, 0.12855124473571777, -0.1727052628993988, 0.47366392612457275, 0.02824210375547409, 0.346895694732666, 0.4837667942047119, 0.1106259748339653, 0.29692840576171875, -0.051628388464450836, 0.09642776846885681, 0.13776257634162903, -0.2225683033466339, 0.3065260648727417, -0.11901548504829407, 0.22848543524742126, -0.15927152335643768, 0.03452685847878456, -0.25932180881500244, -0.23684222996234894, -0.2718672752380371, 0.07119147479534149, -0.08138484507799149, -0.14546309411525726, -0.12873055040836334, -0.0969960168004036, 0.08348154276609421, 0.4801548719406128, -0.17134855687618256, 0.09650762379169464, 0.36681243777275085, 0.08347194641828537, 0.10576590895652771, 0.3646400272846222, -0.0001040833376464434, -0.037110887467861176, 0.2795769274234772, -0.07796426862478256, -0.6386165022850037, -0.046184834092855453, -0.30764517188072205, -0.1986417919397354, 0.06438937783241272, -0.254823237657547, 0.2327757179737091, -0.0027485331520438194, 0.04635200649499893, -0.3353763222694397, 0.40556979179382324, 0.4336429536342621, 0.30688726902008057, 0.4383596181869507, 0.03416798263788223, -0.2993324398994446, 0.02535964362323284, -0.0057555995881557465, 0.023073485121130943, 0.2956070899963379, -0.2108626812696457, 0.05789513140916824, -0.10173968225717545, 0.05384380370378494, 0.002399040851742029, 0.03406102582812309, 0.1789364367723465, -0.13153855502605438, 0.18581248819828033, 0.07890230417251587, 0.11546003818511963, -0.04144582152366638, 0.4206816554069519, -0.12908394634723663, -0.0173219945281744, 0.16763761639595032, 0.017377810552716255, -0.4104149043560028, 0.19748836755752563, 0.1361268013715744, -0.040722232311964035, -0.03412675857543945, -0.07363508641719818, -0.058384452015161514, -0.26207301020622253, 0.1517574042081833, -0.0970430001616478, 0.01996459625661373, -0.1306753307580948, 0.029084648936986923, 0.051175009459257126, 0.1744173765182495, 0.5323216319084167, 0.20264454185962677, 0.3006632924079895, -0.09411907941102982, -0.38444456458091736, 0.09932845085859299, 0.1775163859128952, 0.28853175044059753, 0.30813851952552795, -0.1284933090209961, 0.045570600777864456, 0.13792483508586884, 0.6448735594749451, 0.02263101376593113, 0.5010524392127991, 0.09283220767974854, 0.10847168415784836, -0.10657132416963577, 0.08010352402925491, 0.06426224857568741, -0.17486214637756348, 0.14903487265110016, -0.29137852787971497, -0.04044204577803612, 0.2042371928691864, -0.0666777640581131, 0.03354255110025406, -0.1697913110256195, -0.23929913341999054, 0.2901141047477722, 0.02062942273914814, -0.20983430743217468, 0.04955223947763443, 0.29402896761894226, 0.1301020234823227, -0.07043925672769547, -0.015236571431159973, 0.21107086539268494, 0.0813339501619339, 0.13855686783790588, -0.44077420234680176, 0.04999565705657005, -0.332993745803833, -0.1123073548078537, 0.2770630121231079, -0.4028894007205963, 0.3283267617225647, -0.05806003883481026, 0.31301745772361755, -0.06181203946471214, 0.10392574965953827, -0.08327001333236694, -0.01729094795882702, 0.2752833664417267, 0.05231960117816925, 0.011761714704334736, 0.2878783047199249, 0.47094836831092834, 0.07289163023233414, -0.010895500890910625, -0.2299327254295349, -0.40343940258026123, -0.2621915340423584, 0.22407099604606628, 0.06243635714054108, 0.086177758872509, 0.05923363193869591, -0.07403220981359482, -0.06879910826683044, 0.11769790202379227, -0.13594850897789001, -0.18494774401187897, -0.011970549821853638, -0.13740959763526917, 0.08339086174964905, 0.2711523175239563, -0.4620927572250366, -0.00914971437305212, -0.335310697555542, -0.15080390870571136, 0.12233338505029678, 0.11186236888170242, -0.35792264342308044, 0.1609247773885727, -0.14293602108955383, -0.07354146987199783, 0.20441900193691254, -0.12136001139879227, -0.400410532951355, 0.10053674131631851, -0.026558876037597656, -0.08592474460601807, 0.03417002782225609, 0.024357596412301064, -0.1427973210811615, -0.0899384543299675, 0.2804391086101532, 0.22443906962871552, 0.022954866290092468, -0.0824400931596756, -0.05152008682489395, -0.14856134355068207, 0.0763273611664772, 0.22407236695289612, 0.09661944955587387, 0.1889926642179489, 0.18364638090133667, -0.020131487399339676, 0.14779314398765564, 0.008321424946188927, -0.16057895123958588, 0.15175850689411163, -0.011430311016738415, 0.28514960408210754, 0.03538960963487625, 0.08158047497272491, -0.5102732181549072, -0.02985222451388836, -0.1994793862104416, 0.1554035246372223, -0.099378801882267, 0.17567691206932068, -0.4608302712440491, 0.11324836313724518, -0.04003940895199776, -0.014509481377899647, 0.26732876896858215, 0.1503349095582962, -0.2789642810821533, -0.14166264235973358, -0.22219860553741455, 0.3417208194732666, -0.22443553805351257, -0.13489803671836853, -0.3903248608112335, 0.2795688509941101, -0.12231052666902542, -0.10813064873218536, 0.010644967667758465, 0.06959796696901321, 0.17195555567741394, -0.17375284433364868, -0.0479736402630806, 0.19210940599441528, -0.17300601303577423, -0.5619369745254517, -0.1208718940615654, -0.0016964799724519253, -0.08634891360998154, -0.15502429008483887, 0.23819157481193542, -0.18749012053012848, 0.07388672977685928, 0.03347133472561836, -0.1443302184343338, 0.12856638431549072, -0.04099969193339348, -0.16615179181098938, 0.07380008697509766, -0.20544883608818054, 0.1412554532289505, -0.11823034286499023, 0.20055519044399261, -0.2528247535228729, 0.16024620831012726, 0.1539682149887085, 0.2055758237838745, 0.05471920967102051, -0.14613990485668182, -0.28999650478363037, 0.30020928382873535, 0.13384069502353668, 0.23196817934513092, 0.14421319961547852, -0.23909227550029755, -0.40536004304885864, -0.028586495667696, 0.17006488144397736, 0.4603850543498993, 0.13697677850723267, 0.047131046652793884, 0.12348312884569168, -0.01653764210641384, -0.10529444366693497, 0.0489683635532856, -0.1379687637090683, 0.3099789321422577, 0.23715010285377502, 0.03600373864173889, -0.11895983666181564, -0.5934008955955505, -0.06410450488328934, 0.12264574319124222, 0.24478761851787567, -0.1876843422651291, -0.02177255228161812, 0.06002584844827652, 0.026316210627555847, 0.07688950002193451, 0.04726623743772507, 0.24443326890468597, -0.4240869879722595, -0.08104900270700455, 0.029972601681947708, -0.042594265192747116, 0.045578256249427795, -0.07594427466392517, 0.3389427363872528, 0.36671850085258484, 0.22643771767616272, -0.15313707292079926, -0.20820562541484833, -0.03729656711220741, 0.16179512441158295, -0.05211855098605156, 0.3625420928001404, 0.14018641412258148, -0.14522786438465118, 0.04922376573085785, -0.23809196054935455, -0.08756372332572937, 0.23971013724803925, -0.01998116448521614, 0.3604099154472351, 0.24783377349376678, 0.40555626153945923, -0.33536532521247864, -0.48178982734680176, 0.22132644057273865, -0.3805285394191742, -0.12789440155029297, 0.16228260099887848, 0.10137341171503067, -0.0024416663218289614, 0.14766326546669006, -0.5776462554931641, -0.3948420584201813, -0.24074777960777283, 0.056803327053785324, 0.03322448953986168, -0.006817072629928589, 0.3291395604610443, 0.0439860038459301, 0.15014097094535828, 0.04020367190241814, 0.11033066362142563, -0.4151386022567749, -0.2983870804309845, 0.3631080389022827, -0.23164880275726318, -0.44386520981788635, -0.009194985032081604, 0.1738722175359726, -0.03929655998945236, 0.3207295536994934, -0.3456163704395294, -0.10507003962993622, 0.007099151611328125, -0.4030020236968994, -0.2596883177757263, 0.04099106788635254, 0.0876920148730278, 0.03808334469795227, -0.29856738448143005, -0.17410306632518768, -0.11263304948806763, 0.3715451955795288, 0.03161504119634628, -0.05925837904214859, -0.23001229763031006, 0.546198308467865, -0.12922979891300201, 0.23830357193946838, 0.02250920981168747, -0.19463872909545898, 0.3398822844028473, 0.03272783011198044, 0.4568217396736145, 0.04001999646425247, -0.41910260915756226, 0.13520042598247528, 0.017019828781485558, -0.21057742834091187, 0.37848570942878723, -0.15499728918075562, -0.367930144071579, -0.07688963413238525, 0.06653133779764175, -0.3216116428375244, -0.09039472043514252, 0.04710923507809639, 0.4036816358566284, 0.11741200089454651, -0.030534571036696434, -0.10376446694135666, -0.041624557226896286, -0.11906594783067703, 0.0005258802557364106, -0.0662275031208992, -0.07721816748380661, -0.08682567626237869, -0.07048467546701431, 0.3876110017299652, -0.21062856912612915, 0.1569591760635376, -0.17163650691509247, 0.6067467331886292, -0.30349087715148926, -0.07916427403688431, -0.04511481523513794, 0.179904043674469, 0.5938794612884521, -0.0651436522603035, 0.19963586330413818, -0.11507244408130646, 0.09794241189956665, -0.3908632695674896, 0.10215103626251221, -0.30560773611068726, 0.15922066569328308, 0.05014863610267639, 0.28542444109916687, -0.13548727333545685, -0.0018128566443920135, 0.5429168939590454, 0.26092660427093506, -0.02326669916510582, -0.2705157697200775, -0.22603750228881836, -0.3280389904975891, -0.13260425627231598, 0.17408503592014313, 0.1441487967967987, 0.1352245807647705, 0.033567752689123154, -0.2107861191034317, 0.017981765791773796, -0.13084809482097626, 0.11120858788490295, -0.04810534045100212, 0.1419057846069336, 0.08076232671737671, -0.14505355060100555, 0.2723918557167053, 0.37420082092285156, 0.6420478820800781, 0.43814465403556824, -0.38338902592658997, -0.3891381323337555, 0.23650629818439484, -0.18183541297912598, 0.2405521720647812, 0.3895115554332733, -0.267802894115448, -0.3542800545692444, -0.06540704518556595, -0.007722313050180674, 0.3320814371109009, -0.025983547791838646, 0.24335533380508423, 0.08918116986751556, -0.3782944083213806, -0.22908128798007965, 0.07220863550901413, -0.056428730487823486, 0.15393562614917755, -0.012310861609876156, 0.0015899647260084748, -0.19465512037277222, 0.2762358784675598, -0.17695283889770508, 0.6219958662986755, 0.026838315650820732, 0.12165065854787827, 0.0908447653055191, 0.22739766538143158, 0.22108398377895355, -0.2004244476556778, -0.005429570097476244, -0.12746508419513702, -0.48999035358428955, -0.00624355673789978, -0.2272091954946518, 0.04820893704891205, 0.4963739514350891, 0.00847583170980215, 0.251181960105896, -0.41630250215530396, -0.07040863484144211, -0.06711471825838089, 0.23970668017864227, -0.14414143562316895, 0.10626298934221268, -0.35635945200920105, 0.24010200798511505, 0.18146726489067078, -0.08229973912239075, -0.1928405463695526, -0.04284859076142311, 0.08996022492647171, -0.10898414999246597, -0.10321062803268433, 0.11385723203420639, -0.33744725584983826, 0.20831988751888275, -0.07860981673002243, -0.2579829692840576, -0.07070255279541016, 0.11313726752996445, 0.3347426950931549, 0.11825215071439743, -0.04599976912140846, 0.026978280395269394, -0.1461840122938156, -0.11019545048475266, -0.12079276144504547, 0.017920449376106262, 0.39859384298324585, -0.043619655072689056, -0.1536276489496231, -0.1378530114889145, -0.16108901798725128, -0.3899531960487366, 0.22218771278858185, 0.26926931738853455, 0.019464926794171333, -0.3705272972583771, -0.16618411242961884, -0.1647804081439972, -0.009350513108074665, -0.31885403394699097, 0.22188700735569, 0.03843701630830765, 0.12192488461732864, -0.12557198107242584, 0.09379183501005173, -0.2520392835140228, -0.16908589005470276, 0.44611942768096924, -0.07798474282026291, -0.2117663472890854, 0.35495513677597046, 0.2120809108018875, -0.2056414633989334, -0.3354315161705017, -0.18599185347557068, 0.5038391351699829, -0.35649287700653076, 0.17704077064990997, 0.08899810910224915, 0.07692304253578186, 0.1272776871919632, 0.22132517397403717, 0.31849566102027893, 0.15132714807987213, 0.02639477141201496, -0.48744332790374756, -0.15247614681720734, 0.011436119675636292, 0.21438506245613098, 0.2861050069332123, 0.02895638905465603, -0.2082994431257248, 0.1644986867904663, -0.07605382800102234, -0.4262959361076355, 0.12940935790538788, -0.25079989433288574, -0.138410747051239, 0.24917936325073242, -0.13347911834716797, 0.33384695649147034, -0.078001469373703, 0.27054035663604736, -0.06174026429653168, -0.25885429978370667, -0.3370407521724701, 0.001888939761556685, 0.04170632362365723, 0.06838655471801758, -0.10416203737258911, 0.05779571458697319, -0.35265958309173584, -0.2597079277038574, -0.0926375761628151, 0.27064359188079834, 0.15495909750461578, 0.060242634266614914, 0.042195938527584076, 0.5218937993049622, 0.1841598004102707, -0.03631136938929558, -0.0016439092578366399, 0.02628636546432972, -0.014833901077508926, -0.08964327722787857, -0.03758050873875618, 0.02974756807088852, 0.002231990685686469, -0.0302582997828722, 0.13413366675376892, 0.35972627997398376, 0.21018514037132263, -0.07408824563026428, -0.2564712166786194, -0.31082579493522644, 0.24449454247951508, 0.18877026438713074, 0.47145965695381165, -0.19258376955986023, -0.19583533704280853, 0.044338203966617584, 0.3387637436389923, -0.3943132758140564, -0.14405986666679382, 0.14410242438316345, -0.2402672916650772, 0.0178575087338686, -0.05359458923339844, 0.4011630415916443, -0.32991823554039, -0.08981598168611526, -0.011423647403717041, 0.29084762930870056, -0.25299352407455444, 0.04148780554533005, 0.28481924533843994, -0.2127801924943924, -0.0025831270031630993, 0.20524102449417114, 0.1509321630001068, 0.262564092874527, 0.5245814919471741, 0.27273568511009216, 0.265036940574646, 0.1842660754919052, 0.1444236785173416, -0.24889224767684937, -0.3781558573246002, 0.32788950204849243, 0.5802581906318665, -0.06438025832176208, 0.09719379991292953, -0.10547854751348495, 0.42122402787208557, -0.24781076610088348, 0.26806071400642395, -0.35481223464012146, 0.03281591087579727, -0.2199150174856186, 0.07900715619325638, 0.20934489369392395, -0.26465925574302673, -0.11753271520137787, -0.03461189940571785, -0.08614658564329147, -0.13173870742321014, -0.152456596493721, 0.02699529565870762, -0.015963422134518623, -0.2330188751220703, -0.07401616871356964, 0.20795415341854095, -0.343288779258728, -0.20181205868721008, 0.20628713071346283, 0.12341547757387161, -0.03834094852209091, 0.1505245715379715, 0.32574331760406494, 0.13995249569416046, 0.08890791237354279, 0.21533739566802979, -0.08174633234739304, 0.3143869638442993, -0.01820104755461216, -0.3291139006614685, 0.22903890907764435, 0.25190579891204834, 0.09906194359064102, 0.07728362828493118, 0.30466485023498535, -0.2672373950481415, -0.006225876044481993, 0.13469167053699493, -0.01626891829073429, -0.015141358599066734, -0.04774060100317001, 0.006997469812631607, 0.006725050043314695, -0.10791561007499695, -0.07281129062175751, -0.34377530217170715, -0.1549910604953766, 0.5259606242179871, -0.1087755337357521, 0.21700549125671387, 0.2390889823436737, 0.1652391105890274, -0.25369614362716675, 0.4392161965370178, 0.3335678279399872, -0.03666084259748459, -0.1346842646598816, -0.06654565781354904, -0.6467063426971436, 0.3715363144874573, 0.21350856125354767, 0.1770876795053482, 0.1901521384716034, 0.026296304538846016, 0.3695494532585144, -0.0352865494787693, -0.00616338849067688, 0.05129101872444153, -0.014393762685358524, -0.17078085243701935, -0.5144212245941162, 0.11863677203655243, 0.13167963922023773, 0.119950070977211, 0.02632001042366028, -0.1402367353439331, 0.05083118751645088, 0.07547197490930557, 0.1825868934392929, -0.4125029146671295, -0.29651689529418945, -0.198612242937088, -0.021021908149123192, 0.276028573513031, -0.11928656697273254, 0.6440917253494263, -0.2399464249610901, -0.14305387437343597, -0.108550526201725, -0.26707276701927185, 0.14105834066867828, 0.2030055820941925, 0.27954187989234924, -0.1680869162082672, -0.10741504281759262, 0.058588966727256775, -0.1337757706642151, 0.06895788013935089, -0.0986996665596962, -0.13488371670246124, -0.3730708956718445, 0.25428131222724915, -0.014028077945113182, -0.15078003704547882, 0.015096745453774929, 0.12736308574676514, 0.01240763533860445, 0.015886301174759865, 0.05588093027472496, -0.07161614298820496, 0.43220269680023193, -0.2107408195734024, -0.44894376397132874, -0.12262597680091858, 0.1586548089981079, -0.12589898705482483, 0.12694604694843292, -0.16454856097698212, 0.3853066861629486, 0.08285646140575409, 0.04498393461108208, -0.3717867434024811, 0.19694918394088745, -0.14496451616287231, 0.168251171708107, -0.030681969597935677, 0.28911641240119934, 0.2346961945295334, -0.3687785565853119, -0.21721522510051727, -0.1677694171667099 ]
https://github.com/huggingface/datasets/issues/5374
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
The data files are hosted on HF at https://huggingface.co/datasets/allenai/c4/tree/main You have 200 runs streaming the same files in parallel. So this is probably a Hub limitation. Maybe rate limiting ? cc @julien-c Maybe you can also try to reduce the number of HTTP requests by increasing the block size of each request. This can be done by increasing `DEFAULT_BLOCK_SIZE` in `fsspec.implementations.http`. Default is `5 * 2**20` (5MiB) Anyway maybe it's just better to save the dataset locally in that case ?
### Describe the bug `streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐 The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200. Possibly related: - https://github.com/huggingface/datasets/pull/3100 - https://github.com/huggingface/datasets/pull/3050 ### Steps to reproduce the bug Running ```python c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start) df = pd.DataFrame(c4, index=None) ``` with different start & end arguments on 200 CPUs in parallel yields: ``` WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4. WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │ │ _c4.py:68 in <module> │ │ │ │ 65 │ model.eval() │ │ 66 │ │ │ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │ │ ❱ 68 │ df = pd.DataFrame(c4, index=None) │ │ 69 │ texts = df["text"].to_list() │ │ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │ │ y:684 in __init__ │ │ │ │ 681 │ │ # For data is list-like, or Iterable (will consume into list │ │ 682 │ │ elif is_list_like(data): │ │ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │ │ ❱ 684 │ │ │ │ data = list(data) │ │ 685 │ │ │ if len(data) > 0: │ │ 686 │ │ │ │ if is_dataclass(data[0]): │ │ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │ │ │ │ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │ │ 749 │ │ │ 750 │ def __iter__(self): │ │ ❱ 751 │ │ for key, example in self._iter(): │ │ 752 │ │ │ if self.features: │ │ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │ │ 754 │ │ │ │ # This is done with `_apply_feature_types`. │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │ │ │ │ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │ │ 739 │ │ else: │ │ 740 │ │ │ ex_iterable = self._ex_iterable │ │ ❱ 741 │ │ yield from ex_iterable │ │ 742 │ │ │ 743 │ def _iter_shard(self, shard_idx: int): │ │ 744 │ │ if self._shuffling: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │ │ │ │ 614 │ │ self.n = n │ │ 615 │ │ │ 616 │ def __iter__(self): │ │ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │ │ 618 │ │ │ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │ │ │ │ 591 │ │ │ 592 │ def __iter__(self): │ │ 593 │ │ #ex_iterator = iter(self.ex_iterable) │ │ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │ │ 595 │ │ #for _ in range(self.n): │ │ 596 │ │ # next(ex_iterator) │ │ 597 │ │ #yield from islice(ex_iterator, self.n, None) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │ │ │ │ 103 │ │ self.kwargs = kwargs │ │ 104 │ │ │ 105 │ def __iter__(self): │ │ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │ │ 107 │ │ │ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │ │ │ │ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │ │ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │ │ _generate_examples │ │ │ │ 86 │ │ for filepath in filepaths: │ │ 87 │ │ │ logger.info("generating examples from = %s", filepath) │ │ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │ │ ❱ 89 │ │ │ │ for line in f: │ │ 90 │ │ │ │ │ if line: │ │ 91 │ │ │ │ │ │ example = json.loads(line) │ │ 92 │ │ │ │ │ │ yield id_, example │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │ │ │ │ 310 │ │ │ │ 311 │ │ if size < 0: │ │ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │ │ ❱ 313 │ │ return self._buffer.read1(size) │ │ 314 │ │ │ 315 │ def peek(self, n): │ │ 316 │ │ self._check_not_closed() │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │ │ │ │ 65 │ │ │ 66 │ def readinto(self, b): │ │ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │ │ ❱ 68 │ │ │ data = self.read(len(byte_view)) │ │ 69 │ │ │ byte_view[:len(data)] = data │ │ 70 │ │ return len(data) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │ │ │ │ 490 │ │ │ │ self._new_member = False │ │ 491 │ │ │ │ │ 492 │ │ │ # Read a chunk of data from the file │ │ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │ │ 494 │ │ │ │ │ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │ │ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │ │ │ │ 93 │ │ │ read = self._read │ │ 94 │ │ │ self._read = None │ │ 95 │ │ │ return self._buffer[read:] + \ │ │ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │ │ 97 │ │ │ 98 │ def prepend(self, prepend=b''): │ │ 99 │ │ if self._read is None: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │ │ 365 in read_with_retries │ │ │ │ 362 │ │ │ │ ) │ │ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │ │ 364 │ │ else: │ │ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │ │ 366 │ │ return out │ │ 367 │ │ │ 368 │ file_obj.read = read_with_retries │ ╰──────────────────────────────────────────────────────────────────────────────╯ ConnectionError: Server Disconnected ``` ### Expected behavior There should be no disconnect I think. ### Environment info ``` datasets=2.7.0 Python 3.9.12 ```
81
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
[ -0.3806016147136688, -0.32525283098220825, -0.20978423953056335, 0.19854821264743805, -0.027557121589779854, -0.31166669726371765, 0.20527470111846924, -0.06316015124320984, 0.06631922721862793, 0.27808794379234314, 0.10560974478721619, -0.02496887743473053, 0.1686362475156784, -0.10458805412054062, -0.37757906317710876, 0.13817302882671356, 0.09359857439994812, -0.06981568783521652, -0.17918774485588074, -0.13179364800453186, 0.04165147989988327, 0.16627906262874603, 0.19916518032550812, -0.15121357142925262, -0.25269728899002075, -0.1624060869216919, 0.1137022152543068, 0.3129114806652069, 0.19987808167934418, -0.09860803186893463, -0.07413506507873535, 0.10355524718761444, -0.1970507800579071, 0.1339089721441269, -0.00009616801980882883, -0.05888611450791359, -0.04433506354689598, 0.10824929177761078, -0.20660044252872467, 0.46095287799835205, 0.08917921036481857, -0.15139442682266235, 0.3459666073322296, -0.07130404561758041, -0.0493890680372715, 0.0983872339129448, 0.1595781445503235, 0.19089917838573456, 0.6785468459129333, 0.17237968742847443, 0.3211100101470947, 0.391269326210022, -0.20283493399620056, -0.06828092783689499, -0.08723878115415573, -0.3377397358417511, 0.05877739563584328, 0.5422684550285339, 0.6026566028594971, 0.10901042819023132, -0.19700774550437927, 0.11004171520471573, 0.014521192759275436, 0.27680671215057373, -0.36123043298721313, -0.009443145245313644, -0.17940165102481842, -0.13550817966461182, 0.1573604941368103, -0.07220578193664551, -0.05033241584897041, 0.29183247685432434, 0.21124430000782013, -0.11259775608778, -0.12495506554841995, -0.0750284194946289, 0.06782173365354538, -0.21807730197906494, -0.13160695135593414, 0.046759795397520065, 0.17950405180454254, -0.05765969678759575, -0.061435382813215256, -0.12875396013259888, 0.1527923047542572, -0.07436566054821014, 0.0014020622475072742, 0.29968199133872986, -0.14625218510627747, 0.1389325112104416, 0.035455282777547836, 0.13488616049289703, -0.11234184354543686, -0.5269811153411865, -0.2108526974916458, 0.003174310317263007, 0.33495664596557617, 0.01773024909198284, 0.031083213165402412, 0.06970508396625519, 0.13287419080734253, 0.2037937492132187, 0.03653187304735184, -0.20606780052185059, 0.0970725566148758, -0.45183852314949036, -0.2643902003765106, -0.31545963883399963, 0.13737007975578308, 0.008711225353181362, -0.3459934890270233, -0.08069805800914764, 0.24341528117656708, -0.3350318670272827, 0.07615164667367935, -0.035440754145383835, 0.21577194333076477, -0.05515218898653984, -0.06895514577627182, 0.29234129190444946, -0.15857961773872375, 0.2649507522583008, -0.050934188067913055, 0.03475874289870262, -0.08681588619947433, 0.2650652229785919, 0.09663595259189606, -0.09996911138296127, -0.4534294605255127, -0.21897941827774048, -0.3616369664669037, -0.20612572133541107, -0.0030545759946107864, -0.2159239798784256, 0.12234725803136826, -0.01965663582086563, 0.06848175823688507, 0.24329347908496857, 0.11164046078920364, -0.26622551679611206, -0.09186940640211105, -0.06287980824708939, -0.026541421189904213, 0.039933621883392334, 0.024679210036993027, 0.020222140476107597, 0.05357576906681061, 0.2589683532714844, 0.21765461564064026, -0.3047844469547272, -0.06713543087244034, -0.18210634589195251, -0.1205822080373764, 0.29297536611557007, 0.4040898382663727, 0.028256632387638092, 0.2928023338317871, -0.07803919166326523, -0.06102051958441734, -0.04307631403207779, 0.06827770918607712, -0.32071325182914734, -0.16410794854164124, 0.0001443501387257129, -0.19920946657657623, 0.39177000522613525, -0.01590968854725361, 0.12920744717121124, 0.3272266089916229, -0.10404535382986069, 0.2431534230709076, 0.35670724511146545, -0.14936085045337677, 0.16033336520195007, -0.10543794184923172, 0.01032027043402195, -0.05445550009608269, -0.23375308513641357, -0.3792043924331665, 0.40526264905929565, -0.3367913067340851, -0.13046886026859283, 0.19259221851825714, -0.051056213676929474, 0.4433754086494446, 0.0008959569386206567, 0.43871527910232544, -0.018904825672507286, -0.20523503422737122, -0.11712699383497238, -0.2720576822757721, -0.13015982508659363, -0.35166051983833313, 0.33967533707618713, 0.21433000266551971, -0.11113174259662628, 0.24728526175022125, -0.41201499104499817, 0.43318918347358704, -0.04880983754992485, 0.04401455819606781, 0.09870479255914688, 0.06205201521515846, 0.0843934491276741, -0.0976792573928833, 0.22766338288784027, -0.22423462569713593, 0.1119106262922287, 0.39414334297180176, 0.30043908953666687, 0.136640727519989, 0.2343439906835556, 0.07806486636400223, 0.1344422698020935, -0.12540625035762787, 0.16606301069259644, 0.29065388441085815, 0.07707084715366364, -0.33240702748298645, -0.09753308445215225, 0.1097780168056488, 0.5630267262458801, -0.12813431024551392, 0.045586295425891876, -0.18884103000164032, 0.11632940918207169, -0.13682100176811218, -0.28798505663871765, 0.13192462921142578, -0.057562194764614105, 0.17727233469486237, 0.08343738317489624, 0.033592160791158676, -0.03239722549915314, -0.012699327431619167, 0.07000340521335602, 0.1602112352848053, -0.008876443840563297, 0.07439520955085754, 0.058151546865701675, 0.03125743940472603, 0.06180400028824806, 0.1915321946144104, -0.05651877075433731, 0.2396460324525833, 0.06186804175376892, 0.017527280375361443, 0.09568972885608673, -0.10150744020938873, 0.005106077063828707, 0.3661395311355591, -0.09430573880672455, 0.08091367781162262, 0.14404143393039703, 0.41313132643699646, 0.2732672691345215, 0.006838317960500717, -0.22427569329738617, -0.5318171977996826, 0.4029710292816162, -0.10855530202388763, -0.017760932445526123, -0.023388078436255455, -0.07420923560857773, 0.20280586183071136, -0.23675762116909027, 0.14370709657669067, 0.06861041486263275, 0.23870112001895905, 0.24801005423069, 0.20310038328170776, 0.07981754094362259, -0.1093093678355217, -0.31498441100120544, -0.048109035938978195, 0.03932138904929161, 0.12875519692897797, 0.23625032603740692, 0.15912912786006927, -0.2793866693973541, -0.2364913374185562, -0.5303714275360107, -0.114750936627388, 0.10853952914476395, -0.08760982751846313, 0.15721267461776733, -0.2181025594472885, 0.09236020594835281, -0.06016096472740173, 0.13945768773555756, -0.011036834679543972, -0.37515801191329956, 0.13188619911670685, 0.27921274304389954, -0.3378038704395294, 0.02607908472418785, 0.06793580949306488, -0.05396946519613266, 0.15203535556793213, 0.3892182409763336, 0.044308852404356, -0.2586921155452728, -0.1744392067193985, 0.19354918599128723, -0.20475079119205475, 0.09652538597583771, 0.4945565164089203, -0.01115698553621769, -0.1593770831823349, -0.18524521589279175, 0.2661237418651581, 0.05118146166205406, 0.22291876375675201, 0.16079623997211456, 0.11861536651849747, 0.2535725235939026, 0.046755921095609665, -0.06659690290689468, 0.06722299009561539, -0.1201063022017479, 0.17051783204078674, 0.04142611101269722, -0.34182971715927124, -0.05586585775017738, -0.016447044909000397, -0.24806858599185944, -0.1270502209663391, -0.19042201340198517, 0.2812798023223877, -0.04201420024037361, 0.17396517097949982, 0.07464343309402466, 0.17002519965171814, 0.12623701989650726, 0.09275249391794205, -0.04435510188341141, -0.39093542098999023, -0.3554588556289673, -0.125745952129364, 0.01411596778780222, -0.15510673820972443, 0.12021441757678986, 0.03364099562168121, 0.19309553503990173, 0.007936554029583931, -0.44626328349113464, -0.04908210411667824, -0.03383550047874451, 0.18309342861175537, -0.33932074904441833, -0.017115019261837006, 0.30258238315582275, -0.09505760669708252, -0.2726387083530426, 0.14146491885185242, 0.1495104283094406, 0.36019039154052734, 0.15359511971473694, -0.04113258048892021, -0.21765103936195374, 0.6475549340248108, -0.013491842895746231, 0.33449503779411316, -0.07391313463449478, 0.12017452716827393, 0.14702549576759338, -0.14913634955883026, -0.04025060683488846, -0.151533842086792, -0.0976502001285553, 0.3071572482585907, -0.07768452167510986, -0.4458622634410858, 0.12814177572727203, -0.1781955063343048, -0.02511831745505333, -0.05391469970345497, -0.40672656893730164, -0.07307680696249008, -0.33919039368629456, 0.1301576942205429, 0.03463372215628624, -0.1083810031414032, 0.21359123289585114, -0.03299637883901596, -0.09014610201120377, 0.09001068025827408, -0.21923470497131348, -0.16750149428844452, -0.02388681285083294, -0.15971557796001434, -0.11592578887939453, 0.17093871533870697, -0.7584660053253174, 0.14216667413711548, -0.08010917901992798, 0.4029329717159271, -0.08805887401103973, -0.021514486521482468, 0.15477123856544495, -0.3094361126422882, 0.3313550353050232, -0.1347036063671112, 0.37443265318870544, 0.05627058446407318, -0.022321578115224838, -0.05135343596339226, -0.08514970541000366, -0.14132602512836456, -0.15137873589992523, 0.2677975594997406, -0.2194223701953888, -0.13661667704582214, 0.13360309600830078, 0.12787289917469025, -0.11506807804107666, -0.04935801029205322, 0.024933381006121635, -0.035246841609478, -0.32877448201179504, -0.2871609628200531, 0.12916727364063263, 0.015377005562186241, -0.018633954226970673, -0.0704658031463623, -0.22243380546569824, 0.09526318311691284, 0.22004304826259613, -0.10243476182222366, -0.1035623848438263, -0.3316592574119568, -0.2995378077030182, 0.22283028066158295, -0.09949769079685211, 0.30577120184898376, 0.054820466786623, -0.011785815469920635, 0.13065609335899353, 0.08930178731679916, 0.16088823974132538, -0.04619027301669121, 0.10392481088638306, 0.3626703917980194, 0.23412054777145386, 0.22954900562763214, 0.2609115540981293, 0.6117308735847473, 0.05066516622900963, 0.39666134119033813, -0.004285312257707119, -0.14717411994934082, -0.13801197707653046, 0.20657093822956085, -0.015318535268306732, -0.21720974147319794, 0.00524225365370512, 0.3199799358844757, -0.18163712322711945, -0.021264808252453804, 0.19712863862514496, -0.07783866673707962, 0.5948537588119507, 0.24910534918308258, 0.026424309238791466, 0.3590059280395508, -0.6971374154090881, 0.23226569592952728, -0.15168263018131256, 0.18857018649578094, -0.16310001909732819, 0.052436813712120056, 0.09891527146100998, 0.02301250956952572, -0.1306803971529007, -0.015911705791950226, 0.0030266738031059504, 0.07257898896932602, 0.011608054861426353, 0.25473088026046753, -0.2370532900094986, 0.1618858277797699, -0.06320688128471375, -0.2887256443500519, 0.001991339260712266, 0.3124004304409027, -0.23695407807826996, -0.3306705355644226, -0.35819166898727417, 0.08490195125341415, 0.23811101913452148, -0.20535707473754883, 0.024761125445365906, -0.08642371743917465, -0.15200333297252655, 0.09708475321531296, 0.02427465096116066, -0.18078941106796265, -0.3575174808502197, -0.3273407816886902, -0.05123761296272278, -0.14357109367847443, -0.007401739247143269, 0.19401220977306366, -0.06299343705177307, 0.0056318799033761024, 0.0002219184098066762, -0.274915874004364, -0.13739314675331116, -0.10059022158384323, -0.3308408260345459, -0.16380631923675537, 0.025999976322054863, -0.3238352835178375, 0.0930933877825737, 0.2702464461326599, -0.2591007649898529, -0.07019228488206863, 0.04361186921596527, 0.32166045904159546, -0.08716864883899689, -0.3005562722682953, 0.24622231721878052, 0.09977205842733383, -0.06303776800632477, 0.32683035731315613, -0.20850329101085663, 0.03901892155408859, -0.3029005229473114, 0.30386894941329956, -0.09010419249534607, -0.13121336698532104, 0.16323046386241913, 0.5049746036529541, -0.2276410460472107, -0.3797547519207001, -0.034636903554201126, 0.15760298073291779, -0.3848697245121002, 0.18628159165382385, -0.133126899600029, -0.08347903937101364, 0.2094770073890686, 0.16418921947479248, -0.08061587810516357, -0.02436988428235054, 0.29632842540740967, -0.07458434998989105, -0.31136375665664673, -0.08444955199956894, -0.1683218628168106, -0.007237303536385298, 0.19323283433914185, 0.2638923227787018, -0.024688806384801865, -0.07526883482933044, -0.4372938573360443, 0.17790095508098602, -0.3461795151233673, 0.10550007224082947, -0.11121945083141327, -0.5434498190879822, 0.20764926075935364, 0.17109128832817078, 0.29268938302993774, 0.2785819470882416, -0.14294901490211487, -0.3397570550441742, -0.16074104607105255, 0.02305823192000389, 0.015099439769983292, -0.19444435834884644, -0.07596946507692337, -0.16315141320228577, -0.07674792408943176, 0.1009918600320816, 0.09896937757730484, 0.19593851268291473, -0.03512273356318474, -0.40739738941192627, 0.14455506205558777, 0.3205989897251129, 0.09753070771694183, 0.09698484092950821, 0.2866121530532837, 0.4874833822250366, -0.2085604965686798, -0.1349649429321289, -0.04627784341573715, -0.10949012637138367, 0.04811054840683937, 0.29508137702941895, 0.36891987919807434, -0.21608538925647736, 0.19095905125141144, -0.07613672316074371, -0.3241201937198639, 0.12248517572879791, 0.46005943417549133, 0.3530990779399872, -0.027232063934206963, -0.2306606024503708, -0.023130500689148903, 0.3285297453403473, 0.07346498221158981, -0.17998352646827698, 0.27147677540779114, -0.02855488657951355, 0.21250486373901367, 0.15248286724090576, -0.07571553438901901, -0.4897534251213074, 0.04773201420903206, 0.2655690014362335, 0.0372072197496891, -0.5541717410087585, -0.4267132580280304, -0.3831143081188202, 0.010151740163564682, -0.1193467453122139, 0.1416543871164322, 0.05603833869099617, 0.4891684353351593, 0.5090487599372864, 0.14170534908771515, -0.04129632189869881, 0.3514167368412018, 0.21225585043430328, 0.08648715913295746, -0.28136003017425537, -0.237855926156044, 0.03122982569038868, -0.47149163484573364, -0.016298597678542137, -0.11814341694116592, -0.33386287093162537, -0.09684734791517258, -0.014880098402500153, -0.4049619734287262, 0.3382035791873932, -0.26654887199401855, 0.030519867315888405, 0.09253697097301483, -0.037141453474760056, -0.010328331030905247, 0.22147640585899353, -0.016167784109711647, 0.19708622992038727, -0.015883708372712135, 0.013381168246269226, -0.049967411905527115, -0.03913209214806557, -0.20836172997951508, -0.18287111818790436, -0.12774217128753662, -0.14805082976818085, -0.0490780770778656, 0.38206884264945984, 0.05593695119023323, -0.10539431869983673, 0.07201649993658066, 0.3345834016799927, -0.12059099227190018, -0.043877631425857544, 0.20177529752254486, 0.21500933170318604, 0.08122586458921432, -0.26801615953445435, 0.12570811808109283, 0.24914748966693878, 0.4553883373737335, 0.3226674497127533, 0.2463301569223404, -0.3184179663658142, 0.021364623680710793, 0.12340165674686432, -0.0748443454504013, 0.015772826969623566, -0.03134927526116371, -0.03315948694944382, -0.05708998814225197, -0.18118120729923248, 0.1773402988910675, -0.442730188369751, 0.02227451279759407, 0.13299968838691711, -0.18738271296024323, 0.21301034092903137, -0.12926813960075378, 0.15268780291080475, -0.5985479950904846, 0.47939029335975647, -0.11724784225225449, 0.08218608051538467, -0.28048017621040344, -0.18599830567836761, -0.056220561265945435, 0.08007928729057312, -0.06339720636606216, -0.05965091660618782, -0.2760508060455322, 0.2565935254096985, 0.08798057585954666, -0.0010437684832140803, 0.029384339228272438, -0.1166377142071724, 0.20788642764091492, 0.22392436861991882, 0.009538134559988976, 0.027863875031471252, 0.1855924129486084, -0.25347450375556946, 0.14836867153644562, -0.07098143547773361, 0.45657703280448914, -0.15235070884227753, 0.35921603441238403, -0.005099912639707327, -0.3785834312438965, 0.010336875915527344, 0.028163012117147446, 0.21164852380752563, 0.2874480187892914, 0.03981531038880348, -0.09627389162778854, -0.18169847130775452, -0.06629722565412521, -0.2015896588563919, 0.0986824482679367, -0.1557731181383133, 0.034808188676834106, 0.22385573387145996, 0.07054860144853592, 0.46446114778518677, -0.013314821757376194, -0.08950473368167877, 0.04462241381406784, 0.3183930516242981, -0.02859308011829853, 0.19501493871212006, 0.12419077008962631, 0.3218855559825897, -0.018952542915940285, 0.3328471779823303, 0.18833154439926147, -0.020708832889795303, -0.34946268796920776, -0.077494777739048, 0.045230597257614136, 0.23114487528800964, -0.433676153421402, -0.36997082829475403, 0.39501169323921204, -0.07737575471401215, 0.19359448552131653, -0.052408576011657715, -0.10917601734399796, 0.03559467941522598, -0.12563960254192352, -0.37593764066696167, 0.3117985725402832, 0.30491530895233154, -0.21159185469150543, 0.15493080019950867, 0.1306091696023941, 0.17913658916950226, -0.15109381079673767, 0.009544538334012032, 0.011103964410722256 ]
https://github.com/huggingface/datasets/issues/5374
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
you don't get an HTTP error code or something in your stack trace? Kinda hard to debug with this info
### Describe the bug `streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐 The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200. Possibly related: - https://github.com/huggingface/datasets/pull/3100 - https://github.com/huggingface/datasets/pull/3050 ### Steps to reproduce the bug Running ```python c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start) df = pd.DataFrame(c4, index=None) ``` with different start & end arguments on 200 CPUs in parallel yields: ``` WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4. WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │ │ _c4.py:68 in <module> │ │ │ │ 65 │ model.eval() │ │ 66 │ │ │ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │ │ ❱ 68 │ df = pd.DataFrame(c4, index=None) │ │ 69 │ texts = df["text"].to_list() │ │ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │ │ y:684 in __init__ │ │ │ │ 681 │ │ # For data is list-like, or Iterable (will consume into list │ │ 682 │ │ elif is_list_like(data): │ │ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │ │ ❱ 684 │ │ │ │ data = list(data) │ │ 685 │ │ │ if len(data) > 0: │ │ 686 │ │ │ │ if is_dataclass(data[0]): │ │ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │ │ │ │ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │ │ 749 │ │ │ 750 │ def __iter__(self): │ │ ❱ 751 │ │ for key, example in self._iter(): │ │ 752 │ │ │ if self.features: │ │ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │ │ 754 │ │ │ │ # This is done with `_apply_feature_types`. │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │ │ │ │ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │ │ 739 │ │ else: │ │ 740 │ │ │ ex_iterable = self._ex_iterable │ │ ❱ 741 │ │ yield from ex_iterable │ │ 742 │ │ │ 743 │ def _iter_shard(self, shard_idx: int): │ │ 744 │ │ if self._shuffling: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │ │ │ │ 614 │ │ self.n = n │ │ 615 │ │ │ 616 │ def __iter__(self): │ │ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │ │ 618 │ │ │ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │ │ │ │ 591 │ │ │ 592 │ def __iter__(self): │ │ 593 │ │ #ex_iterator = iter(self.ex_iterable) │ │ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │ │ 595 │ │ #for _ in range(self.n): │ │ 596 │ │ # next(ex_iterator) │ │ 597 │ │ #yield from islice(ex_iterator, self.n, None) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │ │ │ │ 103 │ │ self.kwargs = kwargs │ │ 104 │ │ │ 105 │ def __iter__(self): │ │ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │ │ 107 │ │ │ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │ │ │ │ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │ │ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │ │ _generate_examples │ │ │ │ 86 │ │ for filepath in filepaths: │ │ 87 │ │ │ logger.info("generating examples from = %s", filepath) │ │ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │ │ ❱ 89 │ │ │ │ for line in f: │ │ 90 │ │ │ │ │ if line: │ │ 91 │ │ │ │ │ │ example = json.loads(line) │ │ 92 │ │ │ │ │ │ yield id_, example │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │ │ │ │ 310 │ │ │ │ 311 │ │ if size < 0: │ │ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │ │ ❱ 313 │ │ return self._buffer.read1(size) │ │ 314 │ │ │ 315 │ def peek(self, n): │ │ 316 │ │ self._check_not_closed() │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │ │ │ │ 65 │ │ │ 66 │ def readinto(self, b): │ │ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │ │ ❱ 68 │ │ │ data = self.read(len(byte_view)) │ │ 69 │ │ │ byte_view[:len(data)] = data │ │ 70 │ │ return len(data) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │ │ │ │ 490 │ │ │ │ self._new_member = False │ │ 491 │ │ │ │ │ 492 │ │ │ # Read a chunk of data from the file │ │ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │ │ 494 │ │ │ │ │ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │ │ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │ │ │ │ 93 │ │ │ read = self._read │ │ 94 │ │ │ self._read = None │ │ 95 │ │ │ return self._buffer[read:] + \ │ │ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │ │ 97 │ │ │ 98 │ def prepend(self, prepend=b''): │ │ 99 │ │ if self._read is None: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │ │ 365 in read_with_retries │ │ │ │ 362 │ │ │ │ ) │ │ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │ │ 364 │ │ else: │ │ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │ │ 366 │ │ return out │ │ 367 │ │ │ 368 │ file_obj.read = read_with_retries │ ╰──────────────────────────────────────────────────────────────────────────────╯ ConnectionError: Server Disconnected ``` ### Expected behavior There should be no disconnect I think. ### Environment info ``` datasets=2.7.0 Python 3.9.12 ```
20
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
[ -0.3806016147136688, -0.32525283098220825, -0.20978423953056335, 0.19854821264743805, -0.027557121589779854, -0.31166669726371765, 0.20527470111846924, -0.06316015124320984, 0.06631922721862793, 0.27808794379234314, 0.10560974478721619, -0.02496887743473053, 0.1686362475156784, -0.10458805412054062, -0.37757906317710876, 0.13817302882671356, 0.09359857439994812, -0.06981568783521652, -0.17918774485588074, -0.13179364800453186, 0.04165147989988327, 0.16627906262874603, 0.19916518032550812, -0.15121357142925262, -0.25269728899002075, -0.1624060869216919, 0.1137022152543068, 0.3129114806652069, 0.19987808167934418, -0.09860803186893463, -0.07413506507873535, 0.10355524718761444, -0.1970507800579071, 0.1339089721441269, -0.00009616801980882883, -0.05888611450791359, -0.04433506354689598, 0.10824929177761078, -0.20660044252872467, 0.46095287799835205, 0.08917921036481857, -0.15139442682266235, 0.3459666073322296, -0.07130404561758041, -0.0493890680372715, 0.0983872339129448, 0.1595781445503235, 0.19089917838573456, 0.6785468459129333, 0.17237968742847443, 0.3211100101470947, 0.391269326210022, -0.20283493399620056, -0.06828092783689499, -0.08723878115415573, -0.3377397358417511, 0.05877739563584328, 0.5422684550285339, 0.6026566028594971, 0.10901042819023132, -0.19700774550437927, 0.11004171520471573, 0.014521192759275436, 0.27680671215057373, -0.36123043298721313, -0.009443145245313644, -0.17940165102481842, -0.13550817966461182, 0.1573604941368103, -0.07220578193664551, -0.05033241584897041, 0.29183247685432434, 0.21124430000782013, -0.11259775608778, -0.12495506554841995, -0.0750284194946289, 0.06782173365354538, -0.21807730197906494, -0.13160695135593414, 0.046759795397520065, 0.17950405180454254, -0.05765969678759575, -0.061435382813215256, -0.12875396013259888, 0.1527923047542572, -0.07436566054821014, 0.0014020622475072742, 0.29968199133872986, -0.14625218510627747, 0.1389325112104416, 0.035455282777547836, 0.13488616049289703, -0.11234184354543686, -0.5269811153411865, -0.2108526974916458, 0.003174310317263007, 0.33495664596557617, 0.01773024909198284, 0.031083213165402412, 0.06970508396625519, 0.13287419080734253, 0.2037937492132187, 0.03653187304735184, -0.20606780052185059, 0.0970725566148758, -0.45183852314949036, -0.2643902003765106, -0.31545963883399963, 0.13737007975578308, 0.008711225353181362, -0.3459934890270233, -0.08069805800914764, 0.24341528117656708, -0.3350318670272827, 0.07615164667367935, -0.035440754145383835, 0.21577194333076477, -0.05515218898653984, -0.06895514577627182, 0.29234129190444946, -0.15857961773872375, 0.2649507522583008, -0.050934188067913055, 0.03475874289870262, -0.08681588619947433, 0.2650652229785919, 0.09663595259189606, -0.09996911138296127, -0.4534294605255127, -0.21897941827774048, -0.3616369664669037, -0.20612572133541107, -0.0030545759946107864, -0.2159239798784256, 0.12234725803136826, -0.01965663582086563, 0.06848175823688507, 0.24329347908496857, 0.11164046078920364, -0.26622551679611206, -0.09186940640211105, -0.06287980824708939, -0.026541421189904213, 0.039933621883392334, 0.024679210036993027, 0.020222140476107597, 0.05357576906681061, 0.2589683532714844, 0.21765461564064026, -0.3047844469547272, -0.06713543087244034, -0.18210634589195251, -0.1205822080373764, 0.29297536611557007, 0.4040898382663727, 0.028256632387638092, 0.2928023338317871, -0.07803919166326523, -0.06102051958441734, -0.04307631403207779, 0.06827770918607712, -0.32071325182914734, -0.16410794854164124, 0.0001443501387257129, -0.19920946657657623, 0.39177000522613525, -0.01590968854725361, 0.12920744717121124, 0.3272266089916229, -0.10404535382986069, 0.2431534230709076, 0.35670724511146545, -0.14936085045337677, 0.16033336520195007, -0.10543794184923172, 0.01032027043402195, -0.05445550009608269, -0.23375308513641357, -0.3792043924331665, 0.40526264905929565, -0.3367913067340851, -0.13046886026859283, 0.19259221851825714, -0.051056213676929474, 0.4433754086494446, 0.0008959569386206567, 0.43871527910232544, -0.018904825672507286, -0.20523503422737122, -0.11712699383497238, -0.2720576822757721, -0.13015982508659363, -0.35166051983833313, 0.33967533707618713, 0.21433000266551971, -0.11113174259662628, 0.24728526175022125, -0.41201499104499817, 0.43318918347358704, -0.04880983754992485, 0.04401455819606781, 0.09870479255914688, 0.06205201521515846, 0.0843934491276741, -0.0976792573928833, 0.22766338288784027, -0.22423462569713593, 0.1119106262922287, 0.39414334297180176, 0.30043908953666687, 0.136640727519989, 0.2343439906835556, 0.07806486636400223, 0.1344422698020935, -0.12540625035762787, 0.16606301069259644, 0.29065388441085815, 0.07707084715366364, -0.33240702748298645, -0.09753308445215225, 0.1097780168056488, 0.5630267262458801, -0.12813431024551392, 0.045586295425891876, -0.18884103000164032, 0.11632940918207169, -0.13682100176811218, -0.28798505663871765, 0.13192462921142578, -0.057562194764614105, 0.17727233469486237, 0.08343738317489624, 0.033592160791158676, -0.03239722549915314, -0.012699327431619167, 0.07000340521335602, 0.1602112352848053, -0.008876443840563297, 0.07439520955085754, 0.058151546865701675, 0.03125743940472603, 0.06180400028824806, 0.1915321946144104, -0.05651877075433731, 0.2396460324525833, 0.06186804175376892, 0.017527280375361443, 0.09568972885608673, -0.10150744020938873, 0.005106077063828707, 0.3661395311355591, -0.09430573880672455, 0.08091367781162262, 0.14404143393039703, 0.41313132643699646, 0.2732672691345215, 0.006838317960500717, -0.22427569329738617, -0.5318171977996826, 0.4029710292816162, -0.10855530202388763, -0.017760932445526123, -0.023388078436255455, -0.07420923560857773, 0.20280586183071136, -0.23675762116909027, 0.14370709657669067, 0.06861041486263275, 0.23870112001895905, 0.24801005423069, 0.20310038328170776, 0.07981754094362259, -0.1093093678355217, -0.31498441100120544, -0.048109035938978195, 0.03932138904929161, 0.12875519692897797, 0.23625032603740692, 0.15912912786006927, -0.2793866693973541, -0.2364913374185562, -0.5303714275360107, -0.114750936627388, 0.10853952914476395, -0.08760982751846313, 0.15721267461776733, -0.2181025594472885, 0.09236020594835281, -0.06016096472740173, 0.13945768773555756, -0.011036834679543972, -0.37515801191329956, 0.13188619911670685, 0.27921274304389954, -0.3378038704395294, 0.02607908472418785, 0.06793580949306488, -0.05396946519613266, 0.15203535556793213, 0.3892182409763336, 0.044308852404356, -0.2586921155452728, -0.1744392067193985, 0.19354918599128723, -0.20475079119205475, 0.09652538597583771, 0.4945565164089203, -0.01115698553621769, -0.1593770831823349, -0.18524521589279175, 0.2661237418651581, 0.05118146166205406, 0.22291876375675201, 0.16079623997211456, 0.11861536651849747, 0.2535725235939026, 0.046755921095609665, -0.06659690290689468, 0.06722299009561539, -0.1201063022017479, 0.17051783204078674, 0.04142611101269722, -0.34182971715927124, -0.05586585775017738, -0.016447044909000397, -0.24806858599185944, -0.1270502209663391, -0.19042201340198517, 0.2812798023223877, -0.04201420024037361, 0.17396517097949982, 0.07464343309402466, 0.17002519965171814, 0.12623701989650726, 0.09275249391794205, -0.04435510188341141, -0.39093542098999023, -0.3554588556289673, -0.125745952129364, 0.01411596778780222, -0.15510673820972443, 0.12021441757678986, 0.03364099562168121, 0.19309553503990173, 0.007936554029583931, -0.44626328349113464, -0.04908210411667824, -0.03383550047874451, 0.18309342861175537, -0.33932074904441833, -0.017115019261837006, 0.30258238315582275, -0.09505760669708252, -0.2726387083530426, 0.14146491885185242, 0.1495104283094406, 0.36019039154052734, 0.15359511971473694, -0.04113258048892021, -0.21765103936195374, 0.6475549340248108, -0.013491842895746231, 0.33449503779411316, -0.07391313463449478, 0.12017452716827393, 0.14702549576759338, -0.14913634955883026, -0.04025060683488846, -0.151533842086792, -0.0976502001285553, 0.3071572482585907, -0.07768452167510986, -0.4458622634410858, 0.12814177572727203, -0.1781955063343048, -0.02511831745505333, -0.05391469970345497, -0.40672656893730164, -0.07307680696249008, -0.33919039368629456, 0.1301576942205429, 0.03463372215628624, -0.1083810031414032, 0.21359123289585114, -0.03299637883901596, -0.09014610201120377, 0.09001068025827408, -0.21923470497131348, -0.16750149428844452, -0.02388681285083294, -0.15971557796001434, -0.11592578887939453, 0.17093871533870697, -0.7584660053253174, 0.14216667413711548, -0.08010917901992798, 0.4029329717159271, -0.08805887401103973, -0.021514486521482468, 0.15477123856544495, -0.3094361126422882, 0.3313550353050232, -0.1347036063671112, 0.37443265318870544, 0.05627058446407318, -0.022321578115224838, -0.05135343596339226, -0.08514970541000366, -0.14132602512836456, -0.15137873589992523, 0.2677975594997406, -0.2194223701953888, -0.13661667704582214, 0.13360309600830078, 0.12787289917469025, -0.11506807804107666, -0.04935801029205322, 0.024933381006121635, -0.035246841609478, -0.32877448201179504, -0.2871609628200531, 0.12916727364063263, 0.015377005562186241, -0.018633954226970673, -0.0704658031463623, -0.22243380546569824, 0.09526318311691284, 0.22004304826259613, -0.10243476182222366, -0.1035623848438263, -0.3316592574119568, -0.2995378077030182, 0.22283028066158295, -0.09949769079685211, 0.30577120184898376, 0.054820466786623, -0.011785815469920635, 0.13065609335899353, 0.08930178731679916, 0.16088823974132538, -0.04619027301669121, 0.10392481088638306, 0.3626703917980194, 0.23412054777145386, 0.22954900562763214, 0.2609115540981293, 0.6117308735847473, 0.05066516622900963, 0.39666134119033813, -0.004285312257707119, -0.14717411994934082, -0.13801197707653046, 0.20657093822956085, -0.015318535268306732, -0.21720974147319794, 0.00524225365370512, 0.3199799358844757, -0.18163712322711945, -0.021264808252453804, 0.19712863862514496, -0.07783866673707962, 0.5948537588119507, 0.24910534918308258, 0.026424309238791466, 0.3590059280395508, -0.6971374154090881, 0.23226569592952728, -0.15168263018131256, 0.18857018649578094, -0.16310001909732819, 0.052436813712120056, 0.09891527146100998, 0.02301250956952572, -0.1306803971529007, -0.015911705791950226, 0.0030266738031059504, 0.07257898896932602, 0.011608054861426353, 0.25473088026046753, -0.2370532900094986, 0.1618858277797699, -0.06320688128471375, -0.2887256443500519, 0.001991339260712266, 0.3124004304409027, -0.23695407807826996, -0.3306705355644226, -0.35819166898727417, 0.08490195125341415, 0.23811101913452148, -0.20535707473754883, 0.024761125445365906, -0.08642371743917465, -0.15200333297252655, 0.09708475321531296, 0.02427465096116066, -0.18078941106796265, -0.3575174808502197, -0.3273407816886902, -0.05123761296272278, -0.14357109367847443, -0.007401739247143269, 0.19401220977306366, -0.06299343705177307, 0.0056318799033761024, 0.0002219184098066762, -0.274915874004364, -0.13739314675331116, -0.10059022158384323, -0.3308408260345459, -0.16380631923675537, 0.025999976322054863, -0.3238352835178375, 0.0930933877825737, 0.2702464461326599, -0.2591007649898529, -0.07019228488206863, 0.04361186921596527, 0.32166045904159546, -0.08716864883899689, -0.3005562722682953, 0.24622231721878052, 0.09977205842733383, -0.06303776800632477, 0.32683035731315613, -0.20850329101085663, 0.03901892155408859, -0.3029005229473114, 0.30386894941329956, -0.09010419249534607, -0.13121336698532104, 0.16323046386241913, 0.5049746036529541, -0.2276410460472107, -0.3797547519207001, -0.034636903554201126, 0.15760298073291779, -0.3848697245121002, 0.18628159165382385, -0.133126899600029, -0.08347903937101364, 0.2094770073890686, 0.16418921947479248, -0.08061587810516357, -0.02436988428235054, 0.29632842540740967, -0.07458434998989105, -0.31136375665664673, -0.08444955199956894, -0.1683218628168106, -0.007237303536385298, 0.19323283433914185, 0.2638923227787018, -0.024688806384801865, -0.07526883482933044, -0.4372938573360443, 0.17790095508098602, -0.3461795151233673, 0.10550007224082947, -0.11121945083141327, -0.5434498190879822, 0.20764926075935364, 0.17109128832817078, 0.29268938302993774, 0.2785819470882416, -0.14294901490211487, -0.3397570550441742, -0.16074104607105255, 0.02305823192000389, 0.015099439769983292, -0.19444435834884644, -0.07596946507692337, -0.16315141320228577, -0.07674792408943176, 0.1009918600320816, 0.09896937757730484, 0.19593851268291473, -0.03512273356318474, -0.40739738941192627, 0.14455506205558777, 0.3205989897251129, 0.09753070771694183, 0.09698484092950821, 0.2866121530532837, 0.4874833822250366, -0.2085604965686798, -0.1349649429321289, -0.04627784341573715, -0.10949012637138367, 0.04811054840683937, 0.29508137702941895, 0.36891987919807434, -0.21608538925647736, 0.19095905125141144, -0.07613672316074371, -0.3241201937198639, 0.12248517572879791, 0.46005943417549133, 0.3530990779399872, -0.027232063934206963, -0.2306606024503708, -0.023130500689148903, 0.3285297453403473, 0.07346498221158981, -0.17998352646827698, 0.27147677540779114, -0.02855488657951355, 0.21250486373901367, 0.15248286724090576, -0.07571553438901901, -0.4897534251213074, 0.04773201420903206, 0.2655690014362335, 0.0372072197496891, -0.5541717410087585, -0.4267132580280304, -0.3831143081188202, 0.010151740163564682, -0.1193467453122139, 0.1416543871164322, 0.05603833869099617, 0.4891684353351593, 0.5090487599372864, 0.14170534908771515, -0.04129632189869881, 0.3514167368412018, 0.21225585043430328, 0.08648715913295746, -0.28136003017425537, -0.237855926156044, 0.03122982569038868, -0.47149163484573364, -0.016298597678542137, -0.11814341694116592, -0.33386287093162537, -0.09684734791517258, -0.014880098402500153, -0.4049619734287262, 0.3382035791873932, -0.26654887199401855, 0.030519867315888405, 0.09253697097301483, -0.037141453474760056, -0.010328331030905247, 0.22147640585899353, -0.016167784109711647, 0.19708622992038727, -0.015883708372712135, 0.013381168246269226, -0.049967411905527115, -0.03913209214806557, -0.20836172997951508, -0.18287111818790436, -0.12774217128753662, -0.14805082976818085, -0.0490780770778656, 0.38206884264945984, 0.05593695119023323, -0.10539431869983673, 0.07201649993658066, 0.3345834016799927, -0.12059099227190018, -0.043877631425857544, 0.20177529752254486, 0.21500933170318604, 0.08122586458921432, -0.26801615953445435, 0.12570811808109283, 0.24914748966693878, 0.4553883373737335, 0.3226674497127533, 0.2463301569223404, -0.3184179663658142, 0.021364623680710793, 0.12340165674686432, -0.0748443454504013, 0.015772826969623566, -0.03134927526116371, -0.03315948694944382, -0.05708998814225197, -0.18118120729923248, 0.1773402988910675, -0.442730188369751, 0.02227451279759407, 0.13299968838691711, -0.18738271296024323, 0.21301034092903137, -0.12926813960075378, 0.15268780291080475, -0.5985479950904846, 0.47939029335975647, -0.11724784225225449, 0.08218608051538467, -0.28048017621040344, -0.18599830567836761, -0.056220561265945435, 0.08007928729057312, -0.06339720636606216, -0.05965091660618782, -0.2760508060455322, 0.2565935254096985, 0.08798057585954666, -0.0010437684832140803, 0.029384339228272438, -0.1166377142071724, 0.20788642764091492, 0.22392436861991882, 0.009538134559988976, 0.027863875031471252, 0.1855924129486084, -0.25347450375556946, 0.14836867153644562, -0.07098143547773361, 0.45657703280448914, -0.15235070884227753, 0.35921603441238403, -0.005099912639707327, -0.3785834312438965, 0.010336875915527344, 0.028163012117147446, 0.21164852380752563, 0.2874480187892914, 0.03981531038880348, -0.09627389162778854, -0.18169847130775452, -0.06629722565412521, -0.2015896588563919, 0.0986824482679367, -0.1557731181383133, 0.034808188676834106, 0.22385573387145996, 0.07054860144853592, 0.46446114778518677, -0.013314821757376194, -0.08950473368167877, 0.04462241381406784, 0.3183930516242981, -0.02859308011829853, 0.19501493871212006, 0.12419077008962631, 0.3218855559825897, -0.018952542915940285, 0.3328471779823303, 0.18833154439926147, -0.020708832889795303, -0.34946268796920776, -0.077494777739048, 0.045230597257614136, 0.23114487528800964, -0.433676153421402, -0.36997082829475403, 0.39501169323921204, -0.07737575471401215, 0.19359448552131653, -0.052408576011657715, -0.10917601734399796, 0.03559467941522598, -0.12563960254192352, -0.37593764066696167, 0.3117985725402832, 0.30491530895233154, -0.21159185469150543, 0.15493080019950867, 0.1306091696023941, 0.17913658916950226, -0.15109381079673767, 0.009544538334012032, 0.011103964410722256 ]
https://github.com/huggingface/datasets/issues/5374
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
You could try to re-run using this `datasets` branch: [raise-err-when-disconnect](https://github.com/huggingface/datasets/compare/raise-err-when-disconnect?expand=1) It should raise the fsspec error
### Describe the bug `streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐 The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200. Possibly related: - https://github.com/huggingface/datasets/pull/3100 - https://github.com/huggingface/datasets/pull/3050 ### Steps to reproduce the bug Running ```python c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start) df = pd.DataFrame(c4, index=None) ``` with different start & end arguments on 200 CPUs in parallel yields: ``` WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4. WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │ │ _c4.py:68 in <module> │ │ │ │ 65 │ model.eval() │ │ 66 │ │ │ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │ │ ❱ 68 │ df = pd.DataFrame(c4, index=None) │ │ 69 │ texts = df["text"].to_list() │ │ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │ │ y:684 in __init__ │ │ │ │ 681 │ │ # For data is list-like, or Iterable (will consume into list │ │ 682 │ │ elif is_list_like(data): │ │ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │ │ ❱ 684 │ │ │ │ data = list(data) │ │ 685 │ │ │ if len(data) > 0: │ │ 686 │ │ │ │ if is_dataclass(data[0]): │ │ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │ │ │ │ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │ │ 749 │ │ │ 750 │ def __iter__(self): │ │ ❱ 751 │ │ for key, example in self._iter(): │ │ 752 │ │ │ if self.features: │ │ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │ │ 754 │ │ │ │ # This is done with `_apply_feature_types`. │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │ │ │ │ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │ │ 739 │ │ else: │ │ 740 │ │ │ ex_iterable = self._ex_iterable │ │ ❱ 741 │ │ yield from ex_iterable │ │ 742 │ │ │ 743 │ def _iter_shard(self, shard_idx: int): │ │ 744 │ │ if self._shuffling: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │ │ │ │ 614 │ │ self.n = n │ │ 615 │ │ │ 616 │ def __iter__(self): │ │ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │ │ 618 │ │ │ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │ │ │ │ 591 │ │ │ 592 │ def __iter__(self): │ │ 593 │ │ #ex_iterator = iter(self.ex_iterable) │ │ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │ │ 595 │ │ #for _ in range(self.n): │ │ 596 │ │ # next(ex_iterator) │ │ 597 │ │ #yield from islice(ex_iterator, self.n, None) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │ │ │ │ 103 │ │ self.kwargs = kwargs │ │ 104 │ │ │ 105 │ def __iter__(self): │ │ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │ │ 107 │ │ │ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │ │ │ │ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │ │ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │ │ _generate_examples │ │ │ │ 86 │ │ for filepath in filepaths: │ │ 87 │ │ │ logger.info("generating examples from = %s", filepath) │ │ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │ │ ❱ 89 │ │ │ │ for line in f: │ │ 90 │ │ │ │ │ if line: │ │ 91 │ │ │ │ │ │ example = json.loads(line) │ │ 92 │ │ │ │ │ │ yield id_, example │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │ │ │ │ 310 │ │ │ │ 311 │ │ if size < 0: │ │ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │ │ ❱ 313 │ │ return self._buffer.read1(size) │ │ 314 │ │ │ 315 │ def peek(self, n): │ │ 316 │ │ self._check_not_closed() │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │ │ │ │ 65 │ │ │ 66 │ def readinto(self, b): │ │ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │ │ ❱ 68 │ │ │ data = self.read(len(byte_view)) │ │ 69 │ │ │ byte_view[:len(data)] = data │ │ 70 │ │ return len(data) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │ │ │ │ 490 │ │ │ │ self._new_member = False │ │ 491 │ │ │ │ │ 492 │ │ │ # Read a chunk of data from the file │ │ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │ │ 494 │ │ │ │ │ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │ │ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │ │ │ │ 93 │ │ │ read = self._read │ │ 94 │ │ │ self._read = None │ │ 95 │ │ │ return self._buffer[read:] + \ │ │ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │ │ 97 │ │ │ 98 │ def prepend(self, prepend=b''): │ │ 99 │ │ if self._read is None: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │ │ 365 in read_with_retries │ │ │ │ 362 │ │ │ │ ) │ │ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │ │ 364 │ │ else: │ │ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │ │ 366 │ │ return out │ │ 367 │ │ │ 368 │ file_obj.read = read_with_retries │ ╰──────────────────────────────────────────────────────────────────────────────╯ ConnectionError: Server Disconnected ``` ### Expected behavior There should be no disconnect I think. ### Environment info ``` datasets=2.7.0 Python 3.9.12 ```
16
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
[ -0.3806016147136688, -0.32525283098220825, -0.20978423953056335, 0.19854821264743805, -0.027557121589779854, -0.31166669726371765, 0.20527470111846924, -0.06316015124320984, 0.06631922721862793, 0.27808794379234314, 0.10560974478721619, -0.02496887743473053, 0.1686362475156784, -0.10458805412054062, -0.37757906317710876, 0.13817302882671356, 0.09359857439994812, -0.06981568783521652, -0.17918774485588074, -0.13179364800453186, 0.04165147989988327, 0.16627906262874603, 0.19916518032550812, -0.15121357142925262, -0.25269728899002075, -0.1624060869216919, 0.1137022152543068, 0.3129114806652069, 0.19987808167934418, -0.09860803186893463, -0.07413506507873535, 0.10355524718761444, -0.1970507800579071, 0.1339089721441269, -0.00009616801980882883, -0.05888611450791359, -0.04433506354689598, 0.10824929177761078, -0.20660044252872467, 0.46095287799835205, 0.08917921036481857, -0.15139442682266235, 0.3459666073322296, -0.07130404561758041, -0.0493890680372715, 0.0983872339129448, 0.1595781445503235, 0.19089917838573456, 0.6785468459129333, 0.17237968742847443, 0.3211100101470947, 0.391269326210022, -0.20283493399620056, -0.06828092783689499, -0.08723878115415573, -0.3377397358417511, 0.05877739563584328, 0.5422684550285339, 0.6026566028594971, 0.10901042819023132, -0.19700774550437927, 0.11004171520471573, 0.014521192759275436, 0.27680671215057373, -0.36123043298721313, -0.009443145245313644, -0.17940165102481842, -0.13550817966461182, 0.1573604941368103, -0.07220578193664551, -0.05033241584897041, 0.29183247685432434, 0.21124430000782013, -0.11259775608778, -0.12495506554841995, -0.0750284194946289, 0.06782173365354538, -0.21807730197906494, -0.13160695135593414, 0.046759795397520065, 0.17950405180454254, -0.05765969678759575, -0.061435382813215256, -0.12875396013259888, 0.1527923047542572, -0.07436566054821014, 0.0014020622475072742, 0.29968199133872986, -0.14625218510627747, 0.1389325112104416, 0.035455282777547836, 0.13488616049289703, -0.11234184354543686, -0.5269811153411865, -0.2108526974916458, 0.003174310317263007, 0.33495664596557617, 0.01773024909198284, 0.031083213165402412, 0.06970508396625519, 0.13287419080734253, 0.2037937492132187, 0.03653187304735184, -0.20606780052185059, 0.0970725566148758, -0.45183852314949036, -0.2643902003765106, -0.31545963883399963, 0.13737007975578308, 0.008711225353181362, -0.3459934890270233, -0.08069805800914764, 0.24341528117656708, -0.3350318670272827, 0.07615164667367935, -0.035440754145383835, 0.21577194333076477, -0.05515218898653984, -0.06895514577627182, 0.29234129190444946, -0.15857961773872375, 0.2649507522583008, -0.050934188067913055, 0.03475874289870262, -0.08681588619947433, 0.2650652229785919, 0.09663595259189606, -0.09996911138296127, -0.4534294605255127, -0.21897941827774048, -0.3616369664669037, -0.20612572133541107, -0.0030545759946107864, -0.2159239798784256, 0.12234725803136826, -0.01965663582086563, 0.06848175823688507, 0.24329347908496857, 0.11164046078920364, -0.26622551679611206, -0.09186940640211105, -0.06287980824708939, -0.026541421189904213, 0.039933621883392334, 0.024679210036993027, 0.020222140476107597, 0.05357576906681061, 0.2589683532714844, 0.21765461564064026, -0.3047844469547272, -0.06713543087244034, -0.18210634589195251, -0.1205822080373764, 0.29297536611557007, 0.4040898382663727, 0.028256632387638092, 0.2928023338317871, -0.07803919166326523, -0.06102051958441734, -0.04307631403207779, 0.06827770918607712, -0.32071325182914734, -0.16410794854164124, 0.0001443501387257129, -0.19920946657657623, 0.39177000522613525, -0.01590968854725361, 0.12920744717121124, 0.3272266089916229, -0.10404535382986069, 0.2431534230709076, 0.35670724511146545, -0.14936085045337677, 0.16033336520195007, -0.10543794184923172, 0.01032027043402195, -0.05445550009608269, -0.23375308513641357, -0.3792043924331665, 0.40526264905929565, -0.3367913067340851, -0.13046886026859283, 0.19259221851825714, -0.051056213676929474, 0.4433754086494446, 0.0008959569386206567, 0.43871527910232544, -0.018904825672507286, -0.20523503422737122, -0.11712699383497238, -0.2720576822757721, -0.13015982508659363, -0.35166051983833313, 0.33967533707618713, 0.21433000266551971, -0.11113174259662628, 0.24728526175022125, -0.41201499104499817, 0.43318918347358704, -0.04880983754992485, 0.04401455819606781, 0.09870479255914688, 0.06205201521515846, 0.0843934491276741, -0.0976792573928833, 0.22766338288784027, -0.22423462569713593, 0.1119106262922287, 0.39414334297180176, 0.30043908953666687, 0.136640727519989, 0.2343439906835556, 0.07806486636400223, 0.1344422698020935, -0.12540625035762787, 0.16606301069259644, 0.29065388441085815, 0.07707084715366364, -0.33240702748298645, -0.09753308445215225, 0.1097780168056488, 0.5630267262458801, -0.12813431024551392, 0.045586295425891876, -0.18884103000164032, 0.11632940918207169, -0.13682100176811218, -0.28798505663871765, 0.13192462921142578, -0.057562194764614105, 0.17727233469486237, 0.08343738317489624, 0.033592160791158676, -0.03239722549915314, -0.012699327431619167, 0.07000340521335602, 0.1602112352848053, -0.008876443840563297, 0.07439520955085754, 0.058151546865701675, 0.03125743940472603, 0.06180400028824806, 0.1915321946144104, -0.05651877075433731, 0.2396460324525833, 0.06186804175376892, 0.017527280375361443, 0.09568972885608673, -0.10150744020938873, 0.005106077063828707, 0.3661395311355591, -0.09430573880672455, 0.08091367781162262, 0.14404143393039703, 0.41313132643699646, 0.2732672691345215, 0.006838317960500717, -0.22427569329738617, -0.5318171977996826, 0.4029710292816162, -0.10855530202388763, -0.017760932445526123, -0.023388078436255455, -0.07420923560857773, 0.20280586183071136, -0.23675762116909027, 0.14370709657669067, 0.06861041486263275, 0.23870112001895905, 0.24801005423069, 0.20310038328170776, 0.07981754094362259, -0.1093093678355217, -0.31498441100120544, -0.048109035938978195, 0.03932138904929161, 0.12875519692897797, 0.23625032603740692, 0.15912912786006927, -0.2793866693973541, -0.2364913374185562, -0.5303714275360107, -0.114750936627388, 0.10853952914476395, -0.08760982751846313, 0.15721267461776733, -0.2181025594472885, 0.09236020594835281, -0.06016096472740173, 0.13945768773555756, -0.011036834679543972, -0.37515801191329956, 0.13188619911670685, 0.27921274304389954, -0.3378038704395294, 0.02607908472418785, 0.06793580949306488, -0.05396946519613266, 0.15203535556793213, 0.3892182409763336, 0.044308852404356, -0.2586921155452728, -0.1744392067193985, 0.19354918599128723, -0.20475079119205475, 0.09652538597583771, 0.4945565164089203, -0.01115698553621769, -0.1593770831823349, -0.18524521589279175, 0.2661237418651581, 0.05118146166205406, 0.22291876375675201, 0.16079623997211456, 0.11861536651849747, 0.2535725235939026, 0.046755921095609665, -0.06659690290689468, 0.06722299009561539, -0.1201063022017479, 0.17051783204078674, 0.04142611101269722, -0.34182971715927124, -0.05586585775017738, -0.016447044909000397, -0.24806858599185944, -0.1270502209663391, -0.19042201340198517, 0.2812798023223877, -0.04201420024037361, 0.17396517097949982, 0.07464343309402466, 0.17002519965171814, 0.12623701989650726, 0.09275249391794205, -0.04435510188341141, -0.39093542098999023, -0.3554588556289673, -0.125745952129364, 0.01411596778780222, -0.15510673820972443, 0.12021441757678986, 0.03364099562168121, 0.19309553503990173, 0.007936554029583931, -0.44626328349113464, -0.04908210411667824, -0.03383550047874451, 0.18309342861175537, -0.33932074904441833, -0.017115019261837006, 0.30258238315582275, -0.09505760669708252, -0.2726387083530426, 0.14146491885185242, 0.1495104283094406, 0.36019039154052734, 0.15359511971473694, -0.04113258048892021, -0.21765103936195374, 0.6475549340248108, -0.013491842895746231, 0.33449503779411316, -0.07391313463449478, 0.12017452716827393, 0.14702549576759338, -0.14913634955883026, -0.04025060683488846, -0.151533842086792, -0.0976502001285553, 0.3071572482585907, -0.07768452167510986, -0.4458622634410858, 0.12814177572727203, -0.1781955063343048, -0.02511831745505333, -0.05391469970345497, -0.40672656893730164, -0.07307680696249008, -0.33919039368629456, 0.1301576942205429, 0.03463372215628624, -0.1083810031414032, 0.21359123289585114, -0.03299637883901596, -0.09014610201120377, 0.09001068025827408, -0.21923470497131348, -0.16750149428844452, -0.02388681285083294, -0.15971557796001434, -0.11592578887939453, 0.17093871533870697, -0.7584660053253174, 0.14216667413711548, -0.08010917901992798, 0.4029329717159271, -0.08805887401103973, -0.021514486521482468, 0.15477123856544495, -0.3094361126422882, 0.3313550353050232, -0.1347036063671112, 0.37443265318870544, 0.05627058446407318, -0.022321578115224838, -0.05135343596339226, -0.08514970541000366, -0.14132602512836456, -0.15137873589992523, 0.2677975594997406, -0.2194223701953888, -0.13661667704582214, 0.13360309600830078, 0.12787289917469025, -0.11506807804107666, -0.04935801029205322, 0.024933381006121635, -0.035246841609478, -0.32877448201179504, -0.2871609628200531, 0.12916727364063263, 0.015377005562186241, -0.018633954226970673, -0.0704658031463623, -0.22243380546569824, 0.09526318311691284, 0.22004304826259613, -0.10243476182222366, -0.1035623848438263, -0.3316592574119568, -0.2995378077030182, 0.22283028066158295, -0.09949769079685211, 0.30577120184898376, 0.054820466786623, -0.011785815469920635, 0.13065609335899353, 0.08930178731679916, 0.16088823974132538, -0.04619027301669121, 0.10392481088638306, 0.3626703917980194, 0.23412054777145386, 0.22954900562763214, 0.2609115540981293, 0.6117308735847473, 0.05066516622900963, 0.39666134119033813, -0.004285312257707119, -0.14717411994934082, -0.13801197707653046, 0.20657093822956085, -0.015318535268306732, -0.21720974147319794, 0.00524225365370512, 0.3199799358844757, -0.18163712322711945, -0.021264808252453804, 0.19712863862514496, -0.07783866673707962, 0.5948537588119507, 0.24910534918308258, 0.026424309238791466, 0.3590059280395508, -0.6971374154090881, 0.23226569592952728, -0.15168263018131256, 0.18857018649578094, -0.16310001909732819, 0.052436813712120056, 0.09891527146100998, 0.02301250956952572, -0.1306803971529007, -0.015911705791950226, 0.0030266738031059504, 0.07257898896932602, 0.011608054861426353, 0.25473088026046753, -0.2370532900094986, 0.1618858277797699, -0.06320688128471375, -0.2887256443500519, 0.001991339260712266, 0.3124004304409027, -0.23695407807826996, -0.3306705355644226, -0.35819166898727417, 0.08490195125341415, 0.23811101913452148, -0.20535707473754883, 0.024761125445365906, -0.08642371743917465, -0.15200333297252655, 0.09708475321531296, 0.02427465096116066, -0.18078941106796265, -0.3575174808502197, -0.3273407816886902, -0.05123761296272278, -0.14357109367847443, -0.007401739247143269, 0.19401220977306366, -0.06299343705177307, 0.0056318799033761024, 0.0002219184098066762, -0.274915874004364, -0.13739314675331116, -0.10059022158384323, -0.3308408260345459, -0.16380631923675537, 0.025999976322054863, -0.3238352835178375, 0.0930933877825737, 0.2702464461326599, -0.2591007649898529, -0.07019228488206863, 0.04361186921596527, 0.32166045904159546, -0.08716864883899689, -0.3005562722682953, 0.24622231721878052, 0.09977205842733383, -0.06303776800632477, 0.32683035731315613, -0.20850329101085663, 0.03901892155408859, -0.3029005229473114, 0.30386894941329956, -0.09010419249534607, -0.13121336698532104, 0.16323046386241913, 0.5049746036529541, -0.2276410460472107, -0.3797547519207001, -0.034636903554201126, 0.15760298073291779, -0.3848697245121002, 0.18628159165382385, -0.133126899600029, -0.08347903937101364, 0.2094770073890686, 0.16418921947479248, -0.08061587810516357, -0.02436988428235054, 0.29632842540740967, -0.07458434998989105, -0.31136375665664673, -0.08444955199956894, -0.1683218628168106, -0.007237303536385298, 0.19323283433914185, 0.2638923227787018, -0.024688806384801865, -0.07526883482933044, -0.4372938573360443, 0.17790095508098602, -0.3461795151233673, 0.10550007224082947, -0.11121945083141327, -0.5434498190879822, 0.20764926075935364, 0.17109128832817078, 0.29268938302993774, 0.2785819470882416, -0.14294901490211487, -0.3397570550441742, -0.16074104607105255, 0.02305823192000389, 0.015099439769983292, -0.19444435834884644, -0.07596946507692337, -0.16315141320228577, -0.07674792408943176, 0.1009918600320816, 0.09896937757730484, 0.19593851268291473, -0.03512273356318474, -0.40739738941192627, 0.14455506205558777, 0.3205989897251129, 0.09753070771694183, 0.09698484092950821, 0.2866121530532837, 0.4874833822250366, -0.2085604965686798, -0.1349649429321289, -0.04627784341573715, -0.10949012637138367, 0.04811054840683937, 0.29508137702941895, 0.36891987919807434, -0.21608538925647736, 0.19095905125141144, -0.07613672316074371, -0.3241201937198639, 0.12248517572879791, 0.46005943417549133, 0.3530990779399872, -0.027232063934206963, -0.2306606024503708, -0.023130500689148903, 0.3285297453403473, 0.07346498221158981, -0.17998352646827698, 0.27147677540779114, -0.02855488657951355, 0.21250486373901367, 0.15248286724090576, -0.07571553438901901, -0.4897534251213074, 0.04773201420903206, 0.2655690014362335, 0.0372072197496891, -0.5541717410087585, -0.4267132580280304, -0.3831143081188202, 0.010151740163564682, -0.1193467453122139, 0.1416543871164322, 0.05603833869099617, 0.4891684353351593, 0.5090487599372864, 0.14170534908771515, -0.04129632189869881, 0.3514167368412018, 0.21225585043430328, 0.08648715913295746, -0.28136003017425537, -0.237855926156044, 0.03122982569038868, -0.47149163484573364, -0.016298597678542137, -0.11814341694116592, -0.33386287093162537, -0.09684734791517258, -0.014880098402500153, -0.4049619734287262, 0.3382035791873932, -0.26654887199401855, 0.030519867315888405, 0.09253697097301483, -0.037141453474760056, -0.010328331030905247, 0.22147640585899353, -0.016167784109711647, 0.19708622992038727, -0.015883708372712135, 0.013381168246269226, -0.049967411905527115, -0.03913209214806557, -0.20836172997951508, -0.18287111818790436, -0.12774217128753662, -0.14805082976818085, -0.0490780770778656, 0.38206884264945984, 0.05593695119023323, -0.10539431869983673, 0.07201649993658066, 0.3345834016799927, -0.12059099227190018, -0.043877631425857544, 0.20177529752254486, 0.21500933170318604, 0.08122586458921432, -0.26801615953445435, 0.12570811808109283, 0.24914748966693878, 0.4553883373737335, 0.3226674497127533, 0.2463301569223404, -0.3184179663658142, 0.021364623680710793, 0.12340165674686432, -0.0748443454504013, 0.015772826969623566, -0.03134927526116371, -0.03315948694944382, -0.05708998814225197, -0.18118120729923248, 0.1773402988910675, -0.442730188369751, 0.02227451279759407, 0.13299968838691711, -0.18738271296024323, 0.21301034092903137, -0.12926813960075378, 0.15268780291080475, -0.5985479950904846, 0.47939029335975647, -0.11724784225225449, 0.08218608051538467, -0.28048017621040344, -0.18599830567836761, -0.056220561265945435, 0.08007928729057312, -0.06339720636606216, -0.05965091660618782, -0.2760508060455322, 0.2565935254096985, 0.08798057585954666, -0.0010437684832140803, 0.029384339228272438, -0.1166377142071724, 0.20788642764091492, 0.22392436861991882, 0.009538134559988976, 0.027863875031471252, 0.1855924129486084, -0.25347450375556946, 0.14836867153644562, -0.07098143547773361, 0.45657703280448914, -0.15235070884227753, 0.35921603441238403, -0.005099912639707327, -0.3785834312438965, 0.010336875915527344, 0.028163012117147446, 0.21164852380752563, 0.2874480187892914, 0.03981531038880348, -0.09627389162778854, -0.18169847130775452, -0.06629722565412521, -0.2015896588563919, 0.0986824482679367, -0.1557731181383133, 0.034808188676834106, 0.22385573387145996, 0.07054860144853592, 0.46446114778518677, -0.013314821757376194, -0.08950473368167877, 0.04462241381406784, 0.3183930516242981, -0.02859308011829853, 0.19501493871212006, 0.12419077008962631, 0.3218855559825897, -0.018952542915940285, 0.3328471779823303, 0.18833154439926147, -0.020708832889795303, -0.34946268796920776, -0.077494777739048, 0.045230597257614136, 0.23114487528800964, -0.433676153421402, -0.36997082829475403, 0.39501169323921204, -0.07737575471401215, 0.19359448552131653, -0.052408576011657715, -0.10917601734399796, 0.03559467941522598, -0.12563960254192352, -0.37593764066696167, 0.3117985725402832, 0.30491530895233154, -0.21159185469150543, 0.15493080019950867, 0.1306091696023941, 0.17913658916950226, -0.15109381079673767, 0.009544538334012032, 0.011103964410722256 ]
https://github.com/huggingface/datasets/issues/5374
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
The weird thing is that I already have it saved locally & it seems to indeed be using the cached one 🧐 ; I'm also using offline mode, so I don't think it has something to do with the Hub. ``` WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4. ```
### Describe the bug `streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐 The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200. Possibly related: - https://github.com/huggingface/datasets/pull/3100 - https://github.com/huggingface/datasets/pull/3050 ### Steps to reproduce the bug Running ```python c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start) df = pd.DataFrame(c4, index=None) ``` with different start & end arguments on 200 CPUs in parallel yields: ``` WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4. WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │ │ _c4.py:68 in <module> │ │ │ │ 65 │ model.eval() │ │ 66 │ │ │ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │ │ ❱ 68 │ df = pd.DataFrame(c4, index=None) │ │ 69 │ texts = df["text"].to_list() │ │ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │ │ y:684 in __init__ │ │ │ │ 681 │ │ # For data is list-like, or Iterable (will consume into list │ │ 682 │ │ elif is_list_like(data): │ │ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │ │ ❱ 684 │ │ │ │ data = list(data) │ │ 685 │ │ │ if len(data) > 0: │ │ 686 │ │ │ │ if is_dataclass(data[0]): │ │ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │ │ │ │ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │ │ 749 │ │ │ 750 │ def __iter__(self): │ │ ❱ 751 │ │ for key, example in self._iter(): │ │ 752 │ │ │ if self.features: │ │ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │ │ 754 │ │ │ │ # This is done with `_apply_feature_types`. │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │ │ │ │ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │ │ 739 │ │ else: │ │ 740 │ │ │ ex_iterable = self._ex_iterable │ │ ❱ 741 │ │ yield from ex_iterable │ │ 742 │ │ │ 743 │ def _iter_shard(self, shard_idx: int): │ │ 744 │ │ if self._shuffling: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │ │ │ │ 614 │ │ self.n = n │ │ 615 │ │ │ 616 │ def __iter__(self): │ │ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │ │ 618 │ │ │ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │ │ │ │ 591 │ │ │ 592 │ def __iter__(self): │ │ 593 │ │ #ex_iterator = iter(self.ex_iterable) │ │ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │ │ 595 │ │ #for _ in range(self.n): │ │ 596 │ │ # next(ex_iterator) │ │ 597 │ │ #yield from islice(ex_iterator, self.n, None) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │ │ │ │ 103 │ │ self.kwargs = kwargs │ │ 104 │ │ │ 105 │ def __iter__(self): │ │ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │ │ 107 │ │ │ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │ │ │ │ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │ │ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │ │ _generate_examples │ │ │ │ 86 │ │ for filepath in filepaths: │ │ 87 │ │ │ logger.info("generating examples from = %s", filepath) │ │ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │ │ ❱ 89 │ │ │ │ for line in f: │ │ 90 │ │ │ │ │ if line: │ │ 91 │ │ │ │ │ │ example = json.loads(line) │ │ 92 │ │ │ │ │ │ yield id_, example │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │ │ │ │ 310 │ │ │ │ 311 │ │ if size < 0: │ │ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │ │ ❱ 313 │ │ return self._buffer.read1(size) │ │ 314 │ │ │ 315 │ def peek(self, n): │ │ 316 │ │ self._check_not_closed() │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │ │ │ │ 65 │ │ │ 66 │ def readinto(self, b): │ │ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │ │ ❱ 68 │ │ │ data = self.read(len(byte_view)) │ │ 69 │ │ │ byte_view[:len(data)] = data │ │ 70 │ │ return len(data) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │ │ │ │ 490 │ │ │ │ self._new_member = False │ │ 491 │ │ │ │ │ 492 │ │ │ # Read a chunk of data from the file │ │ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │ │ 494 │ │ │ │ │ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │ │ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │ │ │ │ 93 │ │ │ read = self._read │ │ 94 │ │ │ self._read = None │ │ 95 │ │ │ return self._buffer[read:] + \ │ │ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │ │ 97 │ │ │ 98 │ def prepend(self, prepend=b''): │ │ 99 │ │ if self._read is None: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │ │ 365 in read_with_retries │ │ │ │ 362 │ │ │ │ ) │ │ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │ │ 364 │ │ else: │ │ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │ │ 366 │ │ return out │ │ 367 │ │ │ 368 │ file_obj.read = read_with_retries │ ╰──────────────────────────────────────────────────────────────────────────────╯ ConnectionError: Server Disconnected ``` ### Expected behavior There should be no disconnect I think. ### Environment info ``` datasets=2.7.0 Python 3.9.12 ```
68
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
[ -0.3806016147136688, -0.32525283098220825, -0.20978423953056335, 0.19854821264743805, -0.027557121589779854, -0.31166669726371765, 0.20527470111846924, -0.06316015124320984, 0.06631922721862793, 0.27808794379234314, 0.10560974478721619, -0.02496887743473053, 0.1686362475156784, -0.10458805412054062, -0.37757906317710876, 0.13817302882671356, 0.09359857439994812, -0.06981568783521652, -0.17918774485588074, -0.13179364800453186, 0.04165147989988327, 0.16627906262874603, 0.19916518032550812, -0.15121357142925262, -0.25269728899002075, -0.1624060869216919, 0.1137022152543068, 0.3129114806652069, 0.19987808167934418, -0.09860803186893463, -0.07413506507873535, 0.10355524718761444, -0.1970507800579071, 0.1339089721441269, -0.00009616801980882883, -0.05888611450791359, -0.04433506354689598, 0.10824929177761078, -0.20660044252872467, 0.46095287799835205, 0.08917921036481857, -0.15139442682266235, 0.3459666073322296, -0.07130404561758041, -0.0493890680372715, 0.0983872339129448, 0.1595781445503235, 0.19089917838573456, 0.6785468459129333, 0.17237968742847443, 0.3211100101470947, 0.391269326210022, -0.20283493399620056, -0.06828092783689499, -0.08723878115415573, -0.3377397358417511, 0.05877739563584328, 0.5422684550285339, 0.6026566028594971, 0.10901042819023132, -0.19700774550437927, 0.11004171520471573, 0.014521192759275436, 0.27680671215057373, -0.36123043298721313, -0.009443145245313644, -0.17940165102481842, -0.13550817966461182, 0.1573604941368103, -0.07220578193664551, -0.05033241584897041, 0.29183247685432434, 0.21124430000782013, -0.11259775608778, -0.12495506554841995, -0.0750284194946289, 0.06782173365354538, -0.21807730197906494, -0.13160695135593414, 0.046759795397520065, 0.17950405180454254, -0.05765969678759575, -0.061435382813215256, -0.12875396013259888, 0.1527923047542572, -0.07436566054821014, 0.0014020622475072742, 0.29968199133872986, -0.14625218510627747, 0.1389325112104416, 0.035455282777547836, 0.13488616049289703, -0.11234184354543686, -0.5269811153411865, -0.2108526974916458, 0.003174310317263007, 0.33495664596557617, 0.01773024909198284, 0.031083213165402412, 0.06970508396625519, 0.13287419080734253, 0.2037937492132187, 0.03653187304735184, -0.20606780052185059, 0.0970725566148758, -0.45183852314949036, -0.2643902003765106, -0.31545963883399963, 0.13737007975578308, 0.008711225353181362, -0.3459934890270233, -0.08069805800914764, 0.24341528117656708, -0.3350318670272827, 0.07615164667367935, -0.035440754145383835, 0.21577194333076477, -0.05515218898653984, -0.06895514577627182, 0.29234129190444946, -0.15857961773872375, 0.2649507522583008, -0.050934188067913055, 0.03475874289870262, -0.08681588619947433, 0.2650652229785919, 0.09663595259189606, -0.09996911138296127, -0.4534294605255127, -0.21897941827774048, -0.3616369664669037, -0.20612572133541107, -0.0030545759946107864, -0.2159239798784256, 0.12234725803136826, -0.01965663582086563, 0.06848175823688507, 0.24329347908496857, 0.11164046078920364, -0.26622551679611206, -0.09186940640211105, -0.06287980824708939, -0.026541421189904213, 0.039933621883392334, 0.024679210036993027, 0.020222140476107597, 0.05357576906681061, 0.2589683532714844, 0.21765461564064026, -0.3047844469547272, -0.06713543087244034, -0.18210634589195251, -0.1205822080373764, 0.29297536611557007, 0.4040898382663727, 0.028256632387638092, 0.2928023338317871, -0.07803919166326523, -0.06102051958441734, -0.04307631403207779, 0.06827770918607712, -0.32071325182914734, -0.16410794854164124, 0.0001443501387257129, -0.19920946657657623, 0.39177000522613525, -0.01590968854725361, 0.12920744717121124, 0.3272266089916229, -0.10404535382986069, 0.2431534230709076, 0.35670724511146545, -0.14936085045337677, 0.16033336520195007, -0.10543794184923172, 0.01032027043402195, -0.05445550009608269, -0.23375308513641357, -0.3792043924331665, 0.40526264905929565, -0.3367913067340851, -0.13046886026859283, 0.19259221851825714, -0.051056213676929474, 0.4433754086494446, 0.0008959569386206567, 0.43871527910232544, -0.018904825672507286, -0.20523503422737122, -0.11712699383497238, -0.2720576822757721, -0.13015982508659363, -0.35166051983833313, 0.33967533707618713, 0.21433000266551971, -0.11113174259662628, 0.24728526175022125, -0.41201499104499817, 0.43318918347358704, -0.04880983754992485, 0.04401455819606781, 0.09870479255914688, 0.06205201521515846, 0.0843934491276741, -0.0976792573928833, 0.22766338288784027, -0.22423462569713593, 0.1119106262922287, 0.39414334297180176, 0.30043908953666687, 0.136640727519989, 0.2343439906835556, 0.07806486636400223, 0.1344422698020935, -0.12540625035762787, 0.16606301069259644, 0.29065388441085815, 0.07707084715366364, -0.33240702748298645, -0.09753308445215225, 0.1097780168056488, 0.5630267262458801, -0.12813431024551392, 0.045586295425891876, -0.18884103000164032, 0.11632940918207169, -0.13682100176811218, -0.28798505663871765, 0.13192462921142578, -0.057562194764614105, 0.17727233469486237, 0.08343738317489624, 0.033592160791158676, -0.03239722549915314, -0.012699327431619167, 0.07000340521335602, 0.1602112352848053, -0.008876443840563297, 0.07439520955085754, 0.058151546865701675, 0.03125743940472603, 0.06180400028824806, 0.1915321946144104, -0.05651877075433731, 0.2396460324525833, 0.06186804175376892, 0.017527280375361443, 0.09568972885608673, -0.10150744020938873, 0.005106077063828707, 0.3661395311355591, -0.09430573880672455, 0.08091367781162262, 0.14404143393039703, 0.41313132643699646, 0.2732672691345215, 0.006838317960500717, -0.22427569329738617, -0.5318171977996826, 0.4029710292816162, -0.10855530202388763, -0.017760932445526123, -0.023388078436255455, -0.07420923560857773, 0.20280586183071136, -0.23675762116909027, 0.14370709657669067, 0.06861041486263275, 0.23870112001895905, 0.24801005423069, 0.20310038328170776, 0.07981754094362259, -0.1093093678355217, -0.31498441100120544, -0.048109035938978195, 0.03932138904929161, 0.12875519692897797, 0.23625032603740692, 0.15912912786006927, -0.2793866693973541, -0.2364913374185562, -0.5303714275360107, -0.114750936627388, 0.10853952914476395, -0.08760982751846313, 0.15721267461776733, -0.2181025594472885, 0.09236020594835281, -0.06016096472740173, 0.13945768773555756, -0.011036834679543972, -0.37515801191329956, 0.13188619911670685, 0.27921274304389954, -0.3378038704395294, 0.02607908472418785, 0.06793580949306488, -0.05396946519613266, 0.15203535556793213, 0.3892182409763336, 0.044308852404356, -0.2586921155452728, -0.1744392067193985, 0.19354918599128723, -0.20475079119205475, 0.09652538597583771, 0.4945565164089203, -0.01115698553621769, -0.1593770831823349, -0.18524521589279175, 0.2661237418651581, 0.05118146166205406, 0.22291876375675201, 0.16079623997211456, 0.11861536651849747, 0.2535725235939026, 0.046755921095609665, -0.06659690290689468, 0.06722299009561539, -0.1201063022017479, 0.17051783204078674, 0.04142611101269722, -0.34182971715927124, -0.05586585775017738, -0.016447044909000397, -0.24806858599185944, -0.1270502209663391, -0.19042201340198517, 0.2812798023223877, -0.04201420024037361, 0.17396517097949982, 0.07464343309402466, 0.17002519965171814, 0.12623701989650726, 0.09275249391794205, -0.04435510188341141, -0.39093542098999023, -0.3554588556289673, -0.125745952129364, 0.01411596778780222, -0.15510673820972443, 0.12021441757678986, 0.03364099562168121, 0.19309553503990173, 0.007936554029583931, -0.44626328349113464, -0.04908210411667824, -0.03383550047874451, 0.18309342861175537, -0.33932074904441833, -0.017115019261837006, 0.30258238315582275, -0.09505760669708252, -0.2726387083530426, 0.14146491885185242, 0.1495104283094406, 0.36019039154052734, 0.15359511971473694, -0.04113258048892021, -0.21765103936195374, 0.6475549340248108, -0.013491842895746231, 0.33449503779411316, -0.07391313463449478, 0.12017452716827393, 0.14702549576759338, -0.14913634955883026, -0.04025060683488846, -0.151533842086792, -0.0976502001285553, 0.3071572482585907, -0.07768452167510986, -0.4458622634410858, 0.12814177572727203, -0.1781955063343048, -0.02511831745505333, -0.05391469970345497, -0.40672656893730164, -0.07307680696249008, -0.33919039368629456, 0.1301576942205429, 0.03463372215628624, -0.1083810031414032, 0.21359123289585114, -0.03299637883901596, -0.09014610201120377, 0.09001068025827408, -0.21923470497131348, -0.16750149428844452, -0.02388681285083294, -0.15971557796001434, -0.11592578887939453, 0.17093871533870697, -0.7584660053253174, 0.14216667413711548, -0.08010917901992798, 0.4029329717159271, -0.08805887401103973, -0.021514486521482468, 0.15477123856544495, -0.3094361126422882, 0.3313550353050232, -0.1347036063671112, 0.37443265318870544, 0.05627058446407318, -0.022321578115224838, -0.05135343596339226, -0.08514970541000366, -0.14132602512836456, -0.15137873589992523, 0.2677975594997406, -0.2194223701953888, -0.13661667704582214, 0.13360309600830078, 0.12787289917469025, -0.11506807804107666, -0.04935801029205322, 0.024933381006121635, -0.035246841609478, -0.32877448201179504, -0.2871609628200531, 0.12916727364063263, 0.015377005562186241, -0.018633954226970673, -0.0704658031463623, -0.22243380546569824, 0.09526318311691284, 0.22004304826259613, -0.10243476182222366, -0.1035623848438263, -0.3316592574119568, -0.2995378077030182, 0.22283028066158295, -0.09949769079685211, 0.30577120184898376, 0.054820466786623, -0.011785815469920635, 0.13065609335899353, 0.08930178731679916, 0.16088823974132538, -0.04619027301669121, 0.10392481088638306, 0.3626703917980194, 0.23412054777145386, 0.22954900562763214, 0.2609115540981293, 0.6117308735847473, 0.05066516622900963, 0.39666134119033813, -0.004285312257707119, -0.14717411994934082, -0.13801197707653046, 0.20657093822956085, -0.015318535268306732, -0.21720974147319794, 0.00524225365370512, 0.3199799358844757, -0.18163712322711945, -0.021264808252453804, 0.19712863862514496, -0.07783866673707962, 0.5948537588119507, 0.24910534918308258, 0.026424309238791466, 0.3590059280395508, -0.6971374154090881, 0.23226569592952728, -0.15168263018131256, 0.18857018649578094, -0.16310001909732819, 0.052436813712120056, 0.09891527146100998, 0.02301250956952572, -0.1306803971529007, -0.015911705791950226, 0.0030266738031059504, 0.07257898896932602, 0.011608054861426353, 0.25473088026046753, -0.2370532900094986, 0.1618858277797699, -0.06320688128471375, -0.2887256443500519, 0.001991339260712266, 0.3124004304409027, -0.23695407807826996, -0.3306705355644226, -0.35819166898727417, 0.08490195125341415, 0.23811101913452148, -0.20535707473754883, 0.024761125445365906, -0.08642371743917465, -0.15200333297252655, 0.09708475321531296, 0.02427465096116066, -0.18078941106796265, -0.3575174808502197, -0.3273407816886902, -0.05123761296272278, -0.14357109367847443, -0.007401739247143269, 0.19401220977306366, -0.06299343705177307, 0.0056318799033761024, 0.0002219184098066762, -0.274915874004364, -0.13739314675331116, -0.10059022158384323, -0.3308408260345459, -0.16380631923675537, 0.025999976322054863, -0.3238352835178375, 0.0930933877825737, 0.2702464461326599, -0.2591007649898529, -0.07019228488206863, 0.04361186921596527, 0.32166045904159546, -0.08716864883899689, -0.3005562722682953, 0.24622231721878052, 0.09977205842733383, -0.06303776800632477, 0.32683035731315613, -0.20850329101085663, 0.03901892155408859, -0.3029005229473114, 0.30386894941329956, -0.09010419249534607, -0.13121336698532104, 0.16323046386241913, 0.5049746036529541, -0.2276410460472107, -0.3797547519207001, -0.034636903554201126, 0.15760298073291779, -0.3848697245121002, 0.18628159165382385, -0.133126899600029, -0.08347903937101364, 0.2094770073890686, 0.16418921947479248, -0.08061587810516357, -0.02436988428235054, 0.29632842540740967, -0.07458434998989105, -0.31136375665664673, -0.08444955199956894, -0.1683218628168106, -0.007237303536385298, 0.19323283433914185, 0.2638923227787018, -0.024688806384801865, -0.07526883482933044, -0.4372938573360443, 0.17790095508098602, -0.3461795151233673, 0.10550007224082947, -0.11121945083141327, -0.5434498190879822, 0.20764926075935364, 0.17109128832817078, 0.29268938302993774, 0.2785819470882416, -0.14294901490211487, -0.3397570550441742, -0.16074104607105255, 0.02305823192000389, 0.015099439769983292, -0.19444435834884644, -0.07596946507692337, -0.16315141320228577, -0.07674792408943176, 0.1009918600320816, 0.09896937757730484, 0.19593851268291473, -0.03512273356318474, -0.40739738941192627, 0.14455506205558777, 0.3205989897251129, 0.09753070771694183, 0.09698484092950821, 0.2866121530532837, 0.4874833822250366, -0.2085604965686798, -0.1349649429321289, -0.04627784341573715, -0.10949012637138367, 0.04811054840683937, 0.29508137702941895, 0.36891987919807434, -0.21608538925647736, 0.19095905125141144, -0.07613672316074371, -0.3241201937198639, 0.12248517572879791, 0.46005943417549133, 0.3530990779399872, -0.027232063934206963, -0.2306606024503708, -0.023130500689148903, 0.3285297453403473, 0.07346498221158981, -0.17998352646827698, 0.27147677540779114, -0.02855488657951355, 0.21250486373901367, 0.15248286724090576, -0.07571553438901901, -0.4897534251213074, 0.04773201420903206, 0.2655690014362335, 0.0372072197496891, -0.5541717410087585, -0.4267132580280304, -0.3831143081188202, 0.010151740163564682, -0.1193467453122139, 0.1416543871164322, 0.05603833869099617, 0.4891684353351593, 0.5090487599372864, 0.14170534908771515, -0.04129632189869881, 0.3514167368412018, 0.21225585043430328, 0.08648715913295746, -0.28136003017425537, -0.237855926156044, 0.03122982569038868, -0.47149163484573364, -0.016298597678542137, -0.11814341694116592, -0.33386287093162537, -0.09684734791517258, -0.014880098402500153, -0.4049619734287262, 0.3382035791873932, -0.26654887199401855, 0.030519867315888405, 0.09253697097301483, -0.037141453474760056, -0.010328331030905247, 0.22147640585899353, -0.016167784109711647, 0.19708622992038727, -0.015883708372712135, 0.013381168246269226, -0.049967411905527115, -0.03913209214806557, -0.20836172997951508, -0.18287111818790436, -0.12774217128753662, -0.14805082976818085, -0.0490780770778656, 0.38206884264945984, 0.05593695119023323, -0.10539431869983673, 0.07201649993658066, 0.3345834016799927, -0.12059099227190018, -0.043877631425857544, 0.20177529752254486, 0.21500933170318604, 0.08122586458921432, -0.26801615953445435, 0.12570811808109283, 0.24914748966693878, 0.4553883373737335, 0.3226674497127533, 0.2463301569223404, -0.3184179663658142, 0.021364623680710793, 0.12340165674686432, -0.0748443454504013, 0.015772826969623566, -0.03134927526116371, -0.03315948694944382, -0.05708998814225197, -0.18118120729923248, 0.1773402988910675, -0.442730188369751, 0.02227451279759407, 0.13299968838691711, -0.18738271296024323, 0.21301034092903137, -0.12926813960075378, 0.15268780291080475, -0.5985479950904846, 0.47939029335975647, -0.11724784225225449, 0.08218608051538467, -0.28048017621040344, -0.18599830567836761, -0.056220561265945435, 0.08007928729057312, -0.06339720636606216, -0.05965091660618782, -0.2760508060455322, 0.2565935254096985, 0.08798057585954666, -0.0010437684832140803, 0.029384339228272438, -0.1166377142071724, 0.20788642764091492, 0.22392436861991882, 0.009538134559988976, 0.027863875031471252, 0.1855924129486084, -0.25347450375556946, 0.14836867153644562, -0.07098143547773361, 0.45657703280448914, -0.15235070884227753, 0.35921603441238403, -0.005099912639707327, -0.3785834312438965, 0.010336875915527344, 0.028163012117147446, 0.21164852380752563, 0.2874480187892914, 0.03981531038880348, -0.09627389162778854, -0.18169847130775452, -0.06629722565412521, -0.2015896588563919, 0.0986824482679367, -0.1557731181383133, 0.034808188676834106, 0.22385573387145996, 0.07054860144853592, 0.46446114778518677, -0.013314821757376194, -0.08950473368167877, 0.04462241381406784, 0.3183930516242981, -0.02859308011829853, 0.19501493871212006, 0.12419077008962631, 0.3218855559825897, -0.018952542915940285, 0.3328471779823303, 0.18833154439926147, -0.020708832889795303, -0.34946268796920776, -0.077494777739048, 0.045230597257614136, 0.23114487528800964, -0.433676153421402, -0.36997082829475403, 0.39501169323921204, -0.07737575471401215, 0.19359448552131653, -0.052408576011657715, -0.10917601734399796, 0.03559467941522598, -0.12563960254192352, -0.37593764066696167, 0.3117985725402832, 0.30491530895233154, -0.21159185469150543, 0.15493080019950867, 0.1306091696023941, 0.17913658916950226, -0.15109381079673767, 0.009544538334012032, 0.011103964410722256 ]
https://github.com/huggingface/datasets/issues/5374
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
No, you passed `streaming=True` so it streams the data from the Hub. This message just shows that you use the cached version of the `c4` **module**, aka the python script that is run to generate the examples from the raw data files. Maybe the offline mode should also disable `fsspec`/`aiohttp` HTTP calls in `datasets` and not just the `requests` ones.
### Describe the bug `streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐 The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200. Possibly related: - https://github.com/huggingface/datasets/pull/3100 - https://github.com/huggingface/datasets/pull/3050 ### Steps to reproduce the bug Running ```python c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start) df = pd.DataFrame(c4, index=None) ``` with different start & end arguments on 200 CPUs in parallel yields: ``` WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4. WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │ │ _c4.py:68 in <module> │ │ │ │ 65 │ model.eval() │ │ 66 │ │ │ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │ │ ❱ 68 │ df = pd.DataFrame(c4, index=None) │ │ 69 │ texts = df["text"].to_list() │ │ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │ │ y:684 in __init__ │ │ │ │ 681 │ │ # For data is list-like, or Iterable (will consume into list │ │ 682 │ │ elif is_list_like(data): │ │ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │ │ ❱ 684 │ │ │ │ data = list(data) │ │ 685 │ │ │ if len(data) > 0: │ │ 686 │ │ │ │ if is_dataclass(data[0]): │ │ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │ │ │ │ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │ │ 749 │ │ │ 750 │ def __iter__(self): │ │ ❱ 751 │ │ for key, example in self._iter(): │ │ 752 │ │ │ if self.features: │ │ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │ │ 754 │ │ │ │ # This is done with `_apply_feature_types`. │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │ │ │ │ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │ │ 739 │ │ else: │ │ 740 │ │ │ ex_iterable = self._ex_iterable │ │ ❱ 741 │ │ yield from ex_iterable │ │ 742 │ │ │ 743 │ def _iter_shard(self, shard_idx: int): │ │ 744 │ │ if self._shuffling: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │ │ │ │ 614 │ │ self.n = n │ │ 615 │ │ │ 616 │ def __iter__(self): │ │ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │ │ 618 │ │ │ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │ │ │ │ 591 │ │ │ 592 │ def __iter__(self): │ │ 593 │ │ #ex_iterator = iter(self.ex_iterable) │ │ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │ │ 595 │ │ #for _ in range(self.n): │ │ 596 │ │ # next(ex_iterator) │ │ 597 │ │ #yield from islice(ex_iterator, self.n, None) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │ │ │ │ 103 │ │ self.kwargs = kwargs │ │ 104 │ │ │ 105 │ def __iter__(self): │ │ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │ │ 107 │ │ │ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │ │ │ │ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │ │ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │ │ _generate_examples │ │ │ │ 86 │ │ for filepath in filepaths: │ │ 87 │ │ │ logger.info("generating examples from = %s", filepath) │ │ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │ │ ❱ 89 │ │ │ │ for line in f: │ │ 90 │ │ │ │ │ if line: │ │ 91 │ │ │ │ │ │ example = json.loads(line) │ │ 92 │ │ │ │ │ │ yield id_, example │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │ │ │ │ 310 │ │ │ │ 311 │ │ if size < 0: │ │ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │ │ ❱ 313 │ │ return self._buffer.read1(size) │ │ 314 │ │ │ 315 │ def peek(self, n): │ │ 316 │ │ self._check_not_closed() │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │ │ │ │ 65 │ │ │ 66 │ def readinto(self, b): │ │ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │ │ ❱ 68 │ │ │ data = self.read(len(byte_view)) │ │ 69 │ │ │ byte_view[:len(data)] = data │ │ 70 │ │ return len(data) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │ │ │ │ 490 │ │ │ │ self._new_member = False │ │ 491 │ │ │ │ │ 492 │ │ │ # Read a chunk of data from the file │ │ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │ │ 494 │ │ │ │ │ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │ │ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │ │ │ │ 93 │ │ │ read = self._read │ │ 94 │ │ │ self._read = None │ │ 95 │ │ │ return self._buffer[read:] + \ │ │ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │ │ 97 │ │ │ 98 │ def prepend(self, prepend=b''): │ │ 99 │ │ if self._read is None: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │ │ 365 in read_with_retries │ │ │ │ 362 │ │ │ │ ) │ │ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │ │ 364 │ │ else: │ │ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │ │ 366 │ │ return out │ │ 367 │ │ │ 368 │ file_obj.read = read_with_retries │ ╰──────────────────────────────────────────────────────────────────────────────╯ ConnectionError: Server Disconnected ``` ### Expected behavior There should be no disconnect I think. ### Environment info ``` datasets=2.7.0 Python 3.9.12 ```
60
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
[ -0.3806016147136688, -0.32525283098220825, -0.20978423953056335, 0.19854821264743805, -0.027557121589779854, -0.31166669726371765, 0.20527470111846924, -0.06316015124320984, 0.06631922721862793, 0.27808794379234314, 0.10560974478721619, -0.02496887743473053, 0.1686362475156784, -0.10458805412054062, -0.37757906317710876, 0.13817302882671356, 0.09359857439994812, -0.06981568783521652, -0.17918774485588074, -0.13179364800453186, 0.04165147989988327, 0.16627906262874603, 0.19916518032550812, -0.15121357142925262, -0.25269728899002075, -0.1624060869216919, 0.1137022152543068, 0.3129114806652069, 0.19987808167934418, -0.09860803186893463, -0.07413506507873535, 0.10355524718761444, -0.1970507800579071, 0.1339089721441269, -0.00009616801980882883, -0.05888611450791359, -0.04433506354689598, 0.10824929177761078, -0.20660044252872467, 0.46095287799835205, 0.08917921036481857, -0.15139442682266235, 0.3459666073322296, -0.07130404561758041, -0.0493890680372715, 0.0983872339129448, 0.1595781445503235, 0.19089917838573456, 0.6785468459129333, 0.17237968742847443, 0.3211100101470947, 0.391269326210022, -0.20283493399620056, -0.06828092783689499, -0.08723878115415573, -0.3377397358417511, 0.05877739563584328, 0.5422684550285339, 0.6026566028594971, 0.10901042819023132, -0.19700774550437927, 0.11004171520471573, 0.014521192759275436, 0.27680671215057373, -0.36123043298721313, -0.009443145245313644, -0.17940165102481842, -0.13550817966461182, 0.1573604941368103, -0.07220578193664551, -0.05033241584897041, 0.29183247685432434, 0.21124430000782013, -0.11259775608778, -0.12495506554841995, -0.0750284194946289, 0.06782173365354538, -0.21807730197906494, -0.13160695135593414, 0.046759795397520065, 0.17950405180454254, -0.05765969678759575, -0.061435382813215256, -0.12875396013259888, 0.1527923047542572, -0.07436566054821014, 0.0014020622475072742, 0.29968199133872986, -0.14625218510627747, 0.1389325112104416, 0.035455282777547836, 0.13488616049289703, -0.11234184354543686, -0.5269811153411865, -0.2108526974916458, 0.003174310317263007, 0.33495664596557617, 0.01773024909198284, 0.031083213165402412, 0.06970508396625519, 0.13287419080734253, 0.2037937492132187, 0.03653187304735184, -0.20606780052185059, 0.0970725566148758, -0.45183852314949036, -0.2643902003765106, -0.31545963883399963, 0.13737007975578308, 0.008711225353181362, -0.3459934890270233, -0.08069805800914764, 0.24341528117656708, -0.3350318670272827, 0.07615164667367935, -0.035440754145383835, 0.21577194333076477, -0.05515218898653984, -0.06895514577627182, 0.29234129190444946, -0.15857961773872375, 0.2649507522583008, -0.050934188067913055, 0.03475874289870262, -0.08681588619947433, 0.2650652229785919, 0.09663595259189606, -0.09996911138296127, -0.4534294605255127, -0.21897941827774048, -0.3616369664669037, -0.20612572133541107, -0.0030545759946107864, -0.2159239798784256, 0.12234725803136826, -0.01965663582086563, 0.06848175823688507, 0.24329347908496857, 0.11164046078920364, -0.26622551679611206, -0.09186940640211105, -0.06287980824708939, -0.026541421189904213, 0.039933621883392334, 0.024679210036993027, 0.020222140476107597, 0.05357576906681061, 0.2589683532714844, 0.21765461564064026, -0.3047844469547272, -0.06713543087244034, -0.18210634589195251, -0.1205822080373764, 0.29297536611557007, 0.4040898382663727, 0.028256632387638092, 0.2928023338317871, -0.07803919166326523, -0.06102051958441734, -0.04307631403207779, 0.06827770918607712, -0.32071325182914734, -0.16410794854164124, 0.0001443501387257129, -0.19920946657657623, 0.39177000522613525, -0.01590968854725361, 0.12920744717121124, 0.3272266089916229, -0.10404535382986069, 0.2431534230709076, 0.35670724511146545, -0.14936085045337677, 0.16033336520195007, -0.10543794184923172, 0.01032027043402195, -0.05445550009608269, -0.23375308513641357, -0.3792043924331665, 0.40526264905929565, -0.3367913067340851, -0.13046886026859283, 0.19259221851825714, -0.051056213676929474, 0.4433754086494446, 0.0008959569386206567, 0.43871527910232544, -0.018904825672507286, -0.20523503422737122, -0.11712699383497238, -0.2720576822757721, -0.13015982508659363, -0.35166051983833313, 0.33967533707618713, 0.21433000266551971, -0.11113174259662628, 0.24728526175022125, -0.41201499104499817, 0.43318918347358704, -0.04880983754992485, 0.04401455819606781, 0.09870479255914688, 0.06205201521515846, 0.0843934491276741, -0.0976792573928833, 0.22766338288784027, -0.22423462569713593, 0.1119106262922287, 0.39414334297180176, 0.30043908953666687, 0.136640727519989, 0.2343439906835556, 0.07806486636400223, 0.1344422698020935, -0.12540625035762787, 0.16606301069259644, 0.29065388441085815, 0.07707084715366364, -0.33240702748298645, -0.09753308445215225, 0.1097780168056488, 0.5630267262458801, -0.12813431024551392, 0.045586295425891876, -0.18884103000164032, 0.11632940918207169, -0.13682100176811218, -0.28798505663871765, 0.13192462921142578, -0.057562194764614105, 0.17727233469486237, 0.08343738317489624, 0.033592160791158676, -0.03239722549915314, -0.012699327431619167, 0.07000340521335602, 0.1602112352848053, -0.008876443840563297, 0.07439520955085754, 0.058151546865701675, 0.03125743940472603, 0.06180400028824806, 0.1915321946144104, -0.05651877075433731, 0.2396460324525833, 0.06186804175376892, 0.017527280375361443, 0.09568972885608673, -0.10150744020938873, 0.005106077063828707, 0.3661395311355591, -0.09430573880672455, 0.08091367781162262, 0.14404143393039703, 0.41313132643699646, 0.2732672691345215, 0.006838317960500717, -0.22427569329738617, -0.5318171977996826, 0.4029710292816162, -0.10855530202388763, -0.017760932445526123, -0.023388078436255455, -0.07420923560857773, 0.20280586183071136, -0.23675762116909027, 0.14370709657669067, 0.06861041486263275, 0.23870112001895905, 0.24801005423069, 0.20310038328170776, 0.07981754094362259, -0.1093093678355217, -0.31498441100120544, -0.048109035938978195, 0.03932138904929161, 0.12875519692897797, 0.23625032603740692, 0.15912912786006927, -0.2793866693973541, -0.2364913374185562, -0.5303714275360107, -0.114750936627388, 0.10853952914476395, -0.08760982751846313, 0.15721267461776733, -0.2181025594472885, 0.09236020594835281, -0.06016096472740173, 0.13945768773555756, -0.011036834679543972, -0.37515801191329956, 0.13188619911670685, 0.27921274304389954, -0.3378038704395294, 0.02607908472418785, 0.06793580949306488, -0.05396946519613266, 0.15203535556793213, 0.3892182409763336, 0.044308852404356, -0.2586921155452728, -0.1744392067193985, 0.19354918599128723, -0.20475079119205475, 0.09652538597583771, 0.4945565164089203, -0.01115698553621769, -0.1593770831823349, -0.18524521589279175, 0.2661237418651581, 0.05118146166205406, 0.22291876375675201, 0.16079623997211456, 0.11861536651849747, 0.2535725235939026, 0.046755921095609665, -0.06659690290689468, 0.06722299009561539, -0.1201063022017479, 0.17051783204078674, 0.04142611101269722, -0.34182971715927124, -0.05586585775017738, -0.016447044909000397, -0.24806858599185944, -0.1270502209663391, -0.19042201340198517, 0.2812798023223877, -0.04201420024037361, 0.17396517097949982, 0.07464343309402466, 0.17002519965171814, 0.12623701989650726, 0.09275249391794205, -0.04435510188341141, -0.39093542098999023, -0.3554588556289673, -0.125745952129364, 0.01411596778780222, -0.15510673820972443, 0.12021441757678986, 0.03364099562168121, 0.19309553503990173, 0.007936554029583931, -0.44626328349113464, -0.04908210411667824, -0.03383550047874451, 0.18309342861175537, -0.33932074904441833, -0.017115019261837006, 0.30258238315582275, -0.09505760669708252, -0.2726387083530426, 0.14146491885185242, 0.1495104283094406, 0.36019039154052734, 0.15359511971473694, -0.04113258048892021, -0.21765103936195374, 0.6475549340248108, -0.013491842895746231, 0.33449503779411316, -0.07391313463449478, 0.12017452716827393, 0.14702549576759338, -0.14913634955883026, -0.04025060683488846, -0.151533842086792, -0.0976502001285553, 0.3071572482585907, -0.07768452167510986, -0.4458622634410858, 0.12814177572727203, -0.1781955063343048, -0.02511831745505333, -0.05391469970345497, -0.40672656893730164, -0.07307680696249008, -0.33919039368629456, 0.1301576942205429, 0.03463372215628624, -0.1083810031414032, 0.21359123289585114, -0.03299637883901596, -0.09014610201120377, 0.09001068025827408, -0.21923470497131348, -0.16750149428844452, -0.02388681285083294, -0.15971557796001434, -0.11592578887939453, 0.17093871533870697, -0.7584660053253174, 0.14216667413711548, -0.08010917901992798, 0.4029329717159271, -0.08805887401103973, -0.021514486521482468, 0.15477123856544495, -0.3094361126422882, 0.3313550353050232, -0.1347036063671112, 0.37443265318870544, 0.05627058446407318, -0.022321578115224838, -0.05135343596339226, -0.08514970541000366, -0.14132602512836456, -0.15137873589992523, 0.2677975594997406, -0.2194223701953888, -0.13661667704582214, 0.13360309600830078, 0.12787289917469025, -0.11506807804107666, -0.04935801029205322, 0.024933381006121635, -0.035246841609478, -0.32877448201179504, -0.2871609628200531, 0.12916727364063263, 0.015377005562186241, -0.018633954226970673, -0.0704658031463623, -0.22243380546569824, 0.09526318311691284, 0.22004304826259613, -0.10243476182222366, -0.1035623848438263, -0.3316592574119568, -0.2995378077030182, 0.22283028066158295, -0.09949769079685211, 0.30577120184898376, 0.054820466786623, -0.011785815469920635, 0.13065609335899353, 0.08930178731679916, 0.16088823974132538, -0.04619027301669121, 0.10392481088638306, 0.3626703917980194, 0.23412054777145386, 0.22954900562763214, 0.2609115540981293, 0.6117308735847473, 0.05066516622900963, 0.39666134119033813, -0.004285312257707119, -0.14717411994934082, -0.13801197707653046, 0.20657093822956085, -0.015318535268306732, -0.21720974147319794, 0.00524225365370512, 0.3199799358844757, -0.18163712322711945, -0.021264808252453804, 0.19712863862514496, -0.07783866673707962, 0.5948537588119507, 0.24910534918308258, 0.026424309238791466, 0.3590059280395508, -0.6971374154090881, 0.23226569592952728, -0.15168263018131256, 0.18857018649578094, -0.16310001909732819, 0.052436813712120056, 0.09891527146100998, 0.02301250956952572, -0.1306803971529007, -0.015911705791950226, 0.0030266738031059504, 0.07257898896932602, 0.011608054861426353, 0.25473088026046753, -0.2370532900094986, 0.1618858277797699, -0.06320688128471375, -0.2887256443500519, 0.001991339260712266, 0.3124004304409027, -0.23695407807826996, -0.3306705355644226, -0.35819166898727417, 0.08490195125341415, 0.23811101913452148, -0.20535707473754883, 0.024761125445365906, -0.08642371743917465, -0.15200333297252655, 0.09708475321531296, 0.02427465096116066, -0.18078941106796265, -0.3575174808502197, -0.3273407816886902, -0.05123761296272278, -0.14357109367847443, -0.007401739247143269, 0.19401220977306366, -0.06299343705177307, 0.0056318799033761024, 0.0002219184098066762, -0.274915874004364, -0.13739314675331116, -0.10059022158384323, -0.3308408260345459, -0.16380631923675537, 0.025999976322054863, -0.3238352835178375, 0.0930933877825737, 0.2702464461326599, -0.2591007649898529, -0.07019228488206863, 0.04361186921596527, 0.32166045904159546, -0.08716864883899689, -0.3005562722682953, 0.24622231721878052, 0.09977205842733383, -0.06303776800632477, 0.32683035731315613, -0.20850329101085663, 0.03901892155408859, -0.3029005229473114, 0.30386894941329956, -0.09010419249534607, -0.13121336698532104, 0.16323046386241913, 0.5049746036529541, -0.2276410460472107, -0.3797547519207001, -0.034636903554201126, 0.15760298073291779, -0.3848697245121002, 0.18628159165382385, -0.133126899600029, -0.08347903937101364, 0.2094770073890686, 0.16418921947479248, -0.08061587810516357, -0.02436988428235054, 0.29632842540740967, -0.07458434998989105, -0.31136375665664673, -0.08444955199956894, -0.1683218628168106, -0.007237303536385298, 0.19323283433914185, 0.2638923227787018, -0.024688806384801865, -0.07526883482933044, -0.4372938573360443, 0.17790095508098602, -0.3461795151233673, 0.10550007224082947, -0.11121945083141327, -0.5434498190879822, 0.20764926075935364, 0.17109128832817078, 0.29268938302993774, 0.2785819470882416, -0.14294901490211487, -0.3397570550441742, -0.16074104607105255, 0.02305823192000389, 0.015099439769983292, -0.19444435834884644, -0.07596946507692337, -0.16315141320228577, -0.07674792408943176, 0.1009918600320816, 0.09896937757730484, 0.19593851268291473, -0.03512273356318474, -0.40739738941192627, 0.14455506205558777, 0.3205989897251129, 0.09753070771694183, 0.09698484092950821, 0.2866121530532837, 0.4874833822250366, -0.2085604965686798, -0.1349649429321289, -0.04627784341573715, -0.10949012637138367, 0.04811054840683937, 0.29508137702941895, 0.36891987919807434, -0.21608538925647736, 0.19095905125141144, -0.07613672316074371, -0.3241201937198639, 0.12248517572879791, 0.46005943417549133, 0.3530990779399872, -0.027232063934206963, -0.2306606024503708, -0.023130500689148903, 0.3285297453403473, 0.07346498221158981, -0.17998352646827698, 0.27147677540779114, -0.02855488657951355, 0.21250486373901367, 0.15248286724090576, -0.07571553438901901, -0.4897534251213074, 0.04773201420903206, 0.2655690014362335, 0.0372072197496891, -0.5541717410087585, -0.4267132580280304, -0.3831143081188202, 0.010151740163564682, -0.1193467453122139, 0.1416543871164322, 0.05603833869099617, 0.4891684353351593, 0.5090487599372864, 0.14170534908771515, -0.04129632189869881, 0.3514167368412018, 0.21225585043430328, 0.08648715913295746, -0.28136003017425537, -0.237855926156044, 0.03122982569038868, -0.47149163484573364, -0.016298597678542137, -0.11814341694116592, -0.33386287093162537, -0.09684734791517258, -0.014880098402500153, -0.4049619734287262, 0.3382035791873932, -0.26654887199401855, 0.030519867315888405, 0.09253697097301483, -0.037141453474760056, -0.010328331030905247, 0.22147640585899353, -0.016167784109711647, 0.19708622992038727, -0.015883708372712135, 0.013381168246269226, -0.049967411905527115, -0.03913209214806557, -0.20836172997951508, -0.18287111818790436, -0.12774217128753662, -0.14805082976818085, -0.0490780770778656, 0.38206884264945984, 0.05593695119023323, -0.10539431869983673, 0.07201649993658066, 0.3345834016799927, -0.12059099227190018, -0.043877631425857544, 0.20177529752254486, 0.21500933170318604, 0.08122586458921432, -0.26801615953445435, 0.12570811808109283, 0.24914748966693878, 0.4553883373737335, 0.3226674497127533, 0.2463301569223404, -0.3184179663658142, 0.021364623680710793, 0.12340165674686432, -0.0748443454504013, 0.015772826969623566, -0.03134927526116371, -0.03315948694944382, -0.05708998814225197, -0.18118120729923248, 0.1773402988910675, -0.442730188369751, 0.02227451279759407, 0.13299968838691711, -0.18738271296024323, 0.21301034092903137, -0.12926813960075378, 0.15268780291080475, -0.5985479950904846, 0.47939029335975647, -0.11724784225225449, 0.08218608051538467, -0.28048017621040344, -0.18599830567836761, -0.056220561265945435, 0.08007928729057312, -0.06339720636606216, -0.05965091660618782, -0.2760508060455322, 0.2565935254096985, 0.08798057585954666, -0.0010437684832140803, 0.029384339228272438, -0.1166377142071724, 0.20788642764091492, 0.22392436861991882, 0.009538134559988976, 0.027863875031471252, 0.1855924129486084, -0.25347450375556946, 0.14836867153644562, -0.07098143547773361, 0.45657703280448914, -0.15235070884227753, 0.35921603441238403, -0.005099912639707327, -0.3785834312438965, 0.010336875915527344, 0.028163012117147446, 0.21164852380752563, 0.2874480187892914, 0.03981531038880348, -0.09627389162778854, -0.18169847130775452, -0.06629722565412521, -0.2015896588563919, 0.0986824482679367, -0.1557731181383133, 0.034808188676834106, 0.22385573387145996, 0.07054860144853592, 0.46446114778518677, -0.013314821757376194, -0.08950473368167877, 0.04462241381406784, 0.3183930516242981, -0.02859308011829853, 0.19501493871212006, 0.12419077008962631, 0.3218855559825897, -0.018952542915940285, 0.3328471779823303, 0.18833154439926147, -0.020708832889795303, -0.34946268796920776, -0.077494777739048, 0.045230597257614136, 0.23114487528800964, -0.433676153421402, -0.36997082829475403, 0.39501169323921204, -0.07737575471401215, 0.19359448552131653, -0.052408576011657715, -0.10917601734399796, 0.03559467941522598, -0.12563960254192352, -0.37593764066696167, 0.3117985725402832, 0.30491530895233154, -0.21159185469150543, 0.15493080019950867, 0.1306091696023941, 0.17913658916950226, -0.15109381079673767, 0.009544538334012032, 0.011103964410722256 ]
https://github.com/huggingface/datasets/issues/5374
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
> This message just shows that you use the cached version of the c4 module Ah my bad you're right about the module, but it's also using the downloaded & cached c4 dataset. There's no internet during the runs so it wouldn't work otherwise
### Describe the bug `streaming_download_manager` seems to disconnect if too many runs access the same underlying dataset 🧐 The code works fine for me if I have ~100 runs in parallel, but disconnects once scaling to 200. Possibly related: - https://github.com/huggingface/datasets/pull/3100 - https://github.com/huggingface/datasets/pull/3050 ### Steps to reproduce the bug Running ```python c4 = datasets.load_dataset("c4", "en", split="train", streaming=True).skip(args.start).take(args.end-args.start) df = pd.DataFrame(c4, index=None) ``` with different start & end arguments on 200 CPUs in parallel yields: ``` WARNING:datasets.load:Using the latest cached version of the module from /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/df532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01 (last modified on Mon Dec 12 10:45:02 2022) since it couldn't be found locally at c4. WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [1/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [2/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [3/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [4/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [5/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [6/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [7/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [8/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [9/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [10/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [11/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [12/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [13/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [14/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [15/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [16/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [17/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [18/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [19/20] WARNING:datasets.download.streaming_download_manager:Got disconnected from remote data host. Retrying in 5sec [20/20] ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/dec-2022-tasky/inference │ │ _c4.py:68 in <module> │ │ │ │ 65 │ model.eval() │ │ 66 │ │ │ 67 │ c4 = datasets.load_dataset("c4", "en", split="train", streaming=Tru │ │ ❱ 68 │ df = pd.DataFrame(c4, index=None) │ │ 69 │ texts = df["text"].to_list() │ │ 70 │ preds = batch_inference(texts, batch_size=args.batch_size) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/site-packages/pandas/core/frame.p │ │ y:684 in __init__ │ │ │ │ 681 │ │ # For data is list-like, or Iterable (will consume into list │ │ 682 │ │ elif is_list_like(data): │ │ 683 │ │ │ if not isinstance(data, (abc.Sequence, ExtensionArray)): │ │ ❱ 684 │ │ │ │ data = list(data) │ │ 685 │ │ │ if len(data) > 0: │ │ 686 │ │ │ │ if is_dataclass(data[0]): │ │ 687 │ │ │ │ │ data = dataclasses_to_dicts(data) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:751 in __iter__ │ │ │ │ 748 │ │ yield from ex_iterable.shard_data_sources(shard_idx) │ │ 749 │ │ │ 750 │ def __iter__(self): │ │ ❱ 751 │ │ for key, example in self._iter(): │ │ 752 │ │ │ if self.features: │ │ 753 │ │ │ │ # `IterableDataset` automatically fills missing colum │ │ 754 │ │ │ │ # This is done with `_apply_feature_types`. │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:741 in _iter │ │ │ │ 738 │ │ │ ex_iterable = self._ex_iterable.shuffle_data_sources(self │ │ 739 │ │ else: │ │ 740 │ │ │ ex_iterable = self._ex_iterable │ │ ❱ 741 │ │ yield from ex_iterable │ │ 742 │ │ │ 743 │ def _iter_shard(self, shard_idx: int): │ │ 744 │ │ if self._shuffling: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:617 in __iter__ │ │ │ │ 614 │ │ self.n = n │ │ 615 │ │ │ 616 │ def __iter__(self): │ │ ❱ 617 │ │ yield from islice(self.ex_iterable, self.n) │ │ 618 │ │ │ 619 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 620 │ │ """Doesn't shuffle the wrapped examples iterable since it wou │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:594 in __iter__ │ │ │ │ 591 │ │ │ 592 │ def __iter__(self): │ │ 593 │ │ #ex_iterator = iter(self.ex_iterable) │ │ ❱ 594 │ │ yield from islice(self.ex_iterable, self.n, None) │ │ 595 │ │ #for _ in range(self.n): │ │ 596 │ │ # next(ex_iterator) │ │ 597 │ │ #yield from islice(ex_iterator, self.n, None) │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/iterable_dataset.py:106 in __iter__ │ │ │ │ 103 │ │ self.kwargs = kwargs │ │ 104 │ │ │ 105 │ def __iter__(self): │ │ ❱ 106 │ │ yield from self.generate_examples_fn(**self.kwargs) │ │ 107 │ │ │ 108 │ def shuffle_data_sources(self, generator: np.random.Generator) -> │ │ 109 │ │ return ShardShuffledExamplesIterable(self.generate_examples_f │ │ │ │ /users/muennighoff/.cache/huggingface/modules/datasets_modules/datasets/c4/d │ │ f532b158939272d032cc63ef19cd5b83e9b4d00c922b833e4cb18b2e9869b01/c4.py:89 in │ │ _generate_examples │ │ │ │ 86 │ │ for filepath in filepaths: │ │ 87 │ │ │ logger.info("generating examples from = %s", filepath) │ │ 88 │ │ │ with gzip.open(open(filepath, "rb"), "rt", encoding="utf-8" │ │ ❱ 89 │ │ │ │ for line in f: │ │ 90 │ │ │ │ │ if line: │ │ 91 │ │ │ │ │ │ example = json.loads(line) │ │ 92 │ │ │ │ │ │ yield id_, example │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:313 in read1 │ │ │ │ 310 │ │ │ │ 311 │ │ if size < 0: │ │ 312 │ │ │ size = io.DEFAULT_BUFFER_SIZE │ │ ❱ 313 │ │ return self._buffer.read1(size) │ │ 314 │ │ │ 315 │ def peek(self, n): │ │ 316 │ │ self._check_not_closed() │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/_compression.py:68 in readinto │ │ │ │ 65 │ │ │ 66 │ def readinto(self, b): │ │ 67 │ │ with memoryview(b) as view, view.cast("B") as byte_view: │ │ ❱ 68 │ │ │ data = self.read(len(byte_view)) │ │ 69 │ │ │ byte_view[:len(data)] = data │ │ 70 │ │ return len(data) │ │ 71 │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:493 in read │ │ │ │ 490 │ │ │ │ self._new_member = False │ │ 491 │ │ │ │ │ 492 │ │ │ # Read a chunk of data from the file │ │ ❱ 493 │ │ │ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE) │ │ 494 │ │ │ │ │ 495 │ │ │ uncompress = self._decompressor.decompress(buf, size) │ │ 496 │ │ │ if self._decompressor.unconsumed_tail != b"": │ │ │ │ /opt/cray/pe/python/3.9.12.1/lib/python3.9/gzip.py:96 in read │ │ │ │ 93 │ │ │ read = self._read │ │ 94 │ │ │ self._read = None │ │ 95 │ │ │ return self._buffer[read:] + \ │ │ ❱ 96 │ │ │ │ self.file.read(size-self._length+read) │ │ 97 │ │ │ 98 │ def prepend(self, prepend=b''): │ │ 99 │ │ if self._read is None: │ │ │ │ /pfs/lustrep4/scratch/project_462000119/muennighoff/nov-2022-bettercom/venv/ │ │ lib/python3.9/site-packages/datasets/download/streaming_download_manager.py: │ │ 365 in read_with_retries │ │ │ │ 362 │ │ │ │ ) │ │ 363 │ │ │ │ time.sleep(config.STREAMING_READ_RETRY_INTERVAL) │ │ 364 │ │ else: │ │ ❱ 365 │ │ │ raise ConnectionError("Server Disconnected") │ │ 366 │ │ return out │ │ 367 │ │ │ 368 │ file_obj.read = read_with_retries │ ╰──────────────────────────────────────────────────────────────────────────────╯ ConnectionError: Server Disconnected ``` ### Expected behavior There should be no disconnect I think. ### Environment info ``` datasets=2.7.0 Python 3.9.12 ```
44
Using too many threads results in: Got disconnected from remote data host. Retrying in 5sec
[ -0.3806016147136688, -0.32525283098220825, -0.20978423953056335, 0.19854821264743805, -0.027557121589779854, -0.31166669726371765, 0.20527470111846924, -0.06316015124320984, 0.06631922721862793, 0.27808794379234314, 0.10560974478721619, -0.02496887743473053, 0.1686362475156784, -0.10458805412054062, -0.37757906317710876, 0.13817302882671356, 0.09359857439994812, -0.06981568783521652, -0.17918774485588074, -0.13179364800453186, 0.04165147989988327, 0.16627906262874603, 0.19916518032550812, -0.15121357142925262, -0.25269728899002075, -0.1624060869216919, 0.1137022152543068, 0.3129114806652069, 0.19987808167934418, -0.09860803186893463, -0.07413506507873535, 0.10355524718761444, -0.1970507800579071, 0.1339089721441269, -0.00009616801980882883, -0.05888611450791359, -0.04433506354689598, 0.10824929177761078, -0.20660044252872467, 0.46095287799835205, 0.08917921036481857, -0.15139442682266235, 0.3459666073322296, -0.07130404561758041, -0.0493890680372715, 0.0983872339129448, 0.1595781445503235, 0.19089917838573456, 0.6785468459129333, 0.17237968742847443, 0.3211100101470947, 0.391269326210022, -0.20283493399620056, -0.06828092783689499, -0.08723878115415573, -0.3377397358417511, 0.05877739563584328, 0.5422684550285339, 0.6026566028594971, 0.10901042819023132, -0.19700774550437927, 0.11004171520471573, 0.014521192759275436, 0.27680671215057373, -0.36123043298721313, -0.009443145245313644, -0.17940165102481842, -0.13550817966461182, 0.1573604941368103, -0.07220578193664551, -0.05033241584897041, 0.29183247685432434, 0.21124430000782013, -0.11259775608778, -0.12495506554841995, -0.0750284194946289, 0.06782173365354538, -0.21807730197906494, -0.13160695135593414, 0.046759795397520065, 0.17950405180454254, -0.05765969678759575, -0.061435382813215256, -0.12875396013259888, 0.1527923047542572, -0.07436566054821014, 0.0014020622475072742, 0.29968199133872986, -0.14625218510627747, 0.1389325112104416, 0.035455282777547836, 0.13488616049289703, -0.11234184354543686, -0.5269811153411865, -0.2108526974916458, 0.003174310317263007, 0.33495664596557617, 0.01773024909198284, 0.031083213165402412, 0.06970508396625519, 0.13287419080734253, 0.2037937492132187, 0.03653187304735184, -0.20606780052185059, 0.0970725566148758, -0.45183852314949036, -0.2643902003765106, -0.31545963883399963, 0.13737007975578308, 0.008711225353181362, -0.3459934890270233, -0.08069805800914764, 0.24341528117656708, -0.3350318670272827, 0.07615164667367935, -0.035440754145383835, 0.21577194333076477, -0.05515218898653984, -0.06895514577627182, 0.29234129190444946, -0.15857961773872375, 0.2649507522583008, -0.050934188067913055, 0.03475874289870262, -0.08681588619947433, 0.2650652229785919, 0.09663595259189606, -0.09996911138296127, -0.4534294605255127, -0.21897941827774048, -0.3616369664669037, -0.20612572133541107, -0.0030545759946107864, -0.2159239798784256, 0.12234725803136826, -0.01965663582086563, 0.06848175823688507, 0.24329347908496857, 0.11164046078920364, -0.26622551679611206, -0.09186940640211105, -0.06287980824708939, -0.026541421189904213, 0.039933621883392334, 0.024679210036993027, 0.020222140476107597, 0.05357576906681061, 0.2589683532714844, 0.21765461564064026, -0.3047844469547272, -0.06713543087244034, -0.18210634589195251, -0.1205822080373764, 0.29297536611557007, 0.4040898382663727, 0.028256632387638092, 0.2928023338317871, -0.07803919166326523, -0.06102051958441734, -0.04307631403207779, 0.06827770918607712, -0.32071325182914734, -0.16410794854164124, 0.0001443501387257129, -0.19920946657657623, 0.39177000522613525, -0.01590968854725361, 0.12920744717121124, 0.3272266089916229, -0.10404535382986069, 0.2431534230709076, 0.35670724511146545, -0.14936085045337677, 0.16033336520195007, -0.10543794184923172, 0.01032027043402195, -0.05445550009608269, -0.23375308513641357, -0.3792043924331665, 0.40526264905929565, -0.3367913067340851, -0.13046886026859283, 0.19259221851825714, -0.051056213676929474, 0.4433754086494446, 0.0008959569386206567, 0.43871527910232544, -0.018904825672507286, -0.20523503422737122, -0.11712699383497238, -0.2720576822757721, -0.13015982508659363, -0.35166051983833313, 0.33967533707618713, 0.21433000266551971, -0.11113174259662628, 0.24728526175022125, -0.41201499104499817, 0.43318918347358704, -0.04880983754992485, 0.04401455819606781, 0.09870479255914688, 0.06205201521515846, 0.0843934491276741, -0.0976792573928833, 0.22766338288784027, -0.22423462569713593, 0.1119106262922287, 0.39414334297180176, 0.30043908953666687, 0.136640727519989, 0.2343439906835556, 0.07806486636400223, 0.1344422698020935, -0.12540625035762787, 0.16606301069259644, 0.29065388441085815, 0.07707084715366364, -0.33240702748298645, -0.09753308445215225, 0.1097780168056488, 0.5630267262458801, -0.12813431024551392, 0.045586295425891876, -0.18884103000164032, 0.11632940918207169, -0.13682100176811218, -0.28798505663871765, 0.13192462921142578, -0.057562194764614105, 0.17727233469486237, 0.08343738317489624, 0.033592160791158676, -0.03239722549915314, -0.012699327431619167, 0.07000340521335602, 0.1602112352848053, -0.008876443840563297, 0.07439520955085754, 0.058151546865701675, 0.03125743940472603, 0.06180400028824806, 0.1915321946144104, -0.05651877075433731, 0.2396460324525833, 0.06186804175376892, 0.017527280375361443, 0.09568972885608673, -0.10150744020938873, 0.005106077063828707, 0.3661395311355591, -0.09430573880672455, 0.08091367781162262, 0.14404143393039703, 0.41313132643699646, 0.2732672691345215, 0.006838317960500717, -0.22427569329738617, -0.5318171977996826, 0.4029710292816162, -0.10855530202388763, -0.017760932445526123, -0.023388078436255455, -0.07420923560857773, 0.20280586183071136, -0.23675762116909027, 0.14370709657669067, 0.06861041486263275, 0.23870112001895905, 0.24801005423069, 0.20310038328170776, 0.07981754094362259, -0.1093093678355217, -0.31498441100120544, -0.048109035938978195, 0.03932138904929161, 0.12875519692897797, 0.23625032603740692, 0.15912912786006927, -0.2793866693973541, -0.2364913374185562, -0.5303714275360107, -0.114750936627388, 0.10853952914476395, -0.08760982751846313, 0.15721267461776733, -0.2181025594472885, 0.09236020594835281, -0.06016096472740173, 0.13945768773555756, -0.011036834679543972, -0.37515801191329956, 0.13188619911670685, 0.27921274304389954, -0.3378038704395294, 0.02607908472418785, 0.06793580949306488, -0.05396946519613266, 0.15203535556793213, 0.3892182409763336, 0.044308852404356, -0.2586921155452728, -0.1744392067193985, 0.19354918599128723, -0.20475079119205475, 0.09652538597583771, 0.4945565164089203, -0.01115698553621769, -0.1593770831823349, -0.18524521589279175, 0.2661237418651581, 0.05118146166205406, 0.22291876375675201, 0.16079623997211456, 0.11861536651849747, 0.2535725235939026, 0.046755921095609665, -0.06659690290689468, 0.06722299009561539, -0.1201063022017479, 0.17051783204078674, 0.04142611101269722, -0.34182971715927124, -0.05586585775017738, -0.016447044909000397, -0.24806858599185944, -0.1270502209663391, -0.19042201340198517, 0.2812798023223877, -0.04201420024037361, 0.17396517097949982, 0.07464343309402466, 0.17002519965171814, 0.12623701989650726, 0.09275249391794205, -0.04435510188341141, -0.39093542098999023, -0.3554588556289673, -0.125745952129364, 0.01411596778780222, -0.15510673820972443, 0.12021441757678986, 0.03364099562168121, 0.19309553503990173, 0.007936554029583931, -0.44626328349113464, -0.04908210411667824, -0.03383550047874451, 0.18309342861175537, -0.33932074904441833, -0.017115019261837006, 0.30258238315582275, -0.09505760669708252, -0.2726387083530426, 0.14146491885185242, 0.1495104283094406, 0.36019039154052734, 0.15359511971473694, -0.04113258048892021, -0.21765103936195374, 0.6475549340248108, -0.013491842895746231, 0.33449503779411316, -0.07391313463449478, 0.12017452716827393, 0.14702549576759338, -0.14913634955883026, -0.04025060683488846, -0.151533842086792, -0.0976502001285553, 0.3071572482585907, -0.07768452167510986, -0.4458622634410858, 0.12814177572727203, -0.1781955063343048, -0.02511831745505333, -0.05391469970345497, -0.40672656893730164, -0.07307680696249008, -0.33919039368629456, 0.1301576942205429, 0.03463372215628624, -0.1083810031414032, 0.21359123289585114, -0.03299637883901596, -0.09014610201120377, 0.09001068025827408, -0.21923470497131348, -0.16750149428844452, -0.02388681285083294, -0.15971557796001434, -0.11592578887939453, 0.17093871533870697, -0.7584660053253174, 0.14216667413711548, -0.08010917901992798, 0.4029329717159271, -0.08805887401103973, -0.021514486521482468, 0.15477123856544495, -0.3094361126422882, 0.3313550353050232, -0.1347036063671112, 0.37443265318870544, 0.05627058446407318, -0.022321578115224838, -0.05135343596339226, -0.08514970541000366, -0.14132602512836456, -0.15137873589992523, 0.2677975594997406, -0.2194223701953888, -0.13661667704582214, 0.13360309600830078, 0.12787289917469025, -0.11506807804107666, -0.04935801029205322, 0.024933381006121635, -0.035246841609478, -0.32877448201179504, -0.2871609628200531, 0.12916727364063263, 0.015377005562186241, -0.018633954226970673, -0.0704658031463623, -0.22243380546569824, 0.09526318311691284, 0.22004304826259613, -0.10243476182222366, -0.1035623848438263, -0.3316592574119568, -0.2995378077030182, 0.22283028066158295, -0.09949769079685211, 0.30577120184898376, 0.054820466786623, -0.011785815469920635, 0.13065609335899353, 0.08930178731679916, 0.16088823974132538, -0.04619027301669121, 0.10392481088638306, 0.3626703917980194, 0.23412054777145386, 0.22954900562763214, 0.2609115540981293, 0.6117308735847473, 0.05066516622900963, 0.39666134119033813, -0.004285312257707119, -0.14717411994934082, -0.13801197707653046, 0.20657093822956085, -0.015318535268306732, -0.21720974147319794, 0.00524225365370512, 0.3199799358844757, -0.18163712322711945, -0.021264808252453804, 0.19712863862514496, -0.07783866673707962, 0.5948537588119507, 0.24910534918308258, 0.026424309238791466, 0.3590059280395508, -0.6971374154090881, 0.23226569592952728, -0.15168263018131256, 0.18857018649578094, -0.16310001909732819, 0.052436813712120056, 0.09891527146100998, 0.02301250956952572, -0.1306803971529007, -0.015911705791950226, 0.0030266738031059504, 0.07257898896932602, 0.011608054861426353, 0.25473088026046753, -0.2370532900094986, 0.1618858277797699, -0.06320688128471375, -0.2887256443500519, 0.001991339260712266, 0.3124004304409027, -0.23695407807826996, -0.3306705355644226, -0.35819166898727417, 0.08490195125341415, 0.23811101913452148, -0.20535707473754883, 0.024761125445365906, -0.08642371743917465, -0.15200333297252655, 0.09708475321531296, 0.02427465096116066, -0.18078941106796265, -0.3575174808502197, -0.3273407816886902, -0.05123761296272278, -0.14357109367847443, -0.007401739247143269, 0.19401220977306366, -0.06299343705177307, 0.0056318799033761024, 0.0002219184098066762, -0.274915874004364, -0.13739314675331116, -0.10059022158384323, -0.3308408260345459, -0.16380631923675537, 0.025999976322054863, -0.3238352835178375, 0.0930933877825737, 0.2702464461326599, -0.2591007649898529, -0.07019228488206863, 0.04361186921596527, 0.32166045904159546, -0.08716864883899689, -0.3005562722682953, 0.24622231721878052, 0.09977205842733383, -0.06303776800632477, 0.32683035731315613, -0.20850329101085663, 0.03901892155408859, -0.3029005229473114, 0.30386894941329956, -0.09010419249534607, -0.13121336698532104, 0.16323046386241913, 0.5049746036529541, -0.2276410460472107, -0.3797547519207001, -0.034636903554201126, 0.15760298073291779, -0.3848697245121002, 0.18628159165382385, -0.133126899600029, -0.08347903937101364, 0.2094770073890686, 0.16418921947479248, -0.08061587810516357, -0.02436988428235054, 0.29632842540740967, -0.07458434998989105, -0.31136375665664673, -0.08444955199956894, -0.1683218628168106, -0.007237303536385298, 0.19323283433914185, 0.2638923227787018, -0.024688806384801865, -0.07526883482933044, -0.4372938573360443, 0.17790095508098602, -0.3461795151233673, 0.10550007224082947, -0.11121945083141327, -0.5434498190879822, 0.20764926075935364, 0.17109128832817078, 0.29268938302993774, 0.2785819470882416, -0.14294901490211487, -0.3397570550441742, -0.16074104607105255, 0.02305823192000389, 0.015099439769983292, -0.19444435834884644, -0.07596946507692337, -0.16315141320228577, -0.07674792408943176, 0.1009918600320816, 0.09896937757730484, 0.19593851268291473, -0.03512273356318474, -0.40739738941192627, 0.14455506205558777, 0.3205989897251129, 0.09753070771694183, 0.09698484092950821, 0.2866121530532837, 0.4874833822250366, -0.2085604965686798, -0.1349649429321289, -0.04627784341573715, -0.10949012637138367, 0.04811054840683937, 0.29508137702941895, 0.36891987919807434, -0.21608538925647736, 0.19095905125141144, -0.07613672316074371, -0.3241201937198639, 0.12248517572879791, 0.46005943417549133, 0.3530990779399872, -0.027232063934206963, -0.2306606024503708, -0.023130500689148903, 0.3285297453403473, 0.07346498221158981, -0.17998352646827698, 0.27147677540779114, -0.02855488657951355, 0.21250486373901367, 0.15248286724090576, -0.07571553438901901, -0.4897534251213074, 0.04773201420903206, 0.2655690014362335, 0.0372072197496891, -0.5541717410087585, -0.4267132580280304, -0.3831143081188202, 0.010151740163564682, -0.1193467453122139, 0.1416543871164322, 0.05603833869099617, 0.4891684353351593, 0.5090487599372864, 0.14170534908771515, -0.04129632189869881, 0.3514167368412018, 0.21225585043430328, 0.08648715913295746, -0.28136003017425537, -0.237855926156044, 0.03122982569038868, -0.47149163484573364, -0.016298597678542137, -0.11814341694116592, -0.33386287093162537, -0.09684734791517258, -0.014880098402500153, -0.4049619734287262, 0.3382035791873932, -0.26654887199401855, 0.030519867315888405, 0.09253697097301483, -0.037141453474760056, -0.010328331030905247, 0.22147640585899353, -0.016167784109711647, 0.19708622992038727, -0.015883708372712135, 0.013381168246269226, -0.049967411905527115, -0.03913209214806557, -0.20836172997951508, -0.18287111818790436, -0.12774217128753662, -0.14805082976818085, -0.0490780770778656, 0.38206884264945984, 0.05593695119023323, -0.10539431869983673, 0.07201649993658066, 0.3345834016799927, -0.12059099227190018, -0.043877631425857544, 0.20177529752254486, 0.21500933170318604, 0.08122586458921432, -0.26801615953445435, 0.12570811808109283, 0.24914748966693878, 0.4553883373737335, 0.3226674497127533, 0.2463301569223404, -0.3184179663658142, 0.021364623680710793, 0.12340165674686432, -0.0748443454504013, 0.015772826969623566, -0.03134927526116371, -0.03315948694944382, -0.05708998814225197, -0.18118120729923248, 0.1773402988910675, -0.442730188369751, 0.02227451279759407, 0.13299968838691711, -0.18738271296024323, 0.21301034092903137, -0.12926813960075378, 0.15268780291080475, -0.5985479950904846, 0.47939029335975647, -0.11724784225225449, 0.08218608051538467, -0.28048017621040344, -0.18599830567836761, -0.056220561265945435, 0.08007928729057312, -0.06339720636606216, -0.05965091660618782, -0.2760508060455322, 0.2565935254096985, 0.08798057585954666, -0.0010437684832140803, 0.029384339228272438, -0.1166377142071724, 0.20788642764091492, 0.22392436861991882, 0.009538134559988976, 0.027863875031471252, 0.1855924129486084, -0.25347450375556946, 0.14836867153644562, -0.07098143547773361, 0.45657703280448914, -0.15235070884227753, 0.35921603441238403, -0.005099912639707327, -0.3785834312438965, 0.010336875915527344, 0.028163012117147446, 0.21164852380752563, 0.2874480187892914, 0.03981531038880348, -0.09627389162778854, -0.18169847130775452, -0.06629722565412521, -0.2015896588563919, 0.0986824482679367, -0.1557731181383133, 0.034808188676834106, 0.22385573387145996, 0.07054860144853592, 0.46446114778518677, -0.013314821757376194, -0.08950473368167877, 0.04462241381406784, 0.3183930516242981, -0.02859308011829853, 0.19501493871212006, 0.12419077008962631, 0.3218855559825897, -0.018952542915940285, 0.3328471779823303, 0.18833154439926147, -0.020708832889795303, -0.34946268796920776, -0.077494777739048, 0.045230597257614136, 0.23114487528800964, -0.433676153421402, -0.36997082829475403, 0.39501169323921204, -0.07737575471401215, 0.19359448552131653, -0.052408576011657715, -0.10917601734399796, 0.03559467941522598, -0.12563960254192352, -0.37593764066696167, 0.3117985725402832, 0.30491530895233154, -0.21159185469150543, 0.15493080019950867, 0.1306091696023941, 0.17913658916950226, -0.15109381079673767, 0.009544538334012032, 0.011103964410722256 ]
https://github.com/huggingface/datasets/issues/5362
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
Thanks for reporting, @shaoyuta. We have checked and yes, apparently there is an issue with the server hosting the data of the "enron_emails" subset of "the_pile" dataset: http://eaidata.bmk.sh/data/enron_emails.jsonl.zst It seems to be down: The connection has timed out. Please note that at the Hugging Face Hub, we are not hosting their data for this dataset, but only a script that downloads the data from their servers. We are updating the data URL to one in another server. In the meantime, please note that you can train your model in the entire "the_pile" dataset, by passing the "all" config (instead of the "enron_emails" one).
### Describe the bug Run model "GPT-J" with dataset "the_pile" fail. The fail out is as below: ![image](https://user-images.githubusercontent.com/52023469/207750127-118d9896-35f4-4ee9-90d4-d0ab9aae9c74.png) Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable . ### Steps to reproduce the bug Steps to reproduce this issue: git clone https://github.com/huggingface/transformers cd transformers python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir ### Expected behavior This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached. Is there another way to download the dataset "the_pile" ? Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ? ### Environment info huggingface_hub version: 0.11.1 Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35 Python version: 3.9.12 Running in iPython ?: No Running in notebook ?: No Running in Google Colab ?: No Token path ?: /home/taosy/.huggingface/token Has saved token ?: False Configured git credential helpers: FastAI: N/A Tensorflow: N/A Torch: N/A Jinja2: N/A Graphviz: N/A Pydot: N/A
103
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
[ -0.5160571932792664, 0.1292741447687149, -0.16638308763504028, 0.3648289442062378, 0.08000359684228897, 0.13526254892349243, 0.006715877912938595, 0.43555930256843567, 0.32404235005378723, 0.22803843021392822, 0.0014868405414745212, 0.24868133664131165, 0.10273874551057816, 0.4792901277542114, -0.06477820128202438, 0.13216964900493622, -0.2463032603263855, 0.07071349769830704, -0.24462352693080902, -0.07547017931938171, -0.28423818945884705, 0.3300270736217499, 0.2523927390575409, 0.18821698427200317, 0.22627416253089905, -0.21662119030952454, 0.07791963964700699, 0.30746737122535706, -0.041828036308288574, 0.02469414472579956, 0.04602595791220665, -0.2718275487422943, -0.046218905597925186, 0.20200414955615997, -0.00010165113781113178, 0.04003867506980896, 0.13284118473529816, -0.05998110771179199, -0.43840479850769043, -0.014070270583033562, -0.10174714028835297, -0.3019512891769409, -0.07494120299816132, -0.37076956033706665, -0.17256763577461243, -0.043998606503009796, 0.10755747556686401, -0.3197116553783417, 0.506361722946167, 0.5107082724571228, 0.2615225911140442, -0.034082867205142975, 0.2381628304719925, -0.21031099557876587, 0.17208677530288696, -0.3514349162578583, 0.039628367871046066, -0.0034583171363919973, -0.15584804117679596, 0.03740881010890007, 0.22551947832107544, 0.19357183575630188, -0.04836982488632202, 0.15705488622188568, 0.07073564827442169, -0.10018964856863022, 0.5350996255874634, -0.12126188725233078, 0.07486600428819656, -0.07974998652935028, 0.4527808427810669, -0.014824728481471539, -0.010076753795146942, 0.2761521339416504, 0.01858239248394966, -0.2744806706905365, 0.22804340720176697, 0.09459010511636734, -0.29415997862815857, 0.12488536536693573, -0.1361650824546814, -0.270386278629303, -0.29426971077919006, -0.02141401171684265, -0.10398463904857635, 0.31389692425727844, -0.01286297757178545, 0.07565218210220337, 0.09476958215236664, 0.11746605485677719, 0.07375234365463257, 0.17488528788089752, -0.15012004971504211, -0.009229454211890697, -0.23044657707214355, -0.16442681849002838, 0.09878959506750107, -0.015646371990442276, 0.31720802187919617, 0.45502257347106934, -0.04492838680744171, 0.002500448375940323, 0.481584757566452, 0.10945967584848404, 0.14246879518032074, 0.060911551117897034, -0.15802212059497833, -0.004434939939528704, 0.3378911018371582, -0.03710874915122986, -0.018703369423747063, -0.029267190024256706, -0.15056218206882477, -0.10615670680999756, -0.08006561547517776, 0.10236912220716476, -0.012813674286007881, -0.21634356677532196, -0.12420623004436493, 0.2444208413362503, -0.10185472667217255, -0.10794495791196823, -0.17618423700332642, -0.09581122547388077, -0.09831413626670837, -0.3428528904914856, 0.16438107192516327, -0.03097977302968502, 0.04134679213166237, 0.14020666480064392, -0.19762755930423737, -0.012862023897469044, -0.12665869295597076, -0.12159624695777893, 0.30775871872901917, -0.14093787968158722, 0.4345732033252716, -0.07189908623695374, -0.1031254306435585, 0.12184549868106842, 0.03775191679596901, -0.025146184489130974, -0.2890080213546753, 0.5246975421905518, 0.1665283888578415, -0.03410753980278969, 0.11692480742931366, 0.30922895669937134, -0.07042969763278961, 0.04990079253911972, -0.15628904104232788, -0.10971909016370773, -0.02455109730362892, 0.2387537658214569, 0.30824440717697144, 0.0128405736759305, 0.16563504934310913, -0.10623040050268173, -0.11328522115945816, -0.18566641211509705, -0.33940044045448303, -0.1376429945230484, 0.24421097338199615, 0.03096478246152401, 0.36665111780166626, 0.16931478679180145, -0.17309407889842987, 0.07365364581346512, -0.14459006488323212, -0.11647844314575195, 0.07138008624315262, 0.3689633011817932, -0.18545210361480713, 0.3846178650856018, -0.1048852801322937, -0.2107122242450714, -0.06033724546432495, -0.3645619750022888, -0.3829312026500702, 0.13766714930534363, -0.4653340280056, -0.24308142066001892, 0.07508409768342972, 0.0764293372631073, -0.037607427686452866, 0.1348411738872528, 0.02234184928238392, 0.3808692395687103, 0.01621503196656704, 0.09657931327819824, -0.14433687925338745, -0.20111346244812012, -0.09177824854850769, 0.09147113561630249, 0.1259312778711319, 0.1504235863685608, 0.06580715626478195, 0.12416969984769821, -0.0792730376124382, 0.002231874270364642, -0.1584799587726593, 0.1963609755039215, 0.1427309215068817, -0.10463205724954605, -0.0391225591301918, 0.11085162311792374, -0.18805630505084991, -0.13009056448936462, -0.17873097956180573, 0.26119211316108704, -0.30985262989997864, 0.16702397167682648, -0.24990525841712952, -0.07373757660388947, 0.10509706288576126, -0.11747744679450989, 0.3479095995426178, 0.2446179986000061, 0.18232445418834686, 0.17223083972930908, 0.05109019950032234, 0.34505048394203186, 0.19957181811332703, 0.1242205947637558, -0.020413240417838097, 0.13806338608264923, -0.4227592647075653, -0.011397738009691238, 0.18798032402992249, -0.2938075661659241, 0.1906164139509201, -0.20060288906097412, -0.1420854926109314, 0.1584939807653427, -0.19682902097702026, -0.3230319023132324, 0.1938234269618988, -0.01613537408411503, 0.0026276835706084967, -0.036058228462934494, 0.18797516822814941, 0.21702131628990173, -0.038707561790943146, 0.015827544033527374, -0.031806886196136475, 0.048973508179187775, 0.008360656909644604, -0.037343718111515045, 0.006958254612982273, -0.09984225779771805, 0.26309308409690857, -0.19768348336219788, 0.10299321264028549, 0.1697981357574463, 0.11926702409982681, 0.2961708903312683, -0.28439828753471375, -0.36461833119392395, -0.28263992071151733, -0.2610958516597748, 0.7404878735542297, 0.12024019658565521, 0.13841669261455536, 0.03209277242422104, -0.01534381415694952, -0.03216380253434181, 0.11841829866170883, 0.1810782104730606, 0.35688960552215576, 0.15953309834003448, -0.15668971836566925, 0.28430429100990295, -0.20321686565876007, -0.19563275575637817, 0.1877431571483612, -0.05650268867611885, 0.3722784221172333, 0.38118213415145874, -0.2001073956489563, -0.10718445479869843, -0.24724240601062775, -0.3194560706615448, 0.051564719527959824, 0.4185670018196106, -0.030789263546466827, 0.007817612029612064, -0.1287468820810318, -0.140960231423378, 0.08790487796068192, -0.08031286299228668, -0.021633464843034744, -0.27621573209762573, 0.0007554289768449962, 0.21193554997444153, -0.09983277320861816, 0.15913455188274384, 0.0710863396525383, 0.29931679368019104, 0.34052252769470215, 0.1062033474445343, -0.2788013815879822, -0.2828889787197113, -0.20804691314697266, 0.23191416263580322, 0.052186038345098495, 0.042813997715711594, 0.2282194197177887, -0.3121468722820282, 0.2621365189552307, -0.330593466758728, -0.2141755372285843, 0.024810824543237686, -0.192588672041893, 0.28930118680000305, 0.08991117775440216, 0.5664388537406921, -0.331516295671463, -0.37534981966018677, 0.18444328010082245, -0.27093085646629333, -0.10246490687131882, -0.08956310153007507, 0.03829961270093918, -0.048175375908613205, -0.20635616779327393, -0.5283128619194031, -0.2837277054786682, -0.3027185797691345, 0.3951685428619385, 0.010735972784459591, 0.23866334557533264, 0.1043500080704689, 0.1397119015455246, 0.28108343482017517, 0.15821515023708344, 0.17565099895000458, -0.2112896740436554, -0.21592403948307037, 0.13157333433628082, -0.31474292278289795, -0.29883190989494324, 0.28810781240463257, 0.37141603231430054, 0.3482856750488281, 0.009793896228075027, -0.5439537763595581, -0.0445261225104332, 0.11186038702726364, -0.3414705693721771, -0.3235282003879547, 0.02193218097090721, -0.046546947211027145, 0.09965699166059494, -0.26526495814323425, -0.010727869346737862, 0.057895418256521225, 0.28661125898361206, -0.28658854961395264, 0.10106794536113739, 0.03443722054362297, 0.6734443306922913, -0.056222692131996155, -0.14052176475524902, 0.05285433679819107, 0.10720858722925186, -0.010912840254604816, -0.0640428215265274, 0.14608164131641388, 0.026093915104866028, -0.2513170540332794, 0.0037719199899584055, 0.16121092438697815, -0.1947818398475647, 0.30774712562561035, -0.11866917461156845, -0.23818452656269073, -0.39923885464668274, 0.02589891478419304, 0.0690668374300003, -0.2619394361972809, -0.12345891445875168, 0.28140732645988464, 0.07908942550420761, 0.08015192300081253, 0.021939750760793686, -0.04197697341442108, 0.14525708556175232, 0.11534850299358368, 0.06118863821029663, -0.23085661232471466, 0.07079418748617172, -0.3035234212875366, -0.24820996820926666, -0.349796324968338, 0.39626336097717285, -0.31314077973365784, 0.4469050168991089, -0.376063734292984, 0.3329984247684479, 0.021403305232524872, -0.15843446552753448, 0.46336185932159424, -0.3118586242198944, 0.17556190490722656, 0.10862713307142258, 0.04863176494836807, -0.2078743875026703, -0.03921511024236679, -0.43193042278289795, 0.04462315887212753, 0.2368251234292984, 0.29078152775764465, -0.45261892676353455, 0.0568319596350193, 0.5518908500671387, -0.19094449281692505, -0.015472312457859516, 0.09933553636074066, -0.1488371193408966, -0.5818884968757629, -0.400688111782074, 0.28586670756340027, 0.17858880758285522, 0.2259640246629715, -0.07704436033964157, -0.17883683741092682, 0.08025092631578445, 0.06436032056808472, -0.11489395052194595, -0.004973369650542736, 0.10461137443780899, -0.010913469828665257, -0.07797767966985703, 0.11752787232398987, 0.201290100812912, 0.49114280939102173, 0.33589690923690796, -0.09480069577693939, -0.4101617634296417, 0.16772674024105072, -0.25611451268196106, 0.10150828212499619, 0.029901163652539253, -0.04924800619482994, -0.2401776760816574, 0.02959686890244484, 0.20512624084949493, 0.6281613707542419, -0.1040540412068367, 0.17990657687187195, 0.2414676547050476, -0.32115066051483154, -0.13544024527072906, 0.06155868619680405, 0.17862939834594727, 0.0676407441496849, 0.12032320350408554, -0.33204036951065063, -0.30778592824935913, -0.14974753558635712, 0.15314987301826477, 0.7009268999099731, 0.14512641727924347, -0.04807053133845329, 0.051492322236299515, -0.23710742592811584, 0.3642451763153076, -0.37147054076194763, 0.18199312686920166, -0.3054420053958893, -0.15458296239376068, 0.01511103194206953, -0.18336093425750732, 0.25989410281181335, 0.21224218606948853, -0.3091107904911041, 0.13228416442871094, -0.08224204927682877, 0.16726680099964142, 0.07709471881389618, 0.47557398676872253, -0.2655826210975647, 0.16604562103748322, -0.07050882279872894, 0.22086215019226074, -0.2605742812156677, 0.2600211501121521, -0.14298516511917114, -0.3122495412826538, -0.04857536777853966, -0.13384978473186493, -0.34604665637016296, 0.18866591155529022, -0.5326600670814514, 0.2818257212638855, -0.47846052050590515, -0.13103757798671722, -0.09172266721725464, -0.1336255967617035, 0.2575618028640747, 0.3568534553050995, -0.20663465559482574, 0.06328627467155457, -0.4636419415473938, -0.3195045590400696, -0.18194405734539032, 0.2694152295589447, 0.08407557755708694, -0.316339373588562, -0.4482019245624542, 0.1195153295993805, -0.15351121127605438, -0.30943563580513, 0.18735191226005554, -0.11739548295736313, 0.07091405987739563, 0.078162282705307, 0.33179086446762085, -0.05241991579532623, -0.2738352417945862, -0.25602737069129944, 0.20433780550956726, -0.14442358911037445, 0.1342138946056366, 0.19079360365867615, 0.18551084399223328, -0.24986352026462555, -0.017584072425961494, 0.32838180661201477, -0.012748552486300468, 0.0696955993771553, 0.48748907446861267, 0.11526484787464142, -0.18497709929943085, -0.4591115415096283, -0.19441264867782593, 0.062449026852846146, -0.21346434950828552, 0.2195073366165161, -0.029912108555436134, 0.10505323112010956, 0.20296703279018402, 0.2690528631210327, 0.2885643243789673, 0.10229270160198212, 0.08678962290287018, -0.36961814761161804, -0.02863483503460884, 0.17283393442630768, 0.1752500683069229, 0.26939132809638977, 0.19451069831848145, -0.08246149867773056, 0.15452629327774048, -0.263554185628891, -0.4368734657764435, 0.1124536395072937, -0.233028843998909, -0.0646112710237503, 0.0891546756029129, -0.19994589686393738, 0.2775919735431671, 0.12923333048820496, 0.17173129320144653, 0.11154890805482864, -0.3899048864841461, -0.24904535710811615, 0.1499411016702652, 0.06981948763132095, 0.05301456153392792, -0.1717066913843155, 0.09585056453943253, -0.5379580855369568, -0.055553462356328964, 0.16679121553897858, 0.12950943410396576, -0.28979212045669556, 0.053484708070755005, 0.0013261629501357675, 0.2879137694835663, 0.3108253479003906, 0.12271728366613388, -0.17039747536182404, -0.09461180120706558, -0.0233539380133152, -0.18632318079471588, 0.04379381611943245, 0.06411086767911911, -0.08069215714931488, -0.3403407037258148, 0.0784362256526947, 0.20211146771907806, 0.47540298104286194, 0.2686842679977417, -0.26862743496894836, -0.15541234612464905, 0.0657443255186081, 0.06958720833063126, 0.08798104524612427, -0.09299559891223907, -0.21843481063842773, 0.19616420567035675, 0.3679678738117218, -0.17094944417476654, -0.1502874791622162, 0.20734953880310059, -0.22871579229831696, -0.15680286288261414, -0.03462126478552818, 0.3300491273403168, -0.29283249378204346, 0.182201087474823, -0.054325081408023834, 0.6570346355438232, 0.07012082636356354, 0.008553331717848778, 0.5904546976089478, -0.515817403793335, -0.07231413573026657, 0.12294646352529526, 0.03782126307487488, 0.0711774006485939, 0.37837374210357666, -0.08496759831905365, -0.2815004289150238, 0.22400271892547607, 0.2268875539302826, -0.20081490278244019, -0.18508490920066833, 0.13814131915569305, 0.16382046043872833, -0.06219284236431122, 0.09524304419755936, 0.039235007017850876, 0.06202761456370354, -0.14008040726184845, 0.046149659901857376, -0.5030899047851562, 0.4928852319717407, -0.1815541535615921, 0.27691343426704407, -0.2605796456336975, -0.0657283216714859, 0.16318029165267944, 0.16188035905361176, 0.08232922106981277, -0.13233211636543274, -0.17500877380371094, 0.125279039144516, -0.1379096955060959, -0.17817316949367523, 0.015804098919034004, -0.031163290143013, -0.11750946938991547, -0.1638251692056656, 0.10263321548700333, 0.2369420826435089, 0.0301466416567564, -0.18512482941150665, 0.25940585136413574, 0.28702762722969055, 0.0963752493262291, 0.09054359048604965, -0.07387112826108932, 0.12533903121948242, 0.028630143031477928, -0.13918399810791016, 0.36915090680122375, 0.3597555458545685, -0.1398780196905136, 0.020028352737426758, 0.22342568635940552, -0.246392622590065, -0.00624960707500577, 0.0391853004693985, -0.1550297886133194, 0.2578665018081665, -0.1025579571723938, 0.1647532880306244, -0.14138077199459076, -0.02635793946683407, -0.08876200020313263, -0.24885030090808868, -0.26311737298965454, -0.045994117856025696, -0.024486729875206947, 0.03270978853106499, -0.06605129688978195, 0.15099391341209412, -0.2559463381767273, 0.5279291272163391, 0.14739345014095306, 0.020819999277591705, -0.048596546053886414, -0.3016956150531769, -0.2295088917016983, 0.21199603378772736, -0.03567052632570267, -0.1809142380952835, 0.029979731887578964, -0.055444370955228806, -0.013608500361442566, 0.07381165772676468, 0.2569234073162079, 0.015264454297721386, -0.21539956331253052, 0.1101279929280281, -0.48345938324928284, 0.3619469106197357, 0.30509936809539795, 0.14962132275104523, 0.07711587846279144, -0.1615145057439804, 0.29146862030029297, 0.03641161322593689, 0.24142827093601227, -0.31824666261672974, 0.09588810056447983, -0.07422792166471481, -0.0369868166744709, 0.4242606461048126, 0.0838015079498291, 0.7311719059944153, -0.03153986483812332, -0.26986590027809143, 0.02170184999704361, -0.05392933264374733, -0.09092730283737183, 0.18536970019340515, 0.23635455965995789, 0.15267911553382874, 0.10856736451387405, -0.2477443516254425, -0.21243581175804138, 0.2812337577342987, -0.06396616995334625, 0.2104494273662567, -0.09849803149700165, -0.037076324224472046, 0.2136586457490921, -0.11363646388053894, -0.0713154673576355, -0.018770143389701843, 0.06094301491975784, -0.062438156455755234, -0.4465044140815735, -0.13495339453220367, 0.40403077006340027, 0.046803154051303864, -0.3798530101776123, 0.010851416736841202, 0.12598061561584473, -0.1763485074043274, 0.156117781996727, 0.06440954655408859, 0.3186216652393341, 0.16368325054645538, 0.003994208760559559, -0.34818223118782043, 0.5149437785148621, 0.045062821358442307, -0.024208400398492813, 0.19044405221939087, -0.09931623935699463, 0.03716554865241051, -0.35619863867759705, -0.41222313046455383, -0.012380245141685009 ]
https://github.com/huggingface/datasets/issues/5362
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
We have transferred this issue to the corresponding dataset Community tab: https://huggingface.co/datasets/the_pile/discussions/2 Please, follow the updates there.
### Describe the bug Run model "GPT-J" with dataset "the_pile" fail. The fail out is as below: ![image](https://user-images.githubusercontent.com/52023469/207750127-118d9896-35f4-4ee9-90d4-d0ab9aae9c74.png) Looks like which is due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst" unreachable . ### Steps to reproduce the bug Steps to reproduce this issue: git clone https://github.com/huggingface/transformers cd transformers python examples/pytorch/language-modeling/run_clm.py --model_name_or_path EleutherAI/gpt-j-6B --dataset_name the_pile --dataset_config_name enron_emails --do_eval --output_dir /tmp/output --overwrite_output_dir ### Expected behavior This issue looks like due to "http://eaidata.bmk.sh/data/enron_emails.jsonl.zst " couldn't be reached. Is there another way to download the dataset "the_pile" ? Is there another way to cache the dataset "the_pile" but not let the hg to download it when runtime ? ### Environment info huggingface_hub version: 0.11.1 Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.35 Python version: 3.9.12 Running in iPython ?: No Running in notebook ?: No Running in Google Colab ?: No Token path ?: /home/taosy/.huggingface/token Has saved token ?: False Configured git credential helpers: FastAI: N/A Tensorflow: N/A Torch: N/A Jinja2: N/A Graphviz: N/A Pydot: N/A
17
Run 'GPT-J' failure due to download dataset fail (' ConnectionError: Couldn't reach http://eaidata.bmk.sh/data/enron_emails.jsonl.zst ' )
[ -0.5160571932792664, 0.1292741447687149, -0.16638308763504028, 0.3648289442062378, 0.08000359684228897, 0.13526254892349243, 0.006715877912938595, 0.43555930256843567, 0.32404235005378723, 0.22803843021392822, 0.0014868405414745212, 0.24868133664131165, 0.10273874551057816, 0.4792901277542114, -0.06477820128202438, 0.13216964900493622, -0.2463032603263855, 0.07071349769830704, -0.24462352693080902, -0.07547017931938171, -0.28423818945884705, 0.3300270736217499, 0.2523927390575409, 0.18821698427200317, 0.22627416253089905, -0.21662119030952454, 0.07791963964700699, 0.30746737122535706, -0.041828036308288574, 0.02469414472579956, 0.04602595791220665, -0.2718275487422943, -0.046218905597925186, 0.20200414955615997, -0.00010165113781113178, 0.04003867506980896, 0.13284118473529816, -0.05998110771179199, -0.43840479850769043, -0.014070270583033562, -0.10174714028835297, -0.3019512891769409, -0.07494120299816132, -0.37076956033706665, -0.17256763577461243, -0.043998606503009796, 0.10755747556686401, -0.3197116553783417, 0.506361722946167, 0.5107082724571228, 0.2615225911140442, -0.034082867205142975, 0.2381628304719925, -0.21031099557876587, 0.17208677530288696, -0.3514349162578583, 0.039628367871046066, -0.0034583171363919973, -0.15584804117679596, 0.03740881010890007, 0.22551947832107544, 0.19357183575630188, -0.04836982488632202, 0.15705488622188568, 0.07073564827442169, -0.10018964856863022, 0.5350996255874634, -0.12126188725233078, 0.07486600428819656, -0.07974998652935028, 0.4527808427810669, -0.014824728481471539, -0.010076753795146942, 0.2761521339416504, 0.01858239248394966, -0.2744806706905365, 0.22804340720176697, 0.09459010511636734, -0.29415997862815857, 0.12488536536693573, -0.1361650824546814, -0.270386278629303, -0.29426971077919006, -0.02141401171684265, -0.10398463904857635, 0.31389692425727844, -0.01286297757178545, 0.07565218210220337, 0.09476958215236664, 0.11746605485677719, 0.07375234365463257, 0.17488528788089752, -0.15012004971504211, -0.009229454211890697, -0.23044657707214355, -0.16442681849002838, 0.09878959506750107, -0.015646371990442276, 0.31720802187919617, 0.45502257347106934, -0.04492838680744171, 0.002500448375940323, 0.481584757566452, 0.10945967584848404, 0.14246879518032074, 0.060911551117897034, -0.15802212059497833, -0.004434939939528704, 0.3378911018371582, -0.03710874915122986, -0.018703369423747063, -0.029267190024256706, -0.15056218206882477, -0.10615670680999756, -0.08006561547517776, 0.10236912220716476, -0.012813674286007881, -0.21634356677532196, -0.12420623004436493, 0.2444208413362503, -0.10185472667217255, -0.10794495791196823, -0.17618423700332642, -0.09581122547388077, -0.09831413626670837, -0.3428528904914856, 0.16438107192516327, -0.03097977302968502, 0.04134679213166237, 0.14020666480064392, -0.19762755930423737, -0.012862023897469044, -0.12665869295597076, -0.12159624695777893, 0.30775871872901917, -0.14093787968158722, 0.4345732033252716, -0.07189908623695374, -0.1031254306435585, 0.12184549868106842, 0.03775191679596901, -0.025146184489130974, -0.2890080213546753, 0.5246975421905518, 0.1665283888578415, -0.03410753980278969, 0.11692480742931366, 0.30922895669937134, -0.07042969763278961, 0.04990079253911972, -0.15628904104232788, -0.10971909016370773, -0.02455109730362892, 0.2387537658214569, 0.30824440717697144, 0.0128405736759305, 0.16563504934310913, -0.10623040050268173, -0.11328522115945816, -0.18566641211509705, -0.33940044045448303, -0.1376429945230484, 0.24421097338199615, 0.03096478246152401, 0.36665111780166626, 0.16931478679180145, -0.17309407889842987, 0.07365364581346512, -0.14459006488323212, -0.11647844314575195, 0.07138008624315262, 0.3689633011817932, -0.18545210361480713, 0.3846178650856018, -0.1048852801322937, -0.2107122242450714, -0.06033724546432495, -0.3645619750022888, -0.3829312026500702, 0.13766714930534363, -0.4653340280056, -0.24308142066001892, 0.07508409768342972, 0.0764293372631073, -0.037607427686452866, 0.1348411738872528, 0.02234184928238392, 0.3808692395687103, 0.01621503196656704, 0.09657931327819824, -0.14433687925338745, -0.20111346244812012, -0.09177824854850769, 0.09147113561630249, 0.1259312778711319, 0.1504235863685608, 0.06580715626478195, 0.12416969984769821, -0.0792730376124382, 0.002231874270364642, -0.1584799587726593, 0.1963609755039215, 0.1427309215068817, -0.10463205724954605, -0.0391225591301918, 0.11085162311792374, -0.18805630505084991, -0.13009056448936462, -0.17873097956180573, 0.26119211316108704, -0.30985262989997864, 0.16702397167682648, -0.24990525841712952, -0.07373757660388947, 0.10509706288576126, -0.11747744679450989, 0.3479095995426178, 0.2446179986000061, 0.18232445418834686, 0.17223083972930908, 0.05109019950032234, 0.34505048394203186, 0.19957181811332703, 0.1242205947637558, -0.020413240417838097, 0.13806338608264923, -0.4227592647075653, -0.011397738009691238, 0.18798032402992249, -0.2938075661659241, 0.1906164139509201, -0.20060288906097412, -0.1420854926109314, 0.1584939807653427, -0.19682902097702026, -0.3230319023132324, 0.1938234269618988, -0.01613537408411503, 0.0026276835706084967, -0.036058228462934494, 0.18797516822814941, 0.21702131628990173, -0.038707561790943146, 0.015827544033527374, -0.031806886196136475, 0.048973508179187775, 0.008360656909644604, -0.037343718111515045, 0.006958254612982273, -0.09984225779771805, 0.26309308409690857, -0.19768348336219788, 0.10299321264028549, 0.1697981357574463, 0.11926702409982681, 0.2961708903312683, -0.28439828753471375, -0.36461833119392395, -0.28263992071151733, -0.2610958516597748, 0.7404878735542297, 0.12024019658565521, 0.13841669261455536, 0.03209277242422104, -0.01534381415694952, -0.03216380253434181, 0.11841829866170883, 0.1810782104730606, 0.35688960552215576, 0.15953309834003448, -0.15668971836566925, 0.28430429100990295, -0.20321686565876007, -0.19563275575637817, 0.1877431571483612, -0.05650268867611885, 0.3722784221172333, 0.38118213415145874, -0.2001073956489563, -0.10718445479869843, -0.24724240601062775, -0.3194560706615448, 0.051564719527959824, 0.4185670018196106, -0.030789263546466827, 0.007817612029612064, -0.1287468820810318, -0.140960231423378, 0.08790487796068192, -0.08031286299228668, -0.021633464843034744, -0.27621573209762573, 0.0007554289768449962, 0.21193554997444153, -0.09983277320861816, 0.15913455188274384, 0.0710863396525383, 0.29931679368019104, 0.34052252769470215, 0.1062033474445343, -0.2788013815879822, -0.2828889787197113, -0.20804691314697266, 0.23191416263580322, 0.052186038345098495, 0.042813997715711594, 0.2282194197177887, -0.3121468722820282, 0.2621365189552307, -0.330593466758728, -0.2141755372285843, 0.024810824543237686, -0.192588672041893, 0.28930118680000305, 0.08991117775440216, 0.5664388537406921, -0.331516295671463, -0.37534981966018677, 0.18444328010082245, -0.27093085646629333, -0.10246490687131882, -0.08956310153007507, 0.03829961270093918, -0.048175375908613205, -0.20635616779327393, -0.5283128619194031, -0.2837277054786682, -0.3027185797691345, 0.3951685428619385, 0.010735972784459591, 0.23866334557533264, 0.1043500080704689, 0.1397119015455246, 0.28108343482017517, 0.15821515023708344, 0.17565099895000458, -0.2112896740436554, -0.21592403948307037, 0.13157333433628082, -0.31474292278289795, -0.29883190989494324, 0.28810781240463257, 0.37141603231430054, 0.3482856750488281, 0.009793896228075027, -0.5439537763595581, -0.0445261225104332, 0.11186038702726364, -0.3414705693721771, -0.3235282003879547, 0.02193218097090721, -0.046546947211027145, 0.09965699166059494, -0.26526495814323425, -0.010727869346737862, 0.057895418256521225, 0.28661125898361206, -0.28658854961395264, 0.10106794536113739, 0.03443722054362297, 0.6734443306922913, -0.056222692131996155, -0.14052176475524902, 0.05285433679819107, 0.10720858722925186, -0.010912840254604816, -0.0640428215265274, 0.14608164131641388, 0.026093915104866028, -0.2513170540332794, 0.0037719199899584055, 0.16121092438697815, -0.1947818398475647, 0.30774712562561035, -0.11866917461156845, -0.23818452656269073, -0.39923885464668274, 0.02589891478419304, 0.0690668374300003, -0.2619394361972809, -0.12345891445875168, 0.28140732645988464, 0.07908942550420761, 0.08015192300081253, 0.021939750760793686, -0.04197697341442108, 0.14525708556175232, 0.11534850299358368, 0.06118863821029663, -0.23085661232471466, 0.07079418748617172, -0.3035234212875366, -0.24820996820926666, -0.349796324968338, 0.39626336097717285, -0.31314077973365784, 0.4469050168991089, -0.376063734292984, 0.3329984247684479, 0.021403305232524872, -0.15843446552753448, 0.46336185932159424, -0.3118586242198944, 0.17556190490722656, 0.10862713307142258, 0.04863176494836807, -0.2078743875026703, -0.03921511024236679, -0.43193042278289795, 0.04462315887212753, 0.2368251234292984, 0.29078152775764465, -0.45261892676353455, 0.0568319596350193, 0.5518908500671387, -0.19094449281692505, -0.015472312457859516, 0.09933553636074066, -0.1488371193408966, -0.5818884968757629, -0.400688111782074, 0.28586670756340027, 0.17858880758285522, 0.2259640246629715, -0.07704436033964157, -0.17883683741092682, 0.08025092631578445, 0.06436032056808472, -0.11489395052194595, -0.004973369650542736, 0.10461137443780899, -0.010913469828665257, -0.07797767966985703, 0.11752787232398987, 0.201290100812912, 0.49114280939102173, 0.33589690923690796, -0.09480069577693939, -0.4101617634296417, 0.16772674024105072, -0.25611451268196106, 0.10150828212499619, 0.029901163652539253, -0.04924800619482994, -0.2401776760816574, 0.02959686890244484, 0.20512624084949493, 0.6281613707542419, -0.1040540412068367, 0.17990657687187195, 0.2414676547050476, -0.32115066051483154, -0.13544024527072906, 0.06155868619680405, 0.17862939834594727, 0.0676407441496849, 0.12032320350408554, -0.33204036951065063, -0.30778592824935913, -0.14974753558635712, 0.15314987301826477, 0.7009268999099731, 0.14512641727924347, -0.04807053133845329, 0.051492322236299515, -0.23710742592811584, 0.3642451763153076, -0.37147054076194763, 0.18199312686920166, -0.3054420053958893, -0.15458296239376068, 0.01511103194206953, -0.18336093425750732, 0.25989410281181335, 0.21224218606948853, -0.3091107904911041, 0.13228416442871094, -0.08224204927682877, 0.16726680099964142, 0.07709471881389618, 0.47557398676872253, -0.2655826210975647, 0.16604562103748322, -0.07050882279872894, 0.22086215019226074, -0.2605742812156677, 0.2600211501121521, -0.14298516511917114, -0.3122495412826538, -0.04857536777853966, -0.13384978473186493, -0.34604665637016296, 0.18866591155529022, -0.5326600670814514, 0.2818257212638855, -0.47846052050590515, -0.13103757798671722, -0.09172266721725464, -0.1336255967617035, 0.2575618028640747, 0.3568534553050995, -0.20663465559482574, 0.06328627467155457, -0.4636419415473938, -0.3195045590400696, -0.18194405734539032, 0.2694152295589447, 0.08407557755708694, -0.316339373588562, -0.4482019245624542, 0.1195153295993805, -0.15351121127605438, -0.30943563580513, 0.18735191226005554, -0.11739548295736313, 0.07091405987739563, 0.078162282705307, 0.33179086446762085, -0.05241991579532623, -0.2738352417945862, -0.25602737069129944, 0.20433780550956726, -0.14442358911037445, 0.1342138946056366, 0.19079360365867615, 0.18551084399223328, -0.24986352026462555, -0.017584072425961494, 0.32838180661201477, -0.012748552486300468, 0.0696955993771553, 0.48748907446861267, 0.11526484787464142, -0.18497709929943085, -0.4591115415096283, -0.19441264867782593, 0.062449026852846146, -0.21346434950828552, 0.2195073366165161, -0.029912108555436134, 0.10505323112010956, 0.20296703279018402, 0.2690528631210327, 0.2885643243789673, 0.10229270160198212, 0.08678962290287018, -0.36961814761161804, -0.02863483503460884, 0.17283393442630768, 0.1752500683069229, 0.26939132809638977, 0.19451069831848145, -0.08246149867773056, 0.15452629327774048, -0.263554185628891, -0.4368734657764435, 0.1124536395072937, -0.233028843998909, -0.0646112710237503, 0.0891546756029129, -0.19994589686393738, 0.2775919735431671, 0.12923333048820496, 0.17173129320144653, 0.11154890805482864, -0.3899048864841461, -0.24904535710811615, 0.1499411016702652, 0.06981948763132095, 0.05301456153392792, -0.1717066913843155, 0.09585056453943253, -0.5379580855369568, -0.055553462356328964, 0.16679121553897858, 0.12950943410396576, -0.28979212045669556, 0.053484708070755005, 0.0013261629501357675, 0.2879137694835663, 0.3108253479003906, 0.12271728366613388, -0.17039747536182404, -0.09461180120706558, -0.0233539380133152, -0.18632318079471588, 0.04379381611943245, 0.06411086767911911, -0.08069215714931488, -0.3403407037258148, 0.0784362256526947, 0.20211146771907806, 0.47540298104286194, 0.2686842679977417, -0.26862743496894836, -0.15541234612464905, 0.0657443255186081, 0.06958720833063126, 0.08798104524612427, -0.09299559891223907, -0.21843481063842773, 0.19616420567035675, 0.3679678738117218, -0.17094944417476654, -0.1502874791622162, 0.20734953880310059, -0.22871579229831696, -0.15680286288261414, -0.03462126478552818, 0.3300491273403168, -0.29283249378204346, 0.182201087474823, -0.054325081408023834, 0.6570346355438232, 0.07012082636356354, 0.008553331717848778, 0.5904546976089478, -0.515817403793335, -0.07231413573026657, 0.12294646352529526, 0.03782126307487488, 0.0711774006485939, 0.37837374210357666, -0.08496759831905365, -0.2815004289150238, 0.22400271892547607, 0.2268875539302826, -0.20081490278244019, -0.18508490920066833, 0.13814131915569305, 0.16382046043872833, -0.06219284236431122, 0.09524304419755936, 0.039235007017850876, 0.06202761456370354, -0.14008040726184845, 0.046149659901857376, -0.5030899047851562, 0.4928852319717407, -0.1815541535615921, 0.27691343426704407, -0.2605796456336975, -0.0657283216714859, 0.16318029165267944, 0.16188035905361176, 0.08232922106981277, -0.13233211636543274, -0.17500877380371094, 0.125279039144516, -0.1379096955060959, -0.17817316949367523, 0.015804098919034004, -0.031163290143013, -0.11750946938991547, -0.1638251692056656, 0.10263321548700333, 0.2369420826435089, 0.0301466416567564, -0.18512482941150665, 0.25940585136413574, 0.28702762722969055, 0.0963752493262291, 0.09054359048604965, -0.07387112826108932, 0.12533903121948242, 0.028630143031477928, -0.13918399810791016, 0.36915090680122375, 0.3597555458545685, -0.1398780196905136, 0.020028352737426758, 0.22342568635940552, -0.246392622590065, -0.00624960707500577, 0.0391853004693985, -0.1550297886133194, 0.2578665018081665, -0.1025579571723938, 0.1647532880306244, -0.14138077199459076, -0.02635793946683407, -0.08876200020313263, -0.24885030090808868, -0.26311737298965454, -0.045994117856025696, -0.024486729875206947, 0.03270978853106499, -0.06605129688978195, 0.15099391341209412, -0.2559463381767273, 0.5279291272163391, 0.14739345014095306, 0.020819999277591705, -0.048596546053886414, -0.3016956150531769, -0.2295088917016983, 0.21199603378772736, -0.03567052632570267, -0.1809142380952835, 0.029979731887578964, -0.055444370955228806, -0.013608500361442566, 0.07381165772676468, 0.2569234073162079, 0.015264454297721386, -0.21539956331253052, 0.1101279929280281, -0.48345938324928284, 0.3619469106197357, 0.30509936809539795, 0.14962132275104523, 0.07711587846279144, -0.1615145057439804, 0.29146862030029297, 0.03641161322593689, 0.24142827093601227, -0.31824666261672974, 0.09588810056447983, -0.07422792166471481, -0.0369868166744709, 0.4242606461048126, 0.0838015079498291, 0.7311719059944153, -0.03153986483812332, -0.26986590027809143, 0.02170184999704361, -0.05392933264374733, -0.09092730283737183, 0.18536970019340515, 0.23635455965995789, 0.15267911553382874, 0.10856736451387405, -0.2477443516254425, -0.21243581175804138, 0.2812337577342987, -0.06396616995334625, 0.2104494273662567, -0.09849803149700165, -0.037076324224472046, 0.2136586457490921, -0.11363646388053894, -0.0713154673576355, -0.018770143389701843, 0.06094301491975784, -0.062438156455755234, -0.4465044140815735, -0.13495339453220367, 0.40403077006340027, 0.046803154051303864, -0.3798530101776123, 0.010851416736841202, 0.12598061561584473, -0.1763485074043274, 0.156117781996727, 0.06440954655408859, 0.3186216652393341, 0.16368325054645538, 0.003994208760559559, -0.34818223118782043, 0.5149437785148621, 0.045062821358442307, -0.024208400398492813, 0.19044405221939087, -0.09931623935699463, 0.03716554865241051, -0.35619863867759705, -0.41222313046455383, -0.012380245141685009 ]
https://github.com/huggingface/datasets/issues/5361
How concatenate `Audio` elements using batch mapping
You can try something like this ? ```python def mapper_function(batch): return {"concatenated_audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]} dataset = dataset.map( mapper_function, batched=True, batch_size=3, remove_columns=list(dataset.features), ) ```
### Describe the bug I am trying to do concatenate audios in a dataset e.g. `google/fleurs`. ```python print(dataset) # Dataset({ # features: ['path', 'audio'], # num_rows: 24 # }) def mapper_function(batch): # to merge every 3 audio # np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3) dataset = dataset.map(mapper_function, batch=True, batch_size=24) print(dataset) # Expected output: # Dataset({ # features: ['path', 'audio'], # num_rows: 8 # }) ``` I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :(( I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks! cc: @lhoestq ### Steps to reproduce the bug 1. load audio dataset 2. try to merge every k audios and return as one ### Expected behavior Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples. ### Environment info - `datasets` version: 2.1.0 - Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
26
How concatenate `Audio` elements using batch mapping
[ -0.5357703566551208, -0.20763394236564636, -0.21958951652050018, -0.050550829619169235, -0.0433916375041008, 0.05995304882526398, 0.3866623342037201, 0.21316416561603546, -0.14498434960842133, 0.5547313690185547, -0.5333670377731323, 0.11627169698476791, -0.09980933368206024, -0.09303721785545349, -0.025638025254011154, -0.03188171237707138, 0.10375841706991196, 0.3473285138607025, -0.21558062732219696, 0.00010406693763798103, -0.35719990730285645, 0.2165214866399765, -0.3684723675251007, -0.08943568915128708, -0.023977898061275482, 0.12507754564285278, -0.07510016113519669, 0.020186379551887512, -0.004170647356659174, -0.13793997466564178, -0.2973994016647339, 0.013964801095426083, -0.1310114562511444, 0.12373736500740051, -0.00009936426067724824, -0.16710956394672394, -0.09384652227163315, -0.11904516071081161, -0.06879284977912903, 0.026439975947141647, -0.6301689147949219, 0.19270029664039612, -0.5904602408409119, 0.10746610909700394, 0.008851923048496246, -0.030780760571360588, 0.19117118418216705, -0.3990989029407501, 0.08994454145431519, -0.009588492102921009, 0.25519442558288574, -0.0089594516903162, -0.1157856434583664, 0.09691274166107178, 0.2641872465610504, 0.15731818974018097, 0.30337151885032654, -0.05379427224397659, 0.5242382287979126, -0.11508669704198837, 0.009623583406209946, 0.2924518287181854, -0.04538753256201744, 0.021552756428718567, -0.024567116051912308, 0.15459218621253967, 0.1432715356349945, -0.3124918043613434, 0.20985688269138336, 0.16014593839645386, 0.21178452670574188, -0.16224534809589386, 0.037894509732723236, -0.01908867619931698, -0.13644245266914368, -0.33893725275993347, -0.25073689222335815, 0.2628997266292572, -0.017268342897295952, 0.05097014456987381, -0.28928688168525696, 0.21167506277561188, -0.06567399203777313, 0.10417009890079498, 0.48807474970817566, 0.41825515031814575, -0.049829669296741486, -0.10250937193632126, 0.11406755447387695, -0.3194546103477478, -0.15795882046222687, -0.3202784061431885, -0.2415485829114914, 0.4702732264995575, 0.03653588518500328, -0.03913426026701927, -0.0023537527304142714, -0.16905242204666138, 0.14618706703186035, -0.35965269804000854, -0.024538367986679077, 0.14280350506305695, 0.2887570261955261, 0.2194928377866745, -0.0543363057076931, -0.003127477364614606, 0.45754551887512207, -0.1563188135623932, -0.13004092872142792, -0.016715195029973984, 0.07431166619062424, 0.1661856770515442, -0.05848018825054169, -0.27012333273887634, 0.01886359415948391, 0.18192550539970398, -0.1725112497806549, 0.2572140097618103, -0.28845691680908203, -0.21951675415039062, -0.17948350310325623, -0.25286591053009033, -0.034898024052381516, 0.1255592554807663, 0.2694917321205139, -0.13584864139556885, 0.20242659747600555, 0.26636242866516113, 0.06984991580247879, 0.17127664387226105, -0.027974359691143036, 0.2144080400466919, -0.05473340302705765, -0.002873773220926523, -0.0854404866695404, 0.14620962738990784, -0.012398251332342625, 0.0852925106883049, 0.3823609948158264, -0.18329140543937683, -0.1604568213224411, 0.29484665393829346, 0.17548224329948425, -0.205022394657135, 0.23446562886238098, 0.02852197177708149, -0.20556527376174927, 0.06335041671991348, -0.08532286435365677, 0.027079196646809578, -0.027198253199458122, 0.06017538160085678, -0.028597762808203697, 0.29481860995292664, 0.23729205131530762, 0.23763220012187958, -0.002244030823931098, 0.16211557388305664, 0.26405802369117737, -0.24783970415592194, 0.040079012513160706, 0.07770176231861115, -0.24192585051059723, 0.08997099101543427, 0.08501902222633362, -0.06002609804272652, -0.12166307121515274, -0.28504738211631775, 0.23799638450145721, 0.04649259150028229, 0.28663963079452515, 0.12431442737579346, 0.04745451360940933, 0.15540747344493866, -0.2227237969636917, 0.38037171959877014, 0.2461382895708084, -0.3271651864051819, 0.0058518629521131516, 0.0397450290620327, -0.23422899842262268, 0.07045633345842361, 0.13567344844341278, -0.0949125736951828, 0.26494142413139343, -0.10104046761989594, 0.7111351490020752, 0.20277592539787292, -0.11261700838804245, 0.13075341284275055, 0.1635306477546692, -0.007066068239510059, -0.07663444429636002, -0.21176676452159882, -0.28792211413383484, 0.15625521540641785, -0.11339058727025986, -0.3547019064426422, 0.25140073895454407, -0.3810320198535919, 0.3549880087375641, 0.04536258429288864, 0.2239035815000534, -0.16701646149158478, -0.061805952340364456, -0.05101047456264496, -0.034022122621536255, -0.1930718719959259, -0.3288221061229706, -0.04616932198405266, -0.03347411006689072, -0.20583149790763855, 0.18155047297477722, -0.03645947575569153, -0.1265202760696411, 0.2808249592781067, 0.1932539939880371, 0.2388441562652588, 0.0393233522772789, -0.5395817756652832, -0.06367596238851547, -0.1780029684305191, 0.5615723133087158, -0.12801168859004974, -0.2886364758014679, -0.17715828120708466, -0.07076595723628998, 0.08753308653831482, 0.25257232785224915, 0.22203561663627625, 0.12569598853588104, 0.03061097115278244, 0.23011767864227295, 0.4237358868122101, -0.03541580215096474, 0.04841044917702675, -0.2762146592140198, -0.04960162192583084, -0.06360584497451782, 0.03986730799078941, 0.18337203562259674, -0.2030172497034073, 0.023652033880352974, -0.21608202159404755, -0.011156324297189713, 0.328002005815506, 0.33862045407295227, 0.47891366481781006, 0.044294796884059906, 0.09356987476348877, 0.0821857824921608, 0.11665032058954239, -0.10863891243934631, -0.26783379912376404, -0.08661164343357086, -0.21008679270744324, 0.04649082571268082, 0.054131366312503815, -0.15716995298862457, 0.09025745838880539, 0.3441629707813263, -0.15155090391635895, -0.062114521861076355, 0.02910120040178299, -0.2120467722415924, -0.17064149677753448, 0.0878651887178421, -0.005480425897985697, 0.15693557262420654, 0.31832432746887207, 0.17807331681251526, -0.16930706799030304, 0.12125112861394882, -0.020302871242165565, 0.1697564721107483, 0.01244061067700386, -0.1685059666633606, 0.2724553346633911, -0.0011991820065304637, -0.18231315910816193, -0.11629655957221985, -0.2543405294418335, -0.03253890201449394, -0.2962481677532196, -0.16303804516792297, -0.25714021921157837, 0.05394914373755455, -0.1904129683971405, -0.1361761838197708, -0.5367175340652466, -0.004717566538602114, 0.052653390914201736, 0.2844597399234772, 0.14513354003429413, -0.30265286564826965, 0.39633721113204956, 0.26697489619255066, 0.3110415041446686, 0.05933929607272148, -0.06904982775449753, -0.01965811848640442, 0.21748942136764526, 0.00395676726475358, 0.21225249767303467, 0.00669668335467577, 0.156026229262352, -0.010921492241322994, 0.006828750483691692, 0.08642507344484329, -0.13742633163928986, 0.3830665349960327, 0.15519382059574127, -0.07954680919647217, -0.25019899010658264, 0.11323647201061249, 0.006248034071177244, -0.04514552652835846, -0.833304762840271, 0.11350748687982559, 0.32567551732063293, -0.23936381936073303, 0.11166850477457047, -0.09496942162513733, -0.31898701190948486, -0.1170211136341095, -0.06021463871002197, -0.20377810299396515, -0.3558051884174347, 0.1737665832042694, -0.13027019798755646, 0.41042736172676086, 0.2459053248167038, -0.03541858494281769, -0.30069756507873535, -0.0810035988688469, 0.13548414409160614, -0.20277979969978333, -0.06963381171226501, 0.23784470558166504, -0.16205070912837982, 0.12098219245672226, -0.289170503616333, -0.2731117904186249, 0.15206526219844818, 0.3660241365432739, 0.42520979046821594, 0.1478637456893921, 0.1588522344827652, -0.16423854231834412, 0.0011164966272190213, 0.2677236795425415, 0.0871368795633316, 0.4176289141178131, -0.29111531376838684, -0.17335708439350128, 0.1641577184200287, 0.01136671844869852, 0.17660479247570038, 0.22360873222351074, -0.08276339620351791, 0.08364691585302353, -0.28132307529449463, 0.5131080746650696, 0.18215066194534302, -0.017817948013544083, -0.026497505605220795, -0.03249908238649368, -0.033041149377822876, -0.03946768864989281, -0.1199069544672966, -0.08041022717952728, 0.22090335190296173, 0.17752467095851898, 0.19546595215797424, -0.002572667319327593, -0.06175296753644943, 0.05327958986163139, 0.45416706800460815, -0.2753892242908478, -0.15742962062358856, 0.14373773336410522, -0.158628448843956, 0.24423980712890625, 0.10005287826061249, -0.02841249108314514, 0.02751118503510952, 0.1520581990480423, 0.019200250506401062, -0.1819564253091812, 0.04315376281738281, -0.1558147817850113, -0.35485589504241943, -0.46161118149757385, -0.45497241616249084, 0.3642420470714569, 0.4258440136909485, 0.298177033662796, 0.011971600353717804, -0.29129359126091003, -0.3029599189758301, 0.0892035961151123, 0.4074333608150482, -0.11911782622337341, 0.05945536866784096, 0.22958417236804962, 0.4016084372997284, 0.453852117061615, 0.13620328903198242, -0.24259419739246368, -0.06429566442966461, 0.3171367645263672, 0.23530875146389008, -0.1449284702539444, 0.0881313681602478, 0.037812262773513794, 0.15844674408435822, 0.13937334716320038, 0.0941171869635582, 0.017965953797101974, 0.04312773793935776, -0.4439449608325958, -0.16582272946834564, 0.2977317273616791, 0.4856492578983307, 0.07972761988639832, -0.169334277510643, 0.4637047052383423, 0.0010521566728129983, 0.34943887591362, -0.15546320378780365, 0.14992888271808624, 0.5385439395904541, 0.10126177221536636, -0.02521693706512451, -0.026552140712738037, 0.36825448274612427, -0.11246559023857117, -0.1354573369026184, 0.027745282277464867, 0.05608661472797394, -0.1785905510187149, 0.4488898813724518, 0.09400233626365662, 0.04492756724357605, 0.21903328597545624, 0.021299082785844803, 0.2241881936788559, -0.0497332438826561, 0.16485467553138733, 0.2208453118801117, 0.18709737062454224, -0.3275696337223053, -0.000594974379055202, 0.016330737620592117, -0.09669023007154465, -0.21795208752155304, 0.37293705344200134, -0.2869570553302765, -0.38960468769073486, 0.04474368318915367, -0.30051422119140625, 0.44616174697875977, 0.22343580424785614, 0.055390991270542145, -0.03162660822272301, -0.03451185300946236, -0.2905460298061371, 0.0016977721825242043, 0.28498366475105286, 0.14653842151165009, 0.1383148580789566, 0.011881113052368164, -0.16591987013816833, -0.3188056945800781, 0.4514297842979431, -0.34307825565338135, 0.11212299019098282, -0.07802874594926834, 0.08660212904214859, -0.21741355955600739, -0.15316882729530334, 0.05890144035220146, -0.3767896592617035, 0.07929491251707077, 0.10199400782585144, 0.1779601275920868, -0.02632945403456688, -0.07302014529705048, -0.062483206391334534, 0.11279039829969406, -0.35146310925483704, 0.09131503105163574, 0.2073274552822113, -0.3475484251976013, -0.10473448038101196, 0.015667004510760307, -0.02313312143087387, -0.08183269947767258, -0.07766415178775787, -0.3527001440525055, 0.13941335678100586, 0.24238350987434387, -0.07712326943874359, 0.46852365136146545, 0.2998342514038086, -0.39801251888275146, -0.14970643818378448, -0.013386458158493042, 0.12593886256217957, 0.18218816816806793, -0.05500727519392967, -0.0008667026413604617, -0.05453694239258766, 0.11544229835271835, 0.12321992963552475, -0.04196011275053024, -0.1823960244655609, -0.2689346671104431, 0.2430238276720047, -0.0968003123998642, -0.08966407179832458, 0.20775113999843597, -0.10537494719028473, -0.5549076199531555, 0.26851174235343933, -0.15632474422454834, -0.11561398208141327, 0.08474171906709671, 0.18734605610370636, 0.09688984602689743, -0.5136171579360962, 0.16378727555274963, 0.06268490850925446, -0.12720100581645966, -0.20473533868789673, -0.07986564934253693, 0.14881150424480438, 0.017154870554804802, 0.1956682950258255, 0.04247139394283295, -0.2396196871995926, 0.0187501460313797, 0.1349663883447647, -0.13862086832523346, 0.4784555435180664, -0.18406662344932556, -0.11824379116296768, -0.4211571216583252, 0.1407260298728943, 0.327250212430954, 0.3897196352481842, -0.11443157494068146, 0.2289533168077469, -0.01054585911333561, 0.1518058478832245, -0.4332951605319977, -0.263767808675766, 0.08157972991466522, 0.334432452917099, 0.15499140322208405, -0.01598915457725525, -0.008818047121167183, 0.12326092272996902, 0.284212201833725, 0.005224144551903009, -0.12553729116916656, -0.3019004762172699, 0.19128361344337463, 0.044664498418569565, -0.026139559224247932, -0.06461608409881592, 0.2021704763174057, 0.09269522875547409, -0.21611934900283813, -0.36056816577911377, -0.01782865822315216, -0.01093052513897419, -0.19008727371692657, -0.2954387962818146, -0.09741663932800293, -0.30612191557884216, 0.402010053396225, -0.09242290258407593, 0.04785262048244476, -0.14250779151916504, -0.1871102899312973, 0.06981060653924942, -0.2081136852502823, -0.25191935896873474, 0.060294363647699356, 0.14856041967868805, 0.5774243474006653, -0.20135949552059174, 0.02057073637843132, 0.09246812760829926, -0.46179136633872986, 0.11550173908472061, 0.22509242594242096, 0.02049032598733902, -0.13396090269088745, 0.08101262897253036, -0.06760450452566147, 0.36333930492401123, -0.050096698105335236, -0.34500280022621155, -0.333711713552475, -0.18456730246543884, 0.35877370834350586, 0.021968211978673935, -0.0478455014526844, -0.37960949540138245, 0.18785834312438965, -0.08317291736602783, 0.07296480238437653, -0.19780650734901428, -0.053518399596214294, 0.2255857288837433, 0.25665220618247986, 0.1377432495355606, 0.1769385039806366, 0.18964643776416779, 0.16411416232585907, 0.012298636138439178, -0.14944526553153992, 0.10378661006689072, 0.4051732122898102, -0.2865995466709137, 0.07125429809093475, -0.278799444437027, -0.24394619464874268, 0.41061827540397644, 0.05112475901842117, 0.3024011552333832, 0.35134372115135193, 0.02932683192193508, -0.3359386920928955, -0.12089790403842926, 0.4078117609024048, 0.18918286263942719, 0.1175205260515213, -0.1308882236480713, -0.06530863046646118, 0.1256382018327713, -0.19678270816802979, -0.1453700214624405, 0.3575199842453003, 0.2330475002527237, 0.10452688485383987, -0.35600772500038147, 0.39948707818984985, 0.08698968589305878, 0.012880424037575722, 0.087595134973526, -0.10311989486217499, -0.4102635979652405, 0.06765522062778473, -0.07474236935377121, -0.05124781280755997, 0.34489887952804565, 0.11509224027395248, 0.4727354049682617, 0.036608025431632996, -0.030007092282176018, 0.24533163011074066, -0.2972632944583893, -0.17719918489456177, -0.08530249446630478, 0.061892300844192505, 0.13600440323352814, -0.19771182537078857, 0.1204414963722229, 0.28619176149368286, -0.19026049971580505, -0.10869690030813217, 0.23919107019901276, -0.23125147819519043, 0.32588255405426025, -0.17486761510372162, -0.13912425935268402, -0.44257092475891113, -0.21066537499427795, -0.27004268765449524, -0.24432112276554108, -0.21765169501304626, 0.2268160879611969, -0.2130815088748932, 0.14632627367973328, 0.12869858741760254, 0.20232151448726654, 0.1123100221157074, 0.0007927482947707176, 0.1831599920988083, 0.19352097809314728, -0.2000129222869873, -0.38069698214530945, -0.14248526096343994, -0.27553820610046387, 0.21514290571212769, 0.11816465109586716, -0.2587434947490692, 0.12463561445474625, 0.32930484414100647, -0.08806391060352325, 0.13119642436504364, 0.03186943754553795, -0.2546280026435852, 0.17044739425182343, -0.20697519183158875, 0.36524489521980286, 0.2989574670791626, 0.3486214876174927, 0.16794975101947784, -0.3069908618927002, 0.11777260154485703, 0.1222103014588356, 0.20223844051361084, -0.016486555337905884, 0.13099728524684906, -0.19612781703472137, -0.17968153953552246, -0.12067219614982605, -0.028497233986854553, 0.274309903383255, -0.665733277797699, 0.33864906430244446, 0.325128436088562, -0.05240592733025551, 0.09303523600101471, -0.4242226183414459, 0.1367868036031723, 0.30942121148109436, -0.16522186994552612, 0.2486518919467926, 0.030046284198760986, -0.0760401114821434, 0.2827208936214447, 0.09794191271066666, -0.25833550095558167, 0.38031861186027527, -0.40076255798339844, -0.05966176465153694, -0.07548519968986511, -0.04315066337585449, 0.03243027999997139, 0.015045135281980038, -0.10262273997068405, -0.4515042006969452, 0.26325899362564087, -0.050372395664453506, -0.6829177737236023, -0.3067149221897125, 0.4092709720134735, -0.13569964468479156, 0.09008248895406723, -0.03131446614861488, -0.02777794562280178, 0.15679657459259033, -0.023492049425840378, -0.2586034834384918, 0.17846573889255524, -0.2574191093444824, -0.18099430203437805, -0.013593957759439945, -0.11021911352872849, 0.39809441566467285, -0.09010939300060272, -0.2967379689216614, -0.48195770382881165 ]
https://github.com/huggingface/datasets/issues/5361
How concatenate `Audio` elements using batch mapping
Thanks for the snippet! One more question. I wonder why those two mappers are working so different that one taking 4 sec while other taking over 1 min : ```python %%time def mapper_function1(batch): # list_audio return { "audio": [ { "array": np.concatenate([audio["array"] for audio in batch["audio"]]), "sampling_rate": 16_000, } ] } dataset.map( mapper_function1, batched=True, batch_size=3, remove_columns=list(dataset.features), ) # 100% # 135/135 [01:13<00:00, 1.93ba/s] # CPU times: user 1min 10s, sys: 3.21 s, total: 1min 13s # Wall time: 1min 13s # Dataset({ # features: ['audio'], # num_rows: 135 # }) # -------------------------------- %%time def mapper_function2(batch): # list_audio return {"audio": [np.concatenate([audio["array"] for audio in batch["audio"]])]} dataset.map( mapper_function2, batched=True, batch_size=3, remove_columns=list(dataset.features), ) # 100% # 135/135 [00:03<00:00, 40.69ba/s] # CPU times: user 1.88 s, sys: 1.48 s, total: 3.36 s # Wall time: 4.8 s # Dataset({ # features: ['audio'], # num_rows: 135 # }) ```
### Describe the bug I am trying to do concatenate audios in a dataset e.g. `google/fleurs`. ```python print(dataset) # Dataset({ # features: ['path', 'audio'], # num_rows: 24 # }) def mapper_function(batch): # to merge every 3 audio # np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3) dataset = dataset.map(mapper_function, batch=True, batch_size=24) print(dataset) # Expected output: # Dataset({ # features: ['path', 'audio'], # num_rows: 8 # }) ``` I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :(( I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks! cc: @lhoestq ### Steps to reproduce the bug 1. load audio dataset 2. try to merge every k audios and return as one ### Expected behavior Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples. ### Environment info - `datasets` version: 2.1.0 - Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
144
How concatenate `Audio` elements using batch mapping
[ -0.5357703566551208, -0.20763394236564636, -0.21958951652050018, -0.050550829619169235, -0.0433916375041008, 0.05995304882526398, 0.3866623342037201, 0.21316416561603546, -0.14498434960842133, 0.5547313690185547, -0.5333670377731323, 0.11627169698476791, -0.09980933368206024, -0.09303721785545349, -0.025638025254011154, -0.03188171237707138, 0.10375841706991196, 0.3473285138607025, -0.21558062732219696, 0.00010406693763798103, -0.35719990730285645, 0.2165214866399765, -0.3684723675251007, -0.08943568915128708, -0.023977898061275482, 0.12507754564285278, -0.07510016113519669, 0.020186379551887512, -0.004170647356659174, -0.13793997466564178, -0.2973994016647339, 0.013964801095426083, -0.1310114562511444, 0.12373736500740051, -0.00009936426067724824, -0.16710956394672394, -0.09384652227163315, -0.11904516071081161, -0.06879284977912903, 0.026439975947141647, -0.6301689147949219, 0.19270029664039612, -0.5904602408409119, 0.10746610909700394, 0.008851923048496246, -0.030780760571360588, 0.19117118418216705, -0.3990989029407501, 0.08994454145431519, -0.009588492102921009, 0.25519442558288574, -0.0089594516903162, -0.1157856434583664, 0.09691274166107178, 0.2641872465610504, 0.15731818974018097, 0.30337151885032654, -0.05379427224397659, 0.5242382287979126, -0.11508669704198837, 0.009623583406209946, 0.2924518287181854, -0.04538753256201744, 0.021552756428718567, -0.024567116051912308, 0.15459218621253967, 0.1432715356349945, -0.3124918043613434, 0.20985688269138336, 0.16014593839645386, 0.21178452670574188, -0.16224534809589386, 0.037894509732723236, -0.01908867619931698, -0.13644245266914368, -0.33893725275993347, -0.25073689222335815, 0.2628997266292572, -0.017268342897295952, 0.05097014456987381, -0.28928688168525696, 0.21167506277561188, -0.06567399203777313, 0.10417009890079498, 0.48807474970817566, 0.41825515031814575, -0.049829669296741486, -0.10250937193632126, 0.11406755447387695, -0.3194546103477478, -0.15795882046222687, -0.3202784061431885, -0.2415485829114914, 0.4702732264995575, 0.03653588518500328, -0.03913426026701927, -0.0023537527304142714, -0.16905242204666138, 0.14618706703186035, -0.35965269804000854, -0.024538367986679077, 0.14280350506305695, 0.2887570261955261, 0.2194928377866745, -0.0543363057076931, -0.003127477364614606, 0.45754551887512207, -0.1563188135623932, -0.13004092872142792, -0.016715195029973984, 0.07431166619062424, 0.1661856770515442, -0.05848018825054169, -0.27012333273887634, 0.01886359415948391, 0.18192550539970398, -0.1725112497806549, 0.2572140097618103, -0.28845691680908203, -0.21951675415039062, -0.17948350310325623, -0.25286591053009033, -0.034898024052381516, 0.1255592554807663, 0.2694917321205139, -0.13584864139556885, 0.20242659747600555, 0.26636242866516113, 0.06984991580247879, 0.17127664387226105, -0.027974359691143036, 0.2144080400466919, -0.05473340302705765, -0.002873773220926523, -0.0854404866695404, 0.14620962738990784, -0.012398251332342625, 0.0852925106883049, 0.3823609948158264, -0.18329140543937683, -0.1604568213224411, 0.29484665393829346, 0.17548224329948425, -0.205022394657135, 0.23446562886238098, 0.02852197177708149, -0.20556527376174927, 0.06335041671991348, -0.08532286435365677, 0.027079196646809578, -0.027198253199458122, 0.06017538160085678, -0.028597762808203697, 0.29481860995292664, 0.23729205131530762, 0.23763220012187958, -0.002244030823931098, 0.16211557388305664, 0.26405802369117737, -0.24783970415592194, 0.040079012513160706, 0.07770176231861115, -0.24192585051059723, 0.08997099101543427, 0.08501902222633362, -0.06002609804272652, -0.12166307121515274, -0.28504738211631775, 0.23799638450145721, 0.04649259150028229, 0.28663963079452515, 0.12431442737579346, 0.04745451360940933, 0.15540747344493866, -0.2227237969636917, 0.38037171959877014, 0.2461382895708084, -0.3271651864051819, 0.0058518629521131516, 0.0397450290620327, -0.23422899842262268, 0.07045633345842361, 0.13567344844341278, -0.0949125736951828, 0.26494142413139343, -0.10104046761989594, 0.7111351490020752, 0.20277592539787292, -0.11261700838804245, 0.13075341284275055, 0.1635306477546692, -0.007066068239510059, -0.07663444429636002, -0.21176676452159882, -0.28792211413383484, 0.15625521540641785, -0.11339058727025986, -0.3547019064426422, 0.25140073895454407, -0.3810320198535919, 0.3549880087375641, 0.04536258429288864, 0.2239035815000534, -0.16701646149158478, -0.061805952340364456, -0.05101047456264496, -0.034022122621536255, -0.1930718719959259, -0.3288221061229706, -0.04616932198405266, -0.03347411006689072, -0.20583149790763855, 0.18155047297477722, -0.03645947575569153, -0.1265202760696411, 0.2808249592781067, 0.1932539939880371, 0.2388441562652588, 0.0393233522772789, -0.5395817756652832, -0.06367596238851547, -0.1780029684305191, 0.5615723133087158, -0.12801168859004974, -0.2886364758014679, -0.17715828120708466, -0.07076595723628998, 0.08753308653831482, 0.25257232785224915, 0.22203561663627625, 0.12569598853588104, 0.03061097115278244, 0.23011767864227295, 0.4237358868122101, -0.03541580215096474, 0.04841044917702675, -0.2762146592140198, -0.04960162192583084, -0.06360584497451782, 0.03986730799078941, 0.18337203562259674, -0.2030172497034073, 0.023652033880352974, -0.21608202159404755, -0.011156324297189713, 0.328002005815506, 0.33862045407295227, 0.47891366481781006, 0.044294796884059906, 0.09356987476348877, 0.0821857824921608, 0.11665032058954239, -0.10863891243934631, -0.26783379912376404, -0.08661164343357086, -0.21008679270744324, 0.04649082571268082, 0.054131366312503815, -0.15716995298862457, 0.09025745838880539, 0.3441629707813263, -0.15155090391635895, -0.062114521861076355, 0.02910120040178299, -0.2120467722415924, -0.17064149677753448, 0.0878651887178421, -0.005480425897985697, 0.15693557262420654, 0.31832432746887207, 0.17807331681251526, -0.16930706799030304, 0.12125112861394882, -0.020302871242165565, 0.1697564721107483, 0.01244061067700386, -0.1685059666633606, 0.2724553346633911, -0.0011991820065304637, -0.18231315910816193, -0.11629655957221985, -0.2543405294418335, -0.03253890201449394, -0.2962481677532196, -0.16303804516792297, -0.25714021921157837, 0.05394914373755455, -0.1904129683971405, -0.1361761838197708, -0.5367175340652466, -0.004717566538602114, 0.052653390914201736, 0.2844597399234772, 0.14513354003429413, -0.30265286564826965, 0.39633721113204956, 0.26697489619255066, 0.3110415041446686, 0.05933929607272148, -0.06904982775449753, -0.01965811848640442, 0.21748942136764526, 0.00395676726475358, 0.21225249767303467, 0.00669668335467577, 0.156026229262352, -0.010921492241322994, 0.006828750483691692, 0.08642507344484329, -0.13742633163928986, 0.3830665349960327, 0.15519382059574127, -0.07954680919647217, -0.25019899010658264, 0.11323647201061249, 0.006248034071177244, -0.04514552652835846, -0.833304762840271, 0.11350748687982559, 0.32567551732063293, -0.23936381936073303, 0.11166850477457047, -0.09496942162513733, -0.31898701190948486, -0.1170211136341095, -0.06021463871002197, -0.20377810299396515, -0.3558051884174347, 0.1737665832042694, -0.13027019798755646, 0.41042736172676086, 0.2459053248167038, -0.03541858494281769, -0.30069756507873535, -0.0810035988688469, 0.13548414409160614, -0.20277979969978333, -0.06963381171226501, 0.23784470558166504, -0.16205070912837982, 0.12098219245672226, -0.289170503616333, -0.2731117904186249, 0.15206526219844818, 0.3660241365432739, 0.42520979046821594, 0.1478637456893921, 0.1588522344827652, -0.16423854231834412, 0.0011164966272190213, 0.2677236795425415, 0.0871368795633316, 0.4176289141178131, -0.29111531376838684, -0.17335708439350128, 0.1641577184200287, 0.01136671844869852, 0.17660479247570038, 0.22360873222351074, -0.08276339620351791, 0.08364691585302353, -0.28132307529449463, 0.5131080746650696, 0.18215066194534302, -0.017817948013544083, -0.026497505605220795, -0.03249908238649368, -0.033041149377822876, -0.03946768864989281, -0.1199069544672966, -0.08041022717952728, 0.22090335190296173, 0.17752467095851898, 0.19546595215797424, -0.002572667319327593, -0.06175296753644943, 0.05327958986163139, 0.45416706800460815, -0.2753892242908478, -0.15742962062358856, 0.14373773336410522, -0.158628448843956, 0.24423980712890625, 0.10005287826061249, -0.02841249108314514, 0.02751118503510952, 0.1520581990480423, 0.019200250506401062, -0.1819564253091812, 0.04315376281738281, -0.1558147817850113, -0.35485589504241943, -0.46161118149757385, -0.45497241616249084, 0.3642420470714569, 0.4258440136909485, 0.298177033662796, 0.011971600353717804, -0.29129359126091003, -0.3029599189758301, 0.0892035961151123, 0.4074333608150482, -0.11911782622337341, 0.05945536866784096, 0.22958417236804962, 0.4016084372997284, 0.453852117061615, 0.13620328903198242, -0.24259419739246368, -0.06429566442966461, 0.3171367645263672, 0.23530875146389008, -0.1449284702539444, 0.0881313681602478, 0.037812262773513794, 0.15844674408435822, 0.13937334716320038, 0.0941171869635582, 0.017965953797101974, 0.04312773793935776, -0.4439449608325958, -0.16582272946834564, 0.2977317273616791, 0.4856492578983307, 0.07972761988639832, -0.169334277510643, 0.4637047052383423, 0.0010521566728129983, 0.34943887591362, -0.15546320378780365, 0.14992888271808624, 0.5385439395904541, 0.10126177221536636, -0.02521693706512451, -0.026552140712738037, 0.36825448274612427, -0.11246559023857117, -0.1354573369026184, 0.027745282277464867, 0.05608661472797394, -0.1785905510187149, 0.4488898813724518, 0.09400233626365662, 0.04492756724357605, 0.21903328597545624, 0.021299082785844803, 0.2241881936788559, -0.0497332438826561, 0.16485467553138733, 0.2208453118801117, 0.18709737062454224, -0.3275696337223053, -0.000594974379055202, 0.016330737620592117, -0.09669023007154465, -0.21795208752155304, 0.37293705344200134, -0.2869570553302765, -0.38960468769073486, 0.04474368318915367, -0.30051422119140625, 0.44616174697875977, 0.22343580424785614, 0.055390991270542145, -0.03162660822272301, -0.03451185300946236, -0.2905460298061371, 0.0016977721825242043, 0.28498366475105286, 0.14653842151165009, 0.1383148580789566, 0.011881113052368164, -0.16591987013816833, -0.3188056945800781, 0.4514297842979431, -0.34307825565338135, 0.11212299019098282, -0.07802874594926834, 0.08660212904214859, -0.21741355955600739, -0.15316882729530334, 0.05890144035220146, -0.3767896592617035, 0.07929491251707077, 0.10199400782585144, 0.1779601275920868, -0.02632945403456688, -0.07302014529705048, -0.062483206391334534, 0.11279039829969406, -0.35146310925483704, 0.09131503105163574, 0.2073274552822113, -0.3475484251976013, -0.10473448038101196, 0.015667004510760307, -0.02313312143087387, -0.08183269947767258, -0.07766415178775787, -0.3527001440525055, 0.13941335678100586, 0.24238350987434387, -0.07712326943874359, 0.46852365136146545, 0.2998342514038086, -0.39801251888275146, -0.14970643818378448, -0.013386458158493042, 0.12593886256217957, 0.18218816816806793, -0.05500727519392967, -0.0008667026413604617, -0.05453694239258766, 0.11544229835271835, 0.12321992963552475, -0.04196011275053024, -0.1823960244655609, -0.2689346671104431, 0.2430238276720047, -0.0968003123998642, -0.08966407179832458, 0.20775113999843597, -0.10537494719028473, -0.5549076199531555, 0.26851174235343933, -0.15632474422454834, -0.11561398208141327, 0.08474171906709671, 0.18734605610370636, 0.09688984602689743, -0.5136171579360962, 0.16378727555274963, 0.06268490850925446, -0.12720100581645966, -0.20473533868789673, -0.07986564934253693, 0.14881150424480438, 0.017154870554804802, 0.1956682950258255, 0.04247139394283295, -0.2396196871995926, 0.0187501460313797, 0.1349663883447647, -0.13862086832523346, 0.4784555435180664, -0.18406662344932556, -0.11824379116296768, -0.4211571216583252, 0.1407260298728943, 0.327250212430954, 0.3897196352481842, -0.11443157494068146, 0.2289533168077469, -0.01054585911333561, 0.1518058478832245, -0.4332951605319977, -0.263767808675766, 0.08157972991466522, 0.334432452917099, 0.15499140322208405, -0.01598915457725525, -0.008818047121167183, 0.12326092272996902, 0.284212201833725, 0.005224144551903009, -0.12553729116916656, -0.3019004762172699, 0.19128361344337463, 0.044664498418569565, -0.026139559224247932, -0.06461608409881592, 0.2021704763174057, 0.09269522875547409, -0.21611934900283813, -0.36056816577911377, -0.01782865822315216, -0.01093052513897419, -0.19008727371692657, -0.2954387962818146, -0.09741663932800293, -0.30612191557884216, 0.402010053396225, -0.09242290258407593, 0.04785262048244476, -0.14250779151916504, -0.1871102899312973, 0.06981060653924942, -0.2081136852502823, -0.25191935896873474, 0.060294363647699356, 0.14856041967868805, 0.5774243474006653, -0.20135949552059174, 0.02057073637843132, 0.09246812760829926, -0.46179136633872986, 0.11550173908472061, 0.22509242594242096, 0.02049032598733902, -0.13396090269088745, 0.08101262897253036, -0.06760450452566147, 0.36333930492401123, -0.050096698105335236, -0.34500280022621155, -0.333711713552475, -0.18456730246543884, 0.35877370834350586, 0.021968211978673935, -0.0478455014526844, -0.37960949540138245, 0.18785834312438965, -0.08317291736602783, 0.07296480238437653, -0.19780650734901428, -0.053518399596214294, 0.2255857288837433, 0.25665220618247986, 0.1377432495355606, 0.1769385039806366, 0.18964643776416779, 0.16411416232585907, 0.012298636138439178, -0.14944526553153992, 0.10378661006689072, 0.4051732122898102, -0.2865995466709137, 0.07125429809093475, -0.278799444437027, -0.24394619464874268, 0.41061827540397644, 0.05112475901842117, 0.3024011552333832, 0.35134372115135193, 0.02932683192193508, -0.3359386920928955, -0.12089790403842926, 0.4078117609024048, 0.18918286263942719, 0.1175205260515213, -0.1308882236480713, -0.06530863046646118, 0.1256382018327713, -0.19678270816802979, -0.1453700214624405, 0.3575199842453003, 0.2330475002527237, 0.10452688485383987, -0.35600772500038147, 0.39948707818984985, 0.08698968589305878, 0.012880424037575722, 0.087595134973526, -0.10311989486217499, -0.4102635979652405, 0.06765522062778473, -0.07474236935377121, -0.05124781280755997, 0.34489887952804565, 0.11509224027395248, 0.4727354049682617, 0.036608025431632996, -0.030007092282176018, 0.24533163011074066, -0.2972632944583893, -0.17719918489456177, -0.08530249446630478, 0.061892300844192505, 0.13600440323352814, -0.19771182537078857, 0.1204414963722229, 0.28619176149368286, -0.19026049971580505, -0.10869690030813217, 0.23919107019901276, -0.23125147819519043, 0.32588255405426025, -0.17486761510372162, -0.13912425935268402, -0.44257092475891113, -0.21066537499427795, -0.27004268765449524, -0.24432112276554108, -0.21765169501304626, 0.2268160879611969, -0.2130815088748932, 0.14632627367973328, 0.12869858741760254, 0.20232151448726654, 0.1123100221157074, 0.0007927482947707176, 0.1831599920988083, 0.19352097809314728, -0.2000129222869873, -0.38069698214530945, -0.14248526096343994, -0.27553820610046387, 0.21514290571212769, 0.11816465109586716, -0.2587434947490692, 0.12463561445474625, 0.32930484414100647, -0.08806391060352325, 0.13119642436504364, 0.03186943754553795, -0.2546280026435852, 0.17044739425182343, -0.20697519183158875, 0.36524489521980286, 0.2989574670791626, 0.3486214876174927, 0.16794975101947784, -0.3069908618927002, 0.11777260154485703, 0.1222103014588356, 0.20223844051361084, -0.016486555337905884, 0.13099728524684906, -0.19612781703472137, -0.17968153953552246, -0.12067219614982605, -0.028497233986854553, 0.274309903383255, -0.665733277797699, 0.33864906430244446, 0.325128436088562, -0.05240592733025551, 0.09303523600101471, -0.4242226183414459, 0.1367868036031723, 0.30942121148109436, -0.16522186994552612, 0.2486518919467926, 0.030046284198760986, -0.0760401114821434, 0.2827208936214447, 0.09794191271066666, -0.25833550095558167, 0.38031861186027527, -0.40076255798339844, -0.05966176465153694, -0.07548519968986511, -0.04315066337585449, 0.03243027999997139, 0.015045135281980038, -0.10262273997068405, -0.4515042006969452, 0.26325899362564087, -0.050372395664453506, -0.6829177737236023, -0.3067149221897125, 0.4092709720134735, -0.13569964468479156, 0.09008248895406723, -0.03131446614861488, -0.02777794562280178, 0.15679657459259033, -0.023492049425840378, -0.2586034834384918, 0.17846573889255524, -0.2574191093444824, -0.18099430203437805, -0.013593957759439945, -0.11021911352872849, 0.39809441566467285, -0.09010939300060272, -0.2967379689216614, -0.48195770382881165 ]
https://github.com/huggingface/datasets/issues/5361
How concatenate `Audio` elements using batch mapping
In the first one you get a dataset with an Audio type, and in the second one you get a dataset with a sequence of floats type. The Audio type encodes the data as WAV to save disk space, so it takes more time to create. The Audio type is automatically inferred because you modify the column "audio" which was already an Audio type. If you name it to something else, type inference will use a type struct with array and sampling rate fields.
### Describe the bug I am trying to do concatenate audios in a dataset e.g. `google/fleurs`. ```python print(dataset) # Dataset({ # features: ['path', 'audio'], # num_rows: 24 # }) def mapper_function(batch): # to merge every 3 audio # np.concatnate(audios[i: i+3]) for i in range(i, len(batch), 3) dataset = dataset.map(mapper_function, batch=True, batch_size=24) print(dataset) # Expected output: # Dataset({ # features: ['path', 'audio'], # num_rows: 8 # }) ``` I tried to construct `result={}` dictionary inside the mapper function, I just found it will not work because it needs `byte` also needed :(( I'd appreciate if your share any use cases similar to my problem or any solutions really. Thanks! cc: @lhoestq ### Steps to reproduce the bug 1. load audio dataset 2. try to merge every k audios and return as one ### Expected behavior Merged dataset with a fewer rows. If we merge every 3 rows, then `n // 3` number of examples. ### Environment info - `datasets` version: 2.1.0 - Platform: Linux-5.15.65+-x86_64-with-debian-bullseye-sid - Python version: 3.7.12 - PyArrow version: 8.0.0 - Pandas version: 1.3.5
84
How concatenate `Audio` elements using batch mapping
[ -0.5357703566551208, -0.20763394236564636, -0.21958951652050018, -0.050550829619169235, -0.0433916375041008, 0.05995304882526398, 0.3866623342037201, 0.21316416561603546, -0.14498434960842133, 0.5547313690185547, -0.5333670377731323, 0.11627169698476791, -0.09980933368206024, -0.09303721785545349, -0.025638025254011154, -0.03188171237707138, 0.10375841706991196, 0.3473285138607025, -0.21558062732219696, 0.00010406693763798103, -0.35719990730285645, 0.2165214866399765, -0.3684723675251007, -0.08943568915128708, -0.023977898061275482, 0.12507754564285278, -0.07510016113519669, 0.020186379551887512, -0.004170647356659174, -0.13793997466564178, -0.2973994016647339, 0.013964801095426083, -0.1310114562511444, 0.12373736500740051, -0.00009936426067724824, -0.16710956394672394, -0.09384652227163315, -0.11904516071081161, -0.06879284977912903, 0.026439975947141647, -0.6301689147949219, 0.19270029664039612, -0.5904602408409119, 0.10746610909700394, 0.008851923048496246, -0.030780760571360588, 0.19117118418216705, -0.3990989029407501, 0.08994454145431519, -0.009588492102921009, 0.25519442558288574, -0.0089594516903162, -0.1157856434583664, 0.09691274166107178, 0.2641872465610504, 0.15731818974018097, 0.30337151885032654, -0.05379427224397659, 0.5242382287979126, -0.11508669704198837, 0.009623583406209946, 0.2924518287181854, -0.04538753256201744, 0.021552756428718567, -0.024567116051912308, 0.15459218621253967, 0.1432715356349945, -0.3124918043613434, 0.20985688269138336, 0.16014593839645386, 0.21178452670574188, -0.16224534809589386, 0.037894509732723236, -0.01908867619931698, -0.13644245266914368, -0.33893725275993347, -0.25073689222335815, 0.2628997266292572, -0.017268342897295952, 0.05097014456987381, -0.28928688168525696, 0.21167506277561188, -0.06567399203777313, 0.10417009890079498, 0.48807474970817566, 0.41825515031814575, -0.049829669296741486, -0.10250937193632126, 0.11406755447387695, -0.3194546103477478, -0.15795882046222687, -0.3202784061431885, -0.2415485829114914, 0.4702732264995575, 0.03653588518500328, -0.03913426026701927, -0.0023537527304142714, -0.16905242204666138, 0.14618706703186035, -0.35965269804000854, -0.024538367986679077, 0.14280350506305695, 0.2887570261955261, 0.2194928377866745, -0.0543363057076931, -0.003127477364614606, 0.45754551887512207, -0.1563188135623932, -0.13004092872142792, -0.016715195029973984, 0.07431166619062424, 0.1661856770515442, -0.05848018825054169, -0.27012333273887634, 0.01886359415948391, 0.18192550539970398, -0.1725112497806549, 0.2572140097618103, -0.28845691680908203, -0.21951675415039062, -0.17948350310325623, -0.25286591053009033, -0.034898024052381516, 0.1255592554807663, 0.2694917321205139, -0.13584864139556885, 0.20242659747600555, 0.26636242866516113, 0.06984991580247879, 0.17127664387226105, -0.027974359691143036, 0.2144080400466919, -0.05473340302705765, -0.002873773220926523, -0.0854404866695404, 0.14620962738990784, -0.012398251332342625, 0.0852925106883049, 0.3823609948158264, -0.18329140543937683, -0.1604568213224411, 0.29484665393829346, 0.17548224329948425, -0.205022394657135, 0.23446562886238098, 0.02852197177708149, -0.20556527376174927, 0.06335041671991348, -0.08532286435365677, 0.027079196646809578, -0.027198253199458122, 0.06017538160085678, -0.028597762808203697, 0.29481860995292664, 0.23729205131530762, 0.23763220012187958, -0.002244030823931098, 0.16211557388305664, 0.26405802369117737, -0.24783970415592194, 0.040079012513160706, 0.07770176231861115, -0.24192585051059723, 0.08997099101543427, 0.08501902222633362, -0.06002609804272652, -0.12166307121515274, -0.28504738211631775, 0.23799638450145721, 0.04649259150028229, 0.28663963079452515, 0.12431442737579346, 0.04745451360940933, 0.15540747344493866, -0.2227237969636917, 0.38037171959877014, 0.2461382895708084, -0.3271651864051819, 0.0058518629521131516, 0.0397450290620327, -0.23422899842262268, 0.07045633345842361, 0.13567344844341278, -0.0949125736951828, 0.26494142413139343, -0.10104046761989594, 0.7111351490020752, 0.20277592539787292, -0.11261700838804245, 0.13075341284275055, 0.1635306477546692, -0.007066068239510059, -0.07663444429636002, -0.21176676452159882, -0.28792211413383484, 0.15625521540641785, -0.11339058727025986, -0.3547019064426422, 0.25140073895454407, -0.3810320198535919, 0.3549880087375641, 0.04536258429288864, 0.2239035815000534, -0.16701646149158478, -0.061805952340364456, -0.05101047456264496, -0.034022122621536255, -0.1930718719959259, -0.3288221061229706, -0.04616932198405266, -0.03347411006689072, -0.20583149790763855, 0.18155047297477722, -0.03645947575569153, -0.1265202760696411, 0.2808249592781067, 0.1932539939880371, 0.2388441562652588, 0.0393233522772789, -0.5395817756652832, -0.06367596238851547, -0.1780029684305191, 0.5615723133087158, -0.12801168859004974, -0.2886364758014679, -0.17715828120708466, -0.07076595723628998, 0.08753308653831482, 0.25257232785224915, 0.22203561663627625, 0.12569598853588104, 0.03061097115278244, 0.23011767864227295, 0.4237358868122101, -0.03541580215096474, 0.04841044917702675, -0.2762146592140198, -0.04960162192583084, -0.06360584497451782, 0.03986730799078941, 0.18337203562259674, -0.2030172497034073, 0.023652033880352974, -0.21608202159404755, -0.011156324297189713, 0.328002005815506, 0.33862045407295227, 0.47891366481781006, 0.044294796884059906, 0.09356987476348877, 0.0821857824921608, 0.11665032058954239, -0.10863891243934631, -0.26783379912376404, -0.08661164343357086, -0.21008679270744324, 0.04649082571268082, 0.054131366312503815, -0.15716995298862457, 0.09025745838880539, 0.3441629707813263, -0.15155090391635895, -0.062114521861076355, 0.02910120040178299, -0.2120467722415924, -0.17064149677753448, 0.0878651887178421, -0.005480425897985697, 0.15693557262420654, 0.31832432746887207, 0.17807331681251526, -0.16930706799030304, 0.12125112861394882, -0.020302871242165565, 0.1697564721107483, 0.01244061067700386, -0.1685059666633606, 0.2724553346633911, -0.0011991820065304637, -0.18231315910816193, -0.11629655957221985, -0.2543405294418335, -0.03253890201449394, -0.2962481677532196, -0.16303804516792297, -0.25714021921157837, 0.05394914373755455, -0.1904129683971405, -0.1361761838197708, -0.5367175340652466, -0.004717566538602114, 0.052653390914201736, 0.2844597399234772, 0.14513354003429413, -0.30265286564826965, 0.39633721113204956, 0.26697489619255066, 0.3110415041446686, 0.05933929607272148, -0.06904982775449753, -0.01965811848640442, 0.21748942136764526, 0.00395676726475358, 0.21225249767303467, 0.00669668335467577, 0.156026229262352, -0.010921492241322994, 0.006828750483691692, 0.08642507344484329, -0.13742633163928986, 0.3830665349960327, 0.15519382059574127, -0.07954680919647217, -0.25019899010658264, 0.11323647201061249, 0.006248034071177244, -0.04514552652835846, -0.833304762840271, 0.11350748687982559, 0.32567551732063293, -0.23936381936073303, 0.11166850477457047, -0.09496942162513733, -0.31898701190948486, -0.1170211136341095, -0.06021463871002197, -0.20377810299396515, -0.3558051884174347, 0.1737665832042694, -0.13027019798755646, 0.41042736172676086, 0.2459053248167038, -0.03541858494281769, -0.30069756507873535, -0.0810035988688469, 0.13548414409160614, -0.20277979969978333, -0.06963381171226501, 0.23784470558166504, -0.16205070912837982, 0.12098219245672226, -0.289170503616333, -0.2731117904186249, 0.15206526219844818, 0.3660241365432739, 0.42520979046821594, 0.1478637456893921, 0.1588522344827652, -0.16423854231834412, 0.0011164966272190213, 0.2677236795425415, 0.0871368795633316, 0.4176289141178131, -0.29111531376838684, -0.17335708439350128, 0.1641577184200287, 0.01136671844869852, 0.17660479247570038, 0.22360873222351074, -0.08276339620351791, 0.08364691585302353, -0.28132307529449463, 0.5131080746650696, 0.18215066194534302, -0.017817948013544083, -0.026497505605220795, -0.03249908238649368, -0.033041149377822876, -0.03946768864989281, -0.1199069544672966, -0.08041022717952728, 0.22090335190296173, 0.17752467095851898, 0.19546595215797424, -0.002572667319327593, -0.06175296753644943, 0.05327958986163139, 0.45416706800460815, -0.2753892242908478, -0.15742962062358856, 0.14373773336410522, -0.158628448843956, 0.24423980712890625, 0.10005287826061249, -0.02841249108314514, 0.02751118503510952, 0.1520581990480423, 0.019200250506401062, -0.1819564253091812, 0.04315376281738281, -0.1558147817850113, -0.35485589504241943, -0.46161118149757385, -0.45497241616249084, 0.3642420470714569, 0.4258440136909485, 0.298177033662796, 0.011971600353717804, -0.29129359126091003, -0.3029599189758301, 0.0892035961151123, 0.4074333608150482, -0.11911782622337341, 0.05945536866784096, 0.22958417236804962, 0.4016084372997284, 0.453852117061615, 0.13620328903198242, -0.24259419739246368, -0.06429566442966461, 0.3171367645263672, 0.23530875146389008, -0.1449284702539444, 0.0881313681602478, 0.037812262773513794, 0.15844674408435822, 0.13937334716320038, 0.0941171869635582, 0.017965953797101974, 0.04312773793935776, -0.4439449608325958, -0.16582272946834564, 0.2977317273616791, 0.4856492578983307, 0.07972761988639832, -0.169334277510643, 0.4637047052383423, 0.0010521566728129983, 0.34943887591362, -0.15546320378780365, 0.14992888271808624, 0.5385439395904541, 0.10126177221536636, -0.02521693706512451, -0.026552140712738037, 0.36825448274612427, -0.11246559023857117, -0.1354573369026184, 0.027745282277464867, 0.05608661472797394, -0.1785905510187149, 0.4488898813724518, 0.09400233626365662, 0.04492756724357605, 0.21903328597545624, 0.021299082785844803, 0.2241881936788559, -0.0497332438826561, 0.16485467553138733, 0.2208453118801117, 0.18709737062454224, -0.3275696337223053, -0.000594974379055202, 0.016330737620592117, -0.09669023007154465, -0.21795208752155304, 0.37293705344200134, -0.2869570553302765, -0.38960468769073486, 0.04474368318915367, -0.30051422119140625, 0.44616174697875977, 0.22343580424785614, 0.055390991270542145, -0.03162660822272301, -0.03451185300946236, -0.2905460298061371, 0.0016977721825242043, 0.28498366475105286, 0.14653842151165009, 0.1383148580789566, 0.011881113052368164, -0.16591987013816833, -0.3188056945800781, 0.4514297842979431, -0.34307825565338135, 0.11212299019098282, -0.07802874594926834, 0.08660212904214859, -0.21741355955600739, -0.15316882729530334, 0.05890144035220146, -0.3767896592617035, 0.07929491251707077, 0.10199400782585144, 0.1779601275920868, -0.02632945403456688, -0.07302014529705048, -0.062483206391334534, 0.11279039829969406, -0.35146310925483704, 0.09131503105163574, 0.2073274552822113, -0.3475484251976013, -0.10473448038101196, 0.015667004510760307, -0.02313312143087387, -0.08183269947767258, -0.07766415178775787, -0.3527001440525055, 0.13941335678100586, 0.24238350987434387, -0.07712326943874359, 0.46852365136146545, 0.2998342514038086, -0.39801251888275146, -0.14970643818378448, -0.013386458158493042, 0.12593886256217957, 0.18218816816806793, -0.05500727519392967, -0.0008667026413604617, -0.05453694239258766, 0.11544229835271835, 0.12321992963552475, -0.04196011275053024, -0.1823960244655609, -0.2689346671104431, 0.2430238276720047, -0.0968003123998642, -0.08966407179832458, 0.20775113999843597, -0.10537494719028473, -0.5549076199531555, 0.26851174235343933, -0.15632474422454834, -0.11561398208141327, 0.08474171906709671, 0.18734605610370636, 0.09688984602689743, -0.5136171579360962, 0.16378727555274963, 0.06268490850925446, -0.12720100581645966, -0.20473533868789673, -0.07986564934253693, 0.14881150424480438, 0.017154870554804802, 0.1956682950258255, 0.04247139394283295, -0.2396196871995926, 0.0187501460313797, 0.1349663883447647, -0.13862086832523346, 0.4784555435180664, -0.18406662344932556, -0.11824379116296768, -0.4211571216583252, 0.1407260298728943, 0.327250212430954, 0.3897196352481842, -0.11443157494068146, 0.2289533168077469, -0.01054585911333561, 0.1518058478832245, -0.4332951605319977, -0.263767808675766, 0.08157972991466522, 0.334432452917099, 0.15499140322208405, -0.01598915457725525, -0.008818047121167183, 0.12326092272996902, 0.284212201833725, 0.005224144551903009, -0.12553729116916656, -0.3019004762172699, 0.19128361344337463, 0.044664498418569565, -0.026139559224247932, -0.06461608409881592, 0.2021704763174057, 0.09269522875547409, -0.21611934900283813, -0.36056816577911377, -0.01782865822315216, -0.01093052513897419, -0.19008727371692657, -0.2954387962818146, -0.09741663932800293, -0.30612191557884216, 0.402010053396225, -0.09242290258407593, 0.04785262048244476, -0.14250779151916504, -0.1871102899312973, 0.06981060653924942, -0.2081136852502823, -0.25191935896873474, 0.060294363647699356, 0.14856041967868805, 0.5774243474006653, -0.20135949552059174, 0.02057073637843132, 0.09246812760829926, -0.46179136633872986, 0.11550173908472061, 0.22509242594242096, 0.02049032598733902, -0.13396090269088745, 0.08101262897253036, -0.06760450452566147, 0.36333930492401123, -0.050096698105335236, -0.34500280022621155, -0.333711713552475, -0.18456730246543884, 0.35877370834350586, 0.021968211978673935, -0.0478455014526844, -0.37960949540138245, 0.18785834312438965, -0.08317291736602783, 0.07296480238437653, -0.19780650734901428, -0.053518399596214294, 0.2255857288837433, 0.25665220618247986, 0.1377432495355606, 0.1769385039806366, 0.18964643776416779, 0.16411416232585907, 0.012298636138439178, -0.14944526553153992, 0.10378661006689072, 0.4051732122898102, -0.2865995466709137, 0.07125429809093475, -0.278799444437027, -0.24394619464874268, 0.41061827540397644, 0.05112475901842117, 0.3024011552333832, 0.35134372115135193, 0.02932683192193508, -0.3359386920928955, -0.12089790403842926, 0.4078117609024048, 0.18918286263942719, 0.1175205260515213, -0.1308882236480713, -0.06530863046646118, 0.1256382018327713, -0.19678270816802979, -0.1453700214624405, 0.3575199842453003, 0.2330475002527237, 0.10452688485383987, -0.35600772500038147, 0.39948707818984985, 0.08698968589305878, 0.012880424037575722, 0.087595134973526, -0.10311989486217499, -0.4102635979652405, 0.06765522062778473, -0.07474236935377121, -0.05124781280755997, 0.34489887952804565, 0.11509224027395248, 0.4727354049682617, 0.036608025431632996, -0.030007092282176018, 0.24533163011074066, -0.2972632944583893, -0.17719918489456177, -0.08530249446630478, 0.061892300844192505, 0.13600440323352814, -0.19771182537078857, 0.1204414963722229, 0.28619176149368286, -0.19026049971580505, -0.10869690030813217, 0.23919107019901276, -0.23125147819519043, 0.32588255405426025, -0.17486761510372162, -0.13912425935268402, -0.44257092475891113, -0.21066537499427795, -0.27004268765449524, -0.24432112276554108, -0.21765169501304626, 0.2268160879611969, -0.2130815088748932, 0.14632627367973328, 0.12869858741760254, 0.20232151448726654, 0.1123100221157074, 0.0007927482947707176, 0.1831599920988083, 0.19352097809314728, -0.2000129222869873, -0.38069698214530945, -0.14248526096343994, -0.27553820610046387, 0.21514290571212769, 0.11816465109586716, -0.2587434947490692, 0.12463561445474625, 0.32930484414100647, -0.08806391060352325, 0.13119642436504364, 0.03186943754553795, -0.2546280026435852, 0.17044739425182343, -0.20697519183158875, 0.36524489521980286, 0.2989574670791626, 0.3486214876174927, 0.16794975101947784, -0.3069908618927002, 0.11777260154485703, 0.1222103014588356, 0.20223844051361084, -0.016486555337905884, 0.13099728524684906, -0.19612781703472137, -0.17968153953552246, -0.12067219614982605, -0.028497233986854553, 0.274309903383255, -0.665733277797699, 0.33864906430244446, 0.325128436088562, -0.05240592733025551, 0.09303523600101471, -0.4242226183414459, 0.1367868036031723, 0.30942121148109436, -0.16522186994552612, 0.2486518919467926, 0.030046284198760986, -0.0760401114821434, 0.2827208936214447, 0.09794191271066666, -0.25833550095558167, 0.38031861186027527, -0.40076255798339844, -0.05966176465153694, -0.07548519968986511, -0.04315066337585449, 0.03243027999997139, 0.015045135281980038, -0.10262273997068405, -0.4515042006969452, 0.26325899362564087, -0.050372395664453506, -0.6829177737236023, -0.3067149221897125, 0.4092709720134735, -0.13569964468479156, 0.09008248895406723, -0.03131446614861488, -0.02777794562280178, 0.15679657459259033, -0.023492049425840378, -0.2586034834384918, 0.17846573889255524, -0.2574191093444824, -0.18099430203437805, -0.013593957759439945, -0.11021911352872849, 0.39809441566467285, -0.09010939300060272, -0.2967379689216614, -0.48195770382881165 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
If you use huggingface trainer, you will find the trainer has wrapped a `IterableDatasetShard` to avoid duplication. See: https://github.com/huggingface/transformers/blob/dfd818420dcbad68e05a502495cf666d338b2bfb/src/transformers/trainer.py#L835
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
19
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
If you want to support it by datasets natively, maybe we also need to change the code in `transformers` ?
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
20
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
Maybe something like this then ? ```python from datasets.distributed import split_dataset_by_node ds = split_dataset_by_node(ds, rank=rank, world_size=world_size) ``` For map-style datasets the implementation is trivial (it can simply use `.shard()`). For iterable datasets we would need to implement a new ExamplesIterable that would only iterate on a subset of the (possibly shuffled and re-shuffled after each epoch) list of shards, based on the rank and world size.
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
66
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
My plan is to skip examples by default to not end up with duplicates. And if a dataset has a number of shards that is a factor of the world size, then I'd make it more optimized by distributing the shards evenly across nodes instead.
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
45
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
Opened a PR here: https://github.com/huggingface/datasets/pull/5369 feel free to play with it and share your feedbacks :)
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
16
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
@lhoestq I add shuffle after split_dataset_by_node, duplicated data still exist. For example, we have a directory named `mock_pretraining_data`, which has three files, `part-00000`, `part-00002`,`part-00002`. Text in `part-00000` is like this: {"id": 0} {"id": 1} {"id": 2} {"id": 3} {"id": 4} {"id": 5} {"id": 6} {"id": 7} {"id": 8} {"id": 9} and `part-00001` {"id": 10} {"id": 11} {"id": 12} {"id": 13} {"id": 14} {"id": 15} {"id": 16} {"id": 17} {"id": 18} {"id": 19} and `part-00002` {"id": 20} {"id": 21} {"id": 22} {"id": 23} {"id": 24} {"id": 25} {"id": 26} {"id": 27} {"id": 28} {"id": 29} And code in `test_dist.py` like this, ```python import torch from torch.utils.data import Dataset, DataLoader from datasets import load_dataset import os from transformers import AutoTokenizer, NezhaForPreTraining from transformers import AdamW, get_linear_schedule_with_warmup import torch.nn.functional as F import torch.nn as nn import torch.distributed as dist from datasets.distributed import split_dataset_by_node from torch.nn.parallel import DistributedDataParallel as DDP os.environ["CUDA_VISIBLE_DEVICES"] = '5,6,7' dist.init_process_group("nccl") local_rank = int(os.environ['LOCAL_RANK']) world_size = torch.distributed.get_world_size() device = torch.device('cuda', local_rank) data_dir = './' def load_trainset(train_path): dataset = load_dataset('json', data_dir=os.path.join(data_dir, train_path), split='train', streaming=True) return dataset def collate_fn(examples): input_ids = [] for example in examples: input_ids.append(example['id']) return torch.LongTensor(input_ids).to(device) dataset = load_trainset('mock_pretraining_data') dataset = split_dataset_by_node(dataset, rank=local_rank, world_size=world_size).shuffle(buffer_size=512) # train_sampler = torch.utils.data.distributed.DistributedSampler(dataset) batch_size = 3 print('batch_size: {}'.format(batch_size)) train_dataloader = DataLoader(dataset, batch_size=batch_size, collate_fn=collate_fn) for x in train_dataloader: print({'rank': local_rank, 'id': x}) ``` run `python -m torch.distributed.launch --nproc_per_node=3 test_dist.py` The output is ``` {'rank': 1, 'id': tensor([12, 15, 14], device='cuda:1')} {'rank': 1, 'id': tensor([16, 10, 18], device='cuda:1')} {'rank': 1, 'id': tensor([17, 13, 19], device='cuda:1')} {'rank': 1, 'id': tensor([11], device='cuda:1')} {'rank': 0, 'id': tensor([0, 2, 9], device='cuda:0')} {'rank': 0, 'id': tensor([4, 8, 1], device='cuda:0')} {'rank': 0, 'id': tensor([5, 3, 6], device='cuda:0')} {'rank': 0, 'id': tensor([7], device='cuda:0')} {'rank': 2, 'id': tensor([13, 15, 14], device='cuda:2')} {'rank': 2, 'id': tensor([19, 17, 18], device='cuda:2')} {'rank': 2, 'id': tensor([12, 16, 11], device='cuda:2')} {'rank': 2, 'id': tensor([10], device='cuda:2')} ``` `part-00001` is loaded twice, `part-00002` isn't loaded. If I run `python -m torch.distributed.launch --nproc_per_node=2 test_dist.py` The output is weirder,many numbers appear twice ``` {'rank': 1, 'id': tensor([26, 8, 13], device='cuda:1')} {'rank': 1, 'id': tensor([22, 19, 20], device='cuda:1')} {'rank': 1, 'id': tensor([12, 28, 11], device='cuda:1')} {'rank': 1, 'id': tensor([24, 2, 14], device='cuda:1')} {'rank': 1, 'id': tensor([ 6, 27, 3], device='cuda:1')} {'rank': 0, 'id': tensor([ 8, 25, 1], device='cuda:0')} {'rank': 0, 'id': tensor([20, 4, 12], device='cuda:0')} {'rank': 0, 'id': tensor([14, 29, 5], device='cuda:0')} {'rank': 0, 'id': tensor([ 7, 18, 23], device='cuda:0')} {'rank': 0, 'id': tensor([19, 17, 11], device='cuda:0')} ```
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
403
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
Hi ! Thanks for reporting, you need to pass `seed=` to `shuffle()` or the processes won't use the same seed to shuffle the shards order before assigning each shard to a node. The issue is that the workers are not using the same seed to shuffle the shards before splitting the shards list by node.
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
55
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
I have the same issue ``` ds['train'] = load_dataset(streaming=True) ds['train'] = split_dataset_by_node(ds['train'], rank=int(os.environ["RANK"]), world_size=int(os.environ["WORLD_SIZE"])) vectorized_datasets = ds.map( prepare_dataset, remove_columns=raw_datasets_features, ).with_format("torch") vectorized_datasets["train"] = vectorized_datasets["train"].shuffle( buffer_size=500, seed=42, ) def prepare_dataset(batch): .... print(f"sentence: {batch['sentence']}, target_text: {batch['target_text']}") return batch ``` When using split_dataset_by_node(), the data being read is indeed different for each GPU ID. ``` trainer = Trainer( model=model, data_collator=data_collator, args=training_args, compute_metrics=compute_metrics, train_dataset=vectorized_datasets["train"] if training_args.do_train else None, eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None, tokenizer=processor, callbacks=[ShuffleCallback()], ) ... train_result = trainer.train(resume_from_checkpoint=checkpoint) ``` However, when I execute trainer.train(), the data being read is different from what I expected. Because I print the batch value in prepare_dataset() , I observe that the data is the same for each GPU ID. How should I handle this issue?
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
118
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5360
IterableDataset returns duplicated data using PyTorch DDP
There are two ways an iterable dataset can be split by node: 1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU 2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others. In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU. This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end. Could you open a new issue so that we can discuss about this and find a solution ?
As mentioned in https://github.com/huggingface/datasets/issues/3423, when using PyTorch DDP the dataset ends up with duplicated data. We already check for the PyTorch `worker_info` for single node, but we should also check for `torch.distributed.get_world_size()` and `torch.distributed.get_rank()`
111
IterableDataset returns duplicated data using PyTorch DDP
[ -0.05842670053243637, -0.33093562722206116, -0.19138182699680328, 0.21109133958816528, -0.024326086044311523, -0.10437124967575073, 0.3538439869880676, 0.17014765739440918, -0.286160409450531, 0.12576746940612793, -0.20091868937015533, 0.3289867043495178, -0.16349031031131744, -0.010429928079247475, 0.10526377707719803, 0.3575839698314667, -0.15923891961574554, 0.3550272583961487, -0.1934298723936081, -0.24662107229232788, 0.016314906999468803, 0.22544144093990326, -0.1298932284116745, -0.2907181680202484, -0.4562022387981415, 0.03127869963645935, -0.3212743103504181, 0.3334774076938629, 0.038091693073511124, -0.3306860625743866, 0.3672369122505188, 0.2976260781288147, -0.24594633281230927, 0.3097803294658661, -0.00011424918920965865, 0.05916643515229225, -0.18179954588413239, 0.056305430829524994, -0.1864968240261078, 0.24731990694999695, 0.02747092954814434, 0.13404907286167145, 0.048878032714128494, -0.23179587721824646, -0.19103308022022247, -0.6547009944915771, -0.06365659832954407, -0.0874858871102333, 0.33215388655662537, 0.11602015048265457, 0.18232113122940063, 0.11543857306241989, -0.3518509268760681, -0.03393758088350296, -0.10825025290250778, 0.12099967151880264, 0.15120480954647064, 0.41841942071914673, 0.5012975335121155, 0.1016940101981163, -0.15598532557487488, 0.17815591394901276, -0.04909118637442589, 0.38510653376579285, -0.15582069754600525, 0.09275326877832413, 0.047643501311540604, 0.10706321150064468, 0.37973272800445557, -0.06586617231369019, 0.31149786710739136, -0.40598931908607483, 0.062111616134643555, -0.34769096970558167, 0.026882626116275787, -0.0748562291264534, -0.22879558801651, -0.1862785816192627, -0.06852643191814423, -0.10820522159337997, -0.19959433376789093, 0.15845496952533722, -0.36473819613456726, -0.05309465155005455, -0.003347564721480012, 0.11201465129852295, 0.057308975607156754, 0.14684022963047028, 0.08181222528219223, 0.18542799353599548, 0.30253705382347107, -0.031580276787281036, -0.06867514550685883, -0.002932436065748334, 0.08037383109331131, -0.2532263994216919, 0.11573891341686249, -0.43009427189826965, 0.14704790711402893, 0.06356997787952423, 0.23369428515434265, 0.13771885633468628, 0.2662385404109955, -0.10391267389059067, 0.378849595785141, 0.1050524190068245, -0.15116195380687714, 0.3790314197540283, -0.028737105429172516, -0.1676485240459442, -0.2556016445159912, 0.10015341639518738, 0.23357267677783966, 0.1257333755493164, 0.744627833366394, -0.11395113915205002, 0.3391096293926239, -0.15278005599975586, -0.3334617614746094, -0.054085955023765564, -0.43174976110458374, -0.18703435361385345, -0.15747612714767456, 0.06008776277303696, 0.08064533025026321, -0.13087008893489838, -0.1270550936460495, 0.1342112272977829, -0.3374496400356293, 0.2311924546957016, -0.37703314423561096, -0.04470035061240196, 0.006141532678157091, -0.13373538851737976, 0.328168660402298, -0.02481754682958126, 0.26973071694374084, 0.1674315631389618, 0.08120860904455185, -0.2845914363861084, 0.27218884229660034, 0.030601905658841133, 0.5200586915016174, 0.017142165452241898, -0.10158717632293701, -0.04155369848012924, -0.013937711715698242, -0.20107819139957428, 0.02769886888563633, 0.2161441445350647, -0.011025617830455303, -0.20046991109848022, -0.025966905057430267, 0.2536121606826782, -0.0330636240541935, -0.059838779270648956, 0.2601161003112793, 0.09864798188209534, 0.297078400850296, -0.1498701125383377, -0.09534485638141632, -0.16868841648101807, -0.23925206065177917, -0.01817880943417549, -0.10201948136091232, 0.18827833235263824, -0.17792248725891113, -0.12485011667013168, 0.25380533933639526, 0.11035896837711334, 0.19954349100589752, 0.19806787371635437, -0.10630741715431213, 0.376606285572052, -0.35890817642211914, -0.012650921009480953, -0.018679162487387657, -0.048623502254486084, -0.6224325299263, 0.1101585328578949, 0.02893918938934803, 0.22863979637622833, 0.0563528798520565, 0.26844653487205505, 0.4123174548149109, -0.003640900831669569, 0.15790589153766632, -0.3168255388736725, -0.1834695041179657, -0.03839099034667015, -0.1970682591199875, 0.21046285331249237, 0.16589288413524628, 0.06861377507448196, 0.022110115736722946, 0.27005380392074585, 0.09689343720674515, 0.10984862595796585, 0.39639344811439514, -0.19354669749736786, -0.1391274631023407, 0.0690448209643364, 0.22097113728523254, -0.3209505081176758, 0.41846558451652527, -0.41231805086135864, -0.4446055591106415, 0.10649240016937256, -0.2550562918186188, -0.093633733689785, -0.2674000859260559, -0.21533101797103882, -0.40699517726898193, 0.12588100135326385, -0.37497109174728394, -0.22717642784118652, 0.19465948641300201, 0.25755009055137634, 0.1967211365699768, -0.25685879588127136, -0.20314912497997284, 0.20898506045341492, -0.2245878428220749, -0.26910707354545593, -0.015129495412111282, 0.24468690156936646, -0.003569098189473152, -0.17169952392578125, 0.1805492490530014, 0.553719162940979, 0.19761595129966736, -0.18265315890312195, 0.06783565133810043, -0.003625530982390046, 0.15636692941188812, -0.14906662702560425, 0.1360938996076584, 0.2456355094909668, 0.3343985080718994, -0.0036904679145663977, -0.1551981121301651, 0.26474806666374207, 0.19955170154571533, -0.14492923021316528, -0.022048361599445343, 0.20274893939495087, -0.1303912252187729, 0.03871652111411095, 0.08698458969593048, -0.16591136157512665, 0.20301730930805206, -0.07937921583652496, -0.09471007436513901, -0.3333842158317566, 0.005559732671827078, -0.06541401892900467, 0.348191499710083, 0.1832902580499649, -0.22428523004055023, 0.4066418409347534, 0.31694507598876953, -0.08686792850494385, -0.0635935366153717, -0.19743262231349945, -0.07742910087108612, -0.1720358431339264, 0.05255873128771782, 0.39112797379493713, 0.2744661867618561, 0.21940869092941284, 0.31076958775520325, 0.10388386994600296, -0.350177526473999, -0.03634306788444519, -0.011145323514938354, -0.045438025146722794, 0.24503764510154724, 0.31851688027381897, 0.25663289427757263, -0.32273590564727783, -0.5237513780593872, 0.0726659893989563, 0.18453474342823029, 0.14916124939918518, -0.028677955269813538, 0.1415402889251709, -0.19506460428237915, -0.3454531729221344, -0.12107089906930923, -0.06474697589874268, 0.07152432203292847, -0.27035513520240784, 0.11916268616914749, 0.6824988126754761, 0.15818750858306885, 0.1343424916267395, 0.00550718093290925, 0.424640029668808, 0.060489997267723083, -0.1194295585155487, -0.07306244224309921, -0.1891271322965622, -0.25878310203552246, 0.18541650474071503, -0.2623938322067261, -0.23245513439178467, 0.6281395554542542, 0.10371048748493195, -0.01803794875741005, -0.2839108109474182, -0.3342369496822357, 0.22143864631652832, 0.031211543828248978, -0.17452779412269592, 0.13081161677837372, -0.00338922836817801, 0.10540225356817245, -0.0911925658583641, 0.10984013974666595, 0.013537696562707424, -0.16000168025493622, 0.05115630105137825, -0.27561983466148376, -0.3509168326854706, -0.15520988404750824, -0.4805830717086792, 0.1048051118850708, 0.21332725882530212, 0.017145371064543724, -0.06513461470603943, 0.407041072845459, 0.3763190507888794, -0.12631072103977203, 0.10558924078941345, 0.0785338431596756, -0.1094808280467987, -0.38705602288246155, 0.1256561279296875, -0.021123573184013367, -0.0898122638463974, -0.3221079409122467, -0.30515816807746887, -0.3288109004497528, 0.2141188383102417, 0.23395945131778717, -0.37953779101371765, -0.8095324039459229, -0.1297849714756012, -0.10221143811941147, -0.07391993701457977, -0.18978184461593628, 0.35332968831062317, 0.16290922462940216, -0.14021971821784973, -0.2322009801864624, -0.19876250624656677, 0.34282514452934265, 0.1595895141363144, -0.03475026413798332, -0.05296845734119415, -0.07699409872293472, 0.22724655270576477, 0.346357524394989, 0.513620138168335, -0.05578174814581871, 0.18020789325237274, -0.48459771275520325, 0.1987610161304474, -0.13570037484169006, -0.4343932867050171, 0.05624823644757271, -0.046632733196020126, -0.16047774255275726, 0.200924813747406, -0.2642644941806793, -0.32959672808647156, 0.19745436310768127, 0.3883141875267029, -0.10014171153306961, -0.05988150089979172, -0.20161452889442444, 0.11171688139438629, 0.1554725468158722, 0.3535711467266083, 0.1904289424419403, -0.1261119693517685, 0.11244441568851471, -0.11753250658512115, -0.37260276079177856, -0.08148059248924255, -0.08789706975221634, -0.14973384141921997, -0.21117770671844482, -0.48025625944137573, 0.13917334377765656, 0.36410996317863464, 0.4068571627140045, -0.01952369511127472, -0.03439564257860184, 0.38020095229148865, -0.2020445466041565, 0.7736255526542664, 0.15425805747509003, 0.06990747153759003, 0.1363004893064499, -0.2961440980434418, -0.21159842610359192, 0.10830625891685486, -0.28585806488990784, 0.7215720415115356, 0.17731592059135437, 0.32491299510002136, -0.2729399800300598, 0.02548820897936821, 0.17383502423763275, 0.086249440908432, -0.15129829943180084, -0.009891021065413952, -0.17493627965450287, -0.42867767810821533, -0.17957057058811188, -0.011108429171144962, 0.07323906570672989, 0.27414777874946594, 0.27918440103530884, -0.16355527937412262, -0.0991358831524849, -0.35865792632102966, 0.052506253123283386, 0.3288205862045288, 0.27432090044021606, 0.01626763492822647, 0.2386050820350647, 0.17309588193893433, 0.27803751826286316, -0.05892692506313324, 0.5526765584945679, -0.1277480125427246, -0.11385441571474075, 0.07990028709173203, -0.3542412519454956, 0.15180028975009918, 0.22425121068954468, -0.07560476660728455, -0.15327227115631104, 0.007565454114228487, -0.15519309043884277, -0.3763695955276489, -0.05305466055870056, 0.341235488653183, -0.006848013028502464, -0.1870034635066986, -0.33527734875679016, 0.0077151148580014706, -0.1365123689174652, -0.07926721125841141, 0.5567923784255981, -0.01800456829369068, -0.14368104934692383, 0.12414908409118652, -0.1221679151058197, 0.5512539744377136, -0.011786451563239098, 0.16735532879829407, 0.2396402806043625, -0.3124535381793976, -0.14258500933647156, 0.472781240940094, 0.26469358801841736, -0.30758172273635864, -0.18001402914524078, 0.018863938748836517, -0.06720546633005142, -0.24416975677013397, 0.22908227145671844, 0.053850337862968445, -0.009584113955497742, 0.3119564354419708, -0.198127880692482, 0.0367877334356308, 0.2601246237754822, 0.06553156673908234, 0.08065707236528397, 0.10230220854282379, 0.16692668199539185, -0.2465827763080597, 0.0925128236413002, -0.01138349436223507, 0.10958509147167206, 0.285259485244751, -0.08658909052610397, -0.1733640879392624, 0.14114782214164734, -0.25957944989204407, 0.23260731995105743, -0.07370039075613022, -0.5014401078224182, -0.5647311210632324, -0.11524178087711334, 0.1520373821258545, -0.11526355147361755, -0.04574217647314072, 0.047832515090703964, 0.06945694237947464, 0.305972158908844, -0.09063025563955307, -0.03112856298685074, 0.15972815454006195, -0.02117357961833477, -0.10572142153978348, -0.2829147279262543, 0.2792589068412781, -0.46032091975212097, -0.05039512738585472, 0.261150985956192, -0.03994264453649521, -0.2062252312898636, 0.1795971393585205, 0.2438352257013321, -0.2341771274805069, -0.2919965088367462, 0.09968899935483932, -0.03050120547413826, -0.16998423635959625, 0.366977721452713, -0.06406296044588089, -0.4468826949596405, -0.03541339561343193, 0.2653959393501282, 0.5117487907409668, 0.3308834731578827, 0.5191175937652588, -0.18101638555526733, 0.029533231630921364, -0.2215406894683838, -0.3656294047832489, -0.042824942618608475, -0.24862055480480194, 0.3383888304233551, -0.1927230805158615, 0.09120552986860275, 0.06573350727558136, 0.3238673806190491, -0.08939516544342041, 0.3970819115638733, -0.269953191280365, -0.05095451697707176, -0.3716748356819153, -0.07807996869087219, 0.3013934791088104, 0.4815506339073181, 0.20930126309394836, 0.0605185329914093, -0.08393082767724991, 0.2010568231344223, -0.35118192434310913, -0.01172818522900343, -0.004962578881531954, 0.1470981389284134, -0.1702856868505478, -0.2714284360408783, 0.24395424127578735, -0.12147101014852524, 0.2397395372390747, 0.17061634361743927, 0.11435436457395554, -0.30703336000442505, -0.12143700569868088, 0.054400645196437836, -0.018619319424033165, 0.035755619406700134, -0.3300650119781494, -0.150932177901268, -0.1256667822599411, -0.09778222441673279, 0.35995081067085266, 0.26526156067848206, 0.13584302365779877, 0.1606982946395874, 0.2683364748954773, -0.2871997654438019, 0.23091508448123932, -0.2692467272281647, -0.07669016718864441, -0.08472394198179245, 0.18535536527633667, -0.012160632759332657, -0.08179421722888947, -0.10661689937114716, 0.23001037538051605, -0.017661789432168007, 0.26580700278282166, -0.21519936621189117, 0.1738714873790741, -0.28909432888031006, -0.1499571055173874, 0.08167015016078949, 0.5691075921058655, 0.18239764869213104, -0.10951641947031021, -0.2584834396839142, -0.19889378547668457, 0.15595631301403046, -0.3467489182949066, -0.34751296043395996, -0.03432793170213699, -0.1527092307806015, 0.1844247281551361, 0.34217676520347595, 0.17861522734165192, 0.08044388145208359, 0.37924277782440186, 0.08289902657270432, 0.24834546446800232, -0.6672734022140503, 0.05680333450436592, -0.10805962979793549, 0.06338657438755035, -0.26612311601638794, 0.2932155430316925, 0.335643470287323, -0.03682994842529297, 0.29969286918640137, 0.11009074747562408, 0.3591375946998596, 0.054499801248311996, -0.052439771592617035, 0.2842003405094147, 0.17299510538578033, 0.06252382695674896, -0.04774188995361328, -0.12648335099220276, 0.24464210867881775, 0.2888921797275543, -0.06587712466716766, -0.19357866048812866, -0.13717828691005707, -0.10677166283130646, -0.23663757741451263, -0.22598078846931458, 0.0657477080821991, 0.18541668355464935, -0.06119731068611145, 0.0988573208451271, -0.12969094514846802, 0.019048478454351425, -0.16461819410324097, 0.15971049666404724, -0.12968198955059052, -0.17612674832344055, -0.3460903763771057, -0.12880443036556244, 0.17089229822158813, 0.06765741109848022, -0.11416242271661758, 0.2272462695837021, 0.2623635232448578, -0.03453785553574562, 0.05458841100335121, 0.4905528724193573, 0.3137841522693634, -0.007283894810825586, -0.25225570797920227, 0.1425570845603943, -0.24511031806468964, -0.18724235892295837, -0.19030171632766724, 0.19200927019119263, -0.11763113737106323, -0.29901280999183655, 0.22551478445529938, 0.10681425034999847, -0.026568081229925156, -0.010218233801424503, 0.48250845074653625, -0.26395875215530396, -0.046192657202482224, 0.5765283703804016, -0.17209550738334656, -0.15094269812107086, 0.011745882220566273, 0.13055028021335602, -0.33075401186943054, -0.5248681902885437, 0.11193391680717468, -0.2416982799768448, 0.22432319819927216, 0.003687557764351368, 0.11575276404619217, -0.21116416156291962, 0.3489949107170105, 0.13422246277332306, 0.16251720488071442, -0.12765245139598846, 0.03392950817942619, -0.42567846179008484, 0.209814190864563, -0.14293375611305237, -0.1674567312002182, 0.09683038294315338, 0.41730204224586487, -0.06472253799438477, -0.08465030789375305, 0.1791016161441803, 0.057857222855091095, 0.13937269151210785, 0.08143489807844162, -0.24507658183574677, -0.18135154247283936, 0.08956891298294067, -0.14871829748153687, 0.006440647412091494, -0.23849739134311676, 0.30894961953163147, -0.16925053298473358, 0.16037681698799133, 0.17289479076862335, -0.061685264110565186, 0.1278802901506424, -0.0859992578625679, -0.1769772320985794, 0.21299578249454498, 0.2569272220134735, -0.2021014392375946, 0.05004388466477394, 0.046482961624860764, -0.011486993171274662, -0.2318788766860962, 0.2994230091571808, 0.29518556594848633, 0.03836844861507416, -0.023823995143175125, -0.11130167543888092, 0.06763181835412979, 0.24157679080963135, 0.29685157537460327, -0.02067146822810173, -0.01690429076552391, 0.41003841161727905, -0.11912299692630768, 0.27974700927734375, -0.16636356711387634, 0.4227575659751892, 0.1850755214691162, 0.2621175944805145, -0.029576197266578674, -0.43557092547416687, 0.5263645052909851, -0.4036526083946228, -0.4477192461490631, -0.001059821923263371, 0.3234860897064209, -0.014533375389873981, -0.1024475172162056, -0.1707192063331604, -0.07619943469762802, 0.36262989044189453, -0.4159626364707947, -0.05176280438899994, 0.326656699180603, -0.06415437161922455, -0.011087214574217796, -0.03889590501785278, 0.6277573108673096, 0.27839842438697815, -0.2706364393234253, 0.2254248410463333, -0.24151520431041718 ]
https://github.com/huggingface/datasets/issues/5354
Consider using "Sequence" instead of "List"
Hi! Linking a comment to provide more info on the issue: https://stackoverflow.com/a/39458225. This means we should replace all (most of) the occurrences of `List` with `Sequence` in function signatures. @tranhd95 Would you be interested in submitting a PR?
### Feature request Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below. **How to reproduce** ```py list_of_filenames = ["foo.parquet", "bar.parquet"] ds = Dataset.from_parquet(list_of_filenames) ``` **Expected mypy output:** ``` Success: no issues found ``` **Actual mypy output:** ```py test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type] test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance test.py:19: note: Consider using "Sequence" instead, which is covariant ``` **Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
38
Consider using "Sequence" instead of "List"
[ -0.02010325901210308, -0.15685904026031494, -0.4813176989555359, -0.06430881470441818, 0.12333500385284424, 0.028315294533967972, 0.21228674054145813, 0.16507092118263245, 0.2959001958370209, 0.2231140434741974, 0.2615659832954407, 0.07151017338037491, -0.2606341242790222, 0.0005356925539672375, -0.18638361990451813, -0.06951259821653366, 0.061587926000356674, 0.28856125473976135, 0.2192288637161255, 0.068381667137146, -0.20611178874969482, 0.017301242798566818, -0.11780056357383728, 0.042905159294605255, 0.23109684884548187, -0.1460050642490387, 0.06964094191789627, -0.06962913274765015, 0.023543447256088257, -0.44146400690078735, -0.2850584387779236, 0.27337002754211426, -0.09251920133829117, -0.07281748950481415, -0.00009307639993494377, -0.21502499282360077, 0.31457191705703735, 0.015903010964393616, -0.3047744631767273, 0.14783106744289398, -0.4630415737628937, -0.1533423215150833, 0.15082138776779175, -0.4146380126476288, -0.2754662334918976, 0.04563884064555168, 0.07546617835760117, -0.17707982659339905, 0.12577372789382935, 0.07224424183368683, 0.4495573937892914, -0.08695310354232788, -0.19892315566539764, -0.22065021097660065, 0.3396349549293518, -0.13599760830402374, -0.10500983893871307, -0.12027387320995331, 0.48516345024108887, -0.07148958742618561, 0.12657226622104645, 0.2017439901828766, -0.12521050870418549, 0.0036122766323387623, 0.3626961410045624, -0.08929521590471268, 0.29189449548721313, 0.06628912687301636, -0.15982715785503387, 0.08845733851194382, 0.1626751869916916, -0.049521706998348236, -0.019730543717741966, -0.14718583226203918, -0.1825428158044815, -0.45180585980415344, 0.0369810126721859, -0.15843698382377625, 0.026695558801293373, 0.11895778030157089, 0.19473783671855927, -0.033112555742263794, 0.06786719709634781, 0.2559530735015869, 0.06720320880413055, 0.25022536516189575, -0.06288119405508041, -0.11977128684520721, 0.1304633766412735, -0.135868638753891, 0.04803556576371193, -0.15878285467624664, 0.07856333255767822, -0.016179485246539116, 0.001482201274484396, -0.07919830828905106, 0.11888869106769562, 0.0819900706410408, 0.009634359739720821, 0.0999361127614975, 0.20894593000411987, 0.023612070828676224, 0.07312776148319244, -0.1473216414451599, -0.0004060083592776209, 0.09306636452674866, 0.1630232036113739, -0.15677222609519958, -0.11342150717973709, 0.2281518131494522, 0.25213709473609924, 0.10004831850528717, -0.04156797379255295, -0.027227239683270454, -0.052563779056072235, 0.2832496762275696, -0.19363217055797577, 0.1722627729177475, -0.3046538233757019, 0.19817854464054108, -0.21893833577632904, -0.2642233669757843, -0.034626662731170654, 0.295462042093277, -0.09466937929391861, -0.07553983479738235, 0.07818038761615753, 0.05551502853631973, 0.20590810477733612, 0.05824388936161995, -0.3430277705192566, 0.09125155955553055, -0.18974889814853668, -0.04505026340484619, -0.16975413262844086, -0.06746701896190643, 0.15237200260162354, -0.09676508605480194, 0.2169150561094284, -0.08340581506490707, 0.12079250067472458, -0.0763988122344017, 0.18526291847229004, -0.15038765966892242, -0.22710654139518738, 0.012364105321466923, 0.19912084937095642, -0.0481056347489357, -0.07112787663936615, 0.1313817799091339, 0.048530325293540955, -0.02517629787325859, 0.00609200494363904, 0.4005362391471863, 0.1982477754354477, 0.13565514981746674, 0.3889872431755066, -0.03966839239001274, 0.24200227856636047, 0.018690800294280052, 0.08389528840780258, 0.09430763125419617, -0.14319324493408203, 0.039500124752521515, -0.27394959330558777, 0.10720033198595047, -0.04312881827354431, -0.0430782213807106, 0.04381734877824783, 0.03244439885020256, 0.046671513468027115, 0.14437127113342285, -0.13638398051261902, 0.19302091002464294, -0.17249710857868195, 0.22886288166046143, 0.2196643054485321, -0.0488150529563427, -0.009226497262716293, -0.05117049813270569, -0.18315310776233673, -0.08921805769205093, 0.18165676295757294, 0.2062562257051468, 0.14795604348182678, -0.23324383795261383, 0.3831159174442291, -0.12479770183563232, 0.10825129598379135, 0.07144040614366531, -0.1899661421775818, -0.2876940071582794, 0.04353441670536995, -0.17466327548027039, -0.22076131403446198, 0.2723160982131958, -0.18815141916275024, 0.12557926774024963, 0.2274940311908722, -0.22032463550567627, -0.08125898241996765, 0.2626264989376068, 0.1692994087934494, 0.15554893016815186, -0.23108620941638947, -0.09065542370080948, -0.0647590309381485, -0.2418953776359558, -0.07926489412784576, 0.10881809145212173, 0.174579918384552, -0.1345832645893097, -0.33008211851119995, 0.14062434434890747, 0.0723128542304039, 0.28290536999702454, 0.41775447130203247, 0.20095627009868622, 0.0010609924793243408, -0.1543826311826706, 0.02475297823548317, -0.023407243192195892, -0.24158638715744019, -0.23173940181732178, -0.15997174382209778, 0.09468074887990952, -0.023366417735815048, 0.01527357753366232, 0.11409389227628708, 0.2734394073486328, 0.22679300606250763, 0.1327546387910843, 0.2170652151107788, -0.04038424789905548, 0.06085405871272087, -0.2956792712211609, -0.1374051421880722, 0.16819722950458527, 0.11180033534765244, -0.10562106966972351, -0.05099814012646675, 0.22859561443328857, -0.044609468430280685, 0.03876589611172676, -0.09556645154953003, 0.2870645523071289, 0.07033643871545792, 0.19251365959644318, -0.02251802571117878, -0.05891205370426178, 0.12544791400432587, 0.11165925115346909, -0.09228617697954178, -0.31663572788238525, 0.3294435739517212, 0.4142020344734192, 0.006626846268773079, -0.02409031242132187, -0.36949872970581055, 0.08842480182647705, 0.35079988837242126, 0.07774242013692856, 0.37861889600753784, 0.12786801159381866, 0.0721052959561348, -0.011237549595534801, 0.13635283708572388, -0.18814808130264282, 0.010477337054908276, 0.2637344300746918, -0.077582448720932, -0.22234946489334106, -0.004316261969506741, -0.20863589644432068, 0.15166223049163818, 0.14666748046875, 0.17226794362068176, 0.03997759893536568, 0.23374156653881073, -0.1645989716053009, 0.014569208957254887, -0.3152223825454712, -0.20448234677314758, -0.016735443845391273, -0.07664642482995987, 0.011393488384783268, -0.12427577376365662, -0.05301566421985626, 0.3025378882884979, -0.15021000802516937, -0.0291164368391037, -0.2797580659389496, 0.2686598598957062, 0.1494293510913849, -0.3347187340259552, 0.0997234433889389, 0.1381181925535202, 0.14855937659740448, 0.23890730738639832, 0.03690410032868385, -0.2328975647687912, -0.21577997505664825, 0.163391575217247, 0.3449445962905884, -0.08747986704111099, -0.029132729396224022, 0.2086479216814041, 0.035958871245384216, -0.2688171863555908, -0.2869557738304138, -0.05361710861325264, 0.22489267587661743, 0.0605839304625988, -0.16584759950637817, 0.2085421085357666, 0.18647922575473785, -0.1350679099559784, -0.2980719208717346, -0.03459032624959946, 0.28784289956092834, -0.14465303719043732, -0.053785134106874466, 0.0793742761015892, 0.05751706659793854, -0.09601502120494843, -0.051451168954372406, -0.07454705238342285, -0.37190112471580505, 0.33675888180732727, 0.2783108353614807, 0.18220427632331848, 0.1884712427854538, -0.06437233835458755, 0.02808832935988903, -0.01478523202240467, 0.2315492331981659, -0.1502712368965149, 0.2148197591304779, 0.11373531073331833, -0.09590620547533035, -0.237092524766922, -0.18721146881580353, -0.38945847749710083, 0.05272490158677101, -0.11628800630569458, -0.05733605474233627, -0.26492130756378174, 0.06551560759544373, -0.19083642959594727, 0.12678931653499603, -0.12822435796260834, 0.12406530231237411, 0.006725571118295193, -0.4685618281364441, -0.04271339252591133, 0.08458232879638672, 0.21694284677505493, -0.15786904096603394, 0.09397361427545547, 0.09464181214570999, 0.14765219390392303, -0.16557614505290985, 0.2784755825996399, 0.1497749239206314, 0.03650226071476936, 0.1923057734966278, -0.07657542079687119, -0.06690344959497452, -0.22142638266086578, -0.0312319565564394, -0.37262487411499023, 0.08978752791881561, -0.14968574047088623, 0.2709098756313324, -0.1806054711341858, -0.12598292529582977, 0.16537486016750336, 0.40042009949684143, -0.0763985812664032, -0.11744452267885208, -0.011976645328104496, 0.11821633577346802, 0.30894050002098083, 0.15421275794506073, -0.0838400200009346, -0.01356668584048748, -0.10069867968559265, -0.11713991314172745, -0.028420230373740196, 0.03459318354725838, -0.3357577919960022, -0.4418849050998688, 0.10542871057987213, -0.1362779289484024, 0.1460767388343811, 0.3873714506626129, 0.14790338277816772, -0.11169411987066269, -0.4278515875339508, -0.050305671989917755, 0.001089419354684651, 0.19513705372810364, 0.0008126155589707196, -0.21079479157924652, 0.17447683215141296, -0.03104933723807335, 0.3113623857498169, 0.2465634047985077, -0.18617205321788788, -0.14787140488624573, 0.1257866472005844, 0.017132064327597618, -0.32210537791252136, -0.06954754889011383, -0.03373933583498001, 0.02316785231232643, -0.0851336345076561, -0.058806922286748886, -0.2584642171859741, -0.06446748226881027, -0.44518205523490906, -0.023338939994573593, 0.1803971529006958, 0.013780668377876282, 0.05409397929906845, -0.1669291853904724, 0.03229374438524246, -0.2995699346065521, -0.0001564270642120391, -0.2653385400772095, 0.13331162929534912, 0.0321798101067543, -0.1187131330370903, -0.09345002472400665, 0.10567350685596466, -0.018723640590906143, -0.0852985605597496, -0.16268140077590942, 0.05287761241197586, 0.14812660217285156, -0.2745762765407562, -0.035808954387903214, 0.24894137680530548, -0.028869494795799255, 0.22159653902053833, 0.004078701138496399, 0.2201952338218689, -0.11939413100481033, -0.1735149621963501, 0.10465455055236816, -0.07247143238782883, -0.11948120594024658, -0.24626626074314117, 0.09102262556552887, 0.04015817120671272, -0.15204526484012604, 0.09326353669166565, -0.12551596760749817, -0.20058760046958923, -0.08988264948129654, 0.26725488901138306, 0.9239917397499084, -0.16505734622478485, 0.1435791403055191, 0.20588693022727966, -0.07852233201265335, 0.34093236923217773, 0.08047400414943695, 0.1533178836107254, -0.2782311737537384, -0.2747684121131897, -0.005188443697988987, -0.10916490852832794, 0.030856916680932045, 0.21307581663131714, -0.2580263614654541, 0.19602610170841217, -0.11945457011461258, 0.0536513477563858, -0.1263233870267868, -0.12569986283779144, 0.019904911518096924, -0.16462014615535736, -0.3472287952899933, 0.3266729712486267, 0.1756494790315628, -0.14093945920467377, -0.1600389927625656, -0.09835582971572876, -0.08810433000326157, -0.16895924508571625, 0.09884673357009888, -0.15031081438064575, -0.1780358850955963, -0.061250656843185425, 0.04364524781703949, -0.2517230212688446, -0.05670695751905441, -0.13053488731384277, 0.16149215400218964, 0.10746944695711136, -0.09150867164134979, -0.2882513403892517, 0.05198174715042114, 0.11672291904687881, -0.16544431447982788, -0.14620932936668396, 0.04861360415816307, -0.10249655693769455, 0.265816867351532, 0.09712541848421097, -0.10297038406133652, -0.3882141411304474, -0.23813241720199585, 0.38929662108421326, 0.24857163429260254, -0.240288645029068, -0.24455513060092926, 0.3244796395301819, -0.21959972381591797, -0.12776383757591248, 0.3897331655025482, 0.06267458200454712, 0.053948163986206055, -0.2078550010919571, 0.13124564290046692, 0.16123954951763153, -0.16112270951271057, 0.018199007958173752, 0.28732576966285706, -0.2918155789375305, 0.06259426474571228, 0.11477173119783401, -0.3636978566646576, -0.4826134443283081, -0.1814752072095871, 0.10188830643892288, -0.18362796306610107, 0.1977262645959854, -0.1320372372865677, -0.3604383170604706, -0.09042799472808838, 0.5588863492012024, -0.00016378109285142273, 0.33773913979530334, -0.14333856105804443, 0.2679125964641571, -0.2524040937423706, 0.2685353457927704, 0.045690543949604034, 0.19825147092342377, -0.11150586605072021, 0.061186544597148895, -0.22356431186199188, -0.3035183846950531, -0.5588242411613464, -0.33148708939552307, -0.3616318106651306, 0.10387220233678818, 0.04997970536351204, -0.18723119795322418, -0.005626222118735313, 0.2693925201892853, 0.4707494080066681, 0.20786800980567932, -0.1689276248216629, -0.5615010261535645, 0.17832960188388824, 0.03028002940118313, 0.05006400868296623, -0.02448073774576187, 0.07431918382644653, 0.07622826099395752, -0.032147251069545746, -0.12065038084983826, -0.31338486075401306, -0.13422568142414093, 0.1236773356795311, -0.024723395705223083, 0.3341771960258484, 0.17020849883556366, -0.015336530283093452, -0.10471729189157486, -0.05481475591659546, 0.238359272480011, -0.15357071161270142, 0.01315553579479456, -0.20841577649116516, -0.03472385182976723, -0.09588274359703064, 0.30047255754470825, 0.13749533891677856, 0.1872325837612152, 0.08239667862653732, 0.028363706544041634, -0.3733551800251007, 0.3068995773792267, 0.2916032373905182, -0.07196441292762756, -0.28214937448501587, -0.1169448047876358, 0.0692976713180542, 0.5059606432914734, -0.272103488445282, -0.20891550183296204, -0.12565752863883972, -0.14004945755004883, 0.3760237991809845, 0.5426071286201477, 0.05512057989835739, -0.1497189849615097, 0.3744884729385376, 0.03669511154294014, -0.03165246173739433, -0.40044575929641724, -0.04359836131334305, 0.3214031457901001, 0.2954813838005066, 0.11427494138479233, 0.10115163773298264, 0.05022555962204933, 0.22387361526489258, 0.21080352365970612, 0.14923998713493347, 0.20322178304195404, 0.5018290877342224, 0.22407084703445435, 0.16012558341026306, 0.09989765286445618, 0.14798453450202942, 0.33613377809524536, 0.12962481379508972, 0.07800551503896713, 0.24695917963981628, -0.23431947827339172, 0.14963898062705994, 0.07492628693580627, -0.07948611676692963, 0.07817517966032028, 0.026296304538846016, -0.023505965247750282, 0.041518889367580414, -0.08842378854751587, -0.10100222378969193, -0.27588126063346863, 0.06667877733707428, -0.007801832631230354, 0.23787103593349457, -0.13445334136486053, 0.44108861684799194, -0.18730178475379944, 0.08378808200359344, 0.0231255404651165, 0.16000838577747345, -0.1479605734348297, 0.06538866460323334, 0.05750541761517525, 0.19585907459259033, 0.1375383734703064, 0.08440050482749939, -0.045018039643764496, -0.06392695009708405, 0.20999985933303833, -0.18906761705875397, -0.2089858502149582, -0.17386488616466522, -0.2510957419872284, -0.06733976304531097, 0.16030070185661316, 0.14558127522468567, 0.08751697093248367, 0.3752126395702362, -0.39731743931770325, 0.40877896547317505, 0.10209570825099945, -0.18761193752288818, -0.07293243706226349, 0.27961409091949463, 0.31194889545440674, -0.12368655204772949, 0.017293626442551613, 0.06021735072135925, -0.3631989359855652, 0.15480121970176697, -0.00582902180030942, -0.15308155119419098, 0.31117042899131775, 0.24921944737434387, 0.213509663939476, 0.028561102226376534, -0.030066054314374924, -0.12557844817638397, 0.3412860035896301, -0.04581790789961815, -0.23195600509643555, 0.03466004505753517, 0.06417618691921234, -0.018640121445059776, 0.05012105032801628, 0.1467028111219406, 0.04820644482970238, 0.011933784931898117, 0.34454572200775146, 0.053172919899225235, -0.39620280265808105, -0.24618688225746155, 0.00965475756675005, -0.2709117531776428, -0.10671071708202362, 0.46989375352859497, 0.06271540373563766, 0.17319025099277496, -0.11634192615747452, 0.054422952234745026, -0.021463269367814064, 0.4439111649990082, -0.27010270953178406, -0.13767403364181519, -0.22637157142162323, 0.3973448574542999, 0.14404729008674622, -0.06629978120326996, -0.022070301696658134, -0.22292323410511017, -0.1700882613658905, 0.25035786628723145, -0.15270613133907318, 0.11221557855606079, 0.2542790472507477, 0.12865346670150757, 0.06547625362873077, -0.17533978819847107, -0.05381966754794121, -0.01225330401211977, 0.04368500038981438, 0.2954515218734741, 0.1476738005876541, -0.48073458671569824, 0.31145238876342773, -0.06469342857599258, 0.13906997442245483, -0.3240150511264801, 0.13700389862060547, 0.2567608058452606, 0.05776049196720123, -0.1543792337179184, -0.22930827736854553, 0.27663323283195496, -0.03204191103577614, -0.2976246178150177, 0.20037086308002472, 0.21769100427627563, 0.022820036858320236, -0.11031551659107208, -0.0281771719455719, -0.0659734308719635, 0.3583018183708191, -0.00542514817789197, -0.19243744015693665, 0.08339780569076538, -0.011599453166127205, -0.004088317509740591, -0.12744683027267456, 0.000904693326447159, 0.18874648213386536, -0.30881792306900024, -0.12235403805971146, -0.3719739317893982 ]
https://github.com/huggingface/datasets/issues/5354
Consider using "Sequence" instead of "List"
Hi all! I tried to reproduce this issue and didn't work for me. Also in your example i noticed that the variables have different names: `list_of_filenames` and `list_of_files`, could this be related to that? ```python #I found random data in parquet format: !wget "https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata1.parquet" !wget "https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata2.parquet" #Then i try reproduce list_of_files = ["userdata1.parquet", "userdata2.parquet"] ds = Dataset.from_parquet(list_of_files) ``` **My output:** ```python WARNING:datasets.builder:Using custom data configuration default-e287d097dc54e046 Downloading and preparing dataset parquet/default to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec... Downloading data files: 100% 1/1 [00:00<00:00, 40.38it/s] Extracting data files: 100% 1/1 [00:00<00:00, 23.43it/s] Dataset parquet downloaded and prepared to /root/.cache/huggingface/datasets/parquet/default-e287d097dc54e046/0.0.0/2a3b91fbd88a2c90d1dbbb32b460cf621d31bd5b05b934492fdef7d8d6f236ec. Subsequent calls will reuse this data. ``` P.S. This is my first experience with open source. So do not judge strictly if I do not understand something)
### Feature request Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below. **How to reproduce** ```py list_of_filenames = ["foo.parquet", "bar.parquet"] ds = Dataset.from_parquet(list_of_filenames) ``` **Expected mypy output:** ``` Success: no issues found ``` **Actual mypy output:** ```py test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type] test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance test.py:19: note: Consider using "Sequence" instead, which is covariant ``` **Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
121
Consider using "Sequence" instead of "List"
[ -0.02010325901210308, -0.15685904026031494, -0.4813176989555359, -0.06430881470441818, 0.12333500385284424, 0.028315294533967972, 0.21228674054145813, 0.16507092118263245, 0.2959001958370209, 0.2231140434741974, 0.2615659832954407, 0.07151017338037491, -0.2606341242790222, 0.0005356925539672375, -0.18638361990451813, -0.06951259821653366, 0.061587926000356674, 0.28856125473976135, 0.2192288637161255, 0.068381667137146, -0.20611178874969482, 0.017301242798566818, -0.11780056357383728, 0.042905159294605255, 0.23109684884548187, -0.1460050642490387, 0.06964094191789627, -0.06962913274765015, 0.023543447256088257, -0.44146400690078735, -0.2850584387779236, 0.27337002754211426, -0.09251920133829117, -0.07281748950481415, -0.00009307639993494377, -0.21502499282360077, 0.31457191705703735, 0.015903010964393616, -0.3047744631767273, 0.14783106744289398, -0.4630415737628937, -0.1533423215150833, 0.15082138776779175, -0.4146380126476288, -0.2754662334918976, 0.04563884064555168, 0.07546617835760117, -0.17707982659339905, 0.12577372789382935, 0.07224424183368683, 0.4495573937892914, -0.08695310354232788, -0.19892315566539764, -0.22065021097660065, 0.3396349549293518, -0.13599760830402374, -0.10500983893871307, -0.12027387320995331, 0.48516345024108887, -0.07148958742618561, 0.12657226622104645, 0.2017439901828766, -0.12521050870418549, 0.0036122766323387623, 0.3626961410045624, -0.08929521590471268, 0.29189449548721313, 0.06628912687301636, -0.15982715785503387, 0.08845733851194382, 0.1626751869916916, -0.049521706998348236, -0.019730543717741966, -0.14718583226203918, -0.1825428158044815, -0.45180585980415344, 0.0369810126721859, -0.15843698382377625, 0.026695558801293373, 0.11895778030157089, 0.19473783671855927, -0.033112555742263794, 0.06786719709634781, 0.2559530735015869, 0.06720320880413055, 0.25022536516189575, -0.06288119405508041, -0.11977128684520721, 0.1304633766412735, -0.135868638753891, 0.04803556576371193, -0.15878285467624664, 0.07856333255767822, -0.016179485246539116, 0.001482201274484396, -0.07919830828905106, 0.11888869106769562, 0.0819900706410408, 0.009634359739720821, 0.0999361127614975, 0.20894593000411987, 0.023612070828676224, 0.07312776148319244, -0.1473216414451599, -0.0004060083592776209, 0.09306636452674866, 0.1630232036113739, -0.15677222609519958, -0.11342150717973709, 0.2281518131494522, 0.25213709473609924, 0.10004831850528717, -0.04156797379255295, -0.027227239683270454, -0.052563779056072235, 0.2832496762275696, -0.19363217055797577, 0.1722627729177475, -0.3046538233757019, 0.19817854464054108, -0.21893833577632904, -0.2642233669757843, -0.034626662731170654, 0.295462042093277, -0.09466937929391861, -0.07553983479738235, 0.07818038761615753, 0.05551502853631973, 0.20590810477733612, 0.05824388936161995, -0.3430277705192566, 0.09125155955553055, -0.18974889814853668, -0.04505026340484619, -0.16975413262844086, -0.06746701896190643, 0.15237200260162354, -0.09676508605480194, 0.2169150561094284, -0.08340581506490707, 0.12079250067472458, -0.0763988122344017, 0.18526291847229004, -0.15038765966892242, -0.22710654139518738, 0.012364105321466923, 0.19912084937095642, -0.0481056347489357, -0.07112787663936615, 0.1313817799091339, 0.048530325293540955, -0.02517629787325859, 0.00609200494363904, 0.4005362391471863, 0.1982477754354477, 0.13565514981746674, 0.3889872431755066, -0.03966839239001274, 0.24200227856636047, 0.018690800294280052, 0.08389528840780258, 0.09430763125419617, -0.14319324493408203, 0.039500124752521515, -0.27394959330558777, 0.10720033198595047, -0.04312881827354431, -0.0430782213807106, 0.04381734877824783, 0.03244439885020256, 0.046671513468027115, 0.14437127113342285, -0.13638398051261902, 0.19302091002464294, -0.17249710857868195, 0.22886288166046143, 0.2196643054485321, -0.0488150529563427, -0.009226497262716293, -0.05117049813270569, -0.18315310776233673, -0.08921805769205093, 0.18165676295757294, 0.2062562257051468, 0.14795604348182678, -0.23324383795261383, 0.3831159174442291, -0.12479770183563232, 0.10825129598379135, 0.07144040614366531, -0.1899661421775818, -0.2876940071582794, 0.04353441670536995, -0.17466327548027039, -0.22076131403446198, 0.2723160982131958, -0.18815141916275024, 0.12557926774024963, 0.2274940311908722, -0.22032463550567627, -0.08125898241996765, 0.2626264989376068, 0.1692994087934494, 0.15554893016815186, -0.23108620941638947, -0.09065542370080948, -0.0647590309381485, -0.2418953776359558, -0.07926489412784576, 0.10881809145212173, 0.174579918384552, -0.1345832645893097, -0.33008211851119995, 0.14062434434890747, 0.0723128542304039, 0.28290536999702454, 0.41775447130203247, 0.20095627009868622, 0.0010609924793243408, -0.1543826311826706, 0.02475297823548317, -0.023407243192195892, -0.24158638715744019, -0.23173940181732178, -0.15997174382209778, 0.09468074887990952, -0.023366417735815048, 0.01527357753366232, 0.11409389227628708, 0.2734394073486328, 0.22679300606250763, 0.1327546387910843, 0.2170652151107788, -0.04038424789905548, 0.06085405871272087, -0.2956792712211609, -0.1374051421880722, 0.16819722950458527, 0.11180033534765244, -0.10562106966972351, -0.05099814012646675, 0.22859561443328857, -0.044609468430280685, 0.03876589611172676, -0.09556645154953003, 0.2870645523071289, 0.07033643871545792, 0.19251365959644318, -0.02251802571117878, -0.05891205370426178, 0.12544791400432587, 0.11165925115346909, -0.09228617697954178, -0.31663572788238525, 0.3294435739517212, 0.4142020344734192, 0.006626846268773079, -0.02409031242132187, -0.36949872970581055, 0.08842480182647705, 0.35079988837242126, 0.07774242013692856, 0.37861889600753784, 0.12786801159381866, 0.0721052959561348, -0.011237549595534801, 0.13635283708572388, -0.18814808130264282, 0.010477337054908276, 0.2637344300746918, -0.077582448720932, -0.22234946489334106, -0.004316261969506741, -0.20863589644432068, 0.15166223049163818, 0.14666748046875, 0.17226794362068176, 0.03997759893536568, 0.23374156653881073, -0.1645989716053009, 0.014569208957254887, -0.3152223825454712, -0.20448234677314758, -0.016735443845391273, -0.07664642482995987, 0.011393488384783268, -0.12427577376365662, -0.05301566421985626, 0.3025378882884979, -0.15021000802516937, -0.0291164368391037, -0.2797580659389496, 0.2686598598957062, 0.1494293510913849, -0.3347187340259552, 0.0997234433889389, 0.1381181925535202, 0.14855937659740448, 0.23890730738639832, 0.03690410032868385, -0.2328975647687912, -0.21577997505664825, 0.163391575217247, 0.3449445962905884, -0.08747986704111099, -0.029132729396224022, 0.2086479216814041, 0.035958871245384216, -0.2688171863555908, -0.2869557738304138, -0.05361710861325264, 0.22489267587661743, 0.0605839304625988, -0.16584759950637817, 0.2085421085357666, 0.18647922575473785, -0.1350679099559784, -0.2980719208717346, -0.03459032624959946, 0.28784289956092834, -0.14465303719043732, -0.053785134106874466, 0.0793742761015892, 0.05751706659793854, -0.09601502120494843, -0.051451168954372406, -0.07454705238342285, -0.37190112471580505, 0.33675888180732727, 0.2783108353614807, 0.18220427632331848, 0.1884712427854538, -0.06437233835458755, 0.02808832935988903, -0.01478523202240467, 0.2315492331981659, -0.1502712368965149, 0.2148197591304779, 0.11373531073331833, -0.09590620547533035, -0.237092524766922, -0.18721146881580353, -0.38945847749710083, 0.05272490158677101, -0.11628800630569458, -0.05733605474233627, -0.26492130756378174, 0.06551560759544373, -0.19083642959594727, 0.12678931653499603, -0.12822435796260834, 0.12406530231237411, 0.006725571118295193, -0.4685618281364441, -0.04271339252591133, 0.08458232879638672, 0.21694284677505493, -0.15786904096603394, 0.09397361427545547, 0.09464181214570999, 0.14765219390392303, -0.16557614505290985, 0.2784755825996399, 0.1497749239206314, 0.03650226071476936, 0.1923057734966278, -0.07657542079687119, -0.06690344959497452, -0.22142638266086578, -0.0312319565564394, -0.37262487411499023, 0.08978752791881561, -0.14968574047088623, 0.2709098756313324, -0.1806054711341858, -0.12598292529582977, 0.16537486016750336, 0.40042009949684143, -0.0763985812664032, -0.11744452267885208, -0.011976645328104496, 0.11821633577346802, 0.30894050002098083, 0.15421275794506073, -0.0838400200009346, -0.01356668584048748, -0.10069867968559265, -0.11713991314172745, -0.028420230373740196, 0.03459318354725838, -0.3357577919960022, -0.4418849050998688, 0.10542871057987213, -0.1362779289484024, 0.1460767388343811, 0.3873714506626129, 0.14790338277816772, -0.11169411987066269, -0.4278515875339508, -0.050305671989917755, 0.001089419354684651, 0.19513705372810364, 0.0008126155589707196, -0.21079479157924652, 0.17447683215141296, -0.03104933723807335, 0.3113623857498169, 0.2465634047985077, -0.18617205321788788, -0.14787140488624573, 0.1257866472005844, 0.017132064327597618, -0.32210537791252136, -0.06954754889011383, -0.03373933583498001, 0.02316785231232643, -0.0851336345076561, -0.058806922286748886, -0.2584642171859741, -0.06446748226881027, -0.44518205523490906, -0.023338939994573593, 0.1803971529006958, 0.013780668377876282, 0.05409397929906845, -0.1669291853904724, 0.03229374438524246, -0.2995699346065521, -0.0001564270642120391, -0.2653385400772095, 0.13331162929534912, 0.0321798101067543, -0.1187131330370903, -0.09345002472400665, 0.10567350685596466, -0.018723640590906143, -0.0852985605597496, -0.16268140077590942, 0.05287761241197586, 0.14812660217285156, -0.2745762765407562, -0.035808954387903214, 0.24894137680530548, -0.028869494795799255, 0.22159653902053833, 0.004078701138496399, 0.2201952338218689, -0.11939413100481033, -0.1735149621963501, 0.10465455055236816, -0.07247143238782883, -0.11948120594024658, -0.24626626074314117, 0.09102262556552887, 0.04015817120671272, -0.15204526484012604, 0.09326353669166565, -0.12551596760749817, -0.20058760046958923, -0.08988264948129654, 0.26725488901138306, 0.9239917397499084, -0.16505734622478485, 0.1435791403055191, 0.20588693022727966, -0.07852233201265335, 0.34093236923217773, 0.08047400414943695, 0.1533178836107254, -0.2782311737537384, -0.2747684121131897, -0.005188443697988987, -0.10916490852832794, 0.030856916680932045, 0.21307581663131714, -0.2580263614654541, 0.19602610170841217, -0.11945457011461258, 0.0536513477563858, -0.1263233870267868, -0.12569986283779144, 0.019904911518096924, -0.16462014615535736, -0.3472287952899933, 0.3266729712486267, 0.1756494790315628, -0.14093945920467377, -0.1600389927625656, -0.09835582971572876, -0.08810433000326157, -0.16895924508571625, 0.09884673357009888, -0.15031081438064575, -0.1780358850955963, -0.061250656843185425, 0.04364524781703949, -0.2517230212688446, -0.05670695751905441, -0.13053488731384277, 0.16149215400218964, 0.10746944695711136, -0.09150867164134979, -0.2882513403892517, 0.05198174715042114, 0.11672291904687881, -0.16544431447982788, -0.14620932936668396, 0.04861360415816307, -0.10249655693769455, 0.265816867351532, 0.09712541848421097, -0.10297038406133652, -0.3882141411304474, -0.23813241720199585, 0.38929662108421326, 0.24857163429260254, -0.240288645029068, -0.24455513060092926, 0.3244796395301819, -0.21959972381591797, -0.12776383757591248, 0.3897331655025482, 0.06267458200454712, 0.053948163986206055, -0.2078550010919571, 0.13124564290046692, 0.16123954951763153, -0.16112270951271057, 0.018199007958173752, 0.28732576966285706, -0.2918155789375305, 0.06259426474571228, 0.11477173119783401, -0.3636978566646576, -0.4826134443283081, -0.1814752072095871, 0.10188830643892288, -0.18362796306610107, 0.1977262645959854, -0.1320372372865677, -0.3604383170604706, -0.09042799472808838, 0.5588863492012024, -0.00016378109285142273, 0.33773913979530334, -0.14333856105804443, 0.2679125964641571, -0.2524040937423706, 0.2685353457927704, 0.045690543949604034, 0.19825147092342377, -0.11150586605072021, 0.061186544597148895, -0.22356431186199188, -0.3035183846950531, -0.5588242411613464, -0.33148708939552307, -0.3616318106651306, 0.10387220233678818, 0.04997970536351204, -0.18723119795322418, -0.005626222118735313, 0.2693925201892853, 0.4707494080066681, 0.20786800980567932, -0.1689276248216629, -0.5615010261535645, 0.17832960188388824, 0.03028002940118313, 0.05006400868296623, -0.02448073774576187, 0.07431918382644653, 0.07622826099395752, -0.032147251069545746, -0.12065038084983826, -0.31338486075401306, -0.13422568142414093, 0.1236773356795311, -0.024723395705223083, 0.3341771960258484, 0.17020849883556366, -0.015336530283093452, -0.10471729189157486, -0.05481475591659546, 0.238359272480011, -0.15357071161270142, 0.01315553579479456, -0.20841577649116516, -0.03472385182976723, -0.09588274359703064, 0.30047255754470825, 0.13749533891677856, 0.1872325837612152, 0.08239667862653732, 0.028363706544041634, -0.3733551800251007, 0.3068995773792267, 0.2916032373905182, -0.07196441292762756, -0.28214937448501587, -0.1169448047876358, 0.0692976713180542, 0.5059606432914734, -0.272103488445282, -0.20891550183296204, -0.12565752863883972, -0.14004945755004883, 0.3760237991809845, 0.5426071286201477, 0.05512057989835739, -0.1497189849615097, 0.3744884729385376, 0.03669511154294014, -0.03165246173739433, -0.40044575929641724, -0.04359836131334305, 0.3214031457901001, 0.2954813838005066, 0.11427494138479233, 0.10115163773298264, 0.05022555962204933, 0.22387361526489258, 0.21080352365970612, 0.14923998713493347, 0.20322178304195404, 0.5018290877342224, 0.22407084703445435, 0.16012558341026306, 0.09989765286445618, 0.14798453450202942, 0.33613377809524536, 0.12962481379508972, 0.07800551503896713, 0.24695917963981628, -0.23431947827339172, 0.14963898062705994, 0.07492628693580627, -0.07948611676692963, 0.07817517966032028, 0.026296304538846016, -0.023505965247750282, 0.041518889367580414, -0.08842378854751587, -0.10100222378969193, -0.27588126063346863, 0.06667877733707428, -0.007801832631230354, 0.23787103593349457, -0.13445334136486053, 0.44108861684799194, -0.18730178475379944, 0.08378808200359344, 0.0231255404651165, 0.16000838577747345, -0.1479605734348297, 0.06538866460323334, 0.05750541761517525, 0.19585907459259033, 0.1375383734703064, 0.08440050482749939, -0.045018039643764496, -0.06392695009708405, 0.20999985933303833, -0.18906761705875397, -0.2089858502149582, -0.17386488616466522, -0.2510957419872284, -0.06733976304531097, 0.16030070185661316, 0.14558127522468567, 0.08751697093248367, 0.3752126395702362, -0.39731743931770325, 0.40877896547317505, 0.10209570825099945, -0.18761193752288818, -0.07293243706226349, 0.27961409091949463, 0.31194889545440674, -0.12368655204772949, 0.017293626442551613, 0.06021735072135925, -0.3631989359855652, 0.15480121970176697, -0.00582902180030942, -0.15308155119419098, 0.31117042899131775, 0.24921944737434387, 0.213509663939476, 0.028561102226376534, -0.030066054314374924, -0.12557844817638397, 0.3412860035896301, -0.04581790789961815, -0.23195600509643555, 0.03466004505753517, 0.06417618691921234, -0.018640121445059776, 0.05012105032801628, 0.1467028111219406, 0.04820644482970238, 0.011933784931898117, 0.34454572200775146, 0.053172919899225235, -0.39620280265808105, -0.24618688225746155, 0.00965475756675005, -0.2709117531776428, -0.10671071708202362, 0.46989375352859497, 0.06271540373563766, 0.17319025099277496, -0.11634192615747452, 0.054422952234745026, -0.021463269367814064, 0.4439111649990082, -0.27010270953178406, -0.13767403364181519, -0.22637157142162323, 0.3973448574542999, 0.14404729008674622, -0.06629978120326996, -0.022070301696658134, -0.22292323410511017, -0.1700882613658905, 0.25035786628723145, -0.15270613133907318, 0.11221557855606079, 0.2542790472507477, 0.12865346670150757, 0.06547625362873077, -0.17533978819847107, -0.05381966754794121, -0.01225330401211977, 0.04368500038981438, 0.2954515218734741, 0.1476738005876541, -0.48073458671569824, 0.31145238876342773, -0.06469342857599258, 0.13906997442245483, -0.3240150511264801, 0.13700389862060547, 0.2567608058452606, 0.05776049196720123, -0.1543792337179184, -0.22930827736854553, 0.27663323283195496, -0.03204191103577614, -0.2976246178150177, 0.20037086308002472, 0.21769100427627563, 0.022820036858320236, -0.11031551659107208, -0.0281771719455719, -0.0659734308719635, 0.3583018183708191, -0.00542514817789197, -0.19243744015693665, 0.08339780569076538, -0.011599453166127205, -0.004088317509740591, -0.12744683027267456, 0.000904693326447159, 0.18874648213386536, -0.30881792306900024, -0.12235403805971146, -0.3719739317893982 ]
https://github.com/huggingface/datasets/issues/5354
Consider using "Sequence" instead of "List"
@dantema There is indeed a typo in variable names. Nevertheless, I'm sorry if I was not clear but the output is from `mypy` type checker. You can run the code snippet without issues. The problem is with the type checking.
### Feature request Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below. **How to reproduce** ```py list_of_filenames = ["foo.parquet", "bar.parquet"] ds = Dataset.from_parquet(list_of_filenames) ``` **Expected mypy output:** ``` Success: no issues found ``` **Actual mypy output:** ```py test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type] test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance test.py:19: note: Consider using "Sequence" instead, which is covariant ``` **Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
40
Consider using "Sequence" instead of "List"
[ -0.02010325901210308, -0.15685904026031494, -0.4813176989555359, -0.06430881470441818, 0.12333500385284424, 0.028315294533967972, 0.21228674054145813, 0.16507092118263245, 0.2959001958370209, 0.2231140434741974, 0.2615659832954407, 0.07151017338037491, -0.2606341242790222, 0.0005356925539672375, -0.18638361990451813, -0.06951259821653366, 0.061587926000356674, 0.28856125473976135, 0.2192288637161255, 0.068381667137146, -0.20611178874969482, 0.017301242798566818, -0.11780056357383728, 0.042905159294605255, 0.23109684884548187, -0.1460050642490387, 0.06964094191789627, -0.06962913274765015, 0.023543447256088257, -0.44146400690078735, -0.2850584387779236, 0.27337002754211426, -0.09251920133829117, -0.07281748950481415, -0.00009307639993494377, -0.21502499282360077, 0.31457191705703735, 0.015903010964393616, -0.3047744631767273, 0.14783106744289398, -0.4630415737628937, -0.1533423215150833, 0.15082138776779175, -0.4146380126476288, -0.2754662334918976, 0.04563884064555168, 0.07546617835760117, -0.17707982659339905, 0.12577372789382935, 0.07224424183368683, 0.4495573937892914, -0.08695310354232788, -0.19892315566539764, -0.22065021097660065, 0.3396349549293518, -0.13599760830402374, -0.10500983893871307, -0.12027387320995331, 0.48516345024108887, -0.07148958742618561, 0.12657226622104645, 0.2017439901828766, -0.12521050870418549, 0.0036122766323387623, 0.3626961410045624, -0.08929521590471268, 0.29189449548721313, 0.06628912687301636, -0.15982715785503387, 0.08845733851194382, 0.1626751869916916, -0.049521706998348236, -0.019730543717741966, -0.14718583226203918, -0.1825428158044815, -0.45180585980415344, 0.0369810126721859, -0.15843698382377625, 0.026695558801293373, 0.11895778030157089, 0.19473783671855927, -0.033112555742263794, 0.06786719709634781, 0.2559530735015869, 0.06720320880413055, 0.25022536516189575, -0.06288119405508041, -0.11977128684520721, 0.1304633766412735, -0.135868638753891, 0.04803556576371193, -0.15878285467624664, 0.07856333255767822, -0.016179485246539116, 0.001482201274484396, -0.07919830828905106, 0.11888869106769562, 0.0819900706410408, 0.009634359739720821, 0.0999361127614975, 0.20894593000411987, 0.023612070828676224, 0.07312776148319244, -0.1473216414451599, -0.0004060083592776209, 0.09306636452674866, 0.1630232036113739, -0.15677222609519958, -0.11342150717973709, 0.2281518131494522, 0.25213709473609924, 0.10004831850528717, -0.04156797379255295, -0.027227239683270454, -0.052563779056072235, 0.2832496762275696, -0.19363217055797577, 0.1722627729177475, -0.3046538233757019, 0.19817854464054108, -0.21893833577632904, -0.2642233669757843, -0.034626662731170654, 0.295462042093277, -0.09466937929391861, -0.07553983479738235, 0.07818038761615753, 0.05551502853631973, 0.20590810477733612, 0.05824388936161995, -0.3430277705192566, 0.09125155955553055, -0.18974889814853668, -0.04505026340484619, -0.16975413262844086, -0.06746701896190643, 0.15237200260162354, -0.09676508605480194, 0.2169150561094284, -0.08340581506490707, 0.12079250067472458, -0.0763988122344017, 0.18526291847229004, -0.15038765966892242, -0.22710654139518738, 0.012364105321466923, 0.19912084937095642, -0.0481056347489357, -0.07112787663936615, 0.1313817799091339, 0.048530325293540955, -0.02517629787325859, 0.00609200494363904, 0.4005362391471863, 0.1982477754354477, 0.13565514981746674, 0.3889872431755066, -0.03966839239001274, 0.24200227856636047, 0.018690800294280052, 0.08389528840780258, 0.09430763125419617, -0.14319324493408203, 0.039500124752521515, -0.27394959330558777, 0.10720033198595047, -0.04312881827354431, -0.0430782213807106, 0.04381734877824783, 0.03244439885020256, 0.046671513468027115, 0.14437127113342285, -0.13638398051261902, 0.19302091002464294, -0.17249710857868195, 0.22886288166046143, 0.2196643054485321, -0.0488150529563427, -0.009226497262716293, -0.05117049813270569, -0.18315310776233673, -0.08921805769205093, 0.18165676295757294, 0.2062562257051468, 0.14795604348182678, -0.23324383795261383, 0.3831159174442291, -0.12479770183563232, 0.10825129598379135, 0.07144040614366531, -0.1899661421775818, -0.2876940071582794, 0.04353441670536995, -0.17466327548027039, -0.22076131403446198, 0.2723160982131958, -0.18815141916275024, 0.12557926774024963, 0.2274940311908722, -0.22032463550567627, -0.08125898241996765, 0.2626264989376068, 0.1692994087934494, 0.15554893016815186, -0.23108620941638947, -0.09065542370080948, -0.0647590309381485, -0.2418953776359558, -0.07926489412784576, 0.10881809145212173, 0.174579918384552, -0.1345832645893097, -0.33008211851119995, 0.14062434434890747, 0.0723128542304039, 0.28290536999702454, 0.41775447130203247, 0.20095627009868622, 0.0010609924793243408, -0.1543826311826706, 0.02475297823548317, -0.023407243192195892, -0.24158638715744019, -0.23173940181732178, -0.15997174382209778, 0.09468074887990952, -0.023366417735815048, 0.01527357753366232, 0.11409389227628708, 0.2734394073486328, 0.22679300606250763, 0.1327546387910843, 0.2170652151107788, -0.04038424789905548, 0.06085405871272087, -0.2956792712211609, -0.1374051421880722, 0.16819722950458527, 0.11180033534765244, -0.10562106966972351, -0.05099814012646675, 0.22859561443328857, -0.044609468430280685, 0.03876589611172676, -0.09556645154953003, 0.2870645523071289, 0.07033643871545792, 0.19251365959644318, -0.02251802571117878, -0.05891205370426178, 0.12544791400432587, 0.11165925115346909, -0.09228617697954178, -0.31663572788238525, 0.3294435739517212, 0.4142020344734192, 0.006626846268773079, -0.02409031242132187, -0.36949872970581055, 0.08842480182647705, 0.35079988837242126, 0.07774242013692856, 0.37861889600753784, 0.12786801159381866, 0.0721052959561348, -0.011237549595534801, 0.13635283708572388, -0.18814808130264282, 0.010477337054908276, 0.2637344300746918, -0.077582448720932, -0.22234946489334106, -0.004316261969506741, -0.20863589644432068, 0.15166223049163818, 0.14666748046875, 0.17226794362068176, 0.03997759893536568, 0.23374156653881073, -0.1645989716053009, 0.014569208957254887, -0.3152223825454712, -0.20448234677314758, -0.016735443845391273, -0.07664642482995987, 0.011393488384783268, -0.12427577376365662, -0.05301566421985626, 0.3025378882884979, -0.15021000802516937, -0.0291164368391037, -0.2797580659389496, 0.2686598598957062, 0.1494293510913849, -0.3347187340259552, 0.0997234433889389, 0.1381181925535202, 0.14855937659740448, 0.23890730738639832, 0.03690410032868385, -0.2328975647687912, -0.21577997505664825, 0.163391575217247, 0.3449445962905884, -0.08747986704111099, -0.029132729396224022, 0.2086479216814041, 0.035958871245384216, -0.2688171863555908, -0.2869557738304138, -0.05361710861325264, 0.22489267587661743, 0.0605839304625988, -0.16584759950637817, 0.2085421085357666, 0.18647922575473785, -0.1350679099559784, -0.2980719208717346, -0.03459032624959946, 0.28784289956092834, -0.14465303719043732, -0.053785134106874466, 0.0793742761015892, 0.05751706659793854, -0.09601502120494843, -0.051451168954372406, -0.07454705238342285, -0.37190112471580505, 0.33675888180732727, 0.2783108353614807, 0.18220427632331848, 0.1884712427854538, -0.06437233835458755, 0.02808832935988903, -0.01478523202240467, 0.2315492331981659, -0.1502712368965149, 0.2148197591304779, 0.11373531073331833, -0.09590620547533035, -0.237092524766922, -0.18721146881580353, -0.38945847749710083, 0.05272490158677101, -0.11628800630569458, -0.05733605474233627, -0.26492130756378174, 0.06551560759544373, -0.19083642959594727, 0.12678931653499603, -0.12822435796260834, 0.12406530231237411, 0.006725571118295193, -0.4685618281364441, -0.04271339252591133, 0.08458232879638672, 0.21694284677505493, -0.15786904096603394, 0.09397361427545547, 0.09464181214570999, 0.14765219390392303, -0.16557614505290985, 0.2784755825996399, 0.1497749239206314, 0.03650226071476936, 0.1923057734966278, -0.07657542079687119, -0.06690344959497452, -0.22142638266086578, -0.0312319565564394, -0.37262487411499023, 0.08978752791881561, -0.14968574047088623, 0.2709098756313324, -0.1806054711341858, -0.12598292529582977, 0.16537486016750336, 0.40042009949684143, -0.0763985812664032, -0.11744452267885208, -0.011976645328104496, 0.11821633577346802, 0.30894050002098083, 0.15421275794506073, -0.0838400200009346, -0.01356668584048748, -0.10069867968559265, -0.11713991314172745, -0.028420230373740196, 0.03459318354725838, -0.3357577919960022, -0.4418849050998688, 0.10542871057987213, -0.1362779289484024, 0.1460767388343811, 0.3873714506626129, 0.14790338277816772, -0.11169411987066269, -0.4278515875339508, -0.050305671989917755, 0.001089419354684651, 0.19513705372810364, 0.0008126155589707196, -0.21079479157924652, 0.17447683215141296, -0.03104933723807335, 0.3113623857498169, 0.2465634047985077, -0.18617205321788788, -0.14787140488624573, 0.1257866472005844, 0.017132064327597618, -0.32210537791252136, -0.06954754889011383, -0.03373933583498001, 0.02316785231232643, -0.0851336345076561, -0.058806922286748886, -0.2584642171859741, -0.06446748226881027, -0.44518205523490906, -0.023338939994573593, 0.1803971529006958, 0.013780668377876282, 0.05409397929906845, -0.1669291853904724, 0.03229374438524246, -0.2995699346065521, -0.0001564270642120391, -0.2653385400772095, 0.13331162929534912, 0.0321798101067543, -0.1187131330370903, -0.09345002472400665, 0.10567350685596466, -0.018723640590906143, -0.0852985605597496, -0.16268140077590942, 0.05287761241197586, 0.14812660217285156, -0.2745762765407562, -0.035808954387903214, 0.24894137680530548, -0.028869494795799255, 0.22159653902053833, 0.004078701138496399, 0.2201952338218689, -0.11939413100481033, -0.1735149621963501, 0.10465455055236816, -0.07247143238782883, -0.11948120594024658, -0.24626626074314117, 0.09102262556552887, 0.04015817120671272, -0.15204526484012604, 0.09326353669166565, -0.12551596760749817, -0.20058760046958923, -0.08988264948129654, 0.26725488901138306, 0.9239917397499084, -0.16505734622478485, 0.1435791403055191, 0.20588693022727966, -0.07852233201265335, 0.34093236923217773, 0.08047400414943695, 0.1533178836107254, -0.2782311737537384, -0.2747684121131897, -0.005188443697988987, -0.10916490852832794, 0.030856916680932045, 0.21307581663131714, -0.2580263614654541, 0.19602610170841217, -0.11945457011461258, 0.0536513477563858, -0.1263233870267868, -0.12569986283779144, 0.019904911518096924, -0.16462014615535736, -0.3472287952899933, 0.3266729712486267, 0.1756494790315628, -0.14093945920467377, -0.1600389927625656, -0.09835582971572876, -0.08810433000326157, -0.16895924508571625, 0.09884673357009888, -0.15031081438064575, -0.1780358850955963, -0.061250656843185425, 0.04364524781703949, -0.2517230212688446, -0.05670695751905441, -0.13053488731384277, 0.16149215400218964, 0.10746944695711136, -0.09150867164134979, -0.2882513403892517, 0.05198174715042114, 0.11672291904687881, -0.16544431447982788, -0.14620932936668396, 0.04861360415816307, -0.10249655693769455, 0.265816867351532, 0.09712541848421097, -0.10297038406133652, -0.3882141411304474, -0.23813241720199585, 0.38929662108421326, 0.24857163429260254, -0.240288645029068, -0.24455513060092926, 0.3244796395301819, -0.21959972381591797, -0.12776383757591248, 0.3897331655025482, 0.06267458200454712, 0.053948163986206055, -0.2078550010919571, 0.13124564290046692, 0.16123954951763153, -0.16112270951271057, 0.018199007958173752, 0.28732576966285706, -0.2918155789375305, 0.06259426474571228, 0.11477173119783401, -0.3636978566646576, -0.4826134443283081, -0.1814752072095871, 0.10188830643892288, -0.18362796306610107, 0.1977262645959854, -0.1320372372865677, -0.3604383170604706, -0.09042799472808838, 0.5588863492012024, -0.00016378109285142273, 0.33773913979530334, -0.14333856105804443, 0.2679125964641571, -0.2524040937423706, 0.2685353457927704, 0.045690543949604034, 0.19825147092342377, -0.11150586605072021, 0.061186544597148895, -0.22356431186199188, -0.3035183846950531, -0.5588242411613464, -0.33148708939552307, -0.3616318106651306, 0.10387220233678818, 0.04997970536351204, -0.18723119795322418, -0.005626222118735313, 0.2693925201892853, 0.4707494080066681, 0.20786800980567932, -0.1689276248216629, -0.5615010261535645, 0.17832960188388824, 0.03028002940118313, 0.05006400868296623, -0.02448073774576187, 0.07431918382644653, 0.07622826099395752, -0.032147251069545746, -0.12065038084983826, -0.31338486075401306, -0.13422568142414093, 0.1236773356795311, -0.024723395705223083, 0.3341771960258484, 0.17020849883556366, -0.015336530283093452, -0.10471729189157486, -0.05481475591659546, 0.238359272480011, -0.15357071161270142, 0.01315553579479456, -0.20841577649116516, -0.03472385182976723, -0.09588274359703064, 0.30047255754470825, 0.13749533891677856, 0.1872325837612152, 0.08239667862653732, 0.028363706544041634, -0.3733551800251007, 0.3068995773792267, 0.2916032373905182, -0.07196441292762756, -0.28214937448501587, -0.1169448047876358, 0.0692976713180542, 0.5059606432914734, -0.272103488445282, -0.20891550183296204, -0.12565752863883972, -0.14004945755004883, 0.3760237991809845, 0.5426071286201477, 0.05512057989835739, -0.1497189849615097, 0.3744884729385376, 0.03669511154294014, -0.03165246173739433, -0.40044575929641724, -0.04359836131334305, 0.3214031457901001, 0.2954813838005066, 0.11427494138479233, 0.10115163773298264, 0.05022555962204933, 0.22387361526489258, 0.21080352365970612, 0.14923998713493347, 0.20322178304195404, 0.5018290877342224, 0.22407084703445435, 0.16012558341026306, 0.09989765286445618, 0.14798453450202942, 0.33613377809524536, 0.12962481379508972, 0.07800551503896713, 0.24695917963981628, -0.23431947827339172, 0.14963898062705994, 0.07492628693580627, -0.07948611676692963, 0.07817517966032028, 0.026296304538846016, -0.023505965247750282, 0.041518889367580414, -0.08842378854751587, -0.10100222378969193, -0.27588126063346863, 0.06667877733707428, -0.007801832631230354, 0.23787103593349457, -0.13445334136486053, 0.44108861684799194, -0.18730178475379944, 0.08378808200359344, 0.0231255404651165, 0.16000838577747345, -0.1479605734348297, 0.06538866460323334, 0.05750541761517525, 0.19585907459259033, 0.1375383734703064, 0.08440050482749939, -0.045018039643764496, -0.06392695009708405, 0.20999985933303833, -0.18906761705875397, -0.2089858502149582, -0.17386488616466522, -0.2510957419872284, -0.06733976304531097, 0.16030070185661316, 0.14558127522468567, 0.08751697093248367, 0.3752126395702362, -0.39731743931770325, 0.40877896547317505, 0.10209570825099945, -0.18761193752288818, -0.07293243706226349, 0.27961409091949463, 0.31194889545440674, -0.12368655204772949, 0.017293626442551613, 0.06021735072135925, -0.3631989359855652, 0.15480121970176697, -0.00582902180030942, -0.15308155119419098, 0.31117042899131775, 0.24921944737434387, 0.213509663939476, 0.028561102226376534, -0.030066054314374924, -0.12557844817638397, 0.3412860035896301, -0.04581790789961815, -0.23195600509643555, 0.03466004505753517, 0.06417618691921234, -0.018640121445059776, 0.05012105032801628, 0.1467028111219406, 0.04820644482970238, 0.011933784931898117, 0.34454572200775146, 0.053172919899225235, -0.39620280265808105, -0.24618688225746155, 0.00965475756675005, -0.2709117531776428, -0.10671071708202362, 0.46989375352859497, 0.06271540373563766, 0.17319025099277496, -0.11634192615747452, 0.054422952234745026, -0.021463269367814064, 0.4439111649990082, -0.27010270953178406, -0.13767403364181519, -0.22637157142162323, 0.3973448574542999, 0.14404729008674622, -0.06629978120326996, -0.022070301696658134, -0.22292323410511017, -0.1700882613658905, 0.25035786628723145, -0.15270613133907318, 0.11221557855606079, 0.2542790472507477, 0.12865346670150757, 0.06547625362873077, -0.17533978819847107, -0.05381966754794121, -0.01225330401211977, 0.04368500038981438, 0.2954515218734741, 0.1476738005876541, -0.48073458671569824, 0.31145238876342773, -0.06469342857599258, 0.13906997442245483, -0.3240150511264801, 0.13700389862060547, 0.2567608058452606, 0.05776049196720123, -0.1543792337179184, -0.22930827736854553, 0.27663323283195496, -0.03204191103577614, -0.2976246178150177, 0.20037086308002472, 0.21769100427627563, 0.022820036858320236, -0.11031551659107208, -0.0281771719455719, -0.0659734308719635, 0.3583018183708191, -0.00542514817789197, -0.19243744015693665, 0.08339780569076538, -0.011599453166127205, -0.004088317509740591, -0.12744683027267456, 0.000904693326447159, 0.18874648213386536, -0.30881792306900024, -0.12235403805971146, -0.3719739317893982 ]
https://github.com/huggingface/datasets/issues/5354
Consider using "Sequence" instead of "List"
However, I found out that the type annotation is actually misleading. The [`from_parquet`](https://github.com/huggingface/datasets/blob/5ef1ab1cc06c2b7a574bf2df454cd9fcb071ccb2/src/datasets/arrow_dataset.py#L1039) method should also accept list of [`PathLike`](https://github.com/huggingface/datasets/blob/main/src/datasets/utils/typing.py#L8) objects which includes [`os.PathLike`](https://docs.python.org/3/library/os.html#os.PathLike). But if I would ran the code snippet below, an exception is thrown. **Code** ```py from pathlib import Path list_of_filenames = [Path("foo.parquet"), Path("bar.parquet")] ds = Dataset.from_parquet(list_of_filenames) ``` **Output** ```py [/usr/local/lib/python3.8/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in from_parquet(path_or_paths, split, features, cache_dir, keep_in_memory, columns, **kwargs) 1071 from .io.parquet import ParquetDatasetReader 1072 -> 1073 return ParquetDatasetReader( 1074 path_or_paths, 1075 split=split, [/usr/local/lib/python3.8/dist-packages/datasets/io/parquet.py](https://localhost:8080/#) in __init__(self, path_or_paths, split, features, cache_dir, keep_in_memory, streaming, **kwargs) 35 path_or_paths = path_or_paths if isinstance(path_or_paths, dict) else {self.split: path_or_paths} 36 hash = _PACKAGED_DATASETS_MODULES["parquet"][1] ---> 37 self.builder = Parquet( 38 cache_dir=cache_dir, 39 data_files=path_or_paths, [/usr/local/lib/python3.8/dist-packages/datasets/builder.py](https://localhost:8080/#) in __init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs) 298 299 if data_files is not None and not isinstance(data_files, DataFilesDict): --> 300 data_files = DataFilesDict.from_local_or_remote( 301 sanitize_patterns(data_files), base_path=base_path, use_auth_token=use_auth_token 302 ) [/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token) 794 for key, patterns_for_key in patterns.items(): 795 out[key] = ( --> 796 DataFilesList.from_local_or_remote( 797 patterns_for_key, 798 base_path=base_path, [/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in from_local_or_remote(cls, patterns, base_path, allowed_extensions, use_auth_token) 762 ) -> "DataFilesList": 763 base_path = base_path if base_path is not None else str(Path().resolve()) --> 764 data_files = resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions) 765 origin_metadata = _get_origin_metadata_locally_or_by_urls(data_files, use_auth_token=use_auth_token) 766 return cls(data_files, origin_metadata) [/usr/local/lib/python3.8/dist-packages/datasets/data_files.py](https://localhost:8080/#) in resolve_patterns_locally_or_by_urls(base_path, patterns, allowed_extensions) 357 data_files = [] 358 for pattern in patterns: --> 359 if is_remote_url(pattern): 360 data_files.append(Url(pattern)) 361 else: [/usr/local/lib/python3.8/dist-packages/datasets/utils/file_utils.py](https://localhost:8080/#) in is_remote_url(url_or_filename) 62 63 def is_remote_url(url_or_filename: str) -> bool: ---> 64 parsed = urlparse(url_or_filename) 65 return parsed.scheme in ("http", "https", "s3", "gs", "hdfs", "ftp") 66 [/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in urlparse(url, scheme, allow_fragments) 373 Note that we don't break the components up in smaller bits 374 (e.g. netloc is a single string) and we don't expand % escapes.""" --> 375 url, scheme, _coerce_result = _coerce_args(url, scheme) 376 splitresult = urlsplit(url, scheme, allow_fragments) 377 scheme, netloc, url, query, fragment = splitresult [/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _coerce_args(*args) 125 if str_input: 126 return args + (_noop,) --> 127 return _decode_args(args) + (_encode_result,) 128 129 # Result objects are more helpful than simple tuples [/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in _decode_args(args, encoding, errors) 109 def _decode_args(args, encoding=_implicit_encoding, 110 errors=_implicit_errors): --> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args) 112 113 def _coerce_args(*args): [/usr/lib/python3.8/urllib/parse.py](https://localhost:8080/#) in <genexpr>(.0) 109 def _decode_args(args, encoding=_implicit_encoding, 110 errors=_implicit_errors): --> 111 return tuple(x.decode(encoding, errors) if x else '' for x in args) 112 113 def _coerce_args(*args): AttributeError: 'PosixPath' object has no attribute 'decode' ``` @mariosasko Should I create a new issue?
### Feature request Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below. **How to reproduce** ```py list_of_filenames = ["foo.parquet", "bar.parquet"] ds = Dataset.from_parquet(list_of_filenames) ``` **Expected mypy output:** ``` Success: no issues found ``` **Actual mypy output:** ```py test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type] test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance test.py:19: note: Consider using "Sequence" instead, which is covariant ``` **Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
405
Consider using "Sequence" instead of "List"
[ -0.02010325901210308, -0.15685904026031494, -0.4813176989555359, -0.06430881470441818, 0.12333500385284424, 0.028315294533967972, 0.21228674054145813, 0.16507092118263245, 0.2959001958370209, 0.2231140434741974, 0.2615659832954407, 0.07151017338037491, -0.2606341242790222, 0.0005356925539672375, -0.18638361990451813, -0.06951259821653366, 0.061587926000356674, 0.28856125473976135, 0.2192288637161255, 0.068381667137146, -0.20611178874969482, 0.017301242798566818, -0.11780056357383728, 0.042905159294605255, 0.23109684884548187, -0.1460050642490387, 0.06964094191789627, -0.06962913274765015, 0.023543447256088257, -0.44146400690078735, -0.2850584387779236, 0.27337002754211426, -0.09251920133829117, -0.07281748950481415, -0.00009307639993494377, -0.21502499282360077, 0.31457191705703735, 0.015903010964393616, -0.3047744631767273, 0.14783106744289398, -0.4630415737628937, -0.1533423215150833, 0.15082138776779175, -0.4146380126476288, -0.2754662334918976, 0.04563884064555168, 0.07546617835760117, -0.17707982659339905, 0.12577372789382935, 0.07224424183368683, 0.4495573937892914, -0.08695310354232788, -0.19892315566539764, -0.22065021097660065, 0.3396349549293518, -0.13599760830402374, -0.10500983893871307, -0.12027387320995331, 0.48516345024108887, -0.07148958742618561, 0.12657226622104645, 0.2017439901828766, -0.12521050870418549, 0.0036122766323387623, 0.3626961410045624, -0.08929521590471268, 0.29189449548721313, 0.06628912687301636, -0.15982715785503387, 0.08845733851194382, 0.1626751869916916, -0.049521706998348236, -0.019730543717741966, -0.14718583226203918, -0.1825428158044815, -0.45180585980415344, 0.0369810126721859, -0.15843698382377625, 0.026695558801293373, 0.11895778030157089, 0.19473783671855927, -0.033112555742263794, 0.06786719709634781, 0.2559530735015869, 0.06720320880413055, 0.25022536516189575, -0.06288119405508041, -0.11977128684520721, 0.1304633766412735, -0.135868638753891, 0.04803556576371193, -0.15878285467624664, 0.07856333255767822, -0.016179485246539116, 0.001482201274484396, -0.07919830828905106, 0.11888869106769562, 0.0819900706410408, 0.009634359739720821, 0.0999361127614975, 0.20894593000411987, 0.023612070828676224, 0.07312776148319244, -0.1473216414451599, -0.0004060083592776209, 0.09306636452674866, 0.1630232036113739, -0.15677222609519958, -0.11342150717973709, 0.2281518131494522, 0.25213709473609924, 0.10004831850528717, -0.04156797379255295, -0.027227239683270454, -0.052563779056072235, 0.2832496762275696, -0.19363217055797577, 0.1722627729177475, -0.3046538233757019, 0.19817854464054108, -0.21893833577632904, -0.2642233669757843, -0.034626662731170654, 0.295462042093277, -0.09466937929391861, -0.07553983479738235, 0.07818038761615753, 0.05551502853631973, 0.20590810477733612, 0.05824388936161995, -0.3430277705192566, 0.09125155955553055, -0.18974889814853668, -0.04505026340484619, -0.16975413262844086, -0.06746701896190643, 0.15237200260162354, -0.09676508605480194, 0.2169150561094284, -0.08340581506490707, 0.12079250067472458, -0.0763988122344017, 0.18526291847229004, -0.15038765966892242, -0.22710654139518738, 0.012364105321466923, 0.19912084937095642, -0.0481056347489357, -0.07112787663936615, 0.1313817799091339, 0.048530325293540955, -0.02517629787325859, 0.00609200494363904, 0.4005362391471863, 0.1982477754354477, 0.13565514981746674, 0.3889872431755066, -0.03966839239001274, 0.24200227856636047, 0.018690800294280052, 0.08389528840780258, 0.09430763125419617, -0.14319324493408203, 0.039500124752521515, -0.27394959330558777, 0.10720033198595047, -0.04312881827354431, -0.0430782213807106, 0.04381734877824783, 0.03244439885020256, 0.046671513468027115, 0.14437127113342285, -0.13638398051261902, 0.19302091002464294, -0.17249710857868195, 0.22886288166046143, 0.2196643054485321, -0.0488150529563427, -0.009226497262716293, -0.05117049813270569, -0.18315310776233673, -0.08921805769205093, 0.18165676295757294, 0.2062562257051468, 0.14795604348182678, -0.23324383795261383, 0.3831159174442291, -0.12479770183563232, 0.10825129598379135, 0.07144040614366531, -0.1899661421775818, -0.2876940071582794, 0.04353441670536995, -0.17466327548027039, -0.22076131403446198, 0.2723160982131958, -0.18815141916275024, 0.12557926774024963, 0.2274940311908722, -0.22032463550567627, -0.08125898241996765, 0.2626264989376068, 0.1692994087934494, 0.15554893016815186, -0.23108620941638947, -0.09065542370080948, -0.0647590309381485, -0.2418953776359558, -0.07926489412784576, 0.10881809145212173, 0.174579918384552, -0.1345832645893097, -0.33008211851119995, 0.14062434434890747, 0.0723128542304039, 0.28290536999702454, 0.41775447130203247, 0.20095627009868622, 0.0010609924793243408, -0.1543826311826706, 0.02475297823548317, -0.023407243192195892, -0.24158638715744019, -0.23173940181732178, -0.15997174382209778, 0.09468074887990952, -0.023366417735815048, 0.01527357753366232, 0.11409389227628708, 0.2734394073486328, 0.22679300606250763, 0.1327546387910843, 0.2170652151107788, -0.04038424789905548, 0.06085405871272087, -0.2956792712211609, -0.1374051421880722, 0.16819722950458527, 0.11180033534765244, -0.10562106966972351, -0.05099814012646675, 0.22859561443328857, -0.044609468430280685, 0.03876589611172676, -0.09556645154953003, 0.2870645523071289, 0.07033643871545792, 0.19251365959644318, -0.02251802571117878, -0.05891205370426178, 0.12544791400432587, 0.11165925115346909, -0.09228617697954178, -0.31663572788238525, 0.3294435739517212, 0.4142020344734192, 0.006626846268773079, -0.02409031242132187, -0.36949872970581055, 0.08842480182647705, 0.35079988837242126, 0.07774242013692856, 0.37861889600753784, 0.12786801159381866, 0.0721052959561348, -0.011237549595534801, 0.13635283708572388, -0.18814808130264282, 0.010477337054908276, 0.2637344300746918, -0.077582448720932, -0.22234946489334106, -0.004316261969506741, -0.20863589644432068, 0.15166223049163818, 0.14666748046875, 0.17226794362068176, 0.03997759893536568, 0.23374156653881073, -0.1645989716053009, 0.014569208957254887, -0.3152223825454712, -0.20448234677314758, -0.016735443845391273, -0.07664642482995987, 0.011393488384783268, -0.12427577376365662, -0.05301566421985626, 0.3025378882884979, -0.15021000802516937, -0.0291164368391037, -0.2797580659389496, 0.2686598598957062, 0.1494293510913849, -0.3347187340259552, 0.0997234433889389, 0.1381181925535202, 0.14855937659740448, 0.23890730738639832, 0.03690410032868385, -0.2328975647687912, -0.21577997505664825, 0.163391575217247, 0.3449445962905884, -0.08747986704111099, -0.029132729396224022, 0.2086479216814041, 0.035958871245384216, -0.2688171863555908, -0.2869557738304138, -0.05361710861325264, 0.22489267587661743, 0.0605839304625988, -0.16584759950637817, 0.2085421085357666, 0.18647922575473785, -0.1350679099559784, -0.2980719208717346, -0.03459032624959946, 0.28784289956092834, -0.14465303719043732, -0.053785134106874466, 0.0793742761015892, 0.05751706659793854, -0.09601502120494843, -0.051451168954372406, -0.07454705238342285, -0.37190112471580505, 0.33675888180732727, 0.2783108353614807, 0.18220427632331848, 0.1884712427854538, -0.06437233835458755, 0.02808832935988903, -0.01478523202240467, 0.2315492331981659, -0.1502712368965149, 0.2148197591304779, 0.11373531073331833, -0.09590620547533035, -0.237092524766922, -0.18721146881580353, -0.38945847749710083, 0.05272490158677101, -0.11628800630569458, -0.05733605474233627, -0.26492130756378174, 0.06551560759544373, -0.19083642959594727, 0.12678931653499603, -0.12822435796260834, 0.12406530231237411, 0.006725571118295193, -0.4685618281364441, -0.04271339252591133, 0.08458232879638672, 0.21694284677505493, -0.15786904096603394, 0.09397361427545547, 0.09464181214570999, 0.14765219390392303, -0.16557614505290985, 0.2784755825996399, 0.1497749239206314, 0.03650226071476936, 0.1923057734966278, -0.07657542079687119, -0.06690344959497452, -0.22142638266086578, -0.0312319565564394, -0.37262487411499023, 0.08978752791881561, -0.14968574047088623, 0.2709098756313324, -0.1806054711341858, -0.12598292529582977, 0.16537486016750336, 0.40042009949684143, -0.0763985812664032, -0.11744452267885208, -0.011976645328104496, 0.11821633577346802, 0.30894050002098083, 0.15421275794506073, -0.0838400200009346, -0.01356668584048748, -0.10069867968559265, -0.11713991314172745, -0.028420230373740196, 0.03459318354725838, -0.3357577919960022, -0.4418849050998688, 0.10542871057987213, -0.1362779289484024, 0.1460767388343811, 0.3873714506626129, 0.14790338277816772, -0.11169411987066269, -0.4278515875339508, -0.050305671989917755, 0.001089419354684651, 0.19513705372810364, 0.0008126155589707196, -0.21079479157924652, 0.17447683215141296, -0.03104933723807335, 0.3113623857498169, 0.2465634047985077, -0.18617205321788788, -0.14787140488624573, 0.1257866472005844, 0.017132064327597618, -0.32210537791252136, -0.06954754889011383, -0.03373933583498001, 0.02316785231232643, -0.0851336345076561, -0.058806922286748886, -0.2584642171859741, -0.06446748226881027, -0.44518205523490906, -0.023338939994573593, 0.1803971529006958, 0.013780668377876282, 0.05409397929906845, -0.1669291853904724, 0.03229374438524246, -0.2995699346065521, -0.0001564270642120391, -0.2653385400772095, 0.13331162929534912, 0.0321798101067543, -0.1187131330370903, -0.09345002472400665, 0.10567350685596466, -0.018723640590906143, -0.0852985605597496, -0.16268140077590942, 0.05287761241197586, 0.14812660217285156, -0.2745762765407562, -0.035808954387903214, 0.24894137680530548, -0.028869494795799255, 0.22159653902053833, 0.004078701138496399, 0.2201952338218689, -0.11939413100481033, -0.1735149621963501, 0.10465455055236816, -0.07247143238782883, -0.11948120594024658, -0.24626626074314117, 0.09102262556552887, 0.04015817120671272, -0.15204526484012604, 0.09326353669166565, -0.12551596760749817, -0.20058760046958923, -0.08988264948129654, 0.26725488901138306, 0.9239917397499084, -0.16505734622478485, 0.1435791403055191, 0.20588693022727966, -0.07852233201265335, 0.34093236923217773, 0.08047400414943695, 0.1533178836107254, -0.2782311737537384, -0.2747684121131897, -0.005188443697988987, -0.10916490852832794, 0.030856916680932045, 0.21307581663131714, -0.2580263614654541, 0.19602610170841217, -0.11945457011461258, 0.0536513477563858, -0.1263233870267868, -0.12569986283779144, 0.019904911518096924, -0.16462014615535736, -0.3472287952899933, 0.3266729712486267, 0.1756494790315628, -0.14093945920467377, -0.1600389927625656, -0.09835582971572876, -0.08810433000326157, -0.16895924508571625, 0.09884673357009888, -0.15031081438064575, -0.1780358850955963, -0.061250656843185425, 0.04364524781703949, -0.2517230212688446, -0.05670695751905441, -0.13053488731384277, 0.16149215400218964, 0.10746944695711136, -0.09150867164134979, -0.2882513403892517, 0.05198174715042114, 0.11672291904687881, -0.16544431447982788, -0.14620932936668396, 0.04861360415816307, -0.10249655693769455, 0.265816867351532, 0.09712541848421097, -0.10297038406133652, -0.3882141411304474, -0.23813241720199585, 0.38929662108421326, 0.24857163429260254, -0.240288645029068, -0.24455513060092926, 0.3244796395301819, -0.21959972381591797, -0.12776383757591248, 0.3897331655025482, 0.06267458200454712, 0.053948163986206055, -0.2078550010919571, 0.13124564290046692, 0.16123954951763153, -0.16112270951271057, 0.018199007958173752, 0.28732576966285706, -0.2918155789375305, 0.06259426474571228, 0.11477173119783401, -0.3636978566646576, -0.4826134443283081, -0.1814752072095871, 0.10188830643892288, -0.18362796306610107, 0.1977262645959854, -0.1320372372865677, -0.3604383170604706, -0.09042799472808838, 0.5588863492012024, -0.00016378109285142273, 0.33773913979530334, -0.14333856105804443, 0.2679125964641571, -0.2524040937423706, 0.2685353457927704, 0.045690543949604034, 0.19825147092342377, -0.11150586605072021, 0.061186544597148895, -0.22356431186199188, -0.3035183846950531, -0.5588242411613464, -0.33148708939552307, -0.3616318106651306, 0.10387220233678818, 0.04997970536351204, -0.18723119795322418, -0.005626222118735313, 0.2693925201892853, 0.4707494080066681, 0.20786800980567932, -0.1689276248216629, -0.5615010261535645, 0.17832960188388824, 0.03028002940118313, 0.05006400868296623, -0.02448073774576187, 0.07431918382644653, 0.07622826099395752, -0.032147251069545746, -0.12065038084983826, -0.31338486075401306, -0.13422568142414093, 0.1236773356795311, -0.024723395705223083, 0.3341771960258484, 0.17020849883556366, -0.015336530283093452, -0.10471729189157486, -0.05481475591659546, 0.238359272480011, -0.15357071161270142, 0.01315553579479456, -0.20841577649116516, -0.03472385182976723, -0.09588274359703064, 0.30047255754470825, 0.13749533891677856, 0.1872325837612152, 0.08239667862653732, 0.028363706544041634, -0.3733551800251007, 0.3068995773792267, 0.2916032373905182, -0.07196441292762756, -0.28214937448501587, -0.1169448047876358, 0.0692976713180542, 0.5059606432914734, -0.272103488445282, -0.20891550183296204, -0.12565752863883972, -0.14004945755004883, 0.3760237991809845, 0.5426071286201477, 0.05512057989835739, -0.1497189849615097, 0.3744884729385376, 0.03669511154294014, -0.03165246173739433, -0.40044575929641724, -0.04359836131334305, 0.3214031457901001, 0.2954813838005066, 0.11427494138479233, 0.10115163773298264, 0.05022555962204933, 0.22387361526489258, 0.21080352365970612, 0.14923998713493347, 0.20322178304195404, 0.5018290877342224, 0.22407084703445435, 0.16012558341026306, 0.09989765286445618, 0.14798453450202942, 0.33613377809524536, 0.12962481379508972, 0.07800551503896713, 0.24695917963981628, -0.23431947827339172, 0.14963898062705994, 0.07492628693580627, -0.07948611676692963, 0.07817517966032028, 0.026296304538846016, -0.023505965247750282, 0.041518889367580414, -0.08842378854751587, -0.10100222378969193, -0.27588126063346863, 0.06667877733707428, -0.007801832631230354, 0.23787103593349457, -0.13445334136486053, 0.44108861684799194, -0.18730178475379944, 0.08378808200359344, 0.0231255404651165, 0.16000838577747345, -0.1479605734348297, 0.06538866460323334, 0.05750541761517525, 0.19585907459259033, 0.1375383734703064, 0.08440050482749939, -0.045018039643764496, -0.06392695009708405, 0.20999985933303833, -0.18906761705875397, -0.2089858502149582, -0.17386488616466522, -0.2510957419872284, -0.06733976304531097, 0.16030070185661316, 0.14558127522468567, 0.08751697093248367, 0.3752126395702362, -0.39731743931770325, 0.40877896547317505, 0.10209570825099945, -0.18761193752288818, -0.07293243706226349, 0.27961409091949463, 0.31194889545440674, -0.12368655204772949, 0.017293626442551613, 0.06021735072135925, -0.3631989359855652, 0.15480121970176697, -0.00582902180030942, -0.15308155119419098, 0.31117042899131775, 0.24921944737434387, 0.213509663939476, 0.028561102226376534, -0.030066054314374924, -0.12557844817638397, 0.3412860035896301, -0.04581790789961815, -0.23195600509643555, 0.03466004505753517, 0.06417618691921234, -0.018640121445059776, 0.05012105032801628, 0.1467028111219406, 0.04820644482970238, 0.011933784931898117, 0.34454572200775146, 0.053172919899225235, -0.39620280265808105, -0.24618688225746155, 0.00965475756675005, -0.2709117531776428, -0.10671071708202362, 0.46989375352859497, 0.06271540373563766, 0.17319025099277496, -0.11634192615747452, 0.054422952234745026, -0.021463269367814064, 0.4439111649990082, -0.27010270953178406, -0.13767403364181519, -0.22637157142162323, 0.3973448574542999, 0.14404729008674622, -0.06629978120326996, -0.022070301696658134, -0.22292323410511017, -0.1700882613658905, 0.25035786628723145, -0.15270613133907318, 0.11221557855606079, 0.2542790472507477, 0.12865346670150757, 0.06547625362873077, -0.17533978819847107, -0.05381966754794121, -0.01225330401211977, 0.04368500038981438, 0.2954515218734741, 0.1476738005876541, -0.48073458671569824, 0.31145238876342773, -0.06469342857599258, 0.13906997442245483, -0.3240150511264801, 0.13700389862060547, 0.2567608058452606, 0.05776049196720123, -0.1543792337179184, -0.22930827736854553, 0.27663323283195496, -0.03204191103577614, -0.2976246178150177, 0.20037086308002472, 0.21769100427627563, 0.022820036858320236, -0.11031551659107208, -0.0281771719455719, -0.0659734308719635, 0.3583018183708191, -0.00542514817789197, -0.19243744015693665, 0.08339780569076538, -0.011599453166127205, -0.004088317509740591, -0.12744683027267456, 0.000904693326447159, 0.18874648213386536, -0.30881792306900024, -0.12235403805971146, -0.3719739317893982 ]
https://github.com/huggingface/datasets/issues/5354
Consider using "Sequence" instead of "List"
@avinashsai Hi, I've assigned you the issue. @tranhd95 Yes, feel free to report this in a new issue.
### Feature request Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below. **How to reproduce** ```py list_of_filenames = ["foo.parquet", "bar.parquet"] ds = Dataset.from_parquet(list_of_filenames) ``` **Expected mypy output:** ``` Success: no issues found ``` **Actual mypy output:** ```py test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type] test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance test.py:19: note: Consider using "Sequence" instead, which is covariant ``` **Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
18
Consider using "Sequence" instead of "List"
[ -0.02010325901210308, -0.15685904026031494, -0.4813176989555359, -0.06430881470441818, 0.12333500385284424, 0.028315294533967972, 0.21228674054145813, 0.16507092118263245, 0.2959001958370209, 0.2231140434741974, 0.2615659832954407, 0.07151017338037491, -0.2606341242790222, 0.0005356925539672375, -0.18638361990451813, -0.06951259821653366, 0.061587926000356674, 0.28856125473976135, 0.2192288637161255, 0.068381667137146, -0.20611178874969482, 0.017301242798566818, -0.11780056357383728, 0.042905159294605255, 0.23109684884548187, -0.1460050642490387, 0.06964094191789627, -0.06962913274765015, 0.023543447256088257, -0.44146400690078735, -0.2850584387779236, 0.27337002754211426, -0.09251920133829117, -0.07281748950481415, -0.00009307639993494377, -0.21502499282360077, 0.31457191705703735, 0.015903010964393616, -0.3047744631767273, 0.14783106744289398, -0.4630415737628937, -0.1533423215150833, 0.15082138776779175, -0.4146380126476288, -0.2754662334918976, 0.04563884064555168, 0.07546617835760117, -0.17707982659339905, 0.12577372789382935, 0.07224424183368683, 0.4495573937892914, -0.08695310354232788, -0.19892315566539764, -0.22065021097660065, 0.3396349549293518, -0.13599760830402374, -0.10500983893871307, -0.12027387320995331, 0.48516345024108887, -0.07148958742618561, 0.12657226622104645, 0.2017439901828766, -0.12521050870418549, 0.0036122766323387623, 0.3626961410045624, -0.08929521590471268, 0.29189449548721313, 0.06628912687301636, -0.15982715785503387, 0.08845733851194382, 0.1626751869916916, -0.049521706998348236, -0.019730543717741966, -0.14718583226203918, -0.1825428158044815, -0.45180585980415344, 0.0369810126721859, -0.15843698382377625, 0.026695558801293373, 0.11895778030157089, 0.19473783671855927, -0.033112555742263794, 0.06786719709634781, 0.2559530735015869, 0.06720320880413055, 0.25022536516189575, -0.06288119405508041, -0.11977128684520721, 0.1304633766412735, -0.135868638753891, 0.04803556576371193, -0.15878285467624664, 0.07856333255767822, -0.016179485246539116, 0.001482201274484396, -0.07919830828905106, 0.11888869106769562, 0.0819900706410408, 0.009634359739720821, 0.0999361127614975, 0.20894593000411987, 0.023612070828676224, 0.07312776148319244, -0.1473216414451599, -0.0004060083592776209, 0.09306636452674866, 0.1630232036113739, -0.15677222609519958, -0.11342150717973709, 0.2281518131494522, 0.25213709473609924, 0.10004831850528717, -0.04156797379255295, -0.027227239683270454, -0.052563779056072235, 0.2832496762275696, -0.19363217055797577, 0.1722627729177475, -0.3046538233757019, 0.19817854464054108, -0.21893833577632904, -0.2642233669757843, -0.034626662731170654, 0.295462042093277, -0.09466937929391861, -0.07553983479738235, 0.07818038761615753, 0.05551502853631973, 0.20590810477733612, 0.05824388936161995, -0.3430277705192566, 0.09125155955553055, -0.18974889814853668, -0.04505026340484619, -0.16975413262844086, -0.06746701896190643, 0.15237200260162354, -0.09676508605480194, 0.2169150561094284, -0.08340581506490707, 0.12079250067472458, -0.0763988122344017, 0.18526291847229004, -0.15038765966892242, -0.22710654139518738, 0.012364105321466923, 0.19912084937095642, -0.0481056347489357, -0.07112787663936615, 0.1313817799091339, 0.048530325293540955, -0.02517629787325859, 0.00609200494363904, 0.4005362391471863, 0.1982477754354477, 0.13565514981746674, 0.3889872431755066, -0.03966839239001274, 0.24200227856636047, 0.018690800294280052, 0.08389528840780258, 0.09430763125419617, -0.14319324493408203, 0.039500124752521515, -0.27394959330558777, 0.10720033198595047, -0.04312881827354431, -0.0430782213807106, 0.04381734877824783, 0.03244439885020256, 0.046671513468027115, 0.14437127113342285, -0.13638398051261902, 0.19302091002464294, -0.17249710857868195, 0.22886288166046143, 0.2196643054485321, -0.0488150529563427, -0.009226497262716293, -0.05117049813270569, -0.18315310776233673, -0.08921805769205093, 0.18165676295757294, 0.2062562257051468, 0.14795604348182678, -0.23324383795261383, 0.3831159174442291, -0.12479770183563232, 0.10825129598379135, 0.07144040614366531, -0.1899661421775818, -0.2876940071582794, 0.04353441670536995, -0.17466327548027039, -0.22076131403446198, 0.2723160982131958, -0.18815141916275024, 0.12557926774024963, 0.2274940311908722, -0.22032463550567627, -0.08125898241996765, 0.2626264989376068, 0.1692994087934494, 0.15554893016815186, -0.23108620941638947, -0.09065542370080948, -0.0647590309381485, -0.2418953776359558, -0.07926489412784576, 0.10881809145212173, 0.174579918384552, -0.1345832645893097, -0.33008211851119995, 0.14062434434890747, 0.0723128542304039, 0.28290536999702454, 0.41775447130203247, 0.20095627009868622, 0.0010609924793243408, -0.1543826311826706, 0.02475297823548317, -0.023407243192195892, -0.24158638715744019, -0.23173940181732178, -0.15997174382209778, 0.09468074887990952, -0.023366417735815048, 0.01527357753366232, 0.11409389227628708, 0.2734394073486328, 0.22679300606250763, 0.1327546387910843, 0.2170652151107788, -0.04038424789905548, 0.06085405871272087, -0.2956792712211609, -0.1374051421880722, 0.16819722950458527, 0.11180033534765244, -0.10562106966972351, -0.05099814012646675, 0.22859561443328857, -0.044609468430280685, 0.03876589611172676, -0.09556645154953003, 0.2870645523071289, 0.07033643871545792, 0.19251365959644318, -0.02251802571117878, -0.05891205370426178, 0.12544791400432587, 0.11165925115346909, -0.09228617697954178, -0.31663572788238525, 0.3294435739517212, 0.4142020344734192, 0.006626846268773079, -0.02409031242132187, -0.36949872970581055, 0.08842480182647705, 0.35079988837242126, 0.07774242013692856, 0.37861889600753784, 0.12786801159381866, 0.0721052959561348, -0.011237549595534801, 0.13635283708572388, -0.18814808130264282, 0.010477337054908276, 0.2637344300746918, -0.077582448720932, -0.22234946489334106, -0.004316261969506741, -0.20863589644432068, 0.15166223049163818, 0.14666748046875, 0.17226794362068176, 0.03997759893536568, 0.23374156653881073, -0.1645989716053009, 0.014569208957254887, -0.3152223825454712, -0.20448234677314758, -0.016735443845391273, -0.07664642482995987, 0.011393488384783268, -0.12427577376365662, -0.05301566421985626, 0.3025378882884979, -0.15021000802516937, -0.0291164368391037, -0.2797580659389496, 0.2686598598957062, 0.1494293510913849, -0.3347187340259552, 0.0997234433889389, 0.1381181925535202, 0.14855937659740448, 0.23890730738639832, 0.03690410032868385, -0.2328975647687912, -0.21577997505664825, 0.163391575217247, 0.3449445962905884, -0.08747986704111099, -0.029132729396224022, 0.2086479216814041, 0.035958871245384216, -0.2688171863555908, -0.2869557738304138, -0.05361710861325264, 0.22489267587661743, 0.0605839304625988, -0.16584759950637817, 0.2085421085357666, 0.18647922575473785, -0.1350679099559784, -0.2980719208717346, -0.03459032624959946, 0.28784289956092834, -0.14465303719043732, -0.053785134106874466, 0.0793742761015892, 0.05751706659793854, -0.09601502120494843, -0.051451168954372406, -0.07454705238342285, -0.37190112471580505, 0.33675888180732727, 0.2783108353614807, 0.18220427632331848, 0.1884712427854538, -0.06437233835458755, 0.02808832935988903, -0.01478523202240467, 0.2315492331981659, -0.1502712368965149, 0.2148197591304779, 0.11373531073331833, -0.09590620547533035, -0.237092524766922, -0.18721146881580353, -0.38945847749710083, 0.05272490158677101, -0.11628800630569458, -0.05733605474233627, -0.26492130756378174, 0.06551560759544373, -0.19083642959594727, 0.12678931653499603, -0.12822435796260834, 0.12406530231237411, 0.006725571118295193, -0.4685618281364441, -0.04271339252591133, 0.08458232879638672, 0.21694284677505493, -0.15786904096603394, 0.09397361427545547, 0.09464181214570999, 0.14765219390392303, -0.16557614505290985, 0.2784755825996399, 0.1497749239206314, 0.03650226071476936, 0.1923057734966278, -0.07657542079687119, -0.06690344959497452, -0.22142638266086578, -0.0312319565564394, -0.37262487411499023, 0.08978752791881561, -0.14968574047088623, 0.2709098756313324, -0.1806054711341858, -0.12598292529582977, 0.16537486016750336, 0.40042009949684143, -0.0763985812664032, -0.11744452267885208, -0.011976645328104496, 0.11821633577346802, 0.30894050002098083, 0.15421275794506073, -0.0838400200009346, -0.01356668584048748, -0.10069867968559265, -0.11713991314172745, -0.028420230373740196, 0.03459318354725838, -0.3357577919960022, -0.4418849050998688, 0.10542871057987213, -0.1362779289484024, 0.1460767388343811, 0.3873714506626129, 0.14790338277816772, -0.11169411987066269, -0.4278515875339508, -0.050305671989917755, 0.001089419354684651, 0.19513705372810364, 0.0008126155589707196, -0.21079479157924652, 0.17447683215141296, -0.03104933723807335, 0.3113623857498169, 0.2465634047985077, -0.18617205321788788, -0.14787140488624573, 0.1257866472005844, 0.017132064327597618, -0.32210537791252136, -0.06954754889011383, -0.03373933583498001, 0.02316785231232643, -0.0851336345076561, -0.058806922286748886, -0.2584642171859741, -0.06446748226881027, -0.44518205523490906, -0.023338939994573593, 0.1803971529006958, 0.013780668377876282, 0.05409397929906845, -0.1669291853904724, 0.03229374438524246, -0.2995699346065521, -0.0001564270642120391, -0.2653385400772095, 0.13331162929534912, 0.0321798101067543, -0.1187131330370903, -0.09345002472400665, 0.10567350685596466, -0.018723640590906143, -0.0852985605597496, -0.16268140077590942, 0.05287761241197586, 0.14812660217285156, -0.2745762765407562, -0.035808954387903214, 0.24894137680530548, -0.028869494795799255, 0.22159653902053833, 0.004078701138496399, 0.2201952338218689, -0.11939413100481033, -0.1735149621963501, 0.10465455055236816, -0.07247143238782883, -0.11948120594024658, -0.24626626074314117, 0.09102262556552887, 0.04015817120671272, -0.15204526484012604, 0.09326353669166565, -0.12551596760749817, -0.20058760046958923, -0.08988264948129654, 0.26725488901138306, 0.9239917397499084, -0.16505734622478485, 0.1435791403055191, 0.20588693022727966, -0.07852233201265335, 0.34093236923217773, 0.08047400414943695, 0.1533178836107254, -0.2782311737537384, -0.2747684121131897, -0.005188443697988987, -0.10916490852832794, 0.030856916680932045, 0.21307581663131714, -0.2580263614654541, 0.19602610170841217, -0.11945457011461258, 0.0536513477563858, -0.1263233870267868, -0.12569986283779144, 0.019904911518096924, -0.16462014615535736, -0.3472287952899933, 0.3266729712486267, 0.1756494790315628, -0.14093945920467377, -0.1600389927625656, -0.09835582971572876, -0.08810433000326157, -0.16895924508571625, 0.09884673357009888, -0.15031081438064575, -0.1780358850955963, -0.061250656843185425, 0.04364524781703949, -0.2517230212688446, -0.05670695751905441, -0.13053488731384277, 0.16149215400218964, 0.10746944695711136, -0.09150867164134979, -0.2882513403892517, 0.05198174715042114, 0.11672291904687881, -0.16544431447982788, -0.14620932936668396, 0.04861360415816307, -0.10249655693769455, 0.265816867351532, 0.09712541848421097, -0.10297038406133652, -0.3882141411304474, -0.23813241720199585, 0.38929662108421326, 0.24857163429260254, -0.240288645029068, -0.24455513060092926, 0.3244796395301819, -0.21959972381591797, -0.12776383757591248, 0.3897331655025482, 0.06267458200454712, 0.053948163986206055, -0.2078550010919571, 0.13124564290046692, 0.16123954951763153, -0.16112270951271057, 0.018199007958173752, 0.28732576966285706, -0.2918155789375305, 0.06259426474571228, 0.11477173119783401, -0.3636978566646576, -0.4826134443283081, -0.1814752072095871, 0.10188830643892288, -0.18362796306610107, 0.1977262645959854, -0.1320372372865677, -0.3604383170604706, -0.09042799472808838, 0.5588863492012024, -0.00016378109285142273, 0.33773913979530334, -0.14333856105804443, 0.2679125964641571, -0.2524040937423706, 0.2685353457927704, 0.045690543949604034, 0.19825147092342377, -0.11150586605072021, 0.061186544597148895, -0.22356431186199188, -0.3035183846950531, -0.5588242411613464, -0.33148708939552307, -0.3616318106651306, 0.10387220233678818, 0.04997970536351204, -0.18723119795322418, -0.005626222118735313, 0.2693925201892853, 0.4707494080066681, 0.20786800980567932, -0.1689276248216629, -0.5615010261535645, 0.17832960188388824, 0.03028002940118313, 0.05006400868296623, -0.02448073774576187, 0.07431918382644653, 0.07622826099395752, -0.032147251069545746, -0.12065038084983826, -0.31338486075401306, -0.13422568142414093, 0.1236773356795311, -0.024723395705223083, 0.3341771960258484, 0.17020849883556366, -0.015336530283093452, -0.10471729189157486, -0.05481475591659546, 0.238359272480011, -0.15357071161270142, 0.01315553579479456, -0.20841577649116516, -0.03472385182976723, -0.09588274359703064, 0.30047255754470825, 0.13749533891677856, 0.1872325837612152, 0.08239667862653732, 0.028363706544041634, -0.3733551800251007, 0.3068995773792267, 0.2916032373905182, -0.07196441292762756, -0.28214937448501587, -0.1169448047876358, 0.0692976713180542, 0.5059606432914734, -0.272103488445282, -0.20891550183296204, -0.12565752863883972, -0.14004945755004883, 0.3760237991809845, 0.5426071286201477, 0.05512057989835739, -0.1497189849615097, 0.3744884729385376, 0.03669511154294014, -0.03165246173739433, -0.40044575929641724, -0.04359836131334305, 0.3214031457901001, 0.2954813838005066, 0.11427494138479233, 0.10115163773298264, 0.05022555962204933, 0.22387361526489258, 0.21080352365970612, 0.14923998713493347, 0.20322178304195404, 0.5018290877342224, 0.22407084703445435, 0.16012558341026306, 0.09989765286445618, 0.14798453450202942, 0.33613377809524536, 0.12962481379508972, 0.07800551503896713, 0.24695917963981628, -0.23431947827339172, 0.14963898062705994, 0.07492628693580627, -0.07948611676692963, 0.07817517966032028, 0.026296304538846016, -0.023505965247750282, 0.041518889367580414, -0.08842378854751587, -0.10100222378969193, -0.27588126063346863, 0.06667877733707428, -0.007801832631230354, 0.23787103593349457, -0.13445334136486053, 0.44108861684799194, -0.18730178475379944, 0.08378808200359344, 0.0231255404651165, 0.16000838577747345, -0.1479605734348297, 0.06538866460323334, 0.05750541761517525, 0.19585907459259033, 0.1375383734703064, 0.08440050482749939, -0.045018039643764496, -0.06392695009708405, 0.20999985933303833, -0.18906761705875397, -0.2089858502149582, -0.17386488616466522, -0.2510957419872284, -0.06733976304531097, 0.16030070185661316, 0.14558127522468567, 0.08751697093248367, 0.3752126395702362, -0.39731743931770325, 0.40877896547317505, 0.10209570825099945, -0.18761193752288818, -0.07293243706226349, 0.27961409091949463, 0.31194889545440674, -0.12368655204772949, 0.017293626442551613, 0.06021735072135925, -0.3631989359855652, 0.15480121970176697, -0.00582902180030942, -0.15308155119419098, 0.31117042899131775, 0.24921944737434387, 0.213509663939476, 0.028561102226376534, -0.030066054314374924, -0.12557844817638397, 0.3412860035896301, -0.04581790789961815, -0.23195600509643555, 0.03466004505753517, 0.06417618691921234, -0.018640121445059776, 0.05012105032801628, 0.1467028111219406, 0.04820644482970238, 0.011933784931898117, 0.34454572200775146, 0.053172919899225235, -0.39620280265808105, -0.24618688225746155, 0.00965475756675005, -0.2709117531776428, -0.10671071708202362, 0.46989375352859497, 0.06271540373563766, 0.17319025099277496, -0.11634192615747452, 0.054422952234745026, -0.021463269367814064, 0.4439111649990082, -0.27010270953178406, -0.13767403364181519, -0.22637157142162323, 0.3973448574542999, 0.14404729008674622, -0.06629978120326996, -0.022070301696658134, -0.22292323410511017, -0.1700882613658905, 0.25035786628723145, -0.15270613133907318, 0.11221557855606079, 0.2542790472507477, 0.12865346670150757, 0.06547625362873077, -0.17533978819847107, -0.05381966754794121, -0.01225330401211977, 0.04368500038981438, 0.2954515218734741, 0.1476738005876541, -0.48073458671569824, 0.31145238876342773, -0.06469342857599258, 0.13906997442245483, -0.3240150511264801, 0.13700389862060547, 0.2567608058452606, 0.05776049196720123, -0.1543792337179184, -0.22930827736854553, 0.27663323283195496, -0.03204191103577614, -0.2976246178150177, 0.20037086308002472, 0.21769100427627563, 0.022820036858320236, -0.11031551659107208, -0.0281771719455719, -0.0659734308719635, 0.3583018183708191, -0.00542514817789197, -0.19243744015693665, 0.08339780569076538, -0.011599453166127205, -0.004088317509740591, -0.12744683027267456, 0.000904693326447159, 0.18874648213386536, -0.30881792306900024, -0.12235403805971146, -0.3719739317893982 ]
https://github.com/huggingface/datasets/issues/5354
Consider using "Sequence" instead of "List"
@avinashsai Are you still working on this? If not I would like to give it a try.
### Feature request Hi, please consider using `Sequence` type annotation instead of `List` in function arguments such as in [`Dataset.from_parquet()`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L1088). It leads to type checking errors, see below. **How to reproduce** ```py list_of_filenames = ["foo.parquet", "bar.parquet"] ds = Dataset.from_parquet(list_of_filenames) ``` **Expected mypy output:** ``` Success: no issues found ``` **Actual mypy output:** ```py test.py:19: error: Argument 1 to "from_parquet" of "Dataset" has incompatible type "List[str]"; expected "Union[Union[str, bytes, PathLike[Any]], List[Union[str, bytes, PathLike[Any]]]]" [arg-type] test.py:19: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance test.py:19: note: Consider using "Sequence" instead, which is covariant ``` **Env:** mypy 0.991, Python 3.10.0, datasets 2.7.1
17
Consider using "Sequence" instead of "List"
[ -0.02010325901210308, -0.15685904026031494, -0.4813176989555359, -0.06430881470441818, 0.12333500385284424, 0.028315294533967972, 0.21228674054145813, 0.16507092118263245, 0.2959001958370209, 0.2231140434741974, 0.2615659832954407, 0.07151017338037491, -0.2606341242790222, 0.0005356925539672375, -0.18638361990451813, -0.06951259821653366, 0.061587926000356674, 0.28856125473976135, 0.2192288637161255, 0.068381667137146, -0.20611178874969482, 0.017301242798566818, -0.11780056357383728, 0.042905159294605255, 0.23109684884548187, -0.1460050642490387, 0.06964094191789627, -0.06962913274765015, 0.023543447256088257, -0.44146400690078735, -0.2850584387779236, 0.27337002754211426, -0.09251920133829117, -0.07281748950481415, -0.00009307639993494377, -0.21502499282360077, 0.31457191705703735, 0.015903010964393616, -0.3047744631767273, 0.14783106744289398, -0.4630415737628937, -0.1533423215150833, 0.15082138776779175, -0.4146380126476288, -0.2754662334918976, 0.04563884064555168, 0.07546617835760117, -0.17707982659339905, 0.12577372789382935, 0.07224424183368683, 0.4495573937892914, -0.08695310354232788, -0.19892315566539764, -0.22065021097660065, 0.3396349549293518, -0.13599760830402374, -0.10500983893871307, -0.12027387320995331, 0.48516345024108887, -0.07148958742618561, 0.12657226622104645, 0.2017439901828766, -0.12521050870418549, 0.0036122766323387623, 0.3626961410045624, -0.08929521590471268, 0.29189449548721313, 0.06628912687301636, -0.15982715785503387, 0.08845733851194382, 0.1626751869916916, -0.049521706998348236, -0.019730543717741966, -0.14718583226203918, -0.1825428158044815, -0.45180585980415344, 0.0369810126721859, -0.15843698382377625, 0.026695558801293373, 0.11895778030157089, 0.19473783671855927, -0.033112555742263794, 0.06786719709634781, 0.2559530735015869, 0.06720320880413055, 0.25022536516189575, -0.06288119405508041, -0.11977128684520721, 0.1304633766412735, -0.135868638753891, 0.04803556576371193, -0.15878285467624664, 0.07856333255767822, -0.016179485246539116, 0.001482201274484396, -0.07919830828905106, 0.11888869106769562, 0.0819900706410408, 0.009634359739720821, 0.0999361127614975, 0.20894593000411987, 0.023612070828676224, 0.07312776148319244, -0.1473216414451599, -0.0004060083592776209, 0.09306636452674866, 0.1630232036113739, -0.15677222609519958, -0.11342150717973709, 0.2281518131494522, 0.25213709473609924, 0.10004831850528717, -0.04156797379255295, -0.027227239683270454, -0.052563779056072235, 0.2832496762275696, -0.19363217055797577, 0.1722627729177475, -0.3046538233757019, 0.19817854464054108, -0.21893833577632904, -0.2642233669757843, -0.034626662731170654, 0.295462042093277, -0.09466937929391861, -0.07553983479738235, 0.07818038761615753, 0.05551502853631973, 0.20590810477733612, 0.05824388936161995, -0.3430277705192566, 0.09125155955553055, -0.18974889814853668, -0.04505026340484619, -0.16975413262844086, -0.06746701896190643, 0.15237200260162354, -0.09676508605480194, 0.2169150561094284, -0.08340581506490707, 0.12079250067472458, -0.0763988122344017, 0.18526291847229004, -0.15038765966892242, -0.22710654139518738, 0.012364105321466923, 0.19912084937095642, -0.0481056347489357, -0.07112787663936615, 0.1313817799091339, 0.048530325293540955, -0.02517629787325859, 0.00609200494363904, 0.4005362391471863, 0.1982477754354477, 0.13565514981746674, 0.3889872431755066, -0.03966839239001274, 0.24200227856636047, 0.018690800294280052, 0.08389528840780258, 0.09430763125419617, -0.14319324493408203, 0.039500124752521515, -0.27394959330558777, 0.10720033198595047, -0.04312881827354431, -0.0430782213807106, 0.04381734877824783, 0.03244439885020256, 0.046671513468027115, 0.14437127113342285, -0.13638398051261902, 0.19302091002464294, -0.17249710857868195, 0.22886288166046143, 0.2196643054485321, -0.0488150529563427, -0.009226497262716293, -0.05117049813270569, -0.18315310776233673, -0.08921805769205093, 0.18165676295757294, 0.2062562257051468, 0.14795604348182678, -0.23324383795261383, 0.3831159174442291, -0.12479770183563232, 0.10825129598379135, 0.07144040614366531, -0.1899661421775818, -0.2876940071582794, 0.04353441670536995, -0.17466327548027039, -0.22076131403446198, 0.2723160982131958, -0.18815141916275024, 0.12557926774024963, 0.2274940311908722, -0.22032463550567627, -0.08125898241996765, 0.2626264989376068, 0.1692994087934494, 0.15554893016815186, -0.23108620941638947, -0.09065542370080948, -0.0647590309381485, -0.2418953776359558, -0.07926489412784576, 0.10881809145212173, 0.174579918384552, -0.1345832645893097, -0.33008211851119995, 0.14062434434890747, 0.0723128542304039, 0.28290536999702454, 0.41775447130203247, 0.20095627009868622, 0.0010609924793243408, -0.1543826311826706, 0.02475297823548317, -0.023407243192195892, -0.24158638715744019, -0.23173940181732178, -0.15997174382209778, 0.09468074887990952, -0.023366417735815048, 0.01527357753366232, 0.11409389227628708, 0.2734394073486328, 0.22679300606250763, 0.1327546387910843, 0.2170652151107788, -0.04038424789905548, 0.06085405871272087, -0.2956792712211609, -0.1374051421880722, 0.16819722950458527, 0.11180033534765244, -0.10562106966972351, -0.05099814012646675, 0.22859561443328857, -0.044609468430280685, 0.03876589611172676, -0.09556645154953003, 0.2870645523071289, 0.07033643871545792, 0.19251365959644318, -0.02251802571117878, -0.05891205370426178, 0.12544791400432587, 0.11165925115346909, -0.09228617697954178, -0.31663572788238525, 0.3294435739517212, 0.4142020344734192, 0.006626846268773079, -0.02409031242132187, -0.36949872970581055, 0.08842480182647705, 0.35079988837242126, 0.07774242013692856, 0.37861889600753784, 0.12786801159381866, 0.0721052959561348, -0.011237549595534801, 0.13635283708572388, -0.18814808130264282, 0.010477337054908276, 0.2637344300746918, -0.077582448720932, -0.22234946489334106, -0.004316261969506741, -0.20863589644432068, 0.15166223049163818, 0.14666748046875, 0.17226794362068176, 0.03997759893536568, 0.23374156653881073, -0.1645989716053009, 0.014569208957254887, -0.3152223825454712, -0.20448234677314758, -0.016735443845391273, -0.07664642482995987, 0.011393488384783268, -0.12427577376365662, -0.05301566421985626, 0.3025378882884979, -0.15021000802516937, -0.0291164368391037, -0.2797580659389496, 0.2686598598957062, 0.1494293510913849, -0.3347187340259552, 0.0997234433889389, 0.1381181925535202, 0.14855937659740448, 0.23890730738639832, 0.03690410032868385, -0.2328975647687912, -0.21577997505664825, 0.163391575217247, 0.3449445962905884, -0.08747986704111099, -0.029132729396224022, 0.2086479216814041, 0.035958871245384216, -0.2688171863555908, -0.2869557738304138, -0.05361710861325264, 0.22489267587661743, 0.0605839304625988, -0.16584759950637817, 0.2085421085357666, 0.18647922575473785, -0.1350679099559784, -0.2980719208717346, -0.03459032624959946, 0.28784289956092834, -0.14465303719043732, -0.053785134106874466, 0.0793742761015892, 0.05751706659793854, -0.09601502120494843, -0.051451168954372406, -0.07454705238342285, -0.37190112471580505, 0.33675888180732727, 0.2783108353614807, 0.18220427632331848, 0.1884712427854538, -0.06437233835458755, 0.02808832935988903, -0.01478523202240467, 0.2315492331981659, -0.1502712368965149, 0.2148197591304779, 0.11373531073331833, -0.09590620547533035, -0.237092524766922, -0.18721146881580353, -0.38945847749710083, 0.05272490158677101, -0.11628800630569458, -0.05733605474233627, -0.26492130756378174, 0.06551560759544373, -0.19083642959594727, 0.12678931653499603, -0.12822435796260834, 0.12406530231237411, 0.006725571118295193, -0.4685618281364441, -0.04271339252591133, 0.08458232879638672, 0.21694284677505493, -0.15786904096603394, 0.09397361427545547, 0.09464181214570999, 0.14765219390392303, -0.16557614505290985, 0.2784755825996399, 0.1497749239206314, 0.03650226071476936, 0.1923057734966278, -0.07657542079687119, -0.06690344959497452, -0.22142638266086578, -0.0312319565564394, -0.37262487411499023, 0.08978752791881561, -0.14968574047088623, 0.2709098756313324, -0.1806054711341858, -0.12598292529582977, 0.16537486016750336, 0.40042009949684143, -0.0763985812664032, -0.11744452267885208, -0.011976645328104496, 0.11821633577346802, 0.30894050002098083, 0.15421275794506073, -0.0838400200009346, -0.01356668584048748, -0.10069867968559265, -0.11713991314172745, -0.028420230373740196, 0.03459318354725838, -0.3357577919960022, -0.4418849050998688, 0.10542871057987213, -0.1362779289484024, 0.1460767388343811, 0.3873714506626129, 0.14790338277816772, -0.11169411987066269, -0.4278515875339508, -0.050305671989917755, 0.001089419354684651, 0.19513705372810364, 0.0008126155589707196, -0.21079479157924652, 0.17447683215141296, -0.03104933723807335, 0.3113623857498169, 0.2465634047985077, -0.18617205321788788, -0.14787140488624573, 0.1257866472005844, 0.017132064327597618, -0.32210537791252136, -0.06954754889011383, -0.03373933583498001, 0.02316785231232643, -0.0851336345076561, -0.058806922286748886, -0.2584642171859741, -0.06446748226881027, -0.44518205523490906, -0.023338939994573593, 0.1803971529006958, 0.013780668377876282, 0.05409397929906845, -0.1669291853904724, 0.03229374438524246, -0.2995699346065521, -0.0001564270642120391, -0.2653385400772095, 0.13331162929534912, 0.0321798101067543, -0.1187131330370903, -0.09345002472400665, 0.10567350685596466, -0.018723640590906143, -0.0852985605597496, -0.16268140077590942, 0.05287761241197586, 0.14812660217285156, -0.2745762765407562, -0.035808954387903214, 0.24894137680530548, -0.028869494795799255, 0.22159653902053833, 0.004078701138496399, 0.2201952338218689, -0.11939413100481033, -0.1735149621963501, 0.10465455055236816, -0.07247143238782883, -0.11948120594024658, -0.24626626074314117, 0.09102262556552887, 0.04015817120671272, -0.15204526484012604, 0.09326353669166565, -0.12551596760749817, -0.20058760046958923, -0.08988264948129654, 0.26725488901138306, 0.9239917397499084, -0.16505734622478485, 0.1435791403055191, 0.20588693022727966, -0.07852233201265335, 0.34093236923217773, 0.08047400414943695, 0.1533178836107254, -0.2782311737537384, -0.2747684121131897, -0.005188443697988987, -0.10916490852832794, 0.030856916680932045, 0.21307581663131714, -0.2580263614654541, 0.19602610170841217, -0.11945457011461258, 0.0536513477563858, -0.1263233870267868, -0.12569986283779144, 0.019904911518096924, -0.16462014615535736, -0.3472287952899933, 0.3266729712486267, 0.1756494790315628, -0.14093945920467377, -0.1600389927625656, -0.09835582971572876, -0.08810433000326157, -0.16895924508571625, 0.09884673357009888, -0.15031081438064575, -0.1780358850955963, -0.061250656843185425, 0.04364524781703949, -0.2517230212688446, -0.05670695751905441, -0.13053488731384277, 0.16149215400218964, 0.10746944695711136, -0.09150867164134979, -0.2882513403892517, 0.05198174715042114, 0.11672291904687881, -0.16544431447982788, -0.14620932936668396, 0.04861360415816307, -0.10249655693769455, 0.265816867351532, 0.09712541848421097, -0.10297038406133652, -0.3882141411304474, -0.23813241720199585, 0.38929662108421326, 0.24857163429260254, -0.240288645029068, -0.24455513060092926, 0.3244796395301819, -0.21959972381591797, -0.12776383757591248, 0.3897331655025482, 0.06267458200454712, 0.053948163986206055, -0.2078550010919571, 0.13124564290046692, 0.16123954951763153, -0.16112270951271057, 0.018199007958173752, 0.28732576966285706, -0.2918155789375305, 0.06259426474571228, 0.11477173119783401, -0.3636978566646576, -0.4826134443283081, -0.1814752072095871, 0.10188830643892288, -0.18362796306610107, 0.1977262645959854, -0.1320372372865677, -0.3604383170604706, -0.09042799472808838, 0.5588863492012024, -0.00016378109285142273, 0.33773913979530334, -0.14333856105804443, 0.2679125964641571, -0.2524040937423706, 0.2685353457927704, 0.045690543949604034, 0.19825147092342377, -0.11150586605072021, 0.061186544597148895, -0.22356431186199188, -0.3035183846950531, -0.5588242411613464, -0.33148708939552307, -0.3616318106651306, 0.10387220233678818, 0.04997970536351204, -0.18723119795322418, -0.005626222118735313, 0.2693925201892853, 0.4707494080066681, 0.20786800980567932, -0.1689276248216629, -0.5615010261535645, 0.17832960188388824, 0.03028002940118313, 0.05006400868296623, -0.02448073774576187, 0.07431918382644653, 0.07622826099395752, -0.032147251069545746, -0.12065038084983826, -0.31338486075401306, -0.13422568142414093, 0.1236773356795311, -0.024723395705223083, 0.3341771960258484, 0.17020849883556366, -0.015336530283093452, -0.10471729189157486, -0.05481475591659546, 0.238359272480011, -0.15357071161270142, 0.01315553579479456, -0.20841577649116516, -0.03472385182976723, -0.09588274359703064, 0.30047255754470825, 0.13749533891677856, 0.1872325837612152, 0.08239667862653732, 0.028363706544041634, -0.3733551800251007, 0.3068995773792267, 0.2916032373905182, -0.07196441292762756, -0.28214937448501587, -0.1169448047876358, 0.0692976713180542, 0.5059606432914734, -0.272103488445282, -0.20891550183296204, -0.12565752863883972, -0.14004945755004883, 0.3760237991809845, 0.5426071286201477, 0.05512057989835739, -0.1497189849615097, 0.3744884729385376, 0.03669511154294014, -0.03165246173739433, -0.40044575929641724, -0.04359836131334305, 0.3214031457901001, 0.2954813838005066, 0.11427494138479233, 0.10115163773298264, 0.05022555962204933, 0.22387361526489258, 0.21080352365970612, 0.14923998713493347, 0.20322178304195404, 0.5018290877342224, 0.22407084703445435, 0.16012558341026306, 0.09989765286445618, 0.14798453450202942, 0.33613377809524536, 0.12962481379508972, 0.07800551503896713, 0.24695917963981628, -0.23431947827339172, 0.14963898062705994, 0.07492628693580627, -0.07948611676692963, 0.07817517966032028, 0.026296304538846016, -0.023505965247750282, 0.041518889367580414, -0.08842378854751587, -0.10100222378969193, -0.27588126063346863, 0.06667877733707428, -0.007801832631230354, 0.23787103593349457, -0.13445334136486053, 0.44108861684799194, -0.18730178475379944, 0.08378808200359344, 0.0231255404651165, 0.16000838577747345, -0.1479605734348297, 0.06538866460323334, 0.05750541761517525, 0.19585907459259033, 0.1375383734703064, 0.08440050482749939, -0.045018039643764496, -0.06392695009708405, 0.20999985933303833, -0.18906761705875397, -0.2089858502149582, -0.17386488616466522, -0.2510957419872284, -0.06733976304531097, 0.16030070185661316, 0.14558127522468567, 0.08751697093248367, 0.3752126395702362, -0.39731743931770325, 0.40877896547317505, 0.10209570825099945, -0.18761193752288818, -0.07293243706226349, 0.27961409091949463, 0.31194889545440674, -0.12368655204772949, 0.017293626442551613, 0.06021735072135925, -0.3631989359855652, 0.15480121970176697, -0.00582902180030942, -0.15308155119419098, 0.31117042899131775, 0.24921944737434387, 0.213509663939476, 0.028561102226376534, -0.030066054314374924, -0.12557844817638397, 0.3412860035896301, -0.04581790789961815, -0.23195600509643555, 0.03466004505753517, 0.06417618691921234, -0.018640121445059776, 0.05012105032801628, 0.1467028111219406, 0.04820644482970238, 0.011933784931898117, 0.34454572200775146, 0.053172919899225235, -0.39620280265808105, -0.24618688225746155, 0.00965475756675005, -0.2709117531776428, -0.10671071708202362, 0.46989375352859497, 0.06271540373563766, 0.17319025099277496, -0.11634192615747452, 0.054422952234745026, -0.021463269367814064, 0.4439111649990082, -0.27010270953178406, -0.13767403364181519, -0.22637157142162323, 0.3973448574542999, 0.14404729008674622, -0.06629978120326996, -0.022070301696658134, -0.22292323410511017, -0.1700882613658905, 0.25035786628723145, -0.15270613133907318, 0.11221557855606079, 0.2542790472507477, 0.12865346670150757, 0.06547625362873077, -0.17533978819847107, -0.05381966754794121, -0.01225330401211977, 0.04368500038981438, 0.2954515218734741, 0.1476738005876541, -0.48073458671569824, 0.31145238876342773, -0.06469342857599258, 0.13906997442245483, -0.3240150511264801, 0.13700389862060547, 0.2567608058452606, 0.05776049196720123, -0.1543792337179184, -0.22930827736854553, 0.27663323283195496, -0.03204191103577614, -0.2976246178150177, 0.20037086308002472, 0.21769100427627563, 0.022820036858320236, -0.11031551659107208, -0.0281771719455719, -0.0659734308719635, 0.3583018183708191, -0.00542514817789197, -0.19243744015693665, 0.08339780569076538, -0.011599453166127205, -0.004088317509740591, -0.12744683027267456, 0.000904693326447159, 0.18874648213386536, -0.30881792306900024, -0.12235403805971146, -0.3719739317893982 ]